Files
git.stella-ops.org/docs/features/checked/replay/replay-infrastructure.md
2026-02-12 10:27:23 +02:00

3.3 KiB

Replay Infrastructure (Manifest, Determinism Verifier, Verdict Engine, Drift Detection)

Module

Replay

Status

VERIFIED

Description

Full replay infrastructure: DeterminismVerifier re-hydrates exact inputs from manifest and verifies bit-for-bit verdict reproduction. Run manifest model capturing pipeline state (feeds, rules, versions). DeterministicResolver with feed snapshots, bundle export, and web service. Verdict replay with divergence detection and input drift testing.

Implementation Details

  • Determinism Verifier: src/Replay/__Libraries/StellaOps.Replay.Core/DeterminismVerifier.cs -- re-hydrates exact inputs from a run manifest and verifies bit-for-bit verdict reproduction; reports divergences between original and replayed verdicts.
  • Input Manifest Resolver: src/Replay/__Libraries/StellaOps.Replay.Core/InputManifestResolver.cs -- resolves and snapshots all inputs (feed versions, policy rules, SBOM state) needed to reproduce a verdict, creating a self-contained input manifest.
  • Replay Executor: src/Replay/__Libraries/StellaOps.Replay.Core/ReplayExecutor.cs -- orchestrates verdict replay by loading the input manifest, executing the policy evaluation pipeline, and comparing outputs against the original verdict.
  • Replay Job Queue: src/Replay/__Libraries/StellaOps.Replay.Core/ReplayJobQueue.cs -- background job queue for scheduling and processing replay verification requests.
  • Policy Simulation Input Lock: src/Replay/__Libraries/StellaOps.Replay.Core/PolicySimulationInputLock.cs -- locks input state during replay to prevent concurrent modifications from affecting determinism verification.
  • Verdict Replay Endpoints: src/Replay/StellaOps.Replay.WebService/VerdictReplayEndpoints.cs -- REST endpoints for submitting replay requests and querying replay results.
  • Web Service Entry Point: src/Replay/StellaOps.Replay.WebService/Program.cs -- ASP.NET Core web service hosting replay endpoints.
  • Tests: src/Replay/__Tests/StellaOps.Replay.Core.Tests/Unit/DeterminismVerifierTests.cs, Unit/InputManifestResolverTests.cs, VerdictReplayIntegrationTests.cs, VerdictReplayEndpointsTests.cs, PolicySimulationInputLockValidatorTests.cs

E2E Test Plan

  • Submit a verdict for replay via the REST endpoint and verify DeterminismVerifier produces a bit-for-bit identical verdict when given the same input manifest.
  • Modify a policy rule between the original verdict and the replay and verify divergence is detected and reported.
  • Verify input manifest completeness by replaying using manifest contents only.
  • Verify input lock behavior protects replay consistency during concurrent mutation attempts.
  • Submit multiple replay requests and verify queue processing order and result handling.
  • Verify drift detection when replay uses a different feed snapshot/input state.

Verification

  • Run ID: run-001
  • Date (UTC): 2026-02-11
  • Tier 0: pass (docs/qa/feature-checks/runs/replay/replay-infrastructure/run-001/tier0-source-check.json)
  • Tier 1: pass (docs/qa/feature-checks/runs/replay/replay-infrastructure/run-001/tier1-build-check.json)
  • Tier 2: pass (docs/qa/feature-checks/runs/replay/replay-infrastructure/run-001/tier2-integration-check.json)
  • Evidence directory: docs/qa/feature-checks/runs/replay/replay-infrastructure/run-001/evidence/