1.4 KiB
1.4 KiB
Policy Engine · Simulation Bridge Prep (POLICY-ENGINE-30-002)
- Date: 2025-11-20
- Depends on: Overlay projection (30-001)
- Working directory:
src/Policy/StellaOps.Policy.Engine
Simulation request schema
tenant(string)rules[](string) — ruleIds to simulate; if empty, simulate all active rules.overlays[](optional) — inlineOverlayProjectionobjects to test hypothetical changes without persisting.paths[]— array ofPathScopeinputs.mode(preview|whatif) —previewreturns decisions only;whatifalso returns delta vs current overlays.seed(int, optional) — for deterministic randomization if simulations sample paths.
Response schema
decisions[]— per PathScope result:pathScope,decision,reasons[],ruleId,version,effectiveAt.deltas[](only forwhatif) — entries withruleId,baselineDecision,candidateDecision,diffReason.metrics— echo of counters:evaluated,allowed,denied,warned,deferredfor quick UI.
Determinism rules
- When
seedabsent, use fixed seed0xC0DEC0DEfor any randomized sampling. - Responses ordered by input
paths[]index, thenruleId.
Acceptance for prep completion
- Simulation schemas are frozen; downstream UI/CLI harnesses can rely on shapes and ordering.
- Delta semantics clarified to unblock change-event publication (30-003).