STATE-WP-0069 T03: normalize MCP progress events to workplan_id
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 42s

_emit_progress_event strips legacy workstream_id from POST /progress/
payloads. Task and decision side-effect events now set workplan_id
explicitly so automatic progress logging stays workplan-first.
This commit is contained in:
tegwick 2026-07-08 22:34:56 +02:00
parent 7b2348ef90
commit 242dd25253
4 changed files with 47 additions and 7 deletions

View file

@ -5,6 +5,28 @@ import json
import mcp_server.server as server
def test_normalize_progress_body_prefers_workplan_id_only() -> None:
body = server._normalize_progress_body({
"workplan_id": "wp-1",
"workstream_id": "wp-1",
"event_type": "note",
"summary": "test",
})
assert body == {
"workplan_id": "wp-1",
"event_type": "note",
"summary": "test",
}
legacy_only = server._normalize_progress_body({
"workstream_id": "wp-legacy",
"event_type": "note",
"summary": "legacy",
})
assert legacy_only["workplan_id"] == "wp-legacy"
assert "workstream_id" not in legacy_only
def test_legacy_mcp_deprecation_payload_names_replacement() -> None:
payload = server._legacy_mcp_deprecation(tool="create_workstream")
assert payload["replacement"] == "create_workplan"