Make daily triage ActivityDefinition executable

This commit is contained in:
2026-05-19 19:09:42 +02:00
parent a27e51b83a
commit 350c11c4f9
2 changed files with 74 additions and 23 deletions

View File

@@ -210,7 +210,7 @@ note and one State Hub progress event, and a retry does not duplicate either.
```task
id: CUST-WP-0045-T05
status: todo
status: done
priority: medium
depends_on: [CUST-WP-0045-T02, CUST-WP-0045-T03, CUST-WP-0045-T04]
state_hub_task_id: "0c6d54ec-7ed1-4e80-9cfa-ccb914e65fbf"
@@ -337,12 +337,25 @@ canonical Custodian `canon/` and `workplans/` paths, use run-id/date based
idempotency, and State Hub progress posting deduplicates by activity run id and
instruction id before posting.
T05 is complete. The daily triage ActivityDefinition now uses a single trusted
scalar `context.daily_triage_digest` instead of raw State Hub JSON. The digest
is built in activity-core from safe identifiers, counts, statuses, priority
fields, health labels, and shortened titles, while excluding task descriptions,
message bodies, and other free-text command surfaces. The digest also carries a
`deterministic_scoring` extension marker so a later high-criticality path can
move especially high-gain/high-effort candidate scoring into code without
changing the ActivityDefinition contract.
Verification:
- `uv run pytest tests/test_state_hub_context_resolver.py -q`:
5 passed
6 passed
- activity-core parser validation with
`ACTIVITY_DEFINITION_DIRS=/home/worsch/the-custodian`:
parsed the daily triage definition, cron trigger, trusted instruction, and
report sinks
- `uv run pytest -q` in activity-core:
106 passed, 1 skipped
107 passed, 1 skipped
## Acceptance Criteria