Skip to content

fix(install): say any launcher works in the stub recovery line - #725

Merged
aibex-agent[bot] merged 1 commit into
mainfrom
aibex/t_VnQ8sMaJAwaCmnVJkT2HRRAF-stub-launcher
Nov 30, 2026
Merged

aibex-agent[bot] merged 1 commit into
mainfrom
aibex/t_VnQ8sMaJAwaCmnVJkT2HRRAF-stub-launcher

Conversation

@aibex-agent

@aibex-agent aibex-agent Bot commented Nov 29, 2026

Copy link
Copy Markdown

What

Reference stubs end with a recovery line naming npx @taskless/cli init. That line now gets a second sentence:

Use the same launcher you installed Taskless with: pnpm dlx, yarn dlx and bunx work in place of npx.

  • The first sentence is unchanged, so stubRecoveryInvocation still reads the command from between "run `" and "` from the project root", and stubRecoveryInvocationStale works as before.
  • The new sentence names no version and no machine, and it's the same in every build. Released and nightly builds still don't rewrite each other's stubs (the |nightly| stub-recovery-invocation tests pass).
  • Migration: stubPredatesRecovery now also flags a stub whose recovery line lacks the new sentence. The next init/update rewrites each existing stub once, then leaves it alone. Users will see a one-line diff in each tool directory's SKILL.md, and the changeset says so.

Spec

OpenSpec change stub-recovery-launchers adds one requirement to cli-init and is archived here. Scenarios went from 182 to 184, with none dropped. It's an ADDED requirement, not a MODIFIED one, so the standing stub-recovery requirement is untouched.

Checks

New tests: a fresh stub carries the sentence, and a one-sentence stub is flagged once and the rewritten stub isn't. pnpm typecheck, pnpm lint and pnpm test (3418 passed, nightly project included) all pass.

Fixes #717

@aibex-agent

aibex-agent Bot commented Nov 29, 2026

Copy link
Copy Markdown
Author

@claude /review

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @aibex-agent[bot]'s task in 2m 0s —— View job


Review mode: incremental — read 0 prior review thread(s) before reviewing.

.prior-review.json held no review threads, review summaries, or top-level comments (just the @claude /review trigger itself) — this is the first review of this PR.

  • Read .prior-review.json
  • Fetch PR diff and metadata
  • Review packages/cli/src/install/canonical.ts changes
  • Review test additions
  • Review OpenSpec changes and changeset
  • Post final review

Assessment

The implementation is small and correct. RECOVERY_LAUNCHERS is appended after RECOVERY_TAIL with a space, which doesn't disturb stubRecoveryInvocation's search for ` from the project root + to restore it, then read it. (packages/cli/src/install/canonical.ts:215), so the version-reclaim logic (stubRecoveryInvocationStale) is unaffected by this change — verified by reading the whole file, not just the diff. stubPredatesRecovery's new OR condition (canonical.ts:199) correctly covers both "no recovery line at all" and "one-sentence legacy line," and the migration-order check in install.ts:532-538 runs the body migration before the invocation-staleness/frontmatter checks, so a legacy stub is rewritten regardless of which invocation it recorded. Tests cover the new sentence on a fresh stub and the one-time migration from the one-sentence form; the nightly cross-build tests (test/nightly/stub-recovery-invocation.test.ts) still pass unmodified since they only exercise the invocation fragment, not the new sentence.

I also checked this against the docs-npx-cli Vale rule (.taskless/rules/vale/docs-npx-cli/docs-npx-cli.yml) and the npx-install-only OpenSpec history: that rule only flags npx|pnpm dlx|yarn dlx|bunx @taskless/cli <subcommand> for subcommands other than bare/init/auth, and existing policy already treats all four launchers as fine for init. The new sentence names no subcommand, so it doesn't trip that rule and is consistent with prior policy.

[New] Minor: the new sentence is slightly inaccurate for self builds. restoreCommand() (canonical.ts:139-142) bakes a plain filesystem path for a self build — node packages/cli/dist-self/index.js init (see SELF_INVOCATION in packages/cli/scripts/build-target.ts) — which never contained npx to begin with. RECOVERY_LAUNCHERS is a fixed literal appended in every build, so a self-built stub would read "...to restore it, then read it. Use the same launcher you installed Taskless with: pnpm dlx, yarn dlx and bunx work in place of npx." right after a command that never used npx. This is low-impact — self stubs only exist for in-repo dogfooding and are never published or distributed to end users — but it's a real inaccuracy in the generated text for that one build target, and there's no test asserting what a self-build stub actually says.

[New] Observation, not a defect: this repo's own committed stubs (.agents/skills/taskless/SKILL.md, .claude-pr/.claude/skills/taskless/SKILL.md) still carry the old one-sentence recovery line and weren't rewritten by this PR. That matches the changeset's own description ("Your next init/update rewrites existing stubs once") and nothing in CI appears to force an eager rewrite, so this looks intentional rather than missed — flagging only so it's not mistaken for an oversight.

No correctness, security, or test-adequacy issues found beyond the minor self-build wording point above.

@aibex-agent

aibex-agent Bot commented Nov 29, 2026

Copy link
Copy Markdown
Author

On the self-build wording: leaving this as is, on purpose. The launcher sentence has to be the same in every build, because stubPredatesRecovery keys on it without knowing which build wrote the stub. If self builds left it out, they would either rewrite their own stubs on every install, or need a build-aware exemption, which is the cross-build churn the spec's "Detection SHALL NOT depend on the build" rule exists to prevent. self stubs are only used in this repo, so the slightly odd wording costs less than either alternative. The repo's own committed stubs will update on the next pinned-nightly init, as the changeset says.

@aibex-agent
aibex-agent Bot force-pushed the aibex/t_VnQ8sMaJAwaCmnVJkT2HRRAF-stub-launcher branch from 8c4ac19 to 0b06495 Compare November 30, 2026 00:49
@aibex-agent
aibex-agent Bot force-pushed the aibex/t_VnQ8sMaJAwaCmnVJkT2HRRAF-stub-launcher branch from 0b06495 to 05bfda4 Compare November 30, 2026 00:52
@aibex-agent
aibex-agent Bot merged commit 14fd098 into main Nov 30, 2026
4 checks passed
@aibex-agent
aibex-agent Bot deleted the aibex/t_VnQ8sMaJAwaCmnVJkT2HRRAF-stub-launcher branch November 30, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stub recovery line: say any launcher works, so agents that can't run npx aren't stuck

1 participant