Restructure backend and frontend modules; add story, library, and editor schema migrations. Support editable automatic production, manual confirmation modes, account and user lifecycle management, compact container scrolling, consistent forms, and per-task result previews. Update inference and TTS scheduling, deployment guidance, and regression coverage; remove obsolete standalone pages and temporary acceptance artifacts.
26 lines
1003 B
Python
26 lines
1003 B
Python
async def test_maintenance_intent_pauses_existing_upstream_queue_and_survives_toggles(system):
|
|
response = await system.client.post(
|
|
"/api/jobs",
|
|
json={"task_type": "image.generate", "input": {"prompt": "hold existing queue"}},
|
|
)
|
|
assert response.status_code == 202
|
|
coordinator = system.app.state.coordinator
|
|
await coordinator.run_once(force=True)
|
|
controls = []
|
|
|
|
async def control(id, desired, command_id):
|
|
controls.append((desired, command_id))
|
|
return dict(system.provider.remote[id])
|
|
|
|
system.provider.control = control
|
|
marker = system.settings.state_root / "maintenance"
|
|
for held in (True, False, True, False):
|
|
if held:
|
|
marker.write_text("hold")
|
|
else:
|
|
marker.unlink()
|
|
await coordinator.run_once(force=True)
|
|
assert [state for state, _ in controls] == ["pause", "run", "pause", "run"]
|
|
assert len({key for _, key in controls}) == 4
|
|
assert len(system.provider.accepted) == 1
|