Skip to content

fix: Runner-owned command flags no longer force a dispatcher release - #1861

Merged
hatayama merged 5 commits into
feature/remove-completion-help-forwarding-integrationfrom
feat/remove-shell-completion-and-forward-help
Jul 20, 2026
Merged

hatayama merged 5 commits into
feature/remove-completion-help-forwarding-integrationfrom
feat/remove-shell-completion-and-forward-help

Conversation

@hatayama

@hatayama hatayama commented Jul 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Shell completion (TAB completion) is fully removed; completion is now a silent no-op stub so existing shell rc blocks keep starting up without errors.
  • Help for runner-owned commands (e.g. 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.
  • Outside a Unity project, help output gives clearer guidance on how to see the full command list, and no longer points at the removed completion feature.

User Impact

  • Before: adding or changing a flag on a runner-owned command required a dispatcher release just to update its --help text, even though the flag itself only affects the project runner.
  • After: runner-owned command flags can be added or changed in the project runner alone; the dispatcher forwards --help requests to whatever runner version is pinned for that project, so the help text and the actual behavior can never disagree.
  • Shell completion is gone, but existing eval "$(uloop completion --shell zsh)" blocks in shell rc files keep working silently instead of breaking shell startup.

Changes

  • Removed completion.go's shell-script generation, --install, shell detection, and --list-commands/--list-options handling; replaced with a minimal stub that only recognizes the completion command name.
  • Removed the dispatcher's static nativeCommandOptions table entries for runner-owned commands; their --help now routes through the normal dispatch path to the pinned runner (implemented in a prior PR).
  • Expanded outside-project help guidance (top-level --help, runner-owned command help, Unity tool command help) to consistently point users at --project-path or running inside a project.
  • Moved pause-point flag name constants from the shared clicore package into project-runner, since only the runner needs them.
  • Removed the "Shell Completion" sections from README.md/README_ja.md and refreshed the release-trigger stamps for the shared cli/common changes.

Verification

  • scripts/check-go-cli.sh passes 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 zsh is a silent no-op (empty stdout, exit 0).
  • dist/darwin-arm64/uloop --help / await-pause-point --help / <unknown-tool> --help run outside a Unity project all give the same friendly project-resolution guidance.
  • grep -rn "PausePoint.*FlagName" cli/common cli/dispatcher returns no matches.

Review in cubic

hatayama added 5 commits July 20, 2026 11:38
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.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 62a29242-4f80-4930-9fd2-3956fd689eae

📥 Commits

Reviewing files that changed from the base of the PR and between 1b69722 and 8c555a1.

📒 Files selected for processing (22)
  • README.md
  • README_ja.md
  • cli/common/clicore/command_registry.go
  • cli/common/clicore/global_args.go
  • cli/dispatcher/internal/dispatcher/command_help.go
  • cli/dispatcher/internal/dispatcher/completion.go
  • cli/dispatcher/internal/dispatcher/completion_options.go
  • cli/dispatcher/internal/dispatcher/completion_test.go
  • cli/dispatcher/internal/dispatcher/dispatcher_bootstrap_routing_test.go
  • cli/dispatcher/internal/dispatcher/dispatcher_process.go
  • cli/dispatcher/internal/dispatcher/dispatcher_test.go
  • cli/dispatcher/internal/dispatcher/help_test.go
  • cli/dispatcher/internal/dispatcher/native_command_options.go
  • cli/dispatcher/internal/dispatcher/run_dispatcher.go
  • cli/dispatcher/internal/dispatcher/run_help.go
  • cli/dispatcher/shared-inputs-stamp.json
  • cli/project-runner/internal/projectrunner/native_command_help.go
  • cli/project-runner/internal/projectrunner/pause_point_captured_variables_mode.go
  • cli/project-runner/internal/projectrunner/pause_point_wait.go
  • cli/project-runner/internal/projectrunner/run.go
  • cli/project-runner/internal/projectrunner/runner_usage_test.go
  • cli/project-runner/shared-inputs-stamp.json
💤 Files with no reviewable changes (3)
  • cli/dispatcher/internal/dispatcher/completion_options.go
  • cli/common/clicore/global_args.go
  • cli/project-runner/internal/projectrunner/runner_usage_test.go

📝 Walkthrough

Walkthrough

The CLI removes shell completion generation and installation, making completion a silent successful stub. Dispatcher routing now distinguishes dispatcher-owned and runner-owned help, while pause-point flag constants move into the project runner. Documentation and related tests are updated.

Changes

Completion and dispatcher behavior

Layer / File(s) Summary
Silent completion stub
cli/common/clicore/command_registry.go, cli/dispatcher/internal/dispatcher/completion.go, cli/dispatcher/internal/dispatcher/*test.go, README*
The completion command now returns success without output, completion-generation code is removed, and documentation/tests reflect the stub behavior.
Dispatcher routing and help ownership
cli/dispatcher/internal/dispatcher/run_dispatcher.go, cli/dispatcher/internal/dispatcher/command_help.go, cli/dispatcher/internal/dispatcher/run_help.go, cli/dispatcher/internal/dispatcher/native_command_options.go, cli/dispatcher/internal/dispatcher/*test.go
Dispatcher-owned commands retain local handling, runner-owned help is forwarded, native project requirements are narrowed, and project-resolution guidance is updated.
Runner-local pause-point flags
cli/common/clicore/command_registry.go, cli/project-runner/internal/projectrunner/*, cli/*/shared-inputs-stamp.json
Pause-point flag names are defined and consumed within the project runner, with related usage tests and input hashes updated.

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
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly captures the main change: runner-owned command flags no longer require a dispatcher release.
Description check ✅ Passed The description matches the diff and objectives, covering completion removal, help forwarding, guidance changes, and constant relocation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/remove-shell-completion-and-forward-help

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hatayama
hatayama merged commit 3d73e55 into feature/remove-completion-help-forwarding-integration Jul 20, 2026
2 checks passed
@hatayama
hatayama deleted the feat/remove-shell-completion-and-forward-help branch July 20, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant