cs-test: array-shaped expected.fields and rendered.fields - #6
Merged
llbartekll merged 2 commits intoJun 2, 2026
Merged
Conversation
The v2 test schema reshapes `expected.fields` from a label-keyed map to
an ordered array of {label, value} entries so array-iteration paths
(e.g. `signers.[]`) can render duplicate-label entries side by side
instead of silently collapsing to the last value.
- schema: Expected.fields and NestedExpected.fields become Vec<FieldEntry>;
new FieldEntry/FieldValue replace label-keyed FieldExpected.
- compare: positional comparator. New FieldCountMismatch /
FieldLabelMismatch variants; FieldValueMismatch / FieldKindMismatch
now carry an index. Drops FieldMissing / FieldExtra / AmbiguousLabel.
- results.rs: cases[].rendered.fields emits the same array shape so
the registry CI aggregator and the comparator speak one form.
- report, smoke fixtures, smoke.rs: track the new variants and shape.
- Drop unused indexmap dep.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
llbartekll
approved these changes
Jun 2, 2026
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.
Summary
The ERC-7730 registry's v2 test schema is reshaping
expected.fieldsfrom a label-keyed map to an ordered array of{label, value}entries (spec PR on branchcommon-test-strategy). Array-iteration descriptor paths likesigners.[](e.g. Safesetup) render multiple entries with the same label — a map collapses them; an ordered array preserves them.This PR updates
cs-testto read and emit the new shape:schema—Expected.fieldsandNestedExpected.fieldsbecomeVec<FieldEntry>. NewFieldEntry { label, value }/FieldValuereplace the label-keyedIndexMap<String, FieldExpected>.compare— positional comparator. NewFieldCountMismatch/FieldLabelMismatchvariants;FieldValueMismatch/FieldKindMismatchcarry anindex. The old label-set logic (FieldMissing,FieldExtra,AmbiguousLabel) is gone — duplicates at different positions now compare cleanly instead of being flagged as ambiguous.results.rs—cases[].rendered.fieldsemits the same array shape. Duplicate labels are preserved end-to-end instead of being silently collapsed byIndexMap::insert.report, fixtures,smoke.rs— track the new variants and shape.indexmapdep.Test plan
cargo test -p cs-test(22 unit + 4 smoke, including new positional cases: duplicate-labels-pass, swapped-positions-fail, length-mismatch, label-mismatch)cargo clippy -p cs-test --all-targets -- -D warningsaave/testsv2/calldata-lpv2.tests.jsonon branchcommon-test-strategy: all 3 cases pass;results.jsonemitscases[].rendered.fieldsas ordered[{label, value}, ...].Out of scope
🤖 Generated with Claude Code