Repository navigation
test(core): shrink the slow rustledger-core tests under Miri - #2939
Merged
Merged
Conversation
The weekly Miri job timed out (40 minutes) in `test_bulk_paths_are_not_quadratic`, which builds 50,000 metadata entries. Miri's per-step cost makes that size too slow; shrink it, and the sibling `test_build_keeping_first_keeps_each_keys_first_entry`, to 1,000 under `cfg(miri)`, as miri.yml asks for slow unit tests. A quadratic path still exceeds the 10 * N comparison bound at that size, so the tests keep their meaning there; the native run is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
📊 Benchmark Results
vs base, measured in this run
A difference counts only when it clears the combined spread of the two measurements, per shape (2σ: What do these numbers mean?
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
The dispatched Miri run still timed out at 40 minutes, now inside `for_each_strict_subaccount_visits_exactly_the_strict_subtree`, which ran for over 37 minutes before the job was killed (the metadata tests come later alphabetically and were never reached). Its oracle filters every name per query: about 1,240 queries over 8,655 names, 10.7 million prefix checks, each a long run of interpreted steps under Miri. Under `cfg(miri)` the generated tree is three levels deep with full fan-out under each level's first parent (830 names) and every 23rd name is a query (41 in all). Every root and segment shape is still present, and a filtered scan still reads over four times the 200-key bound, so the test keeps its meaning. The native run is unchanged. A local Miri run of the whole lib under nextest found no other outlier: every other test is a few seconds of CI time. Co-Authored-By: Claude Opus 5.5 <[email protected]>
robcohen
added a commit
that referenced
this pull request
Nov 11, 2026
Brings in #2939 and #2942. CHANGELOG conflict in Fixed resolved by keeping both entries. Cache versions unchanged: loader 71, WASM 99. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 11, 2026
robcohen
added a commit
that referenced
this pull request
Nov 12, 2026
#2945, which this branch carried, is squash-merged as 526f833; its hunks take main's final form (loader cache v71, `escape_untrusted_text` in `rledger query`, its CHANGELOG notes). With #2947: the FFI's `semantic_validation_errors` keeps #2947's `booking_refused` set-aside and its `is_advisory_only` filter, which replaces this branch's equivalent one. `convert::surface_agreement` now matches each finding's code too (the 4.0.0 wire error carries it) and runs `validate-file` and `load-file` over the shared cases, so the file surfaces are pinned to leave out E1004 and set a refused transaction aside. No cache moves: the loader cache stores only error-free raw loads, and this branch changes no WASM output. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Shrink the three rustledger-core unit tests that are too slow under Miri, keeping each one's property meaningful at the smaller size. The native run is unchanged.
metadata::tests::test_bulk_paths_are_not_quadraticandtest_build_keeping_first_keeps_each_keys_first_entry: N = 1,000 instead of 50,000 undercfg(miri). A quadratic path still exceeds the10 * Ncomparison bound (N^2/2 = 500,000).inventory::tests::for_each_strict_subaccount_visits_exactly_the_strict_subtree: undercfg(miri)the generated account tree is three levels deep with full fan-out under each level's first parent (830 names instead of 8,655), and every 23rd name is a query (41 instead of about 1,240). Every root and segment shape is still present, and a filtered scan still reads over four times the 200-key bound.Why
The weekly Miri job (
miri.yml, tracked by the scheduled-workflow health issue #2748) times out at its 40-minute budget. The first fix shrank the metadata tests, but dispatched run 42963735396 still timed out: the subaccount test ran for over 37 minutes before the job was killed, and the metadata tests come later alphabetically, so CI never reached them. That test's oracle filters every name per query, about 10.7 million prefix checks, each a long run of interpreted steps under Miri.miri.yml asks for slow unit tests to be shrunk under
cfg(miri)rather than skipped, so no test is ignored.How it was checked
cargo miri nextest(nightly 2026-11-10, CI's MIRIFLAGS) found no other outlier. Calibrated against the per-test timestamps of run 42963735396, every other test costs a few seconds of CI time, and the 171 tests CI never reached add up to about 90 s.cargo test -p rustledger-core --all-features, clippy--all-features --all-targets -D warnings, and treefmt pass.workflow_dispatchrun ofmiri.ymlon this branch.Closes the Miri entry of #2748.
🤖 Generated with Claude Code