Skip to content

feat(search): add --local fallback that greps the local checkpoint branch#1210

Open
timon0305 wants to merge 3 commits into
entireio:mainfrom
timon0305:fix/1195-local-checkpoint-search
Open

feat(search): add --local fallback that greps the local checkpoint branch#1210
timon0305 wants to merge 3 commits into
entireio:mainfrom
timon0305:fix/1195-local-checkpoint-search

Conversation

@timon0305
Copy link
Copy Markdown

@timon0305 timon0305 commented May 14, 2026

Summary

Adds --local to entire search / entire checkpoint search. Skips the remote service and does case-insensitive substring matching over the local entire/checkpoints/v1 branch (prompts, transcripts, file paths, branch name).

Refs #1195, #1171. The remote indexing bug isn't fixed here — but users with confirmed-captured checkpoints (visible in activity / dispatch / explain) get an immediate working path while it's diagnosed.

  • Honors --branch, --json, piped/accessibility output.
  • Reuses the existing JSON shape so scripted consumers don't branch on source.
  • Skips auth entirely (works offline).
  • Out of scope: TUI, --repo *, author/date filters.

Test plan

  • 6 new unit tests pass (transcript token, files-touched, branch filter, empty query, no match, snippet windowing)
  • go build ./..., go vet, gofmt clean
  • E2E against the built binary on a seeded fixture repo: JSON output, branch filter (main and feature), empty query, no-match (total: 0), case-insensitive match, top-level entire search --local alias

@timon0305 timon0305 requested a review from a team as a code owner May 14, 2026 01:34
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

timon0305 added 2 commits May 13, 2026 21:49
…anch

Users can hit empty results from the remote search service even when
checkpoints are fully captured locally (visible via `entire activity`
and `entire checkpoint explain`) — for example when the index is
lagging or when checkpoints push to a dedicated mirror repo whose name
differs from the working copy's origin.

`entire search --local` (also `entire checkpoint search --local`) walks
entire/checkpoints/v1 and does case-insensitive substring matching over
prompts, transcripts, file paths, and the checkpoint branch name. The
flag bypasses auth and the remote service entirely, so it works offline
and against any repo the user owns checkpoints in. Output reuses the
existing JSON/static-table shapes so scripted consumers don't have to
branch on the source.

Refs entireio#1195, entireio#1171
A small Go script that initializes a temp repo and writes two committed
checkpoints via the public store API. Useful for manual end-to-end
verification of `entire checkpoint search --local` without having to
run an agent session.

Usage:
  go run ./scripts/seed-local-search-fixture <repo-dir>
  cd <repo-dir>
  entire checkpoint search --local "<query>" --json
@timon0305 timon0305 force-pushed the fix/1195-local-checkpoint-search branch from 4580f3f to f9a9337 Compare May 14, 2026 01:50
When `entire search` / `entire checkpoint search` returns 0 results
and the local entire/checkpoints/v1 branch has content, print a
one-line stderr hint pointing the user at `--local`.

Closes the discoverability gap reported in entireio#1171 and entireio#1195: the
reporters knew their checkpoints were captured (visible in activity /
dispatch / explain) but had no signal that --local existed or would
work for them. The hint fires only on JSON/static paths so the TUI
isn't polluted, and is silent when results came back, no local
checkpoints exist, or the response is nil.

Refs entireio#1171, entireio#1195
@timon0305
Copy link
Copy Markdown
Author

@claude review

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.

1 participant