Repository navigation
Conversation
…d its docs' routes as Lab, runs lab:sync --check, and checks the route lock when a Lab doc changes
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
…its own folder owns its routes (FR26)
There was a problem hiding this comment.
Outcome: this needs an engineering owner's decision, plus two blocking fixes.
Counting a Lab component's record folder as Lab, the new lab:sync --check step and the wider route-lock trigger follow the draft AST-030 FR26 amendment in #12985, not FR26 as it stands on main, which keeps a spec record beside Lab code mixed. Approval waits on an engineering owner deciding that amendment, by landing #12985 or by commenting /approve-spec <full head SHA> here (the author may do so as an engineering owner); the two fixes below are needed either way:
- The new Lab entries never apply in CI, because
.github/actions/test-scope/action.ymlhands the classifier patches only for the route lock,official-packages.jsonand stories whileisLabEntryChangerefuses a file without a patch, so a new Lab component's pull request still runs the full suite and the title overstates the change; deciding these two entries by path before the patch guard, with an end-to-end case intest-scope-action.test.mjs, would fix it. LAB_SPEC_DIRmatches record folders by name alone, so a change to Lab'sInfoTiporChatfolder plus Core's currentInfoTipor Chat records would take the Lab-only lane instead of broad CI; match a record to its Lab component by content and add a refusedInfoTipcase.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Title, the Lab lane counts Lab samples and a Lab component's spec folder as Lab: false in CI (
action.yml:327,change-scope.cjs:164-172); true only when the classifier is called directly with every patch. - Title, runs
lab:sync --check: verified (ci.yml:1835-1837; the check passes on this head). - Title, checks the route lock when a Lab doc changes: verified (
ci.yml:2918;ci-lab-only-routing.test.mjs:148runs the step's own script). - A Lab-only pull request for a component named for its own folder stays in the Lab lane with its samples and spec folder: false in CI, for the same reason.
- A missing sample or route entry now fails a Lab-only pull request and names
pnpm lab:sync: verified for Lab-only changes (ci.yml:1835-1837). - The samples file is a Lab entry, where before it matched the package-root-script rule and ran the full suite: the classifier change is verified (
change-scope.cjs:172,:247), but in CI the full suite still runs. - A record folder counts only for a Lab component folder the change carries, and another component's does not: false for Lab folders named like Core components (
InfoTip,Chat). - Route-lock ownership is unchanged and a family folder keeps the full suite: verified (
change-scope.test.mjs:1022). - The route-lock step runs on a lock, Lab doc, block doc or Lab
index.tschange: verified (ci.yml:2918,ci-lab-only-routing.test.mjs:148). - The swizzle samples test already runs on every Lab-only change as a source-reading guard, now pinned by a test: verified (
ci-lab-only-routing.test.mjs:142; only the swizzle proof slices leave the Node legs). - No registry-generator test step is needed because that test never reads the lock: verified (the test names no lock path).
- The Node leg bounds test lists the new step: verified (
ci-node-leg-bounds.test.mjs:87). - The new tests were red first: verified (the head's three test files fail 5 cases on the base and pass all 135 on the head).
- The full tally over the CI script tests: not reproduced; only the three changed test files were run.
- CI impact (a few seconds for the sync check, one to two minutes for the route-lock step on doc changes, other lanes unchanged): step placement verified; timings not measured, as CI has not run on this head.
- The pull request is stacked on the one that adds
lab:sync, and this diff holds only the five lane files: verified. - The governing record is the FR26 amendment in a separate pull request: accurate, but that amendment is still an unapproved draft.
Files:
.github/scripts/change-scope.cjs: two blocking findings (the entries never reach CI; name-only record-folder match)..github/scripts/change-scope.test.mjs: the new cases call the classifier with patches CI never supplies; add a refusedInfoTipcase..github/scripts/ci-lab-only-routing.test.mjs: clear (non-blocking: the route-lock test leaves its temporary directory behind)..github/scripts/ci-node-leg-bounds.test.mjs: clear..github/workflows/ci.yml: clear as code; its two Lab-only step changes wait on the FR26 decision.
| ) | ||
| return false; | ||
| const slugs = new Set([...names].map(labRouteSlug)); | ||
| if (change.filename === LAB_SAMPLES) return true; |
There was a problem hiding this comment.
CI never reaches this line for the samples file or a record folder. The guard above refuses a file with no patch, and .github/actions/test-scope/action.yml passes patches only for the route lock, official-packages.json and stories (LAB_ENTRY), so in CI the new Rating fixture still classifies as mixed with the full suite. Decide these two entries by path before the patch guard (keeping the rename refusal), and add an end-to-end case to test-scope-action.test.mjs.
| const slugs = new Set([...names].map(labRouteSlug)); | ||
| if (change.filename === LAB_SAMPLES) return true; | ||
| const spec = LAB_SPEC_DIR.exec(change.filename); | ||
| if (spec) return names.has(spec[1]); |
There was a problem hiding this comment.
This matches by folder name only. Lab's InfoTip (a deprecated re-export of Core InfoTip) and Chat folders share names with Core record folders, so packages/lab/src/InfoTip/index.ts plus Core's current docs/specs/components/InfoTip/InfoTip.spec.md classifies as Lab-only with no full suite. Match the record to the Lab component by content (for example, accept only an added record whose patch names packages/lab/src/<Name>/ and no packages/core/ path), and add a refused InfoTip case.
There was a problem hiding this comment.
Outcome: this needs an engineering owner's decision, plus two blocking fixes.
Counting a Lab component's record folder as Lab, the new lab:sync --check step and the wider route-lock trigger follow the draft AST-030 FR26 amendment in #12985, not FR26 as it stands on main, which keeps a spec record beside Lab code mixed. Approval waits on an engineering owner deciding that amendment, by landing #12985 or by commenting /approve-spec <full head SHA> here (the author may do so as an engineering owner); the two fixes below are needed either way:
- The new Lab entries never apply in CI, because
.github/actions/test-scope/action.ymlhands the classifier patches only for the route lock,official-packages.jsonand stories whileisLabEntryChangerefuses a file without a patch, so a new Lab component's pull request still runs the full suite and the title overstates the change; deciding these two entries by path before the patch guard, with an end-to-end case intest-scope-action.test.mjs, would fix it. LAB_SPEC_DIRmatches record folders by name alone, so a change to Lab'sInfoTiporChatfolder plus Core's currentInfoTipor Chat records would take the Lab-only lane instead of broad CI; match a record to its Lab component by content and add a refusedInfoTipcase.
Claims and files checked
Review mode: carry-forward; reason: none
Claims:
- Title, the Lab lane counts Lab samples and a Lab component's spec folder as Lab: false in CI (
action.yml:327,change-scope.cjs:164-172); true only when the classifier is called directly with every patch. - Title, runs
lab:sync --check: verified (ci.yml:1835-1837; the check passes on this head). - Title, checks the route lock when a Lab doc changes: verified (
ci.yml:2918;ci-lab-only-routing.test.mjs:148runs the step's own script). - A Lab-only pull request for a component named for its own folder stays in the Lab lane with its samples and spec folder: false in CI, for the same reason.
- A missing sample or route entry now fails a Lab-only pull request and names
pnpm lab:sync: verified for Lab-only changes (ci.yml:1835-1837). - The samples file is a Lab entry, where before it matched the package-root-script rule and ran the full suite: the classifier change is verified (
change-scope.cjs:172,:247), but in CI the full suite still runs. - A record folder counts only for a Lab component folder the change carries, and another component's does not: false for Lab folders named like Core components (
InfoTip,Chat). - Route-lock ownership is unchanged and a family folder keeps the full suite: verified (
change-scope.test.mjs:1022). - The route-lock step runs on a lock, Lab doc, block doc or Lab
index.tschange: verified (ci.yml:2918,ci-lab-only-routing.test.mjs:148). - The swizzle samples test already runs on every Lab-only change as a source-reading guard, now pinned by a test: verified (
ci-lab-only-routing.test.mjs:142; only the swizzle proof slices leave the Node legs). - No registry-generator test step is needed because that test never reads the lock: verified (the test names no lock path).
- The Node leg bounds test lists the new step: verified (
ci-node-leg-bounds.test.mjs:87). - The new tests were red first: verified (the head's three test files fail 5 cases on the base and pass all 135 on the head).
- The full tally over the CI script tests: not reproduced; only the three changed test files were run.
- CI impact (a few seconds for the sync check, one to two minutes for the route-lock step on doc changes, other lanes unchanged): step placement verified; timings not measured, as CI has not run on this head.
- The pull request is stacked on the one that adds
lab:sync, and this diff holds only the five lane files: verified. - The governing record is the FR26 amendment in a separate pull request: accurate, but that amendment is still an unapproved draft.
Files:
.github/scripts/change-scope.cjs: two blocking findings (the entries never reach CI; name-only record-folder match)..github/scripts/change-scope.test.mjs: the new cases call the classifier with patches CI never supplies; add a refusedInfoTipcase..github/scripts/ci-lab-only-routing.test.mjs: clear (non-blocking: the route-lock test leaves its temporary directory behind)..github/scripts/ci-node-leg-bounds.test.mjs: clear..github/workflows/ci.yml: clear as code; its two Lab-only step changes wait on the FR26 decision.
There was a problem hiding this comment.
Outcome: this needs an engineering owner's decision, plus two blocking fixes.
Counting a Lab component's record folder as Lab, the new lab:sync --check step and the wider route-lock trigger follow the draft AST-030 FR26 amendment in #12985, not FR26 as it stands on main, which keeps a spec record beside Lab code mixed and runs the route-lock check only when the lock changes. Approval waits on an engineering owner deciding that amendment, by landing #12985 or by commenting /approve-spec <full head SHA> here (the author may do so as an engineering owner). The two fixes below are needed either way:
- The new Lab entries never apply in CI, because
.github/actions/test-scope/action.ymlhands the classifier patches only for the route lock,official-packages.jsonand stories whileisLabEntryChangerefuses a file without a patch, so a new Lab component's pull request still runs the full suite and the title overstates the change; deciding these two entries by path before the patch guard, with an end-to-end case intest-scope-action.test.mjs, would fix it. LAB_SPEC_DIRmatches record folders by name alone, so once patches reach it a change to Lab'sInfoTiporChatfolder plus Core's currentInfoTipor Chat records would take the Lab-only lane instead of broad CI; tie a record to its Lab component by content and add a refusedInfoTipcase.
Claims and files checked
Review mode: full; reason: merge-touches-pr-files
Claims:
- Title, the Lab lane counts Lab samples and a Lab component's spec folder as Lab: false in CI (
action.yml:327,change-scope.cjs:164-174); true only when the classifier is given every patch. - Title, runs
lab:sync --check: verified (ci.yml:1835-1837; the check passes on this head). - Title, checks the route lock when a Lab doc changes: verified (
ci.yml:2918;ci-lab-only-routing.test.mjs:148runs the step's own script). - A Lab-only pull request for a component named for its own folder stays in the Lab lane with its samples and spec folder: false in CI, for the same reason.
- A missing sample or route entry fails the pull request and names
pnpm lab:sync: verified for Lab-only changes (ci.yml:1835-1837,scripts/lab-sync.mjs:341). - The samples file is a Lab entry, where before it matched the package-root-script rule and ran the full suite: the classifier change is verified (
change-scope.cjs:172), but in CI the full suite still runs. - A record folder counts only for a Lab component folder the change carries, and another component's does not: false for Lab folders named like Core records (
InfoTip,Chat). - Route-lock ownership is unchanged and a family folder keeps the full suite: verified (
change-scope.test.mjs:1022). - The route-lock step runs on a lock, Lab doc, block doc or Lab
index.tschange: verified (ci.yml:2918,ci-lab-only-routing.test.mjs:148). - The new sync step runs on the first Node leg of a Lab-only change: verified (
ci.yml:1835-1837,ci-node-leg-bounds.test.mjs:87). - The swizzle samples test already runs on every Lab-only change as a source-reading guard, now pinned by a test: verified (
ci-lab-only-routing.test.mjs:142). - No registry-generator test step is needed because that test never reads the lock: verified (the test names no lock path).
- The new tests were red first: verified (the head's three test files fail 5 cases on the base and pass all 135 on the head).
- The full tally over the CI script tests: not reproduced; only the three changed test files were run.
- CI impact (a few seconds for the sync check, one to two minutes for the route-lock step on doc changes, other lanes unchanged): step placement verified; timings not measured, as CI has not run on this head.
- The pull request is stacked on the one that adds
lab:sync, and this diff holds only the five lane files: verified. - The governing record is the FR26 amendment in a separate pull request: accurate, but that amendment is still an unapproved draft.
Files:
.github/scripts/change-scope.cjs: two blocking findings (the entries never reach CI; name-only record-folder match)..github/scripts/change-scope.test.mjs: the new cases call the classifier with patches CI never supplies; add a refusedInfoTipcase..github/scripts/ci-lab-only-routing.test.mjs: clear (non-blocking: the route-lock test leaves its temporary directory behind)..github/scripts/ci-node-leg-bounds.test.mjs: clear..github/workflows/ci.yml: clear as code; its two Lab-only step changes wait on the FR26 decision.
Who this helps
Lab component authors, and everyone downstream of main. A Lab-only pull request for a component named for its own folder now stays in the fast Lab lane when it carries what a new component needs: its swizzle samples and its own spec folder, alongside its route entries. The lane also catches what #9832 slipped past: a missing sample or route entry fails on the pull request, naming the fix (
pnpm lab:sync), instead of turning main red.Record: AST-030 FR26 at #12985 12f9b7a.
Stacked on #13019 (
pnpm lab:syncandpackages/lab/swizzle-samples.mjs); the base is that branch, so this diff shows only the lane change. It retargets to main when #13019 merges.What changes
.github/scripts/change-scope.cjs(the trusted classifier) adds two Lab entries:packages/lab/swizzle-samples.mjsis a Lab entry. Before, it matched the package-root-script pattern, so a Lab-only change that added a sample ran the full suite.docs/specs/components/<Name>/is a Lab entry when<Name>is a Lab component folder the change carries; another component's spec folder is not.Route-lock ownership is unchanged: a component named for its own folder owns its routes, and a family folder keeps the full suite (FR26). #9832's MediaPlayer folder, with AudioPlayer and VideoPlayer routes, stays mixed; a test pins that.
.github/workflows/ci.ymlchanges two steps:checkShadcnRouteLockthroughgenerate-data.mjswhenever the change touches the lock, a Lab.doc.mjs(component or block), or a Labindex.ts. Before, it ran only when the lock changed, so a new Lab doc with no route entry passed the lane.node scripts/lab-sync.mjs --check. The swizzle samples test already runs on every Lab-only change as a source-reading guard; a test now pins that.There is no
generate-shadcn-registry.test.mjsstep: it never reads the lock (lane 0's finding).Tests (red first)
Before the change, the new classifier and workflow cases failed; with it, all pass.
change-scope.test.mjs, "a new Lab component with its samples and spec folder":index.ts, a block,swizzle-samples.mjs,docs/specs/components/Rating/, a new story, its route and example entries, and a Changeset. This failed before the change.ci-lab-only-routing.test.mjs, "a Lab-only doc change with an unchanged lock still runs the route-lock check": it runs the step's own script in a temporary git repository with a stand-innode. A source-only change skips the check; a Lab doc, block doc, Labindex.tsor lock change runsgenerate-data.mjs. It fails on today's step. Another case pins the Lab sync check step, and the fs-guard lister always listssamples.test.mjs.ci-node-leg-bounds.test.mjsadds the new leg-1 step to its list..github/scripts/*.test.mjsplus the lab-sync and preflight tests: 2965 passed, 25 skipped.CI impact
CI impact: on a Lab-only change, test-node leg 1 adds
lab:sync --check(a few seconds), and the route-lock step now runsgenerate-data.mjs(about 1 to 2 minutes) whenever a Lab doc orindex.tschanges, not only the lock. Other lanes are unchanged.Overlap checked: #13019 (stacked: those 8 files are #13019's own diff, which this branch sits on; this PR edits only the 5 lane files)
Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the drain's serial merge loop, after #13019, on green, CodeBunny approval and Specs' exact-head
/approve-spec.