fix(hooks): update auto-spawn to use top-level genie spawn command - #538
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical issue in the auto-spawn hook by updating the command used to respawn agents. The change ensures that the system correctly utilizes the current Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly updates the auto-spawn hook to use the top-level genie spawn command, replacing the now-defunct genie agent spawn. The changes are straightforward and properly address the issue. I've made one suggestion to improve a comment's clarity regarding synchronous process spawning to prevent future confusion.
| } | ||
|
|
||
| // Respawn via genie agent spawn (non-blocking fork) | ||
| // Respawn via genie spawn (non-blocking fork) |
There was a problem hiding this comment.
The comment mentions a "non-blocking fork", but spawnSync is used on line 93, which is a synchronous and blocking operation. This is correctly explained in the comment on lines 90-92. To avoid confusion, I suggest updating this comment to reflect that the operation is synchronous.
| // Respawn via genie spawn (non-blocking fork) | |
| // Respawn via genie spawn (synchronous fork) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b51306e2b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Respawn via genie spawn (non-blocking fork) | ||
| const { spawnSync } = require('node:child_process') as typeof import('node:child_process'); | ||
| const args = ['agent', 'spawn', '--provider', template.provider, '--team', template.team]; | ||
| const args = ['spawn', '--provider', template.provider, '--team', template.team]; |
There was a problem hiding this comment.
Pass required agent name to
genie spawn argv
After switching to top-level genie spawn, this argv no longer matches the CLI contract: genie spawn --help shows usage genie spawn [options] <name>, but the constructed args omit <name> and later still append legacy flags like --role/--resume that top-level spawn does not accept. In practice, auto-spawn now exits with parse errors instead of bringing the recipient online whenever this path runs.
Useful? React with 👍 / 👎.
Summary
genie agent spawnwhich no longer exists (agent namespace removed in v2 redesign)genie spawncommandChanges
src/hooks/handlers/auto-spawn.ts: Remove'agent'from spawn args arrayTest Plan
bun run typecheckpassesgrep -rn '"agent", "spawn"' src/returns nothing