CUST-WP-0055 T05: workplan-first progress scope in sinks and resolvers

Prefer workplan_id in State Hub progress writes while dual-writing
workstream_id for wire-compat. Extend schedule_health, evidence/report
sinks, phase5 checks, k8s triage prose, and SCOPE terminology.
This commit is contained in:
tegwick 2026-07-08 20:00:35 +02:00
parent 7947961ed4
commit 69fe69041f
12 changed files with 135 additions and 30 deletions

View file

@ -139,6 +139,7 @@ def post_missed_fire_alert(
state_hub_url: str | None = None,
author: str = "activity-core",
topic_id: str | None = None,
workplan_id: str | None = None,
workstream_id: str | None = None,
timeout_seconds: float = 10.0,
) -> dict[str, Any]:
@ -174,8 +175,10 @@ def post_missed_fire_alert(
}
if topic_id:
body["topic_id"] = topic_id
if workstream_id:
body["workstream_id"] = workstream_id
scope_id = workplan_id or workstream_id
if scope_id:
body["workplan_id"] = scope_id
body["workstream_id"] = scope_id
# Dedup repeated alerts for the same missed window (same schedule + last fire).
last_fired = health.last_fired_at.isoformat() if health.last_fired_at else "none"