Policy Parity Migration Guide

Purpose. Migrate from the legacy policy engine to SPL/DSL v1 safely by dual-running both policies against identical, frozen inputs and activating the new revision only after parity is proven.

Audience. Policy owners and release engineers performing a controlled policy cutover (online or air-gapped).

Golden rule. Parity runs must use frozen inputs (SBOM, advisories, VEX, reachability, signals) and record their hashes. Activation is blocked until parity is proven and the result is attested.

1. Scope

2. Dual-run process

  1. Freeze inputs: snapshot SBOM/advisory/VEX/reachability feeds; record hashes.
  2. Shadow new policy: stage the candidate revision and simulate it against the frozen SBOM set; record the diff and explain traces.
  3. Diff: use stella policy simulate <policy-id> --base <legacyVersion> --candidate <newVersion> --sbom <id> --explain to diff findings (added/removed/unchanged, severity up/down) and rule-hit deltas. The same diff is available over the API at POST /api/policy/policies/{policyId}/simulate (scope policy:simulate).
  4. Thresholds: gate on the diff. --fail-on-diff exits with code 20 when findings are added or removed, so parity passes only when the diff is empty. There is no numeric diff-budget flag today (see §7).
  5. Capture evidence: persist the simulation output (diff plus explainUri) alongside the recorded input hashes for the parity record. There is no first-class CLI-generated, DSSE-signed parity report yet (see §7).
  6. Promote: activate the new revision only after the parity diff is reviewed and approvals captured.

3. CLI commands

Not implemented: stella policy compare, a stella policy parity subcommand, and a --max-diff flag do not exist in src/Cli. The supported parity mechanism is stella policy simulate --base/--candidate with --fail-on-diff.

4. Air-gap workflow

5. Rollback

6. Checklist

7. Roadmap (not yet implemented)

These capabilities are referenced by the parity narrative but are not present in src/Cli/src/Policy today. Track before relying on them.

References