test(epoch-manager): seed ChunkProducers in test harnesses + missing-row invariant#15944
Open
stedfn wants to merge 2 commits into
Open
test(epoch-manager): seed ChunkProducers in test harnesses + missing-row invariant#15944stedfn wants to merge 2 commits into
stedfn wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15944 +/- ##
==========================================
- Coverage 72.60% 72.59% -0.01%
==========================================
Files 952 952
Lines 205109 205163 +54
Branches 205109 205163 +54
==========================================
+ Hits 148914 148939 +25
- Misses 51218 51243 +25
- Partials 4977 4981 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…row invariant Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
seed_chunk_producers_for_test gated EarlyKickout on the epoch after the anchor; production save_chunk_producers_for_header gates on the anchor's own epoch (get_epoch_protocol_version(header.epoch_id())). The epoch-after gate over-seeds dead rows for last-of-epoch anchors across an EarlyKickout activation edge (reachable via test_protocol_version_switch); those rows are never read by the aggregator/witness cross-epoch arm. Gate on the anchor's own epoch instead; sampling still uses the epoch after the anchor. Full near-epoch-manager nightly suite 106/0; near-chain runtime::tests + garbage_collection 55/0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0022d8a to
a839b7a
Compare
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.
Follow-up to #15908 (now merged to master); rebased onto master. Raises test fidelity for the EarlyKickout DB-anchored chunk-producer path before PR6 (#15843) makes
DB[anchor] != sample.EpochManager::seed_chunk_producers_for_test, mirroring production'ssave_chunk_producers_for_header, and seedDBCol::ChunkProducersat the nightly test recording sites (epoch-manager helpers,shard_tracker,tests/mod.rs,runtime/tests.rs,garbage_collection) so the aggregator exercises the real DB-read path instead of always hitting the sampler fallback.get_epoch_info(block_info.epoch_id())), matching production. The epoch-after gate over-seeds dead rows for last-of-epoch anchors across an activation edge; those rows are never read by the aggregator/witness cross-epoch arm.anchored_chunk_producers_for_aggregator, split the miss branch:debug_assertthat a missing same-epoch row only happens for the epoch-sync-installed first block, anddebug_assert!(false)for the unreachable account-not-in-epoch case.anchor.height + CHUNK_GRANDPARENT_ANCHOR_HEIGHT_OFFSET(the producer the writer would have stored) instead of the chunk height; identical for consecutive heights, exact under skips.test_aggregator_missing_epoch_first_block_row_falls_back,test_aggregator_skip_anchor_uses_anchor_height. Full near-epoch-manager nightly suite 106/0.🤖 Generated with Claude Code