Replay Test Strategy (Draft)

Ownership: Docs Guild · Scanner Guild · Evidence Locker Guild · QA Guild
Related: docs/replay/DETERMINISTIC_REPLAY.md, docs/replay/DEVS_GUIDE_REPLAY.md, docs/modules/platform/architecture-overview.md, docs/implplan/SPRINT_186_record_deterministic_execution.md, docs/implplan/SPRINT_187_evidence_locker_cli_integration.md

This playbook enumerates the deterministic replay validation suite. It guides the work tracked under Sprints 186–187 so every guild ships the same baseline before enabling scan --record.


1 · Test matrix

IDScenarioPurposeModulesRequired Artifacts
T-STRICT-001Golden ReplayRe-run a recorded scan and expect byte-identical outputs.Scanner.WebService, Scanner.Worker, CLImanifest.json, input/output bundles, DSSE signatures
T-FEED-002Feed Drift What-IfRe-run with updated feeds (--what-if feeds) to ensure only feed hashes change.Scanner.Worker, Concelier, CLIFeed snapshot bundles, policy bundle, diff report
T-TOOL-003Toolchain Upgrade GuardAttempt replay with newer scanner binary; expect rejection with ToolHashMismatch.Scanner.Worker, Replay.CoreTool hash catalog, error log
T-POLICY-004Policy Variation DiffRe-run with alternate lattice bundle; expect deterministic diff, not failure.Policy Engine, CLIPolicy bundle(s), diff output
T-LEDGER-005Ledger VerificationVerify Rekor inclusion proof and DSSE signatures offline.Attestor, Signer, Authority, CLIDSSE envelopes, Rekor proof, RootPack
T-RETENTION-006Retention SweepEnsure Evidence Locker prunes hot CAS after SLA while preserving cold storage copies.Evidence Locker, OpsReplay retention config, audit logs
T-OFFLINE-007Offline Kit ReplayExecute stella replay using only Offline Kit artifacts.CLI, Evidence LockerOffline kit bundle, local RootPack
T-OPA-008Runbook DrillSimulate replay-driven incident response per docs/runbooks/replay_ops.md.Ops Guild, Scanner, AuthorityRunbook checklist, incident notes
T-REACH-009Reachability ReplayRehydrate reachability graphs/traces from replay bundles and compare against reachbench fixtures.Scanner, Signals, Replayreachbench-2025-expanded, reachability CAS references

2 · Execution guidelines

  1. Deterministic environment — Freeze clock, locale, timezone, and random seed per manifest. See docs/replay/DETERMINISTIC_REPLAY.md §4.
  2. Canonical verification — Use StellaOps.Replay.Core JSON serializer; reject non-canonical payloads before diffing.
  3. Data sources — Replay always consumes replay_runs + CAS bundles, never live feeds/policies.
  4. CI integration
    • Scanner repo: add pipeline stage ReplayStrict running T-STRICT-001 on fixture images (x64 + arm64).
    • CLI repo: smoke test scan --record, verify, replay, diff using generated fixtures.
    • Evidence Locker repo: nightly retention test (T-RETENTION-006) with dry-run mode.
  5. Observability — Emit metrics replay_verify_total{result}, replay_diff_total{mode}, replay_bundle_size_bytes. Structured logs require replay.scan_id, subject.digest, manifest.hash.

3 · Fixtures and tooling

  • Fixture catalog lives under tools/replay-fixtures/. Include README.md describing update workflow and deterministic compression command.
  • Generation script (./tools/replay-fixtures/build.sh) orchestrates recording, verifying, and packaging fixtures.
  • Checksum manifest (fixtures/checksums.json) lists CAS digests and DSSE hashes for quick sanity checks.
  • CI secrets must provide offline RootPack and replay signing keys; use sealed secrets in air-gapped pipelines.

4 · Acceptance checklist

  • [ ] All test scenarios executed on x64 and arm64 runners.
  • [ ] Replay verification metrics ingested into Telemetry Stack dashboards.
  • [ ] Evidence Locker retention job validated against hot/cold tiers.
  • [ ] CLI documentation updated with troubleshooting steps observed during tests.
  • [ ] Runbook drill logged with timestamp and owners in docs/runbooks/replay_ops.md.
  • [ ] Reachability replay drill captured (T-REACH-009) with fixture references and Signals verification logs.

Drafted: 2025-11-03. Update statuses in Sprint 186/187 boards when this checklist is satisfied.