Repository navigation
Fix the repeated-numbers test after batch B (816, 832 and the marked schema's widths) - #132
Merged
Merged
Conversation
…rdinality marks; each rule's own exception Batch B (#130) left three failures in packages/tokens/test/repeated-numbers.test.mjs; the sheet is right and the test is corrected, no pixel changes and no assertion loosened: - The exception check found the first `@container (width >= 816px)` in the sheet, which is the command list's (its own sum), not the diagram's 816px rule it was checking. It now reads the comment above the rule it matched; that comment names its sum (816px). - 832px is an architecture of 4 columns with two group levels at each side (4 × 144 + 3 × 64 + 4 × 16). Groups nest two deep (DECISIONS 306, 1.3), so diagram-core's groupReach runs from 0 to 4, not 0 to 2: the documented sums and the coverage now take every reach from 0 to 4, so a rule is required for each. - Hidden behind those: a schema that draws cardinality marks (1.1) has a column gap of space-12 plus space-3 (the sheet's --_col-gap and diagram-core's least width), so its rules are at 792, 1076, 1360 and 1644. leastWidth takes `marks`, a rule's [data-marks] or :not([data-marks]) is read, and a marked schema of 2 to 6 columns must have a rule. Checked by mutation: the 832 rule at 833 fails, and the 816 exception without its sum fails. Co-Authored-By: Claude Opus 5.5 <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.
Fixes a regression from #130 on main:
packages/tokens/test/repeated-numbers.test.mjs(node-only) failed 3 tests atdb0bc418. This is engineering with no pixel change: only the test changes, and no assertion was loosened (DECISIONS 345).@container (width >= 816px)in the sheet, which is the command list's rule. It now reads the comment above the rule it actually matched (the diagram's), which already names its sum.space-12 + space-3, 60px), with rules at 792, 1076, 1360 and 1644px. The test now computes these and requires a rule for marked schemas of 2 to 6 columns.Checked:
repeated-numbers.test.mjs8/8 after building the tokens. Moving the 832 rule to 833 fails it, and so does removing "816px" from the diagram rule's exception. Lint passes all five steps, and both typechecks pass. No browser test ran (paused, DECISIONS 330).This was not reviewed by a seat; it's a test fix inside decided designs.
🤖 Generated with Claude Code