Skip to content

feat(simulator): separate a vacuous run and assert through the drain - #4191

Open
krishvishal wants to merge 1 commit into
masterfrom
simulator-liveness
Open

krishvishal wants to merge 1 commit into
masterfrom
simulator-liveness

Conversation

@krishvishal

@krishvishal krishvishal commented Sep 15, 2026

Copy link
Copy Markdown
Member

A replica that adopts a view through a probe answer can keep an entry the view change already truncated. handle_request_start_view answers a probe with an empty suffix, so the prober has no canonical headers to compare against, adopt_start_view_suffix parks no pending_view_log, and the commit walk applies the stale entry. Seed 144 of the uniform swarm lane reaches it on network faults alone, at op 7, with no crash needed.

The probe answer now carries local_dvc_suffix().headers(), which the cache already tags on the (op, commit) pair the announcement matches. Two more defects sat at the same site. The announced commit was unclamped, and commit_max legitimately exceeds the head, so StartViewHeader::validate rejected it and transmute_header turned that into a panic; it uses dvc_commit() now, as the DoViewChange builder always did. And reconcile_metadata_view_divergence floored its truncation at the announced commit rather than at what this replica applied, against the argument in its own comment three lines above, so the suffix alone would not have closed the seed. answer_stale_view_heartbeat carried both defects for the same stated reason and is fixed with them.

Two campaign changes ride along. The vacuity floors exit 3 under a vacuous: line instead of panicking, which exits 101 exactly like a real divergence, so a sweep can report yield apart from its failure rate. The drain and the view settle now assert the per-tick invariants, where they previously stepped up to 50,000 ticks with nothing checked.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Sep 15, 2026
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.39768% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.68%. Comparing base (9061596) to head (5040c5d).

Files with missing lines Patch % Lines
core/simulator/src/bin/workload-fuzz.rs 0.00% 36 Missing ⚠️
core/simulator/src/workload/state_checker.rs 89.28% 3 Missing ⚠️
core/consensus/src/impls.rs 96.61% 2 Missing ⚠️
core/simulator/src/lib.rs 99.03% 1 Missing ⚠️
core/simulator/src/workload/oracle.rs 93.33% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #4191       +/-   ##
=============================================
- Coverage     87.42%   70.68%   -16.75%     
- Complexity     1575     1576        +1     
=============================================
  Files          1280     1278        -2     
  Lines        222704   199004    -23700     
  Branches     186067   162367    -23700     
=============================================
- Hits         194706   140659    -54047     
- Misses        23287    53704    +30417     
+ Partials       4711     4641       -70     
Components Coverage Δ
Rust Core 67.80% <83.39%> (-20.70%) ⬇️
Java SDK 68.70% <ø> (+0.01%) ⬆️
C# SDK 77.41% <ø> (-0.02%) ⬇️
Python SDK 90.97% <ø> (ø)
PHP SDK 85.67% <ø> (ø)
Node SDK 96.43% <ø> (ø)
Go SDK 70.15% <ø> (+0.07%) ⬆️
Files with missing lines Coverage Δ
core/shard/src/lib.rs 85.50% <100.00%> (+0.19%) ⬆️
core/simulator/src/workload/mod.rs 91.25% <100.00%> (+0.12%) ⬆️
core/simulator/src/lib.rs 96.08% <99.03%> (+0.04%) ⬆️
core/simulator/src/workload/oracle.rs 67.32% <93.33%> (+0.95%) ⬆️
core/consensus/src/impls.rs 93.30% <96.61%> (+0.13%) ⬆️
core/simulator/src/workload/state_checker.rs 94.53% <89.28%> (-0.67%) ⬇️
core/simulator/src/bin/workload-fuzz.rs 0.00% <0.00%> (ø)

... and 347 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant