Repository navigation
layout golden: refuse a re-seed that is not append-only unless named (TODO l.1829-1831) - #980
Merged
Merged
Conversation
…med (TODO l.1829-1831) BUSBAR_UPDATE_GOLDEN=1 wrote whatever layout it found; the rule against re-seeding a reorder/resize/insert was a sentence in an assert message the seed path never reached, and the airlock resize (TODO l.1806) was re-seeded through it. layout_breaks classifies the old golden against the new layout per struct: a moved field, a size or alignment change with nothing appended, a field inserted inside the old size, and a removed field or struct are breaks; a new struct or fields appended at/after the old size are not. The seed refuses a break unless BUSBAR_UPDATE_GOLDEN=break names it -- pre-tag a v1 layout edit is re-seeded with no version bump (owner 2026-09-28, BUSBAR-1.6.0.md R9); from the tag on it needs the kind ABI bump. RED: a_reseed_that_is_not_append_only_is_refused (moved, resized, inserted, removed are each a break; control: append, new struct and identity are clean).
Collaborator
Author
|
Rule 20 note from #1030 (row 155): one disjoint hunk in crates/busbar-contract/tests/layout_golden.rs (OnPieceOut record list gains |
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.
TODO l.1829-1831: the layout golden must refuse a re-seed whose diff is a reorder/resize/insert, instead of printing a sentence (crates/busbar-contract/tests/layout_golden.rs, seed path at :2497).
layout_breaks(old, new), per struct. These are breaks: a moved field offset, a size or align change with nothing appended, a field inserted inside the old size, a removed field or struct. These are not: a new struct, or fields appended at or past the old size.BUSBAR_UPDATE_GOLDEN=1now refuses any break and lists the breaks.BUSBAR_UPDATE_GOLDEN=breaknames a deliberate layout edit, which the owner allowed pre-tag on 2026-09-28 (BUSBAR-1.6.0.md R9). From the tag on, R9 requires the kind ABI version bump.a_reseed_that_is_not_append_only_is_refusedcovers the moved, resized, inserted and removed cases. Control: append, new struct, and identity are clean.Hunks are disjoint from #561/#778 (compute_layout, l.1405-1473).