Skip to content

dispatch: suggest --repos only where the flag is accepted - #2677

Merged
gtrrz-victor merged 1 commit into
mainfrom
dispatch-local-repos-hint
Oct 8, 2026
Merged

gtrrz-victor merged 1 commit into
mainfrom
dispatch-local-repos-hint

Conversation

@gtrrz-victor

@gtrrz-victor gtrrz-victor commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

https://entire.io/gh/entireio/cli/trails/1498

Follow-up to #2667 (trail 1489: dispatch from Entire-native checkouts).

Problem

resolveOriginRepoSlug is 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), so entire dispatch --local in a checkout whose origin Entire cannot address (e.g. a gitlab.com remote) pointed the user at a flag that then fails.

Fix

  • The shared helper's errors name no flag.
  • The cloud caller (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

  • New TestLocalMode_UnknownOriginHostDoesNotSuggestRepos: fails on main (error says "pass --repos to name the repo"), passes with the fix.
  • Existing TestServerMode_UnknownOriginHostIsAnError still requires the --repos hint in cloud mode.
  • mise run lint clean; integration tests and the Vogon canary pass. Two unrelated local failures in mise run check: TestDialLatencies (timing flake, passes on rerun) and TestPlugin_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 --repos hints when entire dispatch --local cannot resolve the checkout’s origin.

resolveOriginRepoSlug is shared by cloud and local dispatch; its errors no longer mention --repos (local mode rejects that flag). Cloud dispatch in runServer wraps 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.

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
@gtrrz-victor
gtrrz-victor requested a review from a team as a code owner October 6, 2026 08:52
Copilot AI balanced review requested due to automatic review settings October 6, 2026 08:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --repos guidance.
  • 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.

@gtrrz-victor
gtrrz-victor merged commit 963ff47 into main Oct 8, 2026
20 checks passed
@gtrrz-victor
gtrrz-victor deleted the dispatch-local-repos-hint branch October 8, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants