diff --git a/runtime/actions.py b/runtime/actions.py index 117ea30..29a349f 100644 --- a/runtime/actions.py +++ b/runtime/actions.py @@ -93,8 +93,9 @@ def execute( "summary": summary, "event_type": event.get("event_type", "note"), } - if event.get("workstream_id"): - payload["workstream_id"] = event["workstream_id"] + workplan_id = event.get("workplan_id") or event.get("workstream_id") + if workplan_id: + payload["workplan_id"] = workplan_id try: resp = httpx.post( api_base.rstrip("/") + "/progress/", diff --git a/runtime/prompts/daily_statehub_wsgi_triage.md b/runtime/prompts/daily_statehub_wsgi_triage.md index 692fb4b..02e1a41 100644 --- a/runtime/prompts/daily_statehub_wsgi_triage.md +++ b/runtime/prompts/daily_statehub_wsgi_triage.md @@ -230,7 +230,7 @@ source: daily-state-hub-wsjf-triage When the State Hub API is reachable, append one progress event for the review: - `topic_id`: Custodian topic id when known -- `workstream_id`: `99993845-be6a-401d-be98-f8107014abed` +- `workplan_id`: `` - `event_type`: `daily_triage` - `summary`: one sentence summarizing the top recommendation and loose-end count - `detail`: include top three recommendations, input health, and any human gates diff --git a/runtime/tests/test_actions.py b/runtime/tests/test_actions.py index 9d7d4db..b8551e4 100644 --- a/runtime/tests/test_actions.py +++ b/runtime/tests/test_actions.py @@ -102,7 +102,7 @@ class TestExecuteLive: def test_posts_progress_event(self): plan = { "progress_events": [ - {"summary": "session note", "workstream_id": "ws-1", "event_type": "note"} + {"summary": "session note", "workplan_id": "ws-1", "event_type": "note"} ], "tasks_to_update": [], "tasks_to_flag": [], @@ -113,6 +113,8 @@ class TestExecuteLive: mock_post.assert_called_once() payload = mock_post.call_args[1]["json"] assert payload["summary"] == "session note" + assert payload["workplan_id"] == "ws-1" + assert "workstream_id" not in payload def test_patches_task_status(self): plan = {