prep docs and service updates
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled

This commit is contained in:
master
2025-11-21 06:56:36 +00:00
parent ca35db9ef4
commit d519782a8f
242 changed files with 17293 additions and 13367 deletions

View File

@@ -0,0 +1,22 @@
# Violation Events Prep — PREP-POLICY-ENGINE-38-201-VIOLATION-EVENTS-DE
Status: Draft (2025-11-20)
Owners: Policy Guild
Scope: Define violation event payloads emitted after snapshot stream (35-201).
## Dependencies
- Snapshot API/stream shape (35-201).
- Severity fusion rules (40-001) to know which fields to emit.
## Draft event
- `event_type`: `policy.violation.detected`
- Fields: `tenant_id`, `snapshot_id`, `policy_profile_hash`, `component_purl`, `advisory_id`, `violation_code`, `severity`, `status`, `trace_ref`, `occurred_at`, `event_id` (hash of snapshot_id + component_purl + advisory_id).
- Transport: NATS subject `policy.violation.detected`; durable stream; idempotency via `event_id`.
- Metrics: `policy_violation_events_total{tenant,violation_code}`.
## Acceptance
- Draft schema at `docs/modules/policy/schemas/policy-violation-event@draft.json` and sample at `docs/modules/policy/samples/policy-violation-event@draft.json`.
- Confirm subject + retention with Scheduler/Notify.
## Handoff
Use this doc as the prep artefact for PREP-POLICY-ENGINE-38-201-VIOLATION-EVENTS-DE. Update once snapshot stream and fusion rules are frozen; then unblock implementation.