Repository navigation
fix(create-objectstack): a failed install lists the install step in "Next steps" - #23966
Conversation
…Next steps" "Next steps" printed `<pm> install` only under `--skip-install`, so a run whose install was attempted and failed printed the same list as a successful one, and the next command it named ran against an empty node_modules. The condition is now `!installed`: skipped or failed. Pins: a stub `pnpm` whose `install` exits 1 lists the install step before the run commands; CONTROL legs for a succeeding install (no install step) and `--skip-install` (install step, as before). Claude-Session: https://claude.ai/code/session_018t6a5rvqPRvEDMCVVW9kYT Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 11 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
席位核对ACCEPT · #23865 ·
Out of scope, 承接者:无 (wording only, a hold-off of this card): after a failed install, the closing "AI Skills" block still keys on Landing: once every check on the head is green or an expected skip, this seat flips the PR ready and arms auto-merge through the relay, then follows it to Generated by Claude Code |
Fixes #23865
Clause-②: no
What changed
packages/create-objectstack/src/index.ts, the "Next steps" block only. The install line is printedif (!installed)instead ofif (options.skipInstall).installedis the flag the install block already sets: it startsfalseand becomestrueonly after${pm} installreturns, so!installedcovers both a skipped install and one that was attempted and failed. Nothing else in the block changes. A four-line comment states why.packages/create-objectstack/src/scaffold-next-steps-pm.test.ts. Three legs in a newdescribe, driving the real CLI throughtsxunder the file's existing stub-PATH harness. A new stubpnpmanswers--versionwith exit 0 andinstallwith an exit code the leg chooses, and logs each call's argv. Each leg proves from that log whether the install was attempted. There is no new seam inindex.ts.pnpm installon a line beforepnpm run dev.--skip-install: the stub saw only--version, and the list namespnpm installbeforepnpm run dev, as before.pnpm install:" under--skip-install, so a match over the whole section could pass without the list naming the install..changeset/23865-next-steps-after-failed-install.md:create-objectstackpatch,Clause-②: no. This is printed guidance only. No flag, exit code, prompt or scaffolded file changes.Evidence (head
539f59772)Door, before and after. The scaffolder ran from a scratch directory outside the repo, with
src/index.tsrun throughtsx. PATH held onlynodeandnpm, so there was no pnpm, as in the filed case. The install was pointed atnpm_config_registry=http://127.0.0.1:9withnpm_config_fetch_retries=0and a freshnpm_config_cache, bounded bytimeout 180. In both runs the install failed withnpm error FetchError: request to http://127.0.0.1:9/@objectstack%2fcli failed, reason: connect ECONNREFUSED 127.0.0.1:9, then the scaffolder printedDependency installation failed. Run `npm install` manually.Before, at BASE
8f4260fe6:After, at
539f59772:Ablation, once, after committing the fix. The command was
node scripts/ablation-replace.mjs --file packages/create-objectstack/src/index.ts --anchor ' if (!installed) {' --replacement ' if (options.skipInstall) {' -- pnpm --filter create-objectstack exec vitest run --maxWorkers=2 --reporter=verbose src/scaffold-next-steps-pm.test.ts.a76503cfe4ef→2f7b9f0eb219.Tests 1 failed | 9 passed (10). The failing-install leg went red withAssertionError: expected -1 to be greater than or equal to 0, and both CONTROL legs stayed green.a76503cfe4ef, equals the HEAD blob, andgit diff HEADis empty. This was re-proven after a container restart.src/index.tsthroughtsx, so nodist/is in the path and no rebuild leg applies.Local verification at
539f59772:pnpm --filter 'create-objectstack^...' build:VERDICT command-exit 0, and the tree was clean afterwards. This builds@objectstack/spec, whose.d.tsthe typecheck needs for two existing test imports.pnpm --filter create-objectstack run typecheck: exit 0.tsc --listFilesincludes the edited test file.pnpm --filter create-objectstack test:Test Files 18 passed (18),Tests 278 passed (278). The edited file alone ran 10 tests in 4.6 s, up from 7 in 3.0 s.pnpm exec eslint --no-inline-configover the two changed.tsfiles: exit 0. The repo-wide run is CI'sLint & Repo Gates.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 61 commands. 58 exited 0 and 3 are NOT MEASURED:pnpm check:dual-build-cjs-loadsandpnpm check:lean-entry-closureexited 3 withPREREQUISITE NOT MET. Both need a full workspace build.pnpm check:type-check-debthit my 540 s per-command cap. Its coverage leg printedOK(one DEBT entry, which is not this package). Its re-measure leg was still waiting for the shared verify lock behind another session's build when the cap fired.--ranreconciliation answered61 derived, 58 run, 3 NOT-MEASURED, 0 UNRUN.node scripts/check-changeset-fixed.mjs,pnpm check:authz-resolver,pnpm check:error-code-casing,pnpm check:filter-alias-parity): all exit 0.test:repowas not run locally because the diff touches no test in that project. CI'sTest Coreruns it.Acceptance notes
origin/mainhas moved 6 commits past BASE8f4260fe6, to6d1660dc3. None of them touchespackages/create-objectstackor.changeset/config.json, andgit merge-treereports a clean merge, so nothing was merged before opening. The queue rebuilds on currentmain.--skip-installit reads "Not installed yet — they are read from @objectstack/skills in node_modules. Afternpm install:". After a failed install it reads "Read from @objectstack/skills in node_modules, at your @objectstack/spec version:" (door transcript, BASE and head alike). The command it prints is still right: the install line now comes first in "Next steps", and the warning above already says "npm installdid not complete. Once it does, run:". So this is wording, not a wrong command. The skills step is a hold-off for this card. Noted here, not filed.npm install -g @objectstack/clicrashes in npm's peer resolution ("Cannot read properties of null (reading 'edgesOut')") #23801 and docs: npm 10 cannot install@objectstack/plugin-author@objectstack/cli(edgesOutthrough better-auth's optional vitest peer); the install and self-hosting pages name the npm 11 /overrides.vitestremedy #23849 stay as they are and are not addressed here.Generated by Claude Code