Repository navigation
test(ui): doc-version-claims anchors CI's Node on .nvmrc as well as literal node-version lines - #26432
Merged
Conversation
…iteral node-version lines The workflow-version assertion read only literal `node-version:` lines in .github/workflows and floored them at 15. The setup-workspace composite moves most jobs onto `node-version-file: .nvmrc`, which leaves one literal line and turned this file red over a CI whose Node had not moved. The anchor now reads both spellings setup-node accepts, across .github/workflows and .github/actions: a literal `node-version:` and a `node-version-file:` reference resolved to the major of the file it names. The census cross-check counts both keys over the same file list, the floor is re-based on readings of both trees, and the two-direction fixture gains a .nvmrc arm run through the same comparison the corpus assertion runs. Claude-Session: https://claude.ai/code/session_01ADHkmPpSHhxJghrkXZFn8E Co-authored-by: Claude <noreply@anthropic.com>
…ect-thread-lwv5hl Claude-Session: https://claude.ai/code/session_01ADHkmPpSHhxJghrkXZFn8E Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
席位核对 · ACCEPT · seat
|
This was referenced Oct 27, 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.
Requested by Steve · project thread
Fixes #26421
Clause-②: no
Metadata-protocol: none
维护者速读
ui/scripts/__tests__/doc-version-claims.test.ts的 Node 版本锚点,现在同时读字面node-version:与node-version-file: .nvmrc(含.github/actions/下的 composite),后者按.nvmrc的 major 计。.nvmrc读取后只剩 1 行字面值,这个测试的 15 行下限变红;ci: one setup-workspace composite action replaces the setup steps copied into 38 jobs, and pull requests stop saving the pnpm store #26419 已于 03:41Z 合入 main,所以现在 main 上它是红的,本 PR 是 main-red 修复。ui/scripts/__tests__/doc-version-claims.test.ts的workflowVersionDeclarations、ANCHOR_DECLARATION_FLOOR与 fixture 的.nvmrc分支。pnpm --dir ui exec vitest run scripts/__tests__/doc-version-claims.test.ts,预期 29/29 通过。What changes
doc-version-claims.test.tsused literalnode-version:lines in.github/workflows/*.ymlas the anchor for every Node version the docs state, floored at 15. #26419 moved about forty jobs ontonode-version-file: .nvmrc(mostly through the new.github/actions/setup-workspacecomposite), which left one literal line and turned the file red over a CI whose Node had not moved. #26419 merged at 03:41Z (d15f99d), so the file is red onmaintoday.workflowVersionDeclarationsnow reads both spellingsactions/setup-nodeaccepts, across.github/workflows/*.ymland everyaction.ymlunder.github/actions/: a literalnode-version:and anode-version-file:reference, resolved against the checkout root and read the way setup-node reads it (first non-blank, non-comment line). Each declaration carriesvia(the version file, or null for a literal). A.nvmrcthat disagrees with a leftover literal is a split vote; a missing or unreadable version file is an UNKNOWN declaration, named, never agreement.workflowVersionFailures(check), so the corpus assertion and the fixture run the same code. Failure text names both directories and labels file-read values as.nvmrc -> "22".ANCHOR_DECLARATION_FLOOR = 10(readings in the next section). The old 15 was a reading of one shape of the tree; each further job moved into the composite lowers the count by design, and a floor tight to today's count would make the next such move a ui test edit again. A collapse to zero or near it still goes red (ablation below).workflowKeyMentions(['node-version', 'node-version-file'])walks the same file list as the parser, and the two must name the same lines..github/workflows/), and gains a.nvmrcarm: a workflow and a composite action that both read.nvmrc, compared against a page statingNode 22.x. It is green at.nvmrc22, red atv24(naming the page line, major 24 and.nvmrc -> "v24"), a split vote when a leftover literal'22'disagrees with.nvmrc, UNKNOWN atlts/*, and reported (not dropped) when.nvmrcis missing.workflowVersionKeyledger reasons updated to name the new anchor.Forced test edits: none outside this file. The whole diff is this card's own test file; no other test changed.
Why
The workflow Node version is still single-sourced; the truth moved from ~forty literal lines into
.nvmrc, whichcheck:node-versionalready holds the remaining literals to. The anchor has to follow it, or this file reads a CI whose Node never moved as a CI with no Node.Tests
All runs under
scripts/pm/os-verify-lock.sh,pnpm --dir ui exec vitest run scripts/__tests__/doc-version-claims.test.ts.mainat 9a0108c + this changemainat 75afeff (#26419 landed) merged into this branchmain's ORIGINAL test file on tree (b)Anchor readings per tree (floor probe: ANCHOR_DECLARATION_FLOOR set to 1000 through scripts/ablation-replace.mjs, restored, blob == HEAD)
scaffold-e2e.yml's registry canary) + 22node-version-file: .nvmrc(21 in workflows, 1 insetup-workspace/action.yml). Parser 23 = counter 23.git grep: 1 literal, 22 file references under.github/.Ablation: the anchor pointed back at literals only goes red on tree (b)
Both mutations through
node scripts/ablation-replace.mjs(anchor hit 1 -> 0, blob d54c9e19855b -> 0d6f06d8eb46 -> 666e75b1eab5; restored, blob == HEAD d54c9e19855b,git diff HEADempty):-filearm removed AND counter given onlynode-version: 3 failed / 26 passed..nvmrcarm: "expected [] to deeply equal [ [ …(3) ], [ …(3) ] ]"-filearm removed only (counter keeps both keys): 3 failed / 26 passed, and the census cross-check names the loss: "the parser and a counter that knows only the KEYS disagree … expected [ Array(1) ] to deeply equal [ …(23) ]".Acceptance notes
.github/**(rootci.yml,ui/.github), and the five ui jobs' pins (ci-setup-pnpm-wiring,turbo-cache-save-bound, the eightpnpm install --frozen-lockfilereaders). Moving those jobs onto the composite is a later card that needs aci.ymledit.ci.yml, out of bounds):ci.yml'suipaths filter lists.github/workflows/**but not.nvmrcor.github/actions/**. A PR that changes only.nvmrc(a Node bump) or only the composite action does not run Test UI, so this assertion would first see such a drift on the next ui-touching PR ormainrun rather than on the PR that caused it. Carrier: the laterci.ymlcard that moves the five ui jobs onto the composite.type-check:scriptswas run locally; it reports 20 errors, all TS2307 / TS7006 in five otherscripts/__tests__files that import an unbuilt@objectstack/specdist in this container, and none in this file. CI's Type Check UI is the authority.Verification
Local gate subset from
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(change set: this one file), 17 commands, all exit 0 on 79e6d72; re-run on the final head is reported in the card's os-dev-report. Derived list:check-closing-keyword-parity(+--self-test),check-comment-mask-corpus,check:cross-package-test-inputs,check:driver-memory-census,check:engine-double-contract,check:gitlink-declared,check:nul-bytes,check:published-files,check:query-options-erasure,check:refd-timer-probe,check:tier-file-adoption,check:type-check-coverage,check:type-check-debt,check:undeclared-dep-imports,check:watch-hint-literal,check:where-matcher.eslinton the file: clean.Test-only, publishes nothing:
skip-changesetlabel on this PR, no changeset.Generated by Claude Code