fix(dispatch): make `dispatch --local` surface recent merged work (ENT-1188)
Commit

entire dispatch --local returned an empty/near-empty dispatch for
everyone, while the server-side dispatch on entire.io worked. Two causes:
-
Branch scoping: branchLocalRevRange always used
<default>..HEAD, which is empty on an up-to-date default branch, so the reachable trailer set was empty and only checkpoints whose summary.Branch equalled the current branch survived (rare — work happens on feature branches merged into main). -
Stale local store (dominant): enumeration used store.List, which only sees checkpoints present in the local checkout. Recent checkpoints live in the sharded git-refs backend on the checkpoint remote and are never fetched locally (git pull only syncs refs/heads/, not refs/entire/checkpoints/), so recent windows came up empty.
Fix:
- branchLocalRevRange returns HEAD when the current branch is the default branch (nothing to exclude); the base..HEAD exclusion still applies to feature branches.
- Enumerate checkpoints reachable by commit trailer in the window, using the commit subject as the bullet (always available locally from git log) and preferring the richer local session summary only when the checkpoint is already present locally. Windowed by commit ("landed on branch") time. No per-checkpoint network fetch, so it stays fast.
Adds regression tests for the default-branch and missing-from-local-store cases.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01Wi6WfsYgVrWDrZXpu62u8u Entire-Checkpoint: 01KXPF1JCVJVAMCF08433KA12R