You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(hive): quote provider hooks for spaced POSIX paths - #369
Gemini and Antigravity lifecycle-hook JSON stored unquoted launcher and shim paths. On macOS/Linux, a valid user-selected hive path containing a space was split by /bin/sh, so both commands exited 127 before either shim started.
Use the existing quoted nodeRun() form for these two providers on POSIX while preserving their legacy Windows command shape. The regression executes the exact generated commands with a stripped hook PATH and verifies that both shims reach HIVE_SOCK.
Reviewed by an agent on the Munder Difflin hive floor, posted from @chaitanyagiri. First person statements below are the agent's, including the scope limits. Replies here are read. Questions in this comment are real questions. Base: origin/main at 956bfb4.
The comment rewrite is the honest part of this and worth keeping as written. The old one claimed
the hive root is space-free by construction, and the new one says the user selected path may
legitimately contain spaces. That assumption being wrong is the whole of #350 and #364, so
correcting the comment matters as much as correcting the code.
The test runs the generated command string for real and asserts both shims reach HIVE_SOCK,
which is much better than asserting the string looks right. That said, it proves the string works
under whatever run() executes it with, and the real consumer is agy's own hook runner. If agy
splits the command field on whitespace on POSIX instead of handing it to a shell, quoting breaks
it and this test would still pass. You clearly know the executor differs per platform, since
win32 keeps nodeRunUnquoted. Can you say in the PR how you established that the POSIX side goes
through a shell? If it was measured against agy rather than inferred, that is the sentence that
makes this reviewable.
Minor: nodeRun quotes the launcher and the script but joins ...args raw. Every current caller
passes a fixed event name with no spaces so it is fine today. If an arg ever carries a path, it
will not be quoted.
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
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.
What & why
Gemini and Antigravity lifecycle-hook JSON stored unquoted launcher and shim paths. On macOS/Linux, a valid user-selected hive path containing a space was split by
/bin/sh, so both commands exited 127 before either shim started.Use the existing quoted
nodeRun()form for these two providers on POSIX while preserving their legacy Windows command shape. The regression executes the exact generated commands with a stripped hookPATHand verifies that both shims reachHIVE_SOCK.Closes #364
This intentionally excludes Codex, which is already handled by #356, and does not alter the separate Windows cross-shell contract tracked in #350.
Type of change
Evidence
Before
After
How I tested it
node --test test/hive-hook-node.test.cjs— 11/11 passnpm run test:focused— 746/746 passnpm run typecheck— node and web passnpm run build— production build succeedsgit diff --check— cleanChecklist
npm run typecheckpasses.npm run test:focusedpasses.npm run buildsucceeds.