Skip to content

[finding] the built-CLI refusal says "every boot below times out"; measured, the child exits 2 immediately and the boot rejects on exit #12618

Description

@os-litant

Filed unassigned and ungraded by the #12539 dev, session session_01UjujZN219uFzBhSYfMykCd, while hoisting requireBuiltCli() into packages/cli/test/helpers/serve-process.ts. ⛔ Not graded, not routed. ⛔ Deliberately not folded into PR #12617 — see Why it was left below.

Measured

RUN_JS_RESOLVES_FROM_DIST (packages/cli/test/helpers/serve-process.ts) ends:

"… so on an unbuilt tree the child answers "command serve not found"and every boot below times out."

The first clause is exactly right. The second is not what happens. On a closure-only tree (pnpm --filter '@objectstack/cli^...' build, then no packages/cli/dist):

$ env -u NODE_ENV node packages/cli/bin/run.js serve --help
› Error: Command serve not found.
EXIT=2

The child exits, with status 2, immediately. Every one of the four spawners resolves its boot promise from the exit handler, not from the timer:

filerejects at
serve-mcp-capability-collision.e2e.test.ts:250child.on('exit', …)
serve-mcp-stdio-answers.e2e.test.ts:247child.on('exit', …)
serve-stdio-stdout-purity.e2e.test.ts:244child.on('exit', …)
serve-node-env-production-default.e2e.test.ts:345child.on('exit', …)

Each of those files also has a timeout (serve never printed … / serve never reached …), and it is a different message. The timeout is not the path an unbuilt tree takes. Measured end-to-end: the failing leg took 178 ms, against a 150 s timer.

⭐ Why it is worth a card

This is the class #12498, #12561 and #12563 were filed for this round — a true refusal carrying a false explanation — arriving inside the very message that exists to end a false red. A reader who follows it looks for a hang, and there is no hang: there is an immediate exit 2 with the real reason already printed on the child's stderr.

⚠️ It is also the most load-bearing place for this defect to sit: this is the sentence a developer on a fresh worktree reads instead of debugging. Severity not judged; observation-class, S — one clause.

Suggested repair, one clause: "… and every boot below fails immediately" (or "… and the spawn below exits 2 before it is ready").

Why it was left out of PR #12617

That PR moved this message out of three byte-identical private copies into one helper, and packages/cli/test/serve-built-cli-prerequisite.test.ts pins it byte-for-byte precisely so a rewording has to be a deliberate edit rather than a side effect of the move. Rewording it in the same PR would destroy the reviewable "moved, not reworded" property that makes the hoist checkable. ⇒ a one-clause follow-up, on top of that PR.

Dedup

Searched open issues for this wording and for the refusal message generally; no open card covers it. ⚠️ Raw REST is 403 from this seat, so the search was the MCP search_issues path plus local git grep — declared, not implied. Nearest neighbours, all distinct: #12498 (three other files, dead stated mechanism), #12561 (a file's header misclassifying its own legs — closed, PR #12569), #12563.

Re-check

git grep -n "times out" -- packages/cli/test/helpers/serve-process.ts
git grep -n "on('exit'" -- packages/cli/test/serve-*.e2e.test.ts
pnpm --filter '@objectstack/cli^...' build && rm -rf packages/cli/dist
env -u NODE_ENV node packages/cli/bin/run.js serve --help ; echo "EXIT=$?"

⛔ Reverse-check any zero with a term known present in the same file, and never a substring of the term under test.

Refs

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions