fix(retirement): close projection and launch contract gaps
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Multi-Context Image / build-and-push (push) Successful in 23s

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a02b7c-1c49-76a0-955a-49e7b3ddfc0d
This commit is contained in:
tegwick 2026-08-23 00:52:18 +02:00
parent c43266f626
commit b0e1af24f9
13 changed files with 1717 additions and 50 deletions

View file

@ -1006,7 +1006,7 @@ class TestReconciliationEndpoints:
class TestExecutionQueueEndpoints:
async def test_execution_semantics_separates_state_hub_and_activity_core(self, client):
async def test_execution_semantics_retires_workplan_launch_pickup(self, client):
r = await client.get("/execution/semantics")
assert r.status_code == 200
@ -1014,8 +1014,15 @@ class TestExecutionQueueEndpoints:
assert "queued" in body["execution_states"]
assert "immediate" in body["launch_modes"]
assert "parallel" in body["concurrency_modes"]
assert any("launch requests" in item for item in body["state_hub_responsibility"])
assert any("dispatch" in item for item in body["activity_core_responsibility"])
assert body["launch_requests_accepted"] is False
assert "authoritative repository file" in body["replacements"][
"POST /execution/launch-requests"
]
assert any(
"reject new workplan launch" in item
for item in body["state_hub_responsibility"]
)
assert any("do not consume" in item for item in body["activity_core_responsibility"])
async def test_execution_intent_update_does_not_change_lifecycle_status(self, client):
await _create_domain(client)
@ -1107,7 +1114,7 @@ class TestExecutionQueueEndpoints:
assert rows[2]["eligible"] is False
assert rows[2]["blocked_by_workstream_ids"] == [dependency["id"]]
async def test_launch_request_records_handoff_and_updates_execution_intent(self, client):
async def test_launch_request_is_gone_and_does_not_update_execution_intent(self, client):
await _create_domain(client)
topic = await _create_topic(client)
ws = await _create_workstream(client, topic["id"], status="ready")
@ -1124,21 +1131,18 @@ class TestExecutionQueueEndpoints:
"notes": "start now",
})
assert r.status_code == 201, r.text
body = r.json()
assert body["workstream_id"] == ws["id"]
assert body["launch_mode"] == "immediate"
assert body["immediate_pickup"] is True
assert body["status"] == "requested"
assert r.status_code == 410, r.text
assert "no consumer picks up these rows" in r.json()["detail"]
assert "repo file queue" in r.headers["x-statehub-replacement"]
r = await client.get(f"/workplans/{ws['id']}")
updated = r.json()
assert updated["status"] == "ready"
assert updated["execution_state"] == "launching"
assert updated["launch_mode"] == "immediate"
assert updated["execution_state"] == "manual"
assert updated["launch_mode"] == "manual"
r = await client.get(f"/execution/launch-requests?workstream_id={ws['id']}")
assert len(r.json()) == 1
assert r.json() == []
def _fabric_graph_export(generated_at="2026-05-23T12:00:00Z", extra_node=False):