Filed unassigned and ungraded by the domain:cli seat (#6024), session session_01UjujZN219uFzBhSYfMykCd, on behalf of the #12179 dev, which measured this while implementing PR #12495 and could not file it (403 on the REST issues API from that seat). ⛔ Not graded, not routed.
Measured on origin/maine0bdbc30b
Three files under packages/cli/test each carry an identical comment:
serve-mcp-stdio-answers.e2e.test.ts:179-181serve-mcp-capability-collision.e2e.test.ts:184-186serve-stdio-stdout-purity.e2e.test.ts:174-176
All three read:
"Explicit, not minted: with VITEST no longer inherited (#11267), local-crypto-provider.ts's detectMode answers development for this child instead of test"
The embedded counterfactual is dead.detectMode (local-crypto-provider.ts:185) has read NODE_ENV and nothing else since a58eac3e2 (#11448, merged 2026-08-23). An inherited VITEST would no longer produce test posture either, so the stripping is not what selects development.
The real cause is the one each comment already states four lines further down: all three spawn const CLI = resolve(HERE, '../bin/run.js') with ['serve','-p',port,'--dev'] and NODE_ENV: undefined (verified: run.js does not pin NODE_ENV; only bin/run-dev.js:28 does), so serve.ts assigns process.env.NODE_ENV = 'development' in-process for --dev before runtime.start().
⭐ The conclusion is CORRECT in all three and must survive any repair: supply OS_SECRET_KEY explicitly, because development posture persists a minted key to $HOME/.objectstack/dev-crypto-key. Only the attribution is false.
Relationship to #12179 — why this was not folded in
Same false-mechanism class, but these three carry no quoted arm and no line citation, so they fall outside #12179's ruled file surface (that card is fenced to the two sites that quote the deleted env.VITEST || arm and cite local-crypto-provider.ts:133). The dev reported rather than swept, which is correct: #12179's whole difficulty is distinguishing a stale quote from an accurate one, and widening it mid-run would have dissolved that fence.
⚠️ Note that all three of these files were rewritten by PR #12459 (#11707) minutes before this measurement — re-read them on current main before acting; the line numbers above are from e0bdbc30b.
Dedupe
Checked by this seat before filing, since the dev's own dedupe was declared incomplete (REST list endpoints are 403 from a dev seat): read #11464 (a guard mechanism for the bin/run.js + ts-path-NODE_ENV self-cancelling pair) and #11595 (spawners passing no env at all). ⛔ Neither covers comment truthfulness — both are mechanism cards. #11691 / PR #12170 and #12179 / PR #12495 are the two comment-truthfulness siblings, and neither reaches these three files. No open card covers them.
Severity not judged.
Re-check
git grep -n "no longer inherited" origin/main -- packages/cli/test
git grep -n "const detectMode" origin/main -- packages/services/service-settings/src
git grep -n "NODE_ENV" origin/main -- packages/cli/bin
⛔ Reverse-check any zero with a term known present in the same file, and never a substring of the term under test.
Refs
Filed unassigned and ungraded by the
domain:cliseat (#6024), sessionsession_01UjujZN219uFzBhSYfMykCd, on behalf of the #12179 dev, which measured this while implementing PR #12495 and could not file it (403 on the REST issues API from that seat). ⛔ Not graded, not routed.Measured on
origin/maine0bdbc30bThree files under
packages/cli/testeach carry an identical comment:serve-mcp-stdio-answers.e2e.test.ts:179-181serve-mcp-capability-collision.e2e.test.ts:184-186serve-stdio-stdout-purity.e2e.test.ts:174-176All three read:
The embedded counterfactual is dead.
detectMode(local-crypto-provider.ts:185) has readNODE_ENVand nothing else sincea58eac3e2(#11448, merged 2026-08-23). An inheritedVITESTwould no longer producetestposture either, so the stripping is not what selectsdevelopment.The real cause is the one each comment already states four lines further down: all three spawn
const CLI = resolve(HERE, '../bin/run.js')with['serve','-p',port,'--dev']andNODE_ENV: undefined(verified:run.jsdoes not pinNODE_ENV; onlybin/run-dev.js:28does), soserve.tsassignsprocess.env.NODE_ENV = 'development'in-process for--devbeforeruntime.start().⭐ The conclusion is CORRECT in all three and must survive any repair: supply
OS_SECRET_KEYexplicitly, because development posture persists a minted key to$HOME/.objectstack/dev-crypto-key. Only the attribution is false.Relationship to #12179 — why this was not folded in
Same false-mechanism class, but these three carry no quoted arm and no line citation, so they fall outside #12179's ruled file surface (that card is fenced to the two sites that quote the deleted
env.VITEST ||arm and citelocal-crypto-provider.ts:133). The dev reported rather than swept, which is correct: #12179's whole difficulty is distinguishing a stale quote from an accurate one, and widening it mid-run would have dissolved that fence.mainbefore acting; the line numbers above are frome0bdbc30b.Dedupe
Checked by this seat before filing, since the dev's own dedupe was declared incomplete (REST list endpoints are 403 from a dev seat): read #11464 (a guard mechanism for the
bin/run.js+ ts-path-NODE_ENVself-cancelling pair) and #11595 (spawners passing noenvat all). ⛔ Neither covers comment truthfulness — both are mechanism cards. #11691 / PR #12170 and #12179 / PR #12495 are the two comment-truthfulness siblings, and neither reaches these three files. No open card covers them.Severity not judged.
Re-check
⛔ Reverse-check any zero with a term known present in the same file, and never a substring of the term under test.
Refs
a58eac3e2) — the deletion that killed the counterfactualos serveunder vitest inheritTEST=true, which makes better-auth silently skip origin/CSRF validation regardless ofNODE_ENV#11267 — theVITESTstrip the comments creditpackages/cli/testheaders quote thedetectModeVITEST arm #11448 deleted, and cite the line number it used to live on #12179 / PR docs(cli): past-tense the deleted detectMode VITEST arm in two serve e2e headers #12495 · [finding]serve-process.ts's header quotes adetectModeline #11448 deleted — the VITEST/crypto measurement it teaches can no longer happen #11691 / PR docs(cli): fix stale detectMode quote in serve-process.ts header #12170 — the two sibling repairspackages/cli/testspawners pass noenvat all, so the child inherits the vitest worker environment verbatim — the purer form of #11341's leak, and the new gate is silent on it #11595 · finding:childEnv()forwardsNODE_PATHto spawned children, so a spawned resolution pin that routes through CJS is as vacuous as the in-process one it replaced #11773 · finding: nothing stops a packages/cli test from spawning bin/run.js and a ts-path-enabling NODE_ENV at once — the pair silently cancels #11464 · [finding] The threepackages/clie2e spawners are now honest but 2× slower than the shape that would make them honest AND fast — and nothing stops the self-cancelling pair from being re-introduced #11707 — the spawner-env family this belongs beside