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 @@
# Worker Implementation Prep — PREP-POLICY-ENGINE-33-101-WORKER-IMPLEMENTATI
Status: Draft (2025-11-20)
Owners: Policy Guild
Scope: Define worker execution contract that consumes orchestrator jobs (32-101).
## Dependencies
- Job schema from 32-101.
- Overlay + batch context schemas (30-001, 31-002).
## Draft execution contract
- Worker input: job document with `context_id`, `batch_items`, `policy_profile_hash`, `callbacks`.
- Output record: `{job_id, worker_id, started_at, completed_at, results[]}` where each result mirrors change-event format `{component_purl, advisory_id, status, trace_ref}`.
- Idempotency: result hash over sorted results; retries compare hash and skip duplicate emission.
- Metrics: `policy_worker_jobs_total{result}`, `policy_worker_duration_seconds` (histogram), `policy_worker_results_total{status}`.
## Acceptance
- Save schema draft at `docs/modules/policy/schemas/policy-worker-result@draft.json` and sample result at `docs/modules/policy/samples/policy-worker-result@draft.json`.
- Confirm dedupe strategy with Scheduler/Orchestrator.
## Handoff
Prep artefact for PREP-POLICY-ENGINE-33-101-WORKER-IMPLEMENTATI. Finalize once job schema is fixed and dedupe/metric names are agreed.