Close WP-0035 and count declared sink evidence in automation status
The status surface queried only four fixed State Hub event types, so bounded-operation evidence (Forgejo prune, CNPG, SBOM) showed evidence=0 despite successful runs. Default queries now include every state-hub-progress event type the definitions' report/evidence sinks declare. Three natural prune fires (2026-09-06/13/20) supply the last missing bounded-operation evidence, so ACTIVITY-WP-0035-T08 and the workplan finish. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 241500@bnt-lap001 Assistant-Session: 4a77db80-b523-4a03-83c4-e3da08755c30
This commit is contained in:
parent
6b3c4222dd
commit
0c403d2239
3 changed files with 87 additions and 8 deletions
|
|
@ -323,3 +323,38 @@ def test_inventory_cli_emits_json(monkeypatch, capsys) -> None:
|
|||
assert exit_code == 0
|
||||
assert payload["mode"] == "automation-inventory"
|
||||
assert payload["automations"][0]["name"] == "Daily Check"
|
||||
|
||||
|
||||
def test_default_progress_event_types_include_declared_sinks() -> None:
|
||||
definitions = [
|
||||
{
|
||||
"instructions": [{"report_sinks": [
|
||||
{"type": "state-hub-progress", "event_type": "sbom_catchup"},
|
||||
{"type": "working-memory"},
|
||||
]}],
|
||||
"context_sources": [
|
||||
{"type": "shell", "params": {"evidence_sinks": [
|
||||
{"type": "state-hub-progress", "event_type": "forgejo_package_prune"},
|
||||
]}},
|
||||
{"type": "shell", "params": {"evidence_sinks": [
|
||||
{"type": "state-hub-progress", "event_type": "daily_triage"},
|
||||
]}},
|
||||
],
|
||||
},
|
||||
]
|
||||
args = status.parse_args([])
|
||||
|
||||
event_types = status.progress_event_types(args, definitions)
|
||||
|
||||
assert "forgejo_package_prune" in event_types
|
||||
assert "sbom_catchup" in event_types
|
||||
assert event_types.count("daily_triage") == 1
|
||||
|
||||
|
||||
def test_explicit_progress_event_types_ignore_declared_sinks() -> None:
|
||||
definitions = [{"context_sources": [{"params": {"evidence_sinks": [
|
||||
{"type": "state-hub-progress", "event_type": "forgejo_package_prune"},
|
||||
]}}]}]
|
||||
args = status.parse_args(["--progress-event-type", "daily_triage"])
|
||||
|
||||
assert status.progress_event_types(args, definitions) == ["daily_triage"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue