Skip to content

fix(create-objectstack): a failed install lists the install step in "Next steps" - #23966

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-23865-next-steps-after-failed-install
Oct 16, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-23865-next-steps-after-failed-install

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #23865

Clause-②: no

What changed

  • packages/create-objectstack/src/index.ts, the "Next steps" block only. The install line is printed if (!installed) instead of if (options.skipInstall). installed is the flag the install block already sets: it starts false and becomes true only after ${pm} install returns, so !installed covers 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 new describe, driving the real CLI through tsx under the file's existing stub-PATH harness. A new stub pnpm answers --version with exit 0 and install with 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 in index.ts.
    • Install attempted and failed (stub exits 1): the "Next steps" list names pnpm install on a line before pnpm run dev.
    • CONTROL, install attempted and succeeded (stub exits 0): the list has no install step.
    • CONTROL, --skip-install: the stub saw only --version, and the list names pnpm install before pnpm run dev, as before.
    • The assertions read only the command list, the lines up to the blank line that ends it. The "AI Skills" block below it says "After 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-objectstack patch, 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.ts run through tsx. PATH held only node and npm, so there was no pnpm, as in the filed case. The install was pointed at npm_config_registry=http://127.0.0.1:9 with npm_config_fetch_retries=0 and a fresh npm_config_cache, bounded by timeout 180. In both runs the install failed with npm error FetchError: request to http://127.0.0.1:9/@objectstack%2fcli failed, reason: connect ECONNREFUSED 127.0.0.1:9, then the scaffolder printed Dependency installation failed. Run `npm install` manually.

Before, at BASE 8f4260fe6:

  Next steps:
    cd my-app
    npm run dev        # Start development server
    npm run validate   # Verify metadata: schema + predicates + bindings
                       # (run after every metadata edit — see AGENTS.md)

After, at 539f59772:

  Next steps:
    cd my-app
    npm install
    npm run dev        # Start development server
    npm run validate   # Verify metadata: schema + predicates + bindings
                       # (run after every metadata edit — see AGENTS.md)

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.

  • On disk: anchor x1 → x0, replacement x0 → x1, blob a76503cfe4ef → 2f7b9f0eb219.
  • Result: Tests 1 failed | 9 passed (10). The failing-install leg went red with AssertionError: expected -1 to be greater than or equal to 0, and both CONTROL legs stayed green.
  • Restore: the blob after restore, a76503cfe4ef, equals the HEAD blob, and git diff HEAD is empty. This was re-proven after a container restart.
  • The pins run src/index.ts through tsx, so no dist/ 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.ts the typecheck needs for two existing test imports.
  • pnpm --filter create-objectstack run typecheck: exit 0. tsc --listFiles includes 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-config over the two changed .ts files: exit 0. The repo-wide run is CI's Lint & Repo Gates.
  • Gate families: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 61 commands. 58 exited 0 and 3 are NOT MEASURED:
    • pnpm check:dual-build-cjs-loads and pnpm check:lean-entry-closure exited 3 with PREREQUISITE NOT MET. Both need a full workspace build.
    • pnpm check:type-check-debt hit my 540 s per-command cap. Its coverage leg printed OK (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.
    • The --ran reconciliation answered 61 derived, 58 run, 3 NOT-MEASURED, 0 UNRUN.
  • Roster gates the derivation flagged in directories these paths touch (node scripts/check-changeset-fixed.mjs, pnpm check:authz-resolver, pnpm check:error-code-casing, pnpm check:filter-alias-parity): all exit 0.
  • test:repo was not run locally because the diff touches no test in that project. CI's Test Core runs it.

Acceptance notes


Generated by Claude Code

…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>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling labels Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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): node scripts/docs-audit/affected-docs.mjs --json 6d1660dc3b163c30c3a02d34de5cfc219940d958 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · #23865 · domain:cli seat 2 · os-tesla · session session_018t6a5rvqPRvEDMCVVW9kYT · 2026-10-16T15:02Z · reviewed head 539f597727, against GitHub and the branch, not against the report's prose. Holder of claim 6217085865; report on #23865.

  1. Shape. Draft, base main, assignee os-tesla. Line 1 is Fixes #23865, the one closing keyword. Clause-②: no is at line start. 3 files, +123 / −4. check-governed-merges --pr 23966: NOT governed. git merge-tree is clean against origin/main.

  2. The change, read in the diff. In the "Next steps" block, if (options.skipInstall) becomes if (!installed), with a four-line comment. installed is declared false before the install block and set true only after ${pm} install returns, so !installed means "skipped or failed". Nothing else in index.ts changes.

  3. Measured at the door, base 8f4260fe6 against head 539f59772, outside the repo, with the registry at http://127.0.0.1:9. Base printed cd my-app / npm run dev / npm run validate after ECONNREFUSED. Head prints cd my-app / npm install / npm run dev / npm run validate.

  4. Pins. There are three new legs in scaffold-next-steps-pm.test.ts, in its stub-PATH harness:

    • a failing install (the stub answers install with a non-zero exit);
    • CONTROL, a succeeding install;
    • CONTROL, --skip-install.

    One ablation (back to options.skipInstall) turned the failing-install leg red and left both controls green. The restore was proven by blob.

  5. Changeset, sentence by sentence. create-objectstack patch, Clause-②: no. The before / after sentences match the door readings. "whichever package manager the run detected" matches ${pm}. "No flag, exit code, prompt or scaffolded file changes" matches the diff.

  6. Contract review: none is owed. The paths decide no face, and Clause-②: no carries no arm. This seat's read is the review.

  7. Gates, pinned to the head. Check-runs on 539f597727 read at this stamp, latest run per name: 42 names, 35 success, 7 skipped, 0 failure, nothing running. The successes include Build Core, Test Core 1–6/6, Scaffold with repo dist, TypeScript Type Check and the four Type Check · lanes, all eight Lint · lanes, Lint & Repo Gates, Check Changeset and Governed Surface Queue Guard. The 7 skips are roster names: Build Docs, Console Pin Gate, Dogfood Regression Gate (matrix), Dogfood Verify CLI, Packed-tarball smoke, Temporal Conformance, and Registry canary: ${{ matrix.template }} (schedule and dispatch only). The dev's local subset at this head: 58 of 61 derived gate commands exit 0. 3 are NOT MEASURED: check:dual-build-cjs-loads and check:lean-entry-closure need a whole-workspace build, and check:type-check-debt hit its per-command cap while queued for the lock. CI's Lint and Type Check lanes run all three. create-objectstack: typecheck 0, 18 files / 278 tests.

  8. Accepted deviations:

    • the pins sit in the existing file as a new describe rather than a sibling file, since its helpers are file-local; runScaffold gained an optional { skipInstall } (default true, the old behaviour);
    • no merge of origin/main before opening (6 commits, none in create-objectstack; merge-tree clean);
    • the 14:10Z container restart: commands without a recorded exit were re-run at the same head.

Out of scope, 承接者:无 (wording only, a hold-off of this card): after a failed install, the closing "AI Skills" block still keys on options.skipInstall. It reads "Read from @objectstack/skills in node_modules…" rather than "Not installed yet". The command it prints is right, and the warning above it names the install, so it is recorded in the PR's Acceptance notes and not filed.

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 MERGED.


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 16, 2026 15:04
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 16, 2026 15:04
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 0b69564 Oct 16, 2026
43 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-23865-next-steps-after-failed-install branch October 16, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

2 participants