Repository navigation
dispatch: suggest --repos only where the flag is accepted - #2677
Merged
Merged
Conversation
resolveOriginRepoSlug is shared by cloud and local dispatch, but its errors told the user to pass --repos, which --local refuses. A local dispatch in a checkout whose origin Entire cannot address pointed the user at a flag that then failed with "--repos cannot be used with --local". The shared helper now names no flag; the cloud caller adds the --repos hint when it wraps the error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M486K59T3T709D8JVZFQARE3
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused error-message change is correctly scoped and covered by local and existing cloud tests.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes misleading --repos guidance in local dispatch while preserving it for cloud dispatch.
Changes:
- Removes flag-specific hints from shared origin-resolution errors.
- Adds cloud-only
--reposguidance. - Tests unsupported local origins.
| File | Description |
|---|---|
mode_local.go |
Makes shared errors mode-neutral. |
mode_cloud.go |
Adds cloud-specific recovery guidance. |
mode_local_test.go |
Verifies local errors omit --repos. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
alishakawaguchi
approved these changes
Oct 7, 2026
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.
https://entire.io/gh/entireio/cli/trails/1498
Follow-up to #2667 (trail 1489: dispatch from Entire-native checkouts).
Problem
resolveOriginRepoSlugis shared by cloud and local dispatch, and all three of its errors told the user to "pass --repos". Local mode refuses that flag (--repos cannot be used with --local), soentire dispatch --localin a checkout whose origin Entire cannot address (e.g. a gitlab.com remote) pointed the user at a flag that then fails.Fix
runServer) adds(or pass --repos gh/<owner>/<repo> or et/<project>/<repo> to name the repo)when wrapping the error, so cloud users get the same guidance as before.Tests
TestLocalMode_UnknownOriginHostDoesNotSuggestRepos: fails onmain(error says "pass --repos to name the repo"), passes with the fix.TestServerMode_UnknownOriginHostIsAnErrorstill requires the--reposhint in cloud mode.mise run lintclean; integration tests and the Vogon canary pass. Two unrelated local failures inmise run check:TestDialLatencies(timing flake, passes on rerun) andTestPlugin_SpawnsHooksUnderNode(no global node version in the local mise setup).🤖 Generated with Claude Code
Note
Low Risk
User-facing error text only; behavior unchanged aside from removing a misleading flag hint in local mode.
Overview
Fixes misleading
--reposhints whenentire dispatch --localcannot resolve the checkout’s origin.resolveOriginRepoSlugis shared by cloud and local dispatch; its errors no longer mention--repos(local mode rejects that flag). Cloud dispatch inrunServerwraps those failures with(or pass --repos … to name the repo)so server users keep the same escape hatch.Adds
TestLocalMode_UnknownOriginHostDoesNotSuggestRepos(e.g. GitLab origin): error should name the host but must not contain--repos.Reviewed by Cursor Bugbot for commit ccfaa45. Configure here.