This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(devx): say the skill-examples build is scoped at both precondition sites - #8066
Merged
baozhoutao merged 2 commits intoSep 6, 2026
Merged
Conversation
…n sites `scripts/check-skill-examples.mjs` prints the `--build-filter` build command on two precondition paths — the regular path (:1285) and the `--self-test` type-check leg (:1721) — and neither said the build is TRIMMED. Measured on `origin/main` `65ce8c576`: the filter names 10 of the workspace's 40 packages and turbo expands those to 30 in scope, so a reader who runs the printed command is left with 10 packages carrying no `dist/` and nothing to tell that apart from a build that half-failed. Ports the shape objectui#7795 landed as `check-doc-snippet-types.mjs`'s `scopedBuildNotice`: one exported notice function, called from both sites, whose two counts are ARGUMENTS derived from what the gate already read (`state.neededPackages` and the `packageDirOf` map `analyze` now carries out), and which names no package — the reader who wants the exact set is sent back to the same filter via `--dry=text` and turbo's "Packages in scope" line, never to a second list that would rot. `--build-filter`'s selection, the scanner, the judge and every exit code are untouched: the trimming is this gate's design, and the workflow forbids the unfiltered build outright. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
…notice Keeps this branch on the current main (#8054 landed while this was in flight). Disjoint by file: that change is app-shell/console vi.mock factories plus scripts/check-vi-mock-inherit.mjs; this branch touches only scripts/check-skill-examples.mjs and its pin test. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Contributor
Author
|
Standing down on Generated by Claude Code |
baozhoutao
marked this pull request as ready for review
September 6, 2026 14:18
baozhoutao
deleted the
claude/issue-7811-skill-examples-scoped-build-notice
branch
September 6, 2026 14:34
baozhoutao
pushed a commit
that referenced
this pull request
Sep 6, 2026
#8066 touches only scripts/check-skill-examples.mjs and its test — no package source, so the built types this corpus is judged against do not move and no rebuild is owed. Its test is a reader of the gate file, so the reader suite is re-run on this head. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #7811
scripts/check-skill-examples.mjsprints the same--build-filterbuild command on twoprecondition paths, and neither said the build is trimmed. This ports the shape objectui#7795
landed for
check-doc-snippet-types.mjs(scopedBuildNotice), adapted to what this gate scopes:the marked examples' import surface.
The gap, measured on this branch (
3b26507ba)node scripts/check-skill-examples.mjs --build-filternames 10 packages;packages/holds 40.--dry=text), andfinishes with 29 of 40 packages carrying a
dist/.dist/, and nothing on screen told them that leftover was the intended end state rather than abuild that half-failed. (Ten of those are simply outside the closure;
@object-ui/test-supportisin scope but is source-typed and emits no
dist/by design.)Trimming is this gate's design —
.github/workflows/skill-examples.yml's header forbids theunfiltered build outright, under the 2026-08-16 ruling on objectui#4846 — so what was missing is the
sentence, never a wider filter.
What changed
One exported
scopedBuildNotice(named, total)inscripts/check-skill-examples.mjs, called fromboth sites and from nowhere else:
:1285— the regular precondition path (followed bypnpm check:skill-examples):1721— the--self-testtype-check leg (followed bynode scripts/check-skill-examples.mjs --self-test)Both counts are arguments, derived from what the gate already read:
state.neededPackages.size,and
Object.keys(state.packageDirOf).length.analyze()now carriespackageDirOfout in itsreturn — it is the same map it already walked to resolve
neededPackages, not a second reading ofthe tree. The notice names no package; the reader who wants the exact set is sent back to the
same filter (
--dry=text, turbo'sPackages in scopeline), never to a second list that would rot.⛔ Untouched:
--build-filter's package selection, the scanner, the judge, every exit code, andevery existing assertion in the pin test. Nothing under
skills/**or.claude/**is in the diff.It reaches a real terminal
This worktree was genuinely unbuilt, so both paths were exercised for real (exit 2 both times,
unchanged):
Regular path —
node scripts/check-skill-examples.mjs:The
--self-testleg prints the identical paragraph under its own two-line remedy. After the scopedbuild, both run green and the notice is correctly absent from the happy path.
The pin, and its must-fail leg
New
describeinscripts/__tests__/check-skill-examples.test.ts(relative imports only; existingassertions untouched). Six cases: the counts are interpolated (with the control — different inputs,
different text, so a hard-coded "10 of 40" fails); the notice names no package (with the control —
the same matcher is first shown to catch package names in this tree, so the refusal is not
vacuous); it says the build is scoped and its leftovers are the designed end state; both sites
call it; neither call site passes a numeric literal; and
analyze()derivespackageDirOffrom thetree it walked.
Ablation, on the committed implementation (
dcf79b983), restoring under atrap:2b105219f=HEAD:scripts/check-skill-examples.mjs; 2 call sites--self-testleg's call)a6b6eb01b— different, so it reached disk; 1 call sitevitest run scripts/__tests__/check-skill-examples.test.ts→ exit 1, 2 failed / 88 passed — "is printed on BOTH precondition paths" and "is handed numbers the gate read" both red2b105219f,git diff HEADempty, 2 call sitesGates (all at
3b26507ba, exit codes captured by redirect-then-capture)node scripts/check-skill-examples.mjs --self-testpnpm check:skill-examples(after its scoped build)mainpnpm exec vitest run scripts/__tests__/check-skill-examples.test.tspnpm exec vitest run scripts/__tests__/pnpm type-check:scripts--listFilesconfirms both changed files are in the program, so this is measured, not vacuouspnpm lint:rootpnpm check:control-bytesgrep -naPover both paths: no hitsnode scripts/check-changeset-presence.mjsscripts/publishes nothing)node scripts/check-governed-queue-guard.mjs --testboth pathsAGENTS.md→ exit 3, GOVERNED)Readers checked:
.github/workflows/skill-examples.ymlinvokes the gate asnode scripts/check-skill-examples.mjs --build-filter,--self-testand bare — the command line thenotice points at still matches exactly.
scripts/__tests__/check-skill-eval-tokens.test.tsnames thegate only in prose and ran green in the directory sweep above.
origin/mainmoved while this was in flight (#8054), soorigin/mainwas merged in and every gateabove was re-run on the merged head.
Live E2E (informational)is red on every branch today for anupstream reason (objectui#7990) and is not this branch's.
Generated by Claude Code