docs(testing): align aggregation-bits vectors with doc-writer conventions#919
Merged
tcoratger merged 2 commits intoJun 10, 2026
Conversation
…ions Follow-up to leanEthereum#899. Brings the aggregation-bits bounds vectors in line with the consensus test-vector documentation standard: - Drop all inline body comments from the test vectors; the Given/When/Then docstring is the single source of truth. - Strip the "a client that..." narration from every Then section so it states only the asserted outcome (rejection reason or post-state). - Move the bitfield layout and SSZ-encoding rationale into Given as atomic facts, and note the bitfield-limit vs registry distinction. - Tighten the aggregation_bits field and resolver docstrings to terse one-sentence-per-line phrasing. - Note in process_attestations that signature verification normally rejects an out-of-range bit first, so this guards the unsigned path. - Make is_final_block keyword-only on the block builder. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per the doc-writer rules, render the field's three behaviors as bullet points instead of prose, and fix the summary line so it describes the default (derived) case rather than only the verbatim override. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Motivation
Follow-up to #899. That PR added the aggregation-bits bounds vectors, but the documentation did not yet follow the consensus test-vector standard (Given/When/Then with zero body comments). This brings them in line and tightens a few related docstrings.
Changes
Test vectors (
tests/consensus/lstar/state_transition/test_aggregation_bits.py)Thensection so each states only the asserted outcome (rejection reason, or justified/finalized/tally for the valid case).Givenas atomic facts.Given(index 4 is within the 4096 bitfield limit but past the 4-entry registry).Framework (
packages/testing/.../attestation_specs.py,state_transition.py)aggregation_bitsfield and resolver docstrings to terse, one-sentence-per-line phrasing (drop the usage clause).is_final_blockkeyword-only on the block builder.Spec (
src/lean_spec/spec/forks/lstar/state_transition.py)No behavior change: the four vectors fill and pass unchanged, and the determinism check passes.
Testing
uv run fill --fork=lstar -k test_aggregation_bits --clean: 4 passed, determinism check passesjust check: clean