Preserve preview harness, editor, email and task improvements

Snapshot current maintainer-preview application changes and regression fixtures for integration into lab. Excludes local runtime data, evaluation outputs and source backups. Focused Python regression selection: 140 passed; full suite not certified.
This commit is contained in:
pewdiepie-archdaemon
2026-10-01 01:34:26 +00:00
parent 86f376ac3a
commit 2e8413a54a
170 changed files with 11010 additions and 1094 deletions
+24
View File
@@ -28,3 +28,27 @@ def test_done_is_published_only_after_generator_cleanup():
agent_runs._RUNS.pop(session_id, None)
asyncio.run(scenario())
def test_finish_request_is_bound_to_the_exact_active_run():
async def scenario():
session_id = 'finish-editor-run-test'
gate = asyncio.Event()
async def stream():
await gate.wait()
yield 'data: [DONE]\n\n'
run = agent_runs.start(session_id, stream())
await asyncio.sleep(0)
assert not agent_runs.request_finish(session_id, 'stale-run-id')
assert not agent_runs.should_finish(session_id)
assert agent_runs.request_finish(session_id, run.run_id)
assert agent_runs.should_finish(session_id)
gate.set()
async for _ in agent_runs.subscribe(session_id, run):
pass
assert not agent_runs.should_finish(session_id)
agent_runs._RUNS.pop(session_id, None)
asyncio.run(scenario())