1.4 KiB
1.4 KiB
Change Events Prep — PREP-POLICY-ENGINE-30-003-CHANGE-EVENTS-DEPEN
Status: Draft (2025-11-20) Owners: Policy Guild · Scheduler Guild · Cartographer Guild Scope: Define the change-event payload and scheduling expectations following simulation bridge (30-002).
Dependencies
- Simulation bridge output schema (30-002).
- Scheduler delivery channel (NATS/Redis) subject names and dedupe policy.
Draft event envelope
event_type:policy.overlay.change- Fields:
tenant_id,overlay_hash,policy_profile_hash,simulation_id?,changes[](array of{component_purl, advisory_id, prev_status, new_status, severity_delta?, trace_ref}),occurred_at(UTC),event_id(deterministic ID = hash of overlay_hash + timestamp). - Transport: propose NATS subject
policy.overlay.changewith durable stream; idempotency key =event_id. - Observability: counter
policy_overlay_change_total{tenant,result}; log template includes overlay_hash, event_id, change_count.
Acceptance to close PREP
- Subject/stream names confirmed with Scheduler.
- JSON schema stub saved at
docs/modules/policy/schemas/policy-overlay-change@draft.json. - Sample event at
docs/modules/policy/samples/policy-overlay-change@draft.json.
Handoff
This document serves as the prep artefact for PREP-POLICY-ENGINE-30-003-CHANGE-EVENTS-DEPEN. Update once 30-002 finalizes schema/subject; then unblock the implementation task.