Repository navigation
fix: Runner-owned command flags no longer force a dispatcher release - #1861
Conversation
Shell completion required the dispatcher to hardcode every command's flag list, which meant adding a flag to a project-runner-owned command (e.g. pause-point's --captured-variables) forced a dispatcher release. Since uloop is used almost exclusively by AI agents, shell completion provides little value relative to that release-coupling cost, so it is removed outright. `completion` is kept as a silent no-op (stdout empty, exit 0) instead of being deleted, because shells that ran `uloop completion --install` before this change still execute `eval "$(uloop completion --shell zsh)"` on every startup; removing the command entirely would break their shell startup with an unknown- command error.
Previously the dispatcher answered every native command's --help from a static local table, even for runner-owned commands like await-pause-point. That table drifts from the runner's actual flags whenever a runner-owned command gains an option, forcing a dispatcher release for a flag that only the runner needs to know about. Route runner-owned command --help through the normal dispatch path instead, so the pinned project runner answers with its own up-to-date help (already implemented in the runner's native_command_help.go). Dispatcher-owned commands are unaffected and continue to answer locally without a project. Removed the now-obsolete local-help tests for runner-owned commands (await-pause-point, list) since they asserted the exact static-table behavior this change intentionally removes, and added a forwarding test verifying await-pause-point --help reaches the pinned runner's runRealCLI call instead of being answered locally.
…inter The top-level `uloop --help` output listed `uloop completion --help` under More:, but shell completion has been removed and that command is now a no-op stub, so the pointer no longer leads anywhere useful. The outside-project Unity tool command section only said tool commands are project-specific without saying how to see the full list. Add guidance to run `uloop --project-path /path/to/project --help` for the complete command set. Runner-owned command help and Unity tool command help already reached the same shared project-resolution error (with matching NextActions) once resolution fails, since the To-Do 5 forwarding change routes runner-owned command help through the normal project-resolution path. Added tests confirming both paths give consistent guidance outside a project, since this had not been verified before.
The pause-point flag constants (id, timeout-seconds, matching-logs-max-count, captured-variables) only matter to the runner, which owns both the flag parsing and the command help text for await-pause-point and pause-point-status. Keeping them in cli/common/clicore meant any future flag rename touched a shared module and forced a combined project-runner/dispatcher release under the repository's release-trigger rules, even though the dispatcher never reads these flags. Move the constants into cli/project-runner/internal/projectrunner and update all references there. clicore now only keeps the command name and ownership constants the dispatcher actually needs.
Shell completion has been fully removed and `completion` is now a no-op stub, so the README's install/setup instructions for it were stale and misleading. Drop the "Shell Completion (Optional)" sections from both README.md and README_ja.md, and note in the dispatcher-owned command list that completion is a stub. This PR touches non-test cli/common Go files alongside cli/dispatcher and cli/project-runner changes, so run scripts/stamp-release-inputs.sh to refresh both components' shared-inputs stamps per the repository's release-trigger rules.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (22)
💤 Files with no reviewable changes (3)
📝 WalkthroughWalkthroughThe CLI removes shell completion generation and installation, making ChangesCompletion and dispatcher behavior
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Dispatcher
participant CompletionStub
participant PinnedRunner
Dispatcher->>CompletionStub: Handle completion arguments
CompletionStub-->>Dispatcher: Return handled=true and exit code 0
Dispatcher->>PinnedRunner: Forward runner-owned help
PinnedRunner-->>Dispatcher: Return command help
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
3d73e55
into
feature/remove-completion-help-forwarding-integration
Summary
completionis now a silent no-op stub so existing shell rc blocks keep starting up without errors.await-pause-point --help) now comes from the pinned project runner instead of a hardcoded dispatcher table, so it can never drift from what that runner version actually supports.User Impact
--helptext, even though the flag itself only affects the project runner.--helprequests to whatever runner version is pinned for that project, so the help text and the actual behavior can never disagree.eval "$(uloop completion --shell zsh)"blocks in shell rc files keep working silently instead of breaking shell startup.Changes
completion.go's shell-script generation,--install, shell detection, and--list-commands/--list-optionshandling; replaced with a minimal stub that only recognizes thecompletioncommand name.nativeCommandOptionstable entries for runner-owned commands; their--helpnow routes through the normal dispatch path to the pinned runner (implemented in a prior PR).--help, runner-owned command help, Unity tool command help) to consistently point users at--project-pathor running inside a project.clicorepackage intoproject-runner, since only the runner needs them.cli/commonchanges.Verification
scripts/check-go-cli.shpasses across all Go modules (fmt, vet, lint, tests, binary rebuild).dist/darwin-arm64/uloop await-pause-point --help --project-path <repo>forwards to the pinned runner and returns its help text.dist/darwin-arm64/uloop completion --shell zshis a silent no-op (empty stdout, exit 0).dist/darwin-arm64/uloop --help/await-pause-point --help/<unknown-tool> --helprun outside a Unity project all give the same friendly project-resolution guidance.grep -rn "PausePoint.*FlagName" cli/common cli/dispatcherreturns no matches.