Uh oh!
There was an error while loading. Please reload this page.
test(drive-abci): gate PR runs to one comprehensive chain simulation - #4297
Conversation
The drive-abci strategy suite (92 whole-chain simulations, 261s of test CPU — 18% of the entire workspace suite) runs on every Rust PR while its multi-second simulations set the wall-clock floor of the test phase. Replace it on the PR path with a single comprehensive simulation and keep the full suite on push and nightly runs, the same safety-net pattern as the shielded phase. The new simulation packs the subsystems that compose deterministically into one 30-block run (~6s): per-block identity creation, top-ups, key additions, credit withdrawals, credit transfers, document create/replace/delete on dashpay, random contract creation, token minting, address funding from core asset locks, address transfers, identity top-ups from address balances, random core height increases with validator quorum rotation, and epoch changes with masternode payouts — with per-transition proof verification and sum-tree verification enabled. A fixed seed keeps it deterministic; a single hard-coded start identity forces contract ownership so the token contract id (and the token id the mint op signs against) is precomputable. Also fixes a latent panic in strategy-tests: IdentityTransfer(None) drew a recipient from an empty range when exactly one identity existed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe workflows now resolve immutable-structure baselines from the merge commit’s first parent. Workspace CI runs a comprehensive strategy test, separates coverage phases, and uploads coverage by category. Identity transfers now require at least two identities. ChangesStrategy validation
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant comprehensive_mixed_operations_test
participant NetworkStrategy
participant Platform
participant MockCoreRpc
participant Grovedb
comprehensive_mixed_operations_test->>NetworkStrategy: configure mixed platform operations
NetworkStrategy->>Platform: execute 30 blocks
Platform->>MockCoreRpc: broadcast asset-unlock transactions
MockCoreRpc-->>Platform: return unknown unlock statuses
Platform->>Grovedb: verify state transitions and sum trees
Grovedb-->>comprehensive_mixed_operations_test: return zero reported issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## v4.2-dev #4297 +/- ##
============================================
- Coverage 87.61% 87.04% -0.57%
============================================
Files 2704 2704 Lines 345206 345206 ============================================
- Hits 302443 300483 -1960 - Misses 42763 44723 +1960
🚀 New features to boost your workflow:
|
The check listed changed files via `gh pr view`, and a runner with broken connectivity to api.github.com failed the whole Rust job three times in a row before any test ran — while git fetches to github.com kept working from the same box. The pull_request checkout is the PR merge commit, whose first parent is the base-branch tip the merge was built on, so the changed-file list and base file contents now come from `git diff`/`git show` against that parent, entirely over git transport. Verified against a live merge ref that the first parent equals the base tip and the diff yields exactly the PR's files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Excluding the chain-simulation suite on PRs made every PR report a spurious ~0.57% project-coverage drop (drive-abci -1.33%): base coverage comes from full-suite push runs while PRs upload gated coverage. Split coverage into three codecov flags — rust (always uploaded), rust-strategy (chain simulations, push/nightly only), and rust-shielded (shielded phase, when it runs) — with carryforward enabled, so codecov reuses the base commit's coverage for any flag a PR run doesn't upload and PR reports stay comparable. The chain simulations now run as their own phase (push/nightly only) with their own lcov, and the nextest phase uses the same gated filter on every event so the rust flag measures the same population everywhere. Carryforward also replaces the shielded coverage cache from #4293 entirely — instead of restoring a content-verified cached lcov on skip runs, the flag is simply not uploaded and codecov carries the base's forward, which deletes the content-hash, cache-restore, and cache-save steps. The complete-suite tree-hash marker now additionally requires the chain-simulation phase to have succeeded, so a PR fast-path run cannot mark its tree as fully tested for a same-tree post-merge push run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
QuantumExplorer
commented
Aug 5, 2026
Pushed two additions since the last review pass:
🤖 Generated with Claude Code |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.codecov.yml:
- Around line 9-15: Bootstrap the new Codecov flags before enabling
carryforward: update .codecov.yml for rust-strategy and rust-shielded and adjust
.github/workflows/tests-rs-workspace.yml at lines 326-328 so the migration PR
uploads both reports, or configure carryforward to use the last complete commit
containing each flag rather than the combined-only baseline.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: deb98897-adb3-4e92-a278-69cddc917456
📒 Files selected for processing (3)
.codecov.yml.github/workflows/tests-rs-wallet.yml.github/workflows/tests-rs-workspace.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/tests-rs-wallet.yml
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Issue being fixed or feature implemented
The drive-abci strategy suite runs 92 whole-chain simulations on every Rust PR — 261s of test CPU, 18% of the entire workspace suite — and its 7–13s simulations set the wall-clock floor of the test phase. Most PRs get no signal from running all of them.
What was done?
New comprehensive simulation (comprehensive_tests.rs): one 30-block, ~6s run that packs every subsystem that composes deterministically:
with
verify_state_transition_results(per-transition proof verification),verify_sum_trees, and a final grovedb integrity check. Verified via the run's state-transition stats that all ten transition types actually execute (98 IdentityCreate, 207 Batch, 41 TopUp, 15 CreditTransfer, 11 Withdrawal, 12 IdentityUpdate, 9 ContractCreate, plus address ops).Determinism trick: a single hard-coded start identity means contract deployment (block 2, before identity inserts begin at block 3) has exactly one owner candidate, so the token contract's id — and the token id the mint op signs against — is precomputable.
CI gating (
tests-rs-workspace.yml): onpull_requestevents the nextest filter excludesbinary_id(drive-abci::strategy_tests)except this test. Push, nightly, and dispatch runs keep the full suite — the same post-merge safety-net pattern as the shielded phase, so a regression in an excluded simulation surfaces minutes after merge. Filter verified withcargo nextest list: exactly 1 of 97 strategy-binary tests selected, lib/bin tests unaffected.Latent panic fix (
strategy-tests):IdentityTransfer(None)drew a recipient from an empty range when exactly one identity existed (gen_range(0..0)); the guard now requires two identities.Not covered by the PR-path simulation (nightly/push still cover them): shielded operations (separate CI phase with its own cache), contested-resource voting, protocol upgrade forks, failure injection, and masternode list mutations.
Expected saving: the strategy tail currently bounds the test phase's 117s wall time; with it gone the tail is the 19s wallet-storage rekey test, so roughly ~60s off every Rust PR job. PR coverage on codecov will dip slightly relative to base since the excluded simulations' coverage only appears on push runs.
How Has This Been Tested?
cargo nextest listwith the exact CI filter expression selects 1 strategy test + all non-strategy tests.cargo fmtandcargo clippy --all-featuresclean on both changed crates.Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests