Repository navigation
chore: preflight --quick reports a typecheck that fails only on missing /built or relative dist outputs as skipped, not failed - #13005
Conversation
…ng workspace builds as skipped
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 250ecbc |
…s "not checked", never a pass
|
/approve-spec 6887671 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, since the pull request is still a draft.
The quick-mode SKIP works as described: an unbuilt CLI typecheck gives exactly the two @astryxdesign/theme-neutral/built errors and now ends "not checked", and the three new tests fail against main's script and pass here. Two non-blocking edges are worth a look:
- A non-TypeScript failure in another package of the same run (a tsc out-of-memory abort, say) is also reported as "workspace builds missing", because
missingBuildsreads onlyerror TSlines, so the guide's "any other error fails it" says more than the code does. - The
…/dist…branch ofBUILD_OUTPUTalso matches third-party specifiers such asnext/dist/…, and anchoring it to relative paths would keep it to workspace builds.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: on
main, a quick run that fails only on unbuilt workspace packages shows typecheck FAIL and "not ready: 1" — verified (the baserunChecksandformatTable; the red-first run). - Claim: the quick typecheck still shows its output and saves it for the check — verified (
scripts/preflight.mjs:735-746); it now prints when the typecheck ends rather than live. - Claim: when every TypeScript error is a missing
@astryxdesign/<package>/builtordistmodule, the row is SKIP with the missing-builds note — verified (scripts/preflight.mjs:475-494,:552-567; an unbuilt CLI typecheck). - Claim: that SKIP does not count toward "not ready" and the verdict says "not checked", never a pass — verified for the printed verdict (
scripts/preflight.mjs:604-617); the exit status is 0. - Claim: any other error, including a missing third-party module, still fails — verified for TypeScript errors (the mixed-set and bare-package tests); the two edges above are the exceptions.
- Claim: the default mode is unchanged — verified (only the quick plan sets the new fields).
- Claim: the tests cover the classifier, the quick plan and the SKIP verdict, and keep a real type error as FAIL — verified (
scripts/preflight.test.mjs:276-340). - Claim: the guide gains one sentence in the
--quickparagraph — verified (docs/contributing/pull-requests.md:167-170). - Claim: 21 tests pass and the 3 new ones fail on
main's script first — verified (21 passed on the head; 3 failed and 18 passed againstmain's script). - Claim: a fresh-clone quick run found only two missing
theme-neutral/builterrors in the CLI — verified (an unbuilt CLI typecheck gives exactly those two, in two template pages). - Claim: Prettier clean — verified.
- Claim: no CI impact and no workflow changes — verified (no workflow or CI script changes).
- Claim: no overlapping pull request — consistent with a search of open pull requests; not a code claim.
- Claim: the ownership and landing note — a process statement with nothing in the code to check.
- File:
scripts/preflight.mjs— non-blocking notes (the two classifier edges, buffered output, the exit status, and a header@outputthat omits the new verdict). - File:
scripts/preflight.test.mjs— clear. - File:
docs/contributing/pull-requests.md— non-blocking ("any other error fails it" is broader than the classifier).
| const errors = text.split('\n').filter(line => /error TS\d+/.test(line)); | ||
| if (errors.length === 0 || !errors.every(line => BUILD_OUTPUT.test(line))) |
There was a problem hiding this comment.
Non-blocking: only error TS lines are classified, but the exit code covers every package in the recursive run. Built-only TS2307 from one package plus a non-TypeScript failure from another (tsc out of memory, a failing step in a typecheck chain) gives SKIP "workspace builds missing". Skipping only when every failing package in pnpm's [ERROR] <package> summary printed build-output errors would keep "any other error fails it" true.
| const result = spawnSync(command[0], command.slice(1), { | ||
| cwd: ROOT, | ||
| env: {...process.env, ...env}, | ||
| stdio: ['ignore', 'pipe', 'pipe'], | ||
| maxBuffer: 256 * 1024 * 1024, | ||
| }); | ||
| const text = `${result.stdout ?? ''}${result.stderr ?? ''}`; | ||
| process.stdout.write(text); | ||
| fs.writeFileSync(stdout, text); | ||
| return result.status ?? 1; |
There was a problem hiding this comment.
Non-blocking: piping through spawnSync buffers the whole typecheck, so nothing prints until it ends and stderr follows stdout. Streaming while keeping the log would need an asynchronous spawn, if live output matters here.
|
/approve-spec ffcb0de |
There was a problem hiding this comment.
Changes requested: one sentence in the guide, repeated in the description, promises more than the new classifier does.
- Miss:
docs/contributing/pull-requests.md:170and the description say any other error fails the quick typecheck, butmissingBuilds(scripts/preflight.mjs:489-494) reads onlyerror TSlines, so built-outputTS2307s from one package plus another package's failure that prints no TypeScript error report SKIP with exit 0 (and thedistbranch at:480also matches third-party specifiers); either say "any other TypeScript error fails it" or make the classifier skip only when every failing package printed build-output errors.
The quick-mode SKIP itself works as described: an unbuilt CLI typecheck still gives exactly the two theme-neutral/built errors and ends "not checked", and the new tests fail against main's script and pass here. CI has not finished on this head yet.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: on
main, a quick run that fails only on unbuilt workspace packages shows typecheck FAIL and "not ready: 1" — verified (the baserunCheckshas no skip path; the red-first run). - Claim: the quick typecheck still shows its output and saves it for the check — verified (
scripts/preflight.mjs:421-423,:735-746); it now prints when the typecheck ends rather than live. - Claim: when every TypeScript error is a missing
@astryxdesign/<package>/builtordistmodule, the row is SKIP with the missing-builds note — verified (scripts/preflight.mjs:475-494,:552-567; an unbuilt CLI typecheck). - Claim: that SKIP does not count toward "not ready" and the verdict says "not checked", never a pass — verified for the printed verdict (
scripts/preflight.mjs:604-617, the test atscripts/preflight.test.mjs:306-337); the exit status is 0. - Claim: any other error, including a missing third-party module, still fails — false (
scripts/preflight.mjs:489-494ignores failures without anerror TSline;:480matches third-partydistspecifiers). - Claim: the default mode is unchanged — verified (only the quick plan sets the new fields,
scripts/preflight.mjs:421-423). - Claim: the tests cover the classifier, the quick plan and the SKIP verdict, and keep a real type error as FAIL — verified (
scripts/preflight.test.mjs:283-338). - Claim: the guide gains one sentence in the
--quickparagraph — verified (docs/contributing/pull-requests.md:167-170); that sentence carries the false claim above. - Claim: 21 tests pass and the 3 new ones fail on
main's script first — verified (21 of 21 here; 3 failed and 18 passed withmain's script). - Claim: a fresh-clone quick run found only two missing
theme-neutral/builterrors in the CLI's template docs — verified (an unbuilt CLI typecheck gives exactly those two). - Claim: Prettier clean — verified.
- Claim: no CI impact and no workflow changes — verified (no workflow or CI script changes).
- Claim: no overlapping pull request — out of date: #13019, opened later, edits the same three files and merges cleanly with this head.
- Claim: the ownership, landing and local full-preflight notes — process statements with nothing in the code to check.
- File:
scripts/preflight.mjs— the classifier side of the blocking finding; non-blocking notes on the exit status, buffered output and the header's@outputline. - File:
scripts/preflight.test.mjs— clear. - File:
docs/contributing/pull-requests.md— blocking (line 170).
… third-party dist path; the guide says any other TypeScript error fails it
|
/approve-spec b46c81d |
There was a problem hiding this comment.
Changes requested: the guide, the classifier's comment and the title each promise a SKIP that the new pattern does not give.
scripts/preflight.mjs:480needs a folder between the leading./or../and/dist, so a missing'./dist/index.js'or'../dist/index.js'now reports FAIL (the previous revision skipped both), whiledocs/contributing/pull-requests.md:168, the JSDoc at:484-485and the description say any relativedistpath skips; use\.\.?\/(?:[^']*\/)?dist(?:\/[^']*)?and add a'../dist/index.js'test case, or narrow the wording.- Miss: the title's "a typecheck that fails only on missing workspace builds" and the description's "anyone … in a fresh checkout or worktree" cover a fresh-clone typecheck of any package that imports
@astryxdesign/core, which still fails (Lab gives 469TS2307on@astryxdesign/core…plus follow-on errors and ends "not ready: 1"), so retitle to the/builtand relativedistcase and say there that such packages still needpnpm buildfirst.
The previous finding is fixed: the guide now says "any other TypeScript error fails it", and a missing third-party dist module fails again. All 21 preflight tests pass on this head; CI has not run because the pull request is a draft.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Title: a quick typecheck that fails only on missing workspace builds reports SKIP — false for a fresh-clone typecheck of a package that imports Core (a Lab run;
scripts/preflight.mjs:480,:490-494). - Claim: anyone running quick mode in a fresh checkout or worktree is helped — false in the same way; it helps a package whose only missing modules are
/builtor relativedistoutputs, today the CLI's template docs. - Claim: on
mainsuch a run shows typecheck FAIL and "not ready: 1" — verified (the baserunCheckshas no skip path). - Claim: the quick typecheck keeps its output, shown as before and saved for the check — verified (
scripts/preflight.mjs:418-423,:734-748); it now prints when the typecheck ends rather than live. - Claim: SKIP when every TypeScript error is a
TS2307on@astryxdesign/<package>/built…— verified (scripts/preflight.mjs:475-495,:553-568). - Claim: the same for a relative path into a
distfolder — false for./dist/…and../dist/…(scripts/preflight.mjs:480). - Claim: a third-party package's
distsubpath is not one — verified (scripts/preflight.mjs:480;scripts/preflight.test.mjs:294-299). - Claim: the SKIP does not count toward "not ready", never reads as a pass, and the verdict says "not checked … run
pnpm build, then run again" — verified (scripts/preflight.mjs:605-618;scripts/preflight.test.mjs:337-349); the exit status is 0. - Claim: any other TypeScript error, a missing third-party module included, still fails — verified (
scripts/preflight.mjs:490-494;scripts/preflight.test.mjs:287-299,:350). - Claim: a package that fails without a TypeScript error beside build-output errors still reads SKIP, and the verdict says "not checked" — verified (
scripts/preflight.mjs:490-494). - Claim: the default mode is unchanged — verified (only the quick plan sets the new fields).
- Claim: the tests cover the classifier, the quick plan and the SKIP verdict, and keep a real type error as FAIL — verified (
scripts/preflight.test.mjs:283-351). - Claim: the guide gains text in the
--quickparagraph — verified, as two sentences (docs/contributing/pull-requests.md:167-172); its "relativedistpath" carries the false claim above. - Claim: 21 tests pass and the original 3 new cases failed on
main's script first — verified (21 of 21 here; the base script is unchanged since that red-first run). - Claim: a fresh-clone quick run found only two
theme-neutral/builterrors in the CLI's template docs — verified; the CLI is unchanged since that run. - Claim: Prettier clean — verified (ESLint is clean too).
- Claim: no CI impact and no workflow changes — verified.
- Claim: the overlap with #13019 merges cleanly — verified (the two heads merge without conflict).
- Claim: ownership, landing and local full-preflight notes — process statements with nothing in the code to check.
- File:
scripts/preflight.mjs— blocking at line 480; non-blocking notes on non-TypeScript failures, the exit status, buffered output and the header's@outputline. - File:
scripts/preflight.test.mjs— clear apart from the missing'../dist/index.js'case, part of the first fix. - File:
docs/contributing/pull-requests.md— blocking at line 168 (the first finding).
…workspace build output
|
/approve-spec f946acb |
There was a problem hiding this comment.
Changes requested: the code does what the guide says, but the description still promises the SKIP in a fresh checkout, where it does not appear.
- Miss: "Who this helps" and the test plan say a quick run in a fresh checkout or worktree gets the SKIP, but in a clone with only
pnpm installthe CLI's typecheck stops atpackages/cli/assets/theme.template.ts:83(TS2307on@astryxdesign/core/theme, a Core subpath that resolves to Core'sdist) and still ends "not ready: 1", so please say the change helps once Core is built (for example afterpnpm -F @astryxdesign/core buildor a test run) and that a first quick run in an install-only clone still needs a build.
With Core built and the themes unbuilt, the CLI's quick typecheck reports SKIP and "not checked" as described, and all 21 preflight tests pass; CI has not run because the pull request is a draft. The earlier non-blocking notes on non-TypeScript failures, the exit status of "not checked", buffered output and the header's @input and @output lines still apply.
Claims and files checked
Review mode: same-head; reason: none
- changed rules (0): none
- Title: a quick typecheck that fails only on missing
/builtor relativedistoutputs reports SKIP — verified (scripts/preflight.mjs:475-495,:553-568). - Claim: it helps anyone running quick mode in a fresh checkout or worktree whose typecheck reads a
/builtoutput or a relativedistpath — false for an install-only clone (the CLI stops on@astryxdesign/core/theme). - Claim: quick mode builds nothing, so such a typecheck fails on modules that are not built — verified (
scripts/preflight.mjs:384-390). - Claim: the CLI's templates import
@astryxdesign/theme-neutral/built, and today that shows typecheck FAIL and "not ready: 1" — verified once Core is built (the imports are in the page templates); with this change it reads SKIP in that state. - Claim: a package that imports another workspace package by its main entry (Lab and Core) is not covered and still needs a build — verified (
@astryxdesign/coredoes not match the pattern). - Claim: the quick typecheck keeps its output, shown as before and saved for the check — verified (
scripts/preflight.mjs:418-423,:736-748); it prints when the typecheck ends. - Claim: SKIP when every TypeScript error is a
TS2307on@astryxdesign/<package>/built…or a relative path intodistat any depth — verified (scripts/preflight.mjs:480,:490-494;scripts/preflight.test.mjs:283-312). - Claim: a third-party package's
distsubpath is not one — verified (scripts/preflight.test.mjs:294-299). - Claim: the SKIP does not count toward "not ready", never reads as a pass, and the verdict says "not checked … run
pnpm build, then run again" — verified (scripts/preflight.mjs:605-618;scripts/preflight.test.mjs:324-357); the exit status is 0. - Claim: any other TypeScript error, a missing third-party module included, still fails — verified (
scripts/preflight.mjs:491-494;scripts/preflight.test.mjs:287-299,:355-356). - Claim: a package that fails without a TypeScript error beside build-output errors still reads SKIP, and the verdict says "not checked" — verified (
scripts/preflight.mjs:491). - Claim: the default mode is unchanged — verified (only the quick plan sets the new fields).
- Claim: the tests cover the classifier, the quick plan and the SKIP verdict, and keep a real type error as FAIL naming the command — verified (
scripts/preflight.test.mjs:276-358). - Claim: the guide gains text in the
--quickparagraph — verified, as two sentences (docs/contributing/pull-requests.md:167-172). - Claim: 21 tests pass, and the 3 new cases failed on
main's script first — verified (21 of 21 here; the base script lacks the export and fields the new cases need). - Claim: a real quick run on a fresh clone found only two
theme-neutral/builterrors in the CLI — false for an install-only clone (oneTS2307on@astryxdesign/core/theme); true once Core is built. - Claim: Prettier clean — verified.
- Claim: no CI impact and no workflow changes — verified.
- Claim: the overlap with #13019 merges cleanly — verified (the two heads merge without conflict).
- Claim: ownership, landing and local full-preflight notes — process statements with nothing in the code to check.
- File:
scripts/preflight.mjs— clear apart from non-blocking notes on non-TypeScript failures, the exit status, buffered output and the header's@inputand@outputlines. - File:
scripts/preflight.test.mjs— clear. - File:
docs/contributing/pull-requests.md— clear.
| * changed packages, files and tests alone; not CI's scope; a typecheck | ||
| * that fails only on missing workspace builds reports SKIP), and `--wrap |
There was a problem hiding this comment.
Non-blocking: this @input still says "a typecheck that fails only on missing workspace builds reports SKIP", which is wider than the classifier and the narrowed title (a typecheck that fails only because Core is unbuilt still reports FAIL), and the @output lines below list "ready to flip" or "not ready: N" but not "not checked". Suggested: "a typecheck whose only errors are missing /built or relative dist modules reports SKIP", and add "not checked" to @output.
|
/approve-spec f84e469 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
The description now places the SKIP in a checkout with Core built, which matches what the CLI's quick typecheck does: with Core built and the themes unbuilt it reports SKIP and "not checked", and in an install-only clone it still fails on @astryxdesign/core/theme, as stated. All 21 preflight tests pass, and the three new cases fail against main's script. The earlier non-blocking notes (non-TypeScript failures, the exit status of "not checked", buffered output, and the header's @input and @output lines) still apply, and the description's "template docs" are the page templates the CLI's strict typecheck reads.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Title: a quick typecheck that fails only on missing
/builtor relativedistoutputs reports SKIP, not FAIL — verified (scripts/preflight.mjs:475-495,:553-568; a real CLI run). - Claim: it helps a quick run in a checkout where Core is built and other workspace packages are not (after a test run, or a Core build) whose typecheck reads a
/builtoutput or a relativedistpath — verified (the CLI with Core built reports SKIP; the Node test project's global setup builds Core). - Claim: quick mode builds nothing, so such a typecheck fails on modules that are not built — verified (
scripts/preflight.mjs:384-390; the base script reports FAIL in that state). - Claim: a first quick run in an install-only clone still needs a build, because the CLI's typecheck fails on
@astryxdesign/core/themeand the run ends "not ready" — verified (a real install-only run). - Claim: the CLI's templates import
@astryxdesign/theme-neutral/built, and today that shows typecheck FAIL and "not ready: 1" without a type error — verified; the imports sit in page templates (canvas-editor/page.tsx:56,settings-dialog/page.tsx:94), not in a.doc.mjs. - Claim: a package that imports another workspace package by its main entry (Lab and Core) is not covered and still needs a build — verified (
@astryxdesign/corematches neither branch of the pattern). - Claim: the quick typecheck keeps its output, shown as before and saved for the check — verified (
scripts/preflight.mjs:418-424,:736-748); it prints when the typecheck ends. - Claim: SKIP when every TypeScript error is a
TS2307on@astryxdesign/<package>/built…or a relative path intodistat any depth, and a third-partydistsubpath is not one — verified (scripts/preflight.mjs:480,:490-494;scripts/preflight.test.mjs:283-312). - Claim: the SKIP does not count toward "not ready", never reads as a pass, and the verdict says "not checked … run
pnpm build, then run again" — verified (scripts/preflight.mjs:605-618;scripts/preflight.test.mjs:324-357); the exit status is 0. - Claim: any other TypeScript error, a missing third-party module included, still fails — verified (
scripts/preflight.mjs:491-494;scripts/preflight.test.mjs:287-299,:355-356). - Claim: a package that fails without a TypeScript error beside build-output errors still reads SKIP, the verdict says "not checked", and the run after a build shows the failure — verified (
scripts/preflight.mjs:491). - Claim: the default mode is unchanged — verified (only the quick plan sets the new fields).
- Claim: the tests cover the classifier, the quick plan and the SKIP verdict, and keep a real type error as FAIL naming the command — verified (
scripts/preflight.test.mjs:276-358). - Claim: the guide gains text in the
--quickparagraph — verified (docs/contributing/pull-requests.md:167-172). - Claim: 21 tests pass, and the 3 new cases failed on
main's script first — verified (21 of 21; 3 failed and 18 passed against the base script). - Claim: a real quick run with Core built found only two
theme-neutral/builterrors in the CLI — verified (the same two errors at this head). - Claim: Prettier clean — verified.
- Claim: no CI impact and no workflow changes — verified.
- Claim: the overlap with #13019 merges cleanly — verified (the two heads merge without conflict).
- Claim: ownership, landing and local full-preflight notes — process statements with nothing in the code to check.
- File:
scripts/preflight.mjs— clear apart from non-blocking notes on non-TypeScript failures, the exit status, buffered output and the header's@inputand@outputlines. - File:
scripts/preflight.test.mjs— clear. - File:
docs/contributing/pull-requests.md— clear.
Who this helps
Anyone running
pnpm preflight --quickin a checkout where Core is built but other workspace packages are not (for example after a test run, orpnpm -F @astryxdesign/core build), whose typecheck reads a workspace package's/builtoutput or a relativedistpath. Quick mode builds nothing, so such a typecheck fails on modules that simply aren't built yet. A first quick run in an install-only clone still needs a build: there the CLI's typecheck already fails on@astryxdesign/core/theme, which is not a build-output path, and the run ends "not ready". For example, the CLI's template docs import@astryxdesign/theme-neutral/built. Today that shows as a redtypecheck FAILand "not ready: 1", although the change has no type error. This does not cover a package that imports another workspace package by its main entry (Lab imports@astryxdesign/core, which resolves to Core'sdist): those errors aren't build-output paths, and they bring follow-on type errors, so such packages still needpnpm buildbefore a quick run.What changes
scripts/preflight.mjs: in--quickmode the typecheck keeps its output (shown as before, and saved for the check). When it fails and every TypeScript error is aTS2307on a workspace package's build output (@astryxdesign/<package>/built…, or a relative path into adistfolder at any depth, such as./dist/…or../../packages/core/dist/…; a third-party package'sdistsubpath is not one), the row reports SKIP with "skipped, workspace builds missing; runpnpm buildfirst". It does not count toward "not ready", and it never reads as a pass: the verdict ends "not checked: typecheck (workspace builds missing); runpnpm build, then run again before you flip". Any other TypeScript error, including a missing third-party module, still fails the check. The classifier reads only TypeScript error lines, so a package that fails without one (tsc out of memory, say) beside build-output errors still reads as SKIP. That verdict says "not checked", and the run afterpnpm buildshows the failure. The default (full) mode is unchanged, since it builds first.scripts/preflight.test.mjs: red-first cases.missingBuildsnames only all-build-output error sets: a mixed set, no errors and a missing npm package all give null. The quick plan's typecheck keeps and judges its output.runChecksturns the all-missing-builds failure into a SKIP that the verdict doesn't count as a failure but reports as "not checked", never "quick checks pass", and keeps a real type error as FAIL, naming the command.docs/contributing/pull-requests.md: one sentence in the--quickparagraph.Tests
scripts/preflight.test.mjs: 21 passed; the 3 new cases failed on main'spreflight.mjsfirst.--quickrun in a clone with Core already built: its only typecheck errors were twoTS2307on@astryxdesign/theme-neutral/builtin the CLI's template docs.CI impact
CI impact: none; a local command, and no workflow changes.
Overlap checked: #13019 (ours, opened later; it adds a
lab synccheck to the same preflight files and docs paragraph, a separate solution; the two merge cleanly, and whichever lands second merges main)Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the drain's serial merge loop, on green, CodeBunny approval and Specs' exact-head
/approve-spec.Preflight before the ready flip
Full
pnpm preflightat 6887671:review:pre(0 findings),pnpm build, fullpnpm typecheck, eslint, prettier andcheck:repopassed, and so did the preflight tests (21/21). The rest of the full suite (test:uiand the Node suite) could not finish on the shared machine under load: two attempts timed out, at 50 minutes and 2 hours. The Linux container available to me could not run as this session (and has 3 CPUs, well over an hour for those suites). By the CI & Release owner's fallback for this tooling-only change, CI's own run covers those suites.