fix(runtime): emit workplan_id in progress posts (STATE-WP-0070 T04)
This commit is contained in:
parent
99f25b6427
commit
b8dac443f3
3 changed files with 7 additions and 4 deletions
|
|
@ -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/",
|
||||
|
|
|
|||
|
|
@ -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`: `<custodian workplan uuid when known>`
|
||||
- `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
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue