feat(terminology): align completion events to State Hub subjects (CUST-WP-0055 T03)
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 3s
Build and Publish Container Image / build-and-push (push) Successful in 8s

Add org.statehub.workplan.completed as the preferred catalog type, document
org.statehub.workstream.completed as legacy, and deprecate the custodian-era
org.workstream.completed type with a 2026-12-31 sunset date.
This commit is contained in:
tegwick 2026-07-08 16:08:32 +02:00
parent a15e4095d8
commit 63cbe7145e
4 changed files with 172 additions and 14 deletions

View file

@ -0,0 +1,34 @@
from __future__ import annotations
from pathlib import Path
from activity_core.event_type_registry import parse_event_type_file
_EVENT_DIR = Path(__file__).parent.parent / "event-types"
def test_preferred_workplan_completion_event_is_active() -> None:
event_type = parse_event_type_file(_EVENT_DIR / "org.statehub.workplan.completed.md")
assert event_type.type_id == "org.statehub.workplan.completed"
assert event_type.status == "active"
assert event_type.publisher == "state-hub"
assert event_type.attribute_schema["workplan_id"]["required"] is True
assert "preferred" in event_type.raw_md.lower()
def test_legacy_statehub_completion_event_points_to_replacement() -> None:
event_type = parse_event_type_file(_EVENT_DIR / "org.statehub.workstream.completed.md")
assert event_type.type_id == "org.statehub.workstream.completed"
assert event_type.status == "legacy"
assert "org.statehub.workplan.completed" in event_type.raw_md
def test_custodian_catalog_completion_event_is_deprecated() -> None:
event_type = parse_event_type_file(_EVENT_DIR / "org.workstream.completed.md")
assert event_type.type_id == "org.workstream.completed"
assert event_type.status == "deprecated"
assert "org.statehub.workplan.completed" in event_type.raw_md
assert "2026-12-31" in event_type.raw_md