fix(host): resolve pinned pnpm launcher and preflight create/resume - #47
Merged
Merged
Conversation
Replace the bare pnpm prerequisite probe with a pinned package-manager resolution chain (corepack → pnpm → npm exec) and centralize spawn handling (timeout, abort, bounded output, process-group cleanup) in workflow-package-manager.ts, removing duplicated runners from workflow-package.ts and workflow-test-verifier.ts. Preflight package-manager resolution before create and resume of the built-in create workflow so toolchain failures surface before model tokens are spent. Co-Authored-By: Kimchi <noreply@kimchi.dev>
- resolve corepack/pnpm/npm through their .cmd shims on Windows so spawn(shell: false) can start them - add an abortError option so install and verification aborts keep their own messages instead of the generic probe wording - truncate per-candidate probe diagnostics to a single 512-character line before aggregating them into the resolution error - resolve the package manager only when installation is required, and render fallback retry commands through the shared formatter Co-Authored-By: Kimchi <noreply@kimchi.dev>
Kimchi Code ReviewA review is being prepared and will be posted shortly.
What to expectKimchi will analyze the changes in this pull request and post:
The review typically completes within a few minutes. This comment will be updated once the review is ready. Interact with Kimchi
ConfigurationReviews are configured by your organization admin. Powered by Kimchi — AI-powered code review by CAST AI |
…ree termination Replace manual .cmd suffixing with cross-spawn for reliable cross-platform process spawning. Isolate the pnpm --version probe in a temporary neutral directory so project workspace config and corepack auto-pin cannot interfere with version detection. Terminate the entire process tree via taskkill /T /F on Windows when aborting or timing out — killing cmd.exe alone strands descendants and keeps inherited output pipes open, preventing settlement. Always resolve the package manager when installation is skipped so the verify command reflects the actual launcher. Co-Authored-By: Kimchi <noreply@kimchi.dev>
- pass NODE_PATH pointing at repo node_modules to bun build --compile so the distribution-metadata test resolves dependencies on CI - raise the run-identity suite timeout to 20s for slower CI runners - compare the package-manager probe cwd against the realpath of the temp application dir to tolerate symlinked tmpdirs (e.g. macOS /var) Co-Authored-By: Kimchi <noreply@kimchi.dev>
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
Creating or testing a workflow requires Node.js and a specific pinned
version of pnpm on the user's machine. Until now we invoked pnpm
blindly, so when the toolchain was missing or misconfigured, the
failure surfaced deep inside a run — after the agent had already
started spending model tokens.
What changed
an unfinished one, now checks upfront that Node.js and the pinned
pnpm are available. If they aren't, the user gets a clear,
actionable error immediately — no wasted tokens.
we now try several ways of launching the exact pinned version —
via Corepack, a direct pnpm install, or an npm download — whichever
works on the user's machine. Messages guiding users to retry a
failed step show the exact command that was used.
that works on Windows, not just macOS/Linux.
from failed checks is condensed to a readable one-liner instead of
dumping raw logs into the UI, and cancelling an install or test run
reports what was actually cancelled.