Skip to content

fix(tooling): derive QUICK_REFERENCE's Node/pnpm floor as full version - #6390

Merged
os-warren merged 2 commits into
mainfrom
claude/issue-6313-full-version-floor
Aug 25, 2026
Merged

fix(tooling): derive QUICK_REFERENCE's Node/pnpm floor as full version#6390
os-warren merged 2 commits into
mainfrom
claude/issue-6313-full-version-floor

Conversation

@os-warren

Copy link
Copy Markdown
Collaborator

Fixes#6313

What

scripts/__tests__/quick-reference-current-release-4143.test.ts and the sync
generator scripts/sync-quick-reference-release.mjs both derived the Node/pnpm
version floors with match(/(\d+)/)?.[1] — keeping only the leading integer
group
. Against root engines.node: ">=22.11" (objectui#5306 / PR #6311) that
produced a floor of 22, silently discarding the .11, so QUICK_REFERENCE.md's
Node.js row read exactly ≥ 22 and passed a pin whose entire premise is
disagreeing with its own cited anchor.

Per the triage ruling (disposition 1, closed — dispositions 2/3 not re-argued):

  1. scripts/__tests__/quick-reference-current-release-4143.test.ts — added a
    versionFloor() helper (strip the comparator, keep the rest of the string
    whole) and switched the Node forward assertion, the pnpm forward assertion, and
    both add(...) calls in the reverse "no un-derived literal" sweep to use it.
  2. scripts/sync-quick-reference-release.mjs — same versionFloor() helper
    and the same switch for nodeFloor/pnpmFloor in readAnchors(), so the
    script that actually writes the row derives the same value the gate checks.
  3. QUICK_REFERENCE.md — regenerated via pnpm quick-reference:sync (not
    typed by hand); the Node.js row now reads ≥ 22.11.
  4. Docblock — corrected the sentence claiming root engines.node "has been
    >=22" (false since PR fix(repo): declare the Node/pnpm floors the toolchain actually requires #6311 landed >=22.11 today) and added a paragraph
    recording the objectui#6313 drift for future readers.

Also added two regression tests, both deriving from the real manifest rather than
a hard-coded literal:

  • a ≥ 22-shaped row is now rejected against the derived Node floor (the entire
    point of the card — this passed both the derivation's old AND a naive
    reimplementation's output would have to be checked against it, not assumed)
  • a ≥ 220-shaped row is rejected too (objectui#4913's coarseness, now checked
    against the new derivation rather than just the old one)

No published package source changed; the changeset declares no release
(tooling/test/doc only).

Evidence

Before (old derivation, on the real manifest strings):

engines.node ">=22.11" -> match(/(\d+)/)?.[1] -> "22"
engines.pnpm ">=10" -> match(/(\d+)/)?.[1] -> "10"

After (new versionFloor, same real strings):

engines.node ">=22.11" -> versionFloor() -> "22.11"
engines.pnpm ">=10" -> versionFloor() -> "10" (unharmed today, fixed for when it isn't)

The card's core property — a ≥ 22 row now fails where it used to pass (code
fix committed, doc not yet regenerated — the doc still said ≥ 22 at this point):

 FAIL … > states the Node floor from root `engines.node`
AssertionError: QUICK_REFERENCE.md must state the Node floor as exactly "≥ 22.11"
to match engines.node ">=22.11": expected [ '≥22' ] to deeply equal [ '≥22.11' ]
FAIL … > contains only version literals this test derives from a manifest
Test Files 1 failed (1) / Tests 2 failed | 8 passed (10)

Ran pnpm quick-reference:sync (rewrote the row to ≥ 22.11) → re-ran → Test Files 2 passed (2) / Tests 22 passed (22) across both the gate and the
generator's own test file.

The ≥ 220 negative case, against the real committed file (plant → RED →
git checkout HEAD -- QUICK_REFERENCE.md under a trap … EXIT INT TERM
restore verified by blob hash + empty git diff HEAD → GREEN):

sed -i 's/**Node.js:** ≥ 22.11/**Node.js:** ≥ 220/' QUICK_REFERENCE.md
FAIL … Tests 2 failed | 8 passed (10)
(trap restores)
git hash-object QUICK_REFERENCE.md == HEAD:QUICK_REFERENCE.md (4097a911b…)
git diff HEAD -- QUICK_REFERENCE.md == (empty)
Test Files 2 passed (2) / Tests 22 passed (22)

Checks run locally

  • pnpm exec vitest run scripts/__tests__/quick-reference-current-release-4143.test.ts scripts/__tests__/sync-quick-reference-release.test.ts → 2 passed, 22 tests
  • pnpm exec vitest run scripts/ (full scripts/ suite) → 79 files / 2281 tests passed
  • pnpm quick-reference:check → in sync
  • node scripts/check-changeset-presence.mjs → no source of a released package changed; changeset added
  • node scripts/check-changeset-no-major.mjs → clean
  • pnpm run type-check:scripts (covers scripts/__tests__/*.ts) → clean
  • node scripts/check-type-check-coverage.mjs → 45/46 + 41/41, unaffected
  • pnpm run lint:root (covers scripts/**) → 0 errors, 28 pre-existing warnings elsewhere, none in touched files
  • node scripts/check-control-bytes.mjs → clean

CI (ci.yml) will run the full suite; leaving this in draft for the PM seat to
arm per dispatch order.


Generated by Claude Code

objectui#6313: the pin at scripts/__tests__/quick-reference-current-release-4143.test.ts
and the sync generator (scripts/sync-quick-reference-release.mjs) derived the
Node/pnpm version floors with `match(/(\d+)/)?.[1]`, keeping only the leading
integer group. Against root `engines.node: ">=22.11"` (objectui#5306 / PR #6311)
that produced a floor of `22`, silently discarding the `.11` — so a row reading
exactly `≥ 22` passed a pin whose entire premise is disagreeing with its own
cited anchor.
Both derivations now strip the comparator and keep the whole version string.
`pnpm quick-reference:sync` regenerated the Node.js row to `≥ 22.11`. Added
regression coverage pinning that a `≥ 22`-shaped row is now rejected and that a
`≥ 220`-shaped row still is (objectui#4913), and corrected the test file's
docblock sentence that had gone stale on the same anchor one decimal place up.
No published package source changed; changeset declares no release.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CZgmFFzqA9cX8tBMhvpFe
@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tests labels Aug 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationtests

Projects

None yet

2 participants

@os-warren@claude