dispatch: add --me and --author flags#1135
Conversation
Adds two new flags to `entire dispatch` for narrowing the recap to a
single contributor:
entire dispatch --me # just my work
entire dispatch --repos owner/repo --me
entire dispatch --repos owner/repo --author teammate@example.com --since 14d
entire dispatch --local --all-branches --me
Both flags are wired through `dispatch.Options.{Me, Author}` and
flow into:
- Cloud mode (`mode_cloud.go`): passed through in `CreateDispatchRequest`
to POST /api/v1/dispatches/generate. Server resolves them to a
`commit_author_github_id` filter (with username fallback for rows
where the github_login → id mapping hasn't backfilled). See
entirehq/entire.io#1840 for the server-side change this depends on.
- Local mode (`mode_local.go`): `resolveLocalAuthorFilter` lowercases
the input email; `--me` resolves to `git config user.email`. The
metadata-branch commit author email is matched case-insensitively
via `loadCommitAuthorsByCheckpoint`.
`--me` and `--author` are mutually exclusive (`ResolveOptions` returns
"--author and --me are mutually exclusive").
The interactive wizard gains an "Author scope" question with three
options: Everyone (default), Just me, Specific person — the third
prompts for an email.
Tests cover:
- Flag plumbing through `ResolveOptions` (PropagatesAuthor,
PropagatesMe, RejectsAuthorAndMeTogether,
WhitespaceAuthorWithMeIsAllowed)
- Cloud client serialisation (SendsAuthorAndMeWhenSet)
- Local mode filter resolution (resolveLocalAuthorFilter cases) and
candidate filtering (filterCandidatesByAuthor)
- Wizard scope selection and option mapping
Author semantics differ slightly between modes: local matches against
commit email, cloud matches against the requester's GitHub login (the
server doesn't currently resolve emails to logins). Future work can
unify these by adding email lookup server-side.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 1bd236e74bbd
There was a problem hiding this comment.
Pull request overview
Adds contributor-scoping to entire dispatch by introducing --me and --author, enabling users to narrow dispatch recaps to a single person across both cloud and local modes.
Changes:
- Plumbs
--me/--authorthrough CLI flag parsing anddispatch.Options, including mutual-exclusion validation. - Cloud mode forwards
author/mefields in the dispatch generation request payload. - Local mode resolves
--meviagit config user.emailand filters candidate checkpoints by metadata-branch commit author; wizard gains an “Author scope” step.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/dispatch.go | Adds --me / --author flags and passes them into dispatch option resolution. |
| cmd/entire/cli/dispatch_test.go | Updates CLI flag parsing tests for new parameters. |
| cmd/entire/cli/dispatch/options.go | Adds author/me fields to resolved options and enforces mutual exclusivity. |
| cmd/entire/cli/dispatch/options_test.go | Adds coverage for author/me propagation and mutual exclusivity. |
| cmd/entire/cli/dispatch/dispatch.go | Extends dispatch.Options with Author/Me fields and documentation. |
| cmd/entire/cli/dispatch/mode_cloud.go | Forwards Author/Me from options into the cloud dispatch request. |
| cmd/entire/cli/dispatch/cloud.go | Extends CreateDispatchRequest JSON payload with author/me. |
| cmd/entire/cli/dispatch/cloud_test.go | Adds tests ensuring JSON serialization includes/omits author/me as expected. |
| cmd/entire/cli/dispatch/mode_local.go | Implements local author filter resolution and candidate filtering by metadata commit author email. |
| cmd/entire/cli/dispatch/mode_local_test.go | Adds local-mode tests for --author filtering and --me email resolution. |
| cmd/entire/cli/dispatch_wizard.go | Adds wizard “Author scope” selection and renders corresponding flags in the preview command. |
| cmd/entire/cli/dispatch_wizard_test.go | Tests wizard scope resolution and command rendering for --me/--author. |
| cmd.Flags().StringVar(&flagAuthor, "author", "", "filter to checkpoints authored by this email") | ||
| cmd.Flags().BoolVar(&flagMe, "me", false, "filter to your own checkpoints (alias for --author <self>)") |
| // Author filters checkpoints to a specific author email. | ||
| // Cloud mode passes it through to the server; local mode matches it | ||
| // case-insensitively against the metadata-branch commit author. |
| Until string `json:"until"` | ||
| Generate bool `json:"generate"` | ||
| Voice string `json:"voice,omitempty"` | ||
| // Author filters checkpoints to a specific author email. |
| Placeholder("teammate@example.com"). | ||
| Value(&state.authorInput). | ||
| Validate(func(value string) error { | ||
| if state.showAuthorInput() && strings.TrimSpace(value) == "" { | ||
| return errors.New("enter an author email") | ||
| } | ||
| return nil | ||
| }), | ||
| ).Title("Author email").Description("Filter to checkpoints by this email."). |
| func loadCommitAuthorsByCheckpoint(ctx context.Context, repoRoot string) (map[string]string, error) { | ||
| cmd := exec.CommandContext( | ||
| ctx, | ||
| "git", | ||
| "-C", | ||
| repoRoot, | ||
| "log", | ||
| "entire/checkpoints/v1", | ||
| "--format=%ae%x00%s%x00%x00", | ||
| ) |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 1ec45c3. Configure here.
| var exitErr *exec.ExitError | ||
| if errors.As(err, &exitErr) { | ||
| return "", nil | ||
| } |
There was a problem hiding this comment.
readGitUserEmail swallows fatal git exit codes
Medium Severity
readGitUserEmail treats all exec.ExitError results identically by returning ("", nil). For git config user.email, exit code 1 means "key not set" (a normal condition), while exit code 128+ indicates a real failure (e.g., corrupt .gitconfig). By not checking exitErr.ExitCode(), a genuine error is silently swallowed, and the caller produces the misleading message "requires git config user.email" instead of surfacing the actual git failure.
Triggered by learned rule: Distinguish git command exit codes — exit 1 means "no results", not error
Reviewed by Cursor Bugbot for commit 1ec45c3. Configure here.


https://entire.io/gh/entireio/cli/trails/315
Summary
Adds two new flags to
entire dispatchfor narrowing the recap to a single contributor:```
entire dispatch --me # just my work
entire dispatch --repos owner/repo --me
entire dispatch --repos owner/repo --author teammate@example.com --since 14d # specific person
entire dispatch --local --all-branches --me # local + all branches
```
--meand--authorare mutually exclusive —ResolveOptionsreturns "--author and --me are mutually exclusive" if both are passed.Why
Today
entire dispatch --repos Xreturns everyone's work in repo X. The common standup/weekly-review framing ("what did I ship?") needs a way to narrow to the requester's own checkpoints — and a parallel ability to recap a teammate's recent work. Unblocks therecapskill in entireio/skills, which calls--meby default.Behaviour
Cloud mode (
mode_cloud.go):--meand--authorflow intoCreateDispatchRequestand are forwarded as JSON fields toPOST /api/v1/dispatches/generate. The server resolves them to acommit_author_github_idfilter (withcommit_author_usernamefallback for rows where the github_login → id mapping hasn't backfilled). Depends on the server-side change in entirehq/entire.io#1840.Local mode (
mode_local.go):resolveLocalAuthorFilterlowercases the input email;--meresolves togit config user.emailat run time.loadCommitAuthorsByCheckpointmaps checkpoint ID → author email by reading the metadata branch;filterCandidatesByAuthorapplies the filter case-insensitively.Wizard: gains an "Author scope" question — Everyone (default) / Just me / Specific person… (third option prompts for an email).
Author semantics — known difference between modes
Future work can unify these by adding email lookup server-side. For now, users running cloud dispatches should pass a GitHub login as
--author; the email form works in--local.Tests
TestResolveOptions_PropagatesAuthor/_PropagatesMe— flag plumbing throughResolveOptionsTestResolveOptions_RejectsAuthorAndMeTogetherTestResolveOptions_WhitespaceAuthorWithMeIsAllowed— empty/whitespace--authoris ignored, not a conflict with--meTestCloudClient_CreateDispatch_SendsAuthorAndMeWhenSet— JSON serialisationmode_local_test.goadds cases forresolveLocalAuthorFilter(--author,--me, neither) andfilterCandidatesByAuthor(matching, mismatching, missing-author maps)dispatch_wizard_test.gocovers the new scope-selection branchTest plan
mise run fmt && mise run lint— clean (0 issues across all linters)go test ./cmd/entire/cli/dispatch/...— all passmise run test:ci— passes onmainand on this branch in CI's UTC timezone (note: there's a pre-existing AEST-flake inTestGroupCommitsByDay_SortsNewestFirstincmd/entire/cli/activity_cmd_test.gothat fails locally for users in zones where the test's hardcoded UTC times span date boundaries differently; not introduced by this PR — it fails onmaintoo)Follow-ups (not in this PR)
--author(currently only resolves GitHub logins). Then the local/cloud author semantics align.TestGroupCommitsByDay_SortsNewestFirst— pre-existing, worth fixing separately.🤖 Generated with Claude Code
Note
Medium Risk
Adds new user-facing filtering options that change which checkpoints are included, including new local git-log based author lookups and new cloud request fields that depend on server support.
Overview
Adds
--authorand--metoentire dispatchto filter the generated recap to a specific checkpoint author (with mutual exclusion enforced inResolveOptions).Cloud dispatch now forwards
author/meinCreateDispatchRequestto the dispatch generation API, while local dispatch resolves--meviagit config user.emailand filters candidates by commit author onentire/checkpoints/v1.The interactive dispatch wizard gains an Author scope step (everyone/me/specific email) and command preview now renders the new flags; tests were extended across options parsing, cloud payload serialization, and local filtering behavior.
Reviewed by Cursor Bugbot for commit 1ec45c3. Configure here.