Repository navigation
fix(pstack): keep runtime dependencies outside plugin cache - #294
Open
davidrobertson wants to merge 2 commits into
Open
davidrobertson wants to merge 2 commits into
davidrobertson wants to merge 2 commits into
Conversation
Contributor
Merge Protections🟠 1 of 2 protections blocking · waiting on 🤖 CI
🟠 Queue ready pull requestsWaiting for
Waiting checks:
|
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.
Problem
On its first run,
watch-prinstalls dependencies inside the installed plugin. Bun creates anode_modules/.bin/tscsymlink there, which Codex rejects while fingerprinting the plugin for hook trust. Subsequent session-start hooks fail.Closes #293.
Change
Install the frozen dependencies in a user cache outside the plugin, keyed by the manifest and lockfile. Publish complete installations through unique staging directories so concurrent starts can reuse the winner. Register the cached Commander module with Bun before importing the CLI, keeping the command in its original process and preserving its arguments, working directory, environment, streams, and signal handling.
Existing plugin installations already modified by the previous bootstrap need a clean reinstall to remove the symlink from the plugin tree.
Verification
bun run test(520 passed),bun run typecheck, andbun run static(including 219 verifier tests).claude plugin validate plugins/pstackandclaude plugin validate .passed.--cwd, failure diagnostics, and process termination. The focused suite also passed with network access disabled and an already-warm Bun package cache.watch-pr --helpruns, the trusted hook fingerprint stayed unchanged and a fresh Codex session completed the pstack session-start hook. The plugin contained noscripts/node_modulesdirectory.Live gate
The repository's
verify-open-pstackpublisher requires an open same-repository PR, so it cannot publish thelive-gatestatus for this fork PR. A maintainer will need to run the repository's exact-head live gate on a same-repository candidate before merging. No Windows live test was performed.