Skip to content

Fix the repeated-numbers test after batch B (816, 832 and the marked schema's widths) - #132

Merged
bmjcoding merged 1 commit into
mainfrom
claude/diagrams-b-sums
Nov 24, 2026
Merged

bmjcoding merged 1 commit into
mainfrom
claude/diagrams-b-sums

Conversation

@bmjcoding

Copy link
Copy Markdown
Owner

Fixes a regression from #130 on main: packages/tokens/test/repeated-numbers.test.mjs (node-only) failed 3 tests at db0bc418. This is engineering with no pixel change: only the test changes, and no assertion was loosened (DECISIONS 345).

  • The 816px exception: the test read the comment above the first @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.
  • 832px: this 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 a group's reach runs 0 to 4. The documented sums now cover reach 0 to 4, with the derivation in a comment, and a rule is required for every reach.
  • A third gap the first two were hiding: a schema with cardinality marks has a wider column gap (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.mjs 8/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

…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>
@bmjcoding
bmjcoding merged commit 152a324 into main Nov 24, 2026
1 of 2 checks passed
@bmjcoding
bmjcoding deleted the claude/diagrams-b-sums branch November 24, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant