Uh oh!
There was an error while loading. Please reload this page.
fix(tooling): emit the dependency closure from check-doc-snippet-types --build-filter - #6289
Conversation
…s --build-filter The gate's `--build-filter` emitted the packages the covered documents import. That is a true answer to a different question than "what do I build": those packages depend on workspace packages no snippet names, and without them the build the gate prescribes dies on an import the reader never wrote. Each filter now carries pnpm/turbo's dependency-closure suffix `...`. Measured on this tree from an unbuilt state: - `pnpm <bare list> run build` selected 21 packages and failed with ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @object-ui/components, TS2307: Cannot find module '@object-ui/sdui-parser'. - `pnpm <closure list> run build` selected 33 and exited 0, after which the gate returns a real verdict instead of its precondition message. - `turbo run build` selects the IDENTICAL 33 tasks either way, because the `build` task declares dependsOn: ["^build"] — so the suffix is a no-op for the workflow that consumes this, and a fix everywhere else. Both spellings wear the same `--filter=` flag, so which one closed the gap was invisible at the point of use. The emission moves into an exported `buildFilterArgs` so the closure suffix is pinned by a test rather than by the list, which is supposed to move as coverage grows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe
yinlianghui-tw
commented
Aug 25, 2026
PM review — ACCEPT. ⭐ The turbo measurement rewrites the card's diagnosis, and the fix is calibrated to exactly what was broken.Reviewed by the ⭐ The correction that matters: turbo was never brokenThe card (and my dispatch) framed this as "the remedy the gate prints does not work as printed." Measured truth is narrower and more interesting:
So the printed command (turbo spelling) always worked, and CI was never at risk — the defect lives only on the pnpm spelling, which wears the same The card's named example also moved — The old-fail/new-succeed pair — from equal starting states, as demanded
The design choice worth keeping
That is the correct thing to pin — a list pin would rot every time doc coverage grows (tonight's #6280 is literally that failure class), while the suffix is the invariant. The three new tests red under ablation (with the mutation proven on disk and no dist between mutation and run — stated, not skipped) close the loop, and the consumer sweep correctly distinguished the #6221 shell tests' stubbed stdout from the real emission. Changeset — none, on the gate's own verdict, quoted. Correct.⛔ Not armed yetMarking ready → arming once CI concludes, in the wind-down queue. This is the second-to-last card of the shift; #6009 remains in flight. Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#5911
scripts/check-doc-snippet-types.mjs --build-filteremitted the packages thecovered documents import. That is a true answer to a different question than
"what do I build": those packages depend on workspace packages no snippet names,
and without them the build the gate prescribes dies on an import the reader never
wrote.
Each emitted filter now carries pnpm/turbo's dependency-closure suffix
....Premise check — the issue's example is stale, the class is live
The issue names
@object-ui/i18nas the package missing from the list. That isno longer true: coverage grew and
@object-ui/i18nis emitted directly today.The closure gap itself is unchanged — six workspace packages the emitted set
depends on are still absent from it:
One more correction worth recording, because it changes what the fix is for. The
gate's printed remedy uses turbo, and turbo was never broken: this repo's
buildtask declaresdependsOn: ["^build"], so it supplied the closure allalong. Measured with
turbo run build --dry-run=json, the bare list and theclosure list select the identical 33 tasks —
only in NEW: [],only in OLD: []. So the suffix is a no-op for CI and for the printedcommand, and a fix for every other spelling of the same flag.
The gap is real on the pnpm spelling, which wears the same
--filter=flagand selects exactly what it matches. Which of the two closed the gap was
invisible at the point of use — that is the actual defect.
The emitted list, before and after
Before (21 words, bare):
After (21 words, each carrying the closure suffix):
Package selection:
pnpm <bare> exec pwd→ 21 packages;pnpm <closure> exec pwd→ 33.The build pair — same command, same unbuilt start
Both runs started from a tree with
dists=0 tsbuildinfo=0(fresh worktree forthe first; for the second, the dirs the first run built were removed and the
count re-measured at 0 before starting).
OLD list — fails:
Same shape as the issue reported, with the package names moved — a workspace
package no snippet imports, so nothing put it in the list.
NEW list — succeeds:
grep -c "TS2307\|ERR_PNPM"over the new-list log: 0.The gate returns a real verdict after that build
Not the precondition message — a verdict:
check:doc-snippetsexit 0.Consumers of the emitted format — checked
grep -rn build-filterreaches four files. None pinned the bare spelling:.github/workflows/doc-snippet-types.yml— consumes the list throughturbo run build, unquoted so it word-splits. Unchanged: turbo selects thesame 33 tasks either way (measured above), and the suffix introduces no
character the runner shell re-interprets (pinned by a new test).
scripts/__tests__/check-doc-snippet-types.test.ts— the three assertionsnear the old format (
--filter=@object-ui/core --filter=@object-ui/react) pina stubbed gate's stdout for objectui#6221's shell tests, not the real
gate's emission. They still pass unchanged; the stub is testing the step's
handling of a failure, not the format.
content/docs/guide/ci-cd-pipeline.md— prose; updated in this commit to saywhat the suffix is for and why it is a no-op under turbo.
Tests
The emission moves into an exported
buildFilterArgsso the suffix ispinned rather than the list, which is supposed to move as coverage grows.
Three new tests, collected by name under
--reporter=verbose:Reverse-verification (from the committed state, so restoring is a checkout).
Stripping the
...from the emission — mutation confirmed on disk before therun: closure marker
1 → 0, injected bare form1,git diff --statone line— turns exactly those three red and nothing else:
No rebuild leg applies: the suite imports the gate as
../check-doc-snippet-types.mjs,a relative path to plain JS source, so no package
exportsand nodist/sitbetween the mutation and the run. Restore leg confirmed:
git status --shortclean, marker back to
1, emission carrying....Gates, all on
3e9c50a63(the final commit)pnpm exec vitest run scripts/__tests__Test Files 77 passed (77)/Tests 2210 passed (2210)pnpm type-check:scriptstsc -p tsconfig.scripts.json(echoed as positive control)pnpm lint:root(UNNARROWED)✖ 28 problems (0 errors, 28 warnings)— exit 0, warnings all pre-existingpnpm check:control-bytes✅ check-control-bytes: OK (scanned 5178 tracked text file(s); skipped 85 binary).pnpm check:doc-snippetsEvery covered documentation snippet compiles against the built types.pnpm check:doc-types✅ Every documented component type is registered.pnpm check:doc-fences✅ check:doc-fences — every TypeScript block in 223 document(s) is fenced ts/tsx/typescript…pnpm docs:check-linksLinks are valid across 15 scan roots.pnpm check:skills-paths✅ check-skills-paths: OK (93/94 stated path(s) resolve across 18 guide file(s); 1 baselined).Every exit code was captured by redirect before any pipe.
Changeset
None owed, and this is the gate's own verdict on this diff rather than an
assumption:
Exit 0. No label applied —
skip-changesetdoes not exist in this repository.Generated by Claude Code