Skip to content

fix(ci): let the vendored snapshot stay compact instead of losing to the formatter - #290

Merged
andraderaul merged 2 commits into
mainfrom
fix/vendor-snapshot-format
Aug 1, 2026
Merged

fix(ci): let the vendored snapshot stay compact instead of losing to the formatter#290
andraderaul merged 2 commits into
mainfrom
fix/vendor-snapshot-format

Conversation

@andraderaul

Copy link
Copy Markdown
Owner

CI has been red on main since #289 — including on #288, which merged through it. Neither PR broke anything: the failure is a diff no human wrote.

What happens

vendor-dataset.mjs serializes with a bare JSON.stringify, and that is deliberate — the rationale sits on the function itself:

Compact JSON — the points array is large; pretty-printing would triple the committed size for no gain (the diff that matters is per-point capacity, and git shows it either way).

Biome's formatter disagrees, and a 1961-point array on one line is exactly what it rejects. So the monthly bot (ADR 0022) opens its PR, a human reviews the per-point capacity diff and merges, and npm run check goes red on main.

dataset-2026-07.json looks fine only because someone reformatted it by hand after generation. That is the workaround this removes, not the convention.

Which rule yields

The formatter. A vendored, machine-generated artifact is not source, so dataset-*.json leaves files.includes, and the script's comment now records where the exclusion lives and why it has to.

The alternative was indenting the generator. That overturns a decision the script explicitly documents and reformats ~2,700 lines to do it — so it needed a stronger reason than "the formatter said so."

No data moves in this PR. Both spellings are now legal, and the bot's output stops needing a human formatting pass to be mergeable.

Verification

  • npm run check — green repo-wide, 291 files, against the existing compact dataset-2026-08.json, which is what proves the exclusion matches
  • npm run test:run --workspace @cyberdeck/sprawl — 91 passed
  • Ran npm run vendor:dataset to confirm freshly generated output is legal under the new config, then reverted the snapshot: live drift belongs in the bot's own PR with a human on the per-point diff, not smuggled in here

No changeset — tooling and CI only, no app behavior.

🤖 Generated with Claude Code

…the formatter

CI has been red on main since #289. The vendor bot serializes the dataset with
a bare `JSON.stringify` — compact by an explicit decision recorded on
`serialize`, since pretty-printing triples the committed size of a 1961-point
array for a diff git shows either way — and biome's formatter rejects the
single line that produces. The bot opened its PR, the PR merged, and CI went
red on a diff no human wrote.

Two rules disagreeing, so one has to give. The formatter yields: a vendored,
machine-generated artifact is not source, and `dataset-*.json` leaves
`files.includes`. The alternative — indenting the generator — would have
overturned a decision the script documents, and reformatted 2700 lines to do
it.

Nothing about the data moves. `dataset-2026-07.json` is pretty-printed because
a human reformatted it by hand once; both spellings are now legal and the bot's
own output no longer needs that step.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ascii-art-converter Ready Ready Preview Aug 1, 2026 3:21pm
atlas-sprawl Ready Ready Preview Aug 1, 2026 3:21pm
cyberdeck-golem Ready Ready Preview Aug 1, 2026 3:21pm
glitch-studio Ready Ready Preview Aug 1, 2026 3:21pm

…cale (#291)

PR #288 described this review round in its body but merged without it. This
lands the code the description already promised.

SPRAWL's basemap chip named `absolute` before `TOUCH_TARGET_HEIGHT`, and the
constant opens with `relative` to anchor its overlay. `cn` is tailwind-merge,
which resolves a position conflict in favour of the last name — so the chip
lost its corner and fell back into the flow with every target class present
and correct, which is exactly why the className assertion sailed past it. The
constants now document the ordering, and a test pins the position rather than
the classes.

The scale guard gains the `sp-*` spellings, step by step rather than by a
prefix rule: it is a second scale under the same utilities and its ends do not
match the base one, so `gap-3xl` is real while `p-sp-3xl` renders nothing, and
only the step tells the two apart. The completeness test holds the new entries
to the preset the same way it holds the old ones.

`TOUCH_TARGET_ICON` joins the public surface — the height overlay plus the real
width it tells you to pair with — after both canvases composed the pairing
identically. Two callers, which is ADR 0014's bar.

The target tests now assert against the constants instead of the classes they
happen to expand to, so respelling a target cannot red them without a
regression behind it.

Also recorded rather than silently done: the byte-identical range-input
stylesheets, and the `sp-*` row in CLAUDE.md's scale table.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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