Uh oh!
There was an error while loading. Please reload this page.
fix(devx): print the importer's real repo-relative path in the prerequisite advisory - #14217
Merged
Merged
Conversation
…uisite advisory The advisory interpolated the gate BASENAME into a hard-coded `scripts/` directory. Correct for the 42 importers under `scripts/**`, wrong for the three under `packages/lint/scripts/**`: it printed `node scripts/check-doc-formula-expressions.mjs`, which names no file. Copy- pasting it answered `Cannot find module` at exit 1 — a banner whose purpose is to stop a reader misreading an exit code handed them a third failure wearing a finding's code. Derive the path from `importerUrl` instead. The headline gate name stays a basename (it is correct as one), and so does the `/tmp/NAME.log` sink — a repo-relative path there would name directories that do not exist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WLJQhde67SeTccsmnBVarV
baozhoutao
marked this pull request as ready for review
September 1, 2026 13:52
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Sep 1, 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 freeto 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.
Fixes#13826
scripts/import-prerequisite.mjsderived the gate name from the importer's basename and then interpolated it into a hard-codedscripts/directory. That basename is correct for the 42 importers underscripts/**and wrong for the three underpackages/lint/scripts/**.Premise re-verified on this tree, not inherited from the card
The card measured on a pre-#13983 branch. #13983 (exit-code reclassification, PR #14009) has since landed in the same output region, so the advisory now carries exit 3. Re-measured here at merge base
24b66352withnode_modulesgenuinely absent — the defect survives that change untouched:That is the whole cost, and it is worse than a cosmetic path. The banner exists because the reader is already confused about an exit code; it handed them a third failure wearing a finding's exit 1, which reads as an unrelated breakage rather than as a typo in the banner.
Before / after
packages/lint/scripts/check-doc-formula-expressions.mjsnode scripts/check-doc-formula-expressions.mjs …(no such file)node packages/lint/scripts/check-doc-formula-expressions.mjs …(runs)scripts/check-ci-filter-parity.mjsnode scripts/check-ci-filter-parity.mjs …The
scripts/**advisory is unchanged as a whole file, not merely by eye — same sha256 before and after:0fd6f669cc17d2061b249d2f24af5d2b75ac2563325f23a85602dbb6772c3dea. That is the load-bearing half: 45 gates inherit this paragraph verbatim.Scope, held to the triage grading
/tmp/NAME.logsink also keeps the basename, deliberately. A blanket substitution would spell/tmp/packages/lint/scripts/….log, whose parent directories do not exist — the same broken-command defect relocated one token to the right. Pinned.--self-testin CI isscripts/import-prerequisite.mjsships a 49-case--self-testthat no workflow and no package.json script runs — the frame 45 gates inherit #14007, queued behind this card.Why
pnpm-workspace.yamland not.git.gitis the obvious marker and is wrong for the checkout shape this repo mandates. In a linked worktree (git worktree add),.gitis a file holding agitdir:pointer, not a directory — measured here at 70 bytes. A walk testingisDirectory()steps straight past the worktree root and reports no root at all, in the one tree every agent actually works in. The self-test carries that as a paired measurement: the manifest walk finds the root, and a negative control proves the.git-isDirectory walk finds nothing in the same fixture.Nearest marker wins, as node and pnpm resolve. When no root is locatable the command falls back to the absolute path — always runnable — never to the old basename guess.
Verification
Self-test grows 49 to 60 cases. The new pins were ablated rather than assumed: with the hard-coded
scripts/interpolation put back (mutation confirmed on disk, anchor counts flipped 1 to 0 / 0 to 1), 4 of 60 cases go red, naming the defect verbatim; the restore leg is proven by blob-hash identity toHEAD.Gate family derived from the actual diff via
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack(14 families), all run ate550a5d2:check-ratchet-remedy-authoritywas run because this diff changes remedy prose: 183 scripts swept,import-prerequisite.mjsstays among the 165 handing out no ratchet-expanding remedy, unchanged from baseline.check-test-completenessreturns exit 3 (PREREQUISITE NOT MET — it grades a savedturbo run testlog, none named): NOT MEASURED, not red, and unrelated to this diff.The fix dogfoods itself: with
@objectstack/formulaunbuilt, the live refusal now printsnode packages/lint/scripts/check-doc-formula-expressions.mjs— the same gate, the same reproduction as the card, now with a command that runs.No changeset: this diff publishes nothing from any package.
skip-changesetapplied.Sibling cards on this file
Triage's baton order is #13983 then this card then #14007. #13983 landed as PR #14009 and is merged. #14007 (wiring the 60-case self-test into CI) is queued behind this one and stays untouched here — it edits the same
reportPrerequisiteNotMetoutput region.Generated by Claude Code
Generated by Claude Code