Skip to content

fix: dogfood friction — session lookup recovery, honest timestamps, one-line warnings - #34

Merged
lroolle merged 2 commits into
mainfrom
fix/dogfood-friction-20260803
Aug 4, 2026
Merged

fix: dogfood friction — session lookup recovery, honest timestamps, one-line warnings#34
lroolle merged 2 commits into
mainfrom
fix/dogfood-friction-20260803

Conversation

@lroolle

@lroolle lroolle commented Aug 4, 2026

Copy link
Copy Markdown
Member

What

Adopts findings 1–5, 7 of docs/devlog/2026-08-03-trace-session-dogfood.org (two independent dogfood runs tracing archived sessions; findings 2, 3, 5 reproduced verbatim on the second run).

  • VERSION: make build stamps git describe --tags --dirty --always (e.g. v0.13.0-1-g3e3a235-dirty) instead of dev; releases still override.
  • sessions lookup recovery (was: bare "No sessions found" one directory below the workspace root):
    • project-name lookup slug-folds both sides, so 260715_ccx-session-watch finds slug 260715-ccx-session-watch without guessing the mapping;
    • on zero hits, path-like queries walk up parent directories and show the nearest ancestor workspace with a stderr note;
    • if still empty, closest project slugs are suggested by token overlap;
    • ccx projects gains a PATH column (table + --json).
  • search self-explains: help states phrase semantics (words adjacent, in order; exit 0 on zero matches); zero results print hints (single term / --content).
  • search LAST column: results show last-activity time — the timestamp --after/--before filter on and sorting uses — so a filtered row can't display a date outside the window.
  • trace: one git-root warning per run against archived workspaces, not two.
  • -p help lists gx for sessions/search/insight. Deliberately not log: no grok source is wired there (validLogProvider/logSources) — that's a real feature, left open.

Finding 9 (search exits 1 on zero results) did not reproduce — exit is 0 at v0.13.0 and here; help now documents the contract. Findings 6, 8 (trace turn-range slicing; human-readable --turn) deferred to follow-up issues.

Tests

go test ./... green, go vet clean. New: TestSessionsFromParents*, TestWalkStartPath, TestSuggestClosestProjects*, TestProjectMatchesNameSlugNormalized, TestSlugifyProjectQuery. Live-verified: parent-walk note, slug-fold hit, suggestions, hints, single warning line, version stamp.

Stacked on #33.

🤖 Generated with Claude Code

lroolle and others added 2 commits August 3, 2026 19:42
Default --content now parses candidate sessions and counts only
conversation text (user prompts, assistant text+thinking), so ranking
follows discussion instead of injected boilerplate. Role-labeled
previews in table and --json; path added to session/content JSON
results. --raw keeps the old grep-parity raw line scan. A cheap raw
prefilter gates the parse, skipped when JSON escaping could hide the
query. Makefile build refreshes a stale root ./ccx.

See docs/devlog/2026-08-03-content-search-noise.org.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ne-line warnings

Adopts findings 1-5, 7 of docs/devlog/2026-08-03-trace-session-dogfood.org:

- make build stamps VERSION from git describe (releases still override)
- sessions: slug-folded project lookup (260715_x finds 260715-x),
  parent-dir walk on zero hits with a note, closest-slug suggestions;
  projects gains a PATH column (table + --json)
- search: phrase semantics documented, zero-result hints, LAST column
  shows the end time --after/--before actually filter on
- trace: one git-root warning per run, not two
- -p help lists gx where grok is actually wired (not log)

Finding 9 (exit 1 on zero results) did not reproduce — search exits 0;
help now states the contract. Findings 6, 8 (trace slicing, human-
readable --turn) deferred to follow-up issues.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lroolle
lroolle merged commit 7792331 into main Aug 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant