feat(WP-0003c): context adapters, first ActivityDefinition, full test suite

T51: ContextResolver ABC + CONTEXT_RESOLVER_REGISTRY; resolve_context activity
updated to dispatch via registry (warns + binds {} on failure, never aborts run).
T52: RepoScopingContextResolver with 5-min in-process cache.
T53: StateHubContextResolver (no cache) for domain_summary and repo_sbom_status.
T54: activity-definitions/weekly-sbom-staleness.md (Monday 09:00 Berlin, cron
trigger, flag-stale-sbom rule at >30 days) + tasks/sbom-rescan.md template.
T55: 51 parametrized evaluator tests — all whitelisted operators, unsafe
expression rejection, empty condition, missing attribute, nested context access.
T56: 15 executor safety tests — UntrustedFieldError, object-type rejection,
injection fixture, LLM retry on bad JSON, review_required field.
T57: 6 integration tests — parses real definition, evaluates rule per-repo
(stale/fresh boundary), emits via NullSink, verifies spawn log entries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-14 23:24:48 +02:00
parent fd8d0827d7
commit 827ef9c1a0
12 changed files with 839 additions and 27 deletions

View File

@@ -3,7 +3,7 @@ id: custodian-WP-0003c
type: workplan
domain: custodian
repo: activity-core
status: active
status: done
state_hub_workstream_id: b4eb45a9-69e3-4ab0-b00c-67a53c3117c5
split_from: custodian-WP-0003
split_part: 3 of 3
@@ -13,37 +13,37 @@ depends_on:
tasks:
- id: T51
title: Define context resolver adapter interface
status: todo
status: done
priority: medium
state_hub_task_id: dac18c7a-a663-4876-ba41-7378094148ab
- id: T52
title: Implement repo-scoping context adapter
status: todo
status: done
priority: medium
state_hub_task_id: e4ba0c93-0940-4d57-aeb6-80d20749ee2b
- id: T53
title: Implement state-hub context adapter
status: todo
status: done
priority: medium
state_hub_task_id: 24a877f0-1653-4cf2-9e4f-50ed53cbc34c
- id: T54
title: Write first real ActivityDefinition — weekly SBOM staleness
status: todo
status: done
priority: medium
state_hub_task_id: c7f5f5c3-2958-4f0c-ab3a-0b0a0374bf67
- id: T55
title: Rule evaluator unit tests
status: todo
status: done
priority: high
state_hub_task_id: 95a5edb2-a299-45e1-a7a9-48ecbbce13eb
- id: T56
title: Instruction safety tests
status: todo
status: done
priority: high
state_hub_task_id: 7cbcc6db-7c07-4b37-8fd1-dc0a87d93173
- id: T57
title: Integration test — fixture event → rule → spawn log → IssueSink
status: todo
status: done
priority: high
state_hub_task_id: 73bf70ef-7969-434d-99d2-7a5787169d94
created: "2026-05-14"