Invariants / DC-NODE-03

DC-NODE-03

DC derived enforced

Clock-injection seam + replay equivalence: the orchestrator depends on a Clock trait yielding now() and tick_stream(). No SystemTime::now() or tokio::time::Instant::now() reachable from the orchestrator core. Replaying the orchestrator core with a deterministic Clock and a recorded OrchestratorEvent stream against a frozen snapshot store + chaindb produces byte-identical final (LedgerState fingerprint, PraosChainDepState, ChainDb tip) across runs.

Source

docs/planning/phase4-n-k-orchestrator-binary-invariants.md §1 (I-5)

Enforcement trace

Tests 5

  • crates/ade_runtime/tests/orchestrator_replay_equivalence.rs::replay_equivalence_under_deterministic_clock_holds
  • crates/ade_runtime/tests/orchestrator_replay_equivalence.rs::replay_corpus_is_present_and_decodable
  • crates/ade_runtime/src/orchestrator/core.rs::tests::step_two_runs_produce_byte_identical_effects
  • crates/ade_runtime/src/clock.rs::tests::deterministic_clock_is_pure
  • crates/ade_runtime/src/orchestrator/leadership_session.rs::tests::leadership_session_slot_arithmetic_is_pure

Cross-references

Strengthened in

Evidence notes

PHASE4-N-K S1+S2+S5+S8 (2026-05-26) shipped the Clock trait (with DeterministicClock + SystemClock), pinned the orchestrator core as the SOLE wall-clock-free consumer, and proved replay equivalence end-to-end via tests/orchestrator_replay_equivalence.rs. ci/ci_check_clock_seam.sh enforces that crates/ade_runtime/src/clock.rs is the sole site of SystemTime::now() / Instant::now() within ade_runtime, and that orchestrator/{core,event,state,mod}.rs contain none of tokio::time, rand, HashMap/HashSet, or f32/f64.