Repository navigation
fix(#1231): detectPackageManagerSync detects Python managers; npm-package hints keep a JS-only detector - #1235
Merged
admarble merged 3 commits intoSep 30, 2026
Conversation
Entire-Checkpoint: 608e818c21e8
…ageManagerSync) QA risk_gap: with detectPackageManagerSync now Python-aware, bin/cli.ts's serve missing-SDK hint would print 'uv add @modelcontextprotocol/sdk' in a Python-only cwd. cli.ts:167/763 and version-check.ts:413 name sequant's own npm packages, so they use the JS-only detector. Also fixes the stale resolvePackageManager JSDoc. Entire-Checkpoint: 5bd4127755d3
Entire-Checkpoint: f30d540d5a92
admarble
deleted the
feature/1231-fix-stacks-detectpackagemanagersync-is-js-only-a-u
branch
September 30, 2026 14:29
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
detectPackageManagerSyncchecked JS lockfiles only and otherwise returned"npm". It's the fallback inresolvePackageManager, so a uv or poetry repo whose manifest declares nopackageManagerresolved to npm. Worktree provisioning then logged "no manifest found for npm" and installed nothing, and #1217'suv sync --frozenwas never reached.detectPackageManagerSync(root)now follows the asyncdetectPackageManager's order: JS lockfiles, thenpackage.json→ npm, thenuv.lock/poetry.lock, thenpyproject.tomlor arequirements*.txt→ pip, andnpmlast.installWorktreeDeps(dir, undefined)onpyproject.toml+uv.lockspawnsuv sync --frozen.Added by the runner, fixing a regression QA flagged: three callers used the sync detector to name the package manager for sequant's own npm packages:
bin/cli.ts:167, the "remove local sequant" hintbin/cli.ts:763, theservemissing-@modelcontextprotocol/sdkhintsrc/lib/version-check.ts:413, the "update sequant" hintWith a Python-aware detector,
servein a Python-only directory would have printeduv add @modelcontextprotocol/sdk. These three now call a new JS-onlydetectNodePackageManagerSync(), which shares its lockfile loop with the project detector. The staleresolvePackageManagerJSDoc ("the JS-only detector") is also updated.Scope note:
bin/cli.ts,src/lib/version-check.tsandsrc/lib/version-check.yarn-major.test.ts(comments only) are outside the issue's "May touch" list. They're the callers the detector change would otherwise have broken.AC verification
npx vitest run src/lib/stacks.test.ts, "detectPackageManagerSync (#1231 AC-1)": 11 casesfileExistsfor the async sidenpx vitest run src/lib/workflow/worktree-manager.frozen-install.test.ts, withspawnSyncmocked, assertinguv["sync", "--frozen"]Mutation-verified: AC-3 — restored the old JS-only behaviour in
detectPackageManagerSync(JS lockfile, else"npm");src/lib/workflow/worktree-manager.frozen-install.test.ts > manifest-less worktrees detect the package manager (#870) > installWorktreeDeps resolves uv and runsuv sync --frozenon a manifest-less Python worktree (#1231 AC-3)failed, along with 6 AC-1 and 4 AC-2 cases (13 failed / 168 passed); restored.Mutation-verified: the npm-package hints — made
detectNodePackageManagerSyncreturndetectPackageManagerSync(root);src/lib/stacks.test.ts > detectNodePackageManagerSync — sequant's own package manager (#1231) > answers npm in a Python-only directory the project detector reads as uvfailed, with the requirements-only case (2 failed / 164 passed); restored.Runner verification (graph #1203)
5c6053a9(the regression and the stale JSDoc above).5c6053a9: NEEDS_VERIFICATION, 3/3. Its two gaps were CI still pending at QA time (now checked by SHA) and the AC-2 parity comment, which sat above the wrong describe. The comment was moved in898d1e2f.dist/: a real project withpyproject.toml(depending onsix) anduv lock, no manifest, no declared package manager:resolvePackageManager(undefined, dir)givesuv/"uv sync --frozen", whiledetectNodePackageManagerSync(dir)givesnpm.installWorktreeDeps(dir, undefined)installed, andsiximported from the project's.venv.mainbefore this PR, the same directory resolvednpmand skipped with "no manifest found for npm". That was the evidence in fix(stacks): detectPackageManagerSync is JS-only — a uv/poetry repo without a declared packageManager resolves to npm and skips its install #1231.stacks,worktree-manager,worktree-manager.frozen-install,version-check,version-check.yarn-majorandcombined-branch-testall pass (303).tsc --noEmit,npm run lintand prettier are clean.Closes #1231
Refs #1203
🤖 Generated with Claude Code