test(dst): add deterministic simulation harness - #527
Open
azimafroozeh wants to merge 1 commit into
Open
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Comment on lines
+57
to
+58
| days=$(( ( $(date -u +%s) - $(date -u -d 2026-08-14 +%s) ) / 86400 )) | ||
| export DST_FLEET_SEED_BASE=$(( 200000 + days * 1000 + ${{ matrix.shard }} * 60 )) |
There was a problem hiding this comment.
Execution date breaks nightly replay
When an older workflow run is rerun on a later UTC date, this step recalculates DST_FLEET_SEED_BASE from the new wall clock, causing the deterministic fleet to search a different interval instead of replaying the original night. The concurrent fleet repeats the same calculation at lines 97–106, and a scheduled job delayed across midnight is likewise assigned to the wrong nightly interval.
Knowledge Base Used: Dev conventions and invariants
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
This PR lands DST v1, the deterministic simulation harness designed in #507: a dev-only crate that runs engine operations in a fully seeded simulated world, plus the smallest engine seams that make that world controllable. A universe (one sampled operation stream) replays from its (scenario, seed) pair at sequential-universe scope; concurrent universes run under a measured envelope with no replay claim.
omnigraph-dst: scenario sampling, fault injection (storage faults, ack loss, bounded staleness, corruption, entropy), crash-state enumeration, five observation channels judged by 21 oracles behind typed detectors, concurrent universes, and the cost counting pass with its checked-in golden (recorded in RFC-031 §11).dst_ids,dst_clock,dst_gate) plus injection constructors (init_with_storage,open_read_only_with_storage); canonically ordered hash walks;failreplaced byfail-parallelwith scenario serialization restored on the shim..cargo/config.tomlfor--cfg tokio_unstable(tokio's seeded runtime RNG); root-invoked builds stay flag-free, the upstream default shape.Local verification
cargo testfromcrates/omnigraph-dston the rebased tree: 25 lib + 42 integration + 1 torn-init green (~26 s); instruments stay#[ignore]dcargo clippy --workspace --all-targetsin both CI shapes (default and failpoints superset,--locked) pluscargo fmt --all --check: cleanRUST_MIN_STACK=16777216; it was green on the previous baseGreptile Summary
The PR adds a deterministic simulation-testing crate and the engine seams, failpoint registry changes, storage injection points, fixtures, documentation, and CI workflows needed to exercise it.
fail-parallel.Confidence Score: 4/5
The nightly workflow should be fixed before merging because rerunning an older run searches a new seed interval instead of replaying the original night.
Both nightly fleets calculate their seed ownership from the current date inside the executing step, so reruns and sufficiently delayed jobs lose the stable run-to-seed mapping promised by the harness.
Files Needing Attention: .github/workflows/dst-nightly.yml
Important Files Changed
failAPI with a sharedfail-parallelregistry and scoped configuration wrappers.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD Seed[Scenario and seed] --> Universe[DST universe] Universe --> Seams[Engine seams] Seams --> IDs[Seeded IDs] Seams --> Clock[Virtual clock] Seams --> Gate[Storage-call gate] Seams --> Storage[Injected storage and faults] Universe --> Ops[Engine operations] Ops --> Observe[Query, physical, history, claim, and time observations] Observe --> Detectors[Typed detectors and oracles] Detectors --> Report[Universe report and replay bundle] Nightly[Nightly planner] --> SeedReviews (1): Last reviewed commit: "imp" | Re-trigger Greptile
Context used (5)