Earned auto-apply (fire + observability + UI), retrain cadences, Explore arrow-nav #143
@@ -117,7 +117,11 @@ def test_sweep_skips_ungraduated_head(db_sync):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_auto_apply_disabled_blocks_real_run(client, db):
|
||||
# head_auto_apply_enabled defaults False → a real sweep is refused (400).
|
||||
# With the master switch OFF, a real sweep is refused (400). (It defaults ON
|
||||
# now — opt-out — so the test disables it explicitly to exercise this path.)
|
||||
s = (await db.execute(select(MLSettings).where(MLSettings.id == 1))).scalar_one()
|
||||
s.head_auto_apply_enabled = False
|
||||
await db.commit()
|
||||
resp = await client.post("/api/heads/auto-apply", json={"dry_run": False})
|
||||
assert resp.status_code == 400
|
||||
assert (await resp.get_json())["error"] == "auto_apply_disabled"
|
||||
|
||||
Reference in New Issue
Block a user