- Status: proposed
- Date: 2026-02-22
ADR 0027 established simulation preparedness gates (G0-G5) and a deterministic replay harness. That harness is now useful for measuring pipeline reliability, but it does not execute live runtime behavior.
Current mismatch:
- Deterministic class-1 packs can pass readiness gates while live examples still regress semantically.
- The deterministic oracle lane validates scoring/replay/ledger mechanics, not runtime solving behavior (
method_missing -> forge/delegate/tool -> guardrails -> outcome). - We currently lack a controlled way to run real agent flows at simulation scale with reproducible evidence semantics.
Recent evidence:
docs/baselines/2026-02-22/adr-0027/phase-7b-validation-report.mdshows deterministic advisory infrastructure is complete.- The same report shows live example instability (
solve/historycontinuity failures, assistant top-news failure) despite green deterministic infrastructure checks.
The project now needs a second simulation lane: one that runs live runtime behavior in shadow mode without weakening ADR 0027 discipline.
Adopt a dual-lane simulation model:
- Deterministic Lane (existing): machine-checkable deterministic oracle execution for replay and readiness mechanics.
- Live-Shadow Lane (new): scripted real agent execution with oracle assertions over observed outcomes/logs.
- Deterministic lane validates measurement reliability.
- Live-shadow lane validates runtime semantic behavior.
- Neither lane replaces the other.
Replay comparability rule:
- Deterministic lane compares payload identity across replay runs.
- Live-shadow lane compares oracle verdict reproducibility across replay runs (pass/fail and numeric tolerance outcomes), not raw response text identity.
- Lane-specific replay semantics are explicit contract behavior, not inferred at runtime.
Introduce scenario-pack execution lane metadata:
version: 1
id: calculator-live-shadow-v1
class: class_1
execution:
lane: live_shadow
isolation: run_scoped
replay:
mode: replay
seeds: [11, 19, 23, 31, 43]
scenario:
role: calculator
script:
- call: memory=
args: [5]
- call: add
args: [3]
- call: multiply
args: [4]
- call: sqrt
args: [144]
oracles:
- id: sqrt_returns_12
kind: live_outcome_value
input:
step: sqrt
expect:
equals: 12.0
tolerance: 0.000001Per seed/session, the live-shadow runner executes:
- Build isolated run scope (state/tool/artifact namespace unique to run).
- Materialize top-level role via runtime API (
Agent.for(...)). - Execute scripted call sequence.
- Capture step outcomes + trace references.
- Evaluate live oracles against captured outcomes and required logs.
- Emit per-seed result payload into existing scorer/gates/ledger pipeline.
Isolation default:
- Durable tool/artifact writes are blocked outside run scope unless pack contract explicitly opts in.
- Cross-run namespace contamination is treated as a harness defect, not a scenario failure.
Keep ADR 0027 gate model unchanged; apply status interpretation by lane:
- Deterministic class-1 packs remain primary gating evidence.
- Live-shadow packs are advisory until deterministic class-1 window is stable.
- Promotion rule for live-shadow gating requires explicit decision record (maintainer override is explicit, never implicit).
Current deterministic path:
scenario pack YAML -> deterministic oracle evaluator -> scorer -> G0..G5 -> ledger
Post-ADR dual-lane path:
scenario pack YAML
-> lane selector
-> deterministic evaluator (lane A)
-> live-shadow executor + oracle evaluator (lane B)
-> shared scorer -> G0..G5 -> ledger
- Deterministic simulation readiness infrastructure is implemented and CI-capable (
docs/simulation-readiness.md,.github/workflows/simulation-readiness-ci.yml). - Class-1 stabilization evidence can be computed, but day-window criterion still governs readiness (
docs/reports/simulation-readiness-decision-2026-02-22.md). - Live runtime semantic failures still appear in manual validation traces (
docs/baselines/2026-02-22/adr-0027/phase-7b-validation-report.md).
- Semantic signal availability:
- from ad hoc manual trace review to machine-scored live-shadow evidence for calculator and assistant packs.
- Regression attribution quality:
- classify regressions as deterministic-lane, live-runtime-lane, or both in a single report.
- Runtime confidence:
- detect live semantic regressions within one simulation cycle, without waiting for manual example sweeps.
- Operator ergonomics:
- unify deterministic and live-shadow evidence in one ledger/report surface.
- This ADR does not auto-repair runtime semantics.
- This ADR does not relax ADR 0025 authority boundaries.
- This ADR does not make networked/open-world scenarios deterministic.
- Tests:
- simulation runner specs include lane selection, isolation, script execution, and live-oracle evaluation.
- existing test/lint suite remains green.
- Traces/logs:
- each live-shadow step emits trace linkages (
trace_id,call_id,depth,outcome_status). - run ledger stores lane metadata and per-step outcome summary.
- run ledger stores usage telemetry for live-shadow runs (at minimum: model/provider, input/output token counts when available, and cost estimate if available).
- each live-shadow step emits trace linkages (
- Thresholds:
- lane metadata present on
100%of simulation ledger entries. - live-shadow script execution coverage
100%for pack-defined steps. - oracle evaluation coverage
100%for pack-defined live oracles. - isolation contamination checks pass
100%(no state/tool/artifact leakage across run scopes for same pack/seed matrix). - usage telemetry presence
100%on live-shadow ledger entries (allowing explicitunknownvalue when provider does not return a field).
- lane metadata present on
- Observation window:
- live-shadow remains advisory for at least
20runs across>= 5seeds and>= 3days before promotion decision.
- live-shadow remains advisory for at least
- If live-shadow isolation leaks state across runs:
- freeze live-shadow expansion; remediate isolation before adding packs.
- If live-shadow replay noise makes reports non-actionable (
> 20%ambiguous regressions):- tighten pack contracts and oracle definitions before adding new domains.
- If deterministic lane stability degrades during live-shadow rollout:
- pause live-shadow rollout and restore deterministic lane health first.
- If usage telemetry is missing for live-shadow runs:
- treat lane readiness evidence as incomplete and block promotion decisions until telemetry is restored.
In scope:
- scenario-pack lane metadata (
deterministicvslive_shadow), - live-shadow scripted execution harness,
- live-oracle kinds for outcome/log checks,
- shared scorer/gate/ledger integration,
- advisory-first activation policy for live-shadow packs.
- live-shadow usage telemetry in run ledger.
Out of scope:
- autonomous runtime mutation from simulation results,
- replacing deterministic lane,
- immediate class-2+ promotion to gating.
- Separates measurement reliability from runtime semantic correctness while preserving one evidence model.
- Reduces dependence on manual calculator/assistant trace sweeps for regression detection.
- Keeps ADR 0027 governance discipline intact during expansion.
- Adds harness complexity (script executor, lane selection, isolation mechanics).
- Increases simulation run cost and execution time.
- Requires stricter pack/oracle authoring for live flows.
- Keep deterministic-only simulation and continue manual live validations.
- Rejected: leaves semantic regressions under-instrumented.
- Replace deterministic lane entirely with live runs.
- Rejected: loses reproducibility and gate reliability baseline.
- Run live-shadow as gating immediately.
- Rejected: premature; requires advisory evidence maturation first.
- Phase 0: Contract extension.
- add
execution.laneand live-script schema fields to pack contract.
- add
- Phase 1: Isolation proof first.
- add isolation tests that verify clean per-run state/tool/artifact namespaces and no cross-run leakage.
- Phase 2: Live-shadow executor core.
- isolated run scope, scripted call runner, step outcome capture.
- Phase 3: Live oracle surface.
- add oracle kinds for outcome value/error/provenance/continuity checks.
- Phase 4: Shared pipeline integration.
- feed live-shadow outputs into scorer/gates/ledger with lane metadata and usage telemetry.
- Phase 5: Initial packs.
calculator-live-shadow-v1andassistant-live-shadow-v1in advisory mode.
- Phase 6: Reporting and promotion criteria.
- lane-split trend report + explicit promotion decision record template.
- Do not allow live-shadow lane to write durable runtime artifacts outside run-scoped isolation unless pack explicitly opts in.
- Keep live-shadow non-gating until deterministic class-1 stability is maintained.
- Treat network-dependent assertions as advisory unless fixture-backed.
- Keep failure typing explicit (
semantic_regression,contract_mismatch,trace_integrity_failure) in reporting. - Maintain separate awareness from authority (simulation can observe/propose, not enact).
- Do not promote live-shadow to gating when usage telemetry or isolation evidence is incomplete.
Add these terms to docs/ubiquitous-language.md:
Dual-Lane SimulationDeterministic LaneLive-Shadow LaneLane Promotion DecisionRun-Scoped IsolationSemantic Regression SignalRun Cost Telemetry