Skip to content

feat(sessions): search history before a date with --until - #595

Merged
bompus merged 4 commits into
fork/consolidatedfrom
feat/sessions-until
Oct 30, 2026
Merged

bompus merged 4 commits into
fork/consolidatedfrom
feat/sessions-until

Conversation

@bompus

@bompus bompus commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

codegraph sessions and the codegraph_sessions tool can now search history before a date: --until 2026-10-20 (CLI) and until: "2026-10-20" (MCP).

Until now a search could only look back a number of days (--since, sinceDays). Its best 100 hits come from whatever matches best, so for a common word the newest sessions filled the list and older context could not be reached. With until (and since for the lower edge) a search can target any window.

until takes a date, read as midnight UTC, or a timestamp that names its zone (2026-10-20T05:00:00-06:00). A day that does not exist (2026-02-30) and a timestamp with no zone are refused with a message, as the other bad arguments are, because accepting them moves the cutoff to a different day or to the machine's time zone. The bound is exclusive, like the end of a date range. The --project fan-out passes it through.

Checks: the full suite passed on the first commit (936 files, 11,202 tests, tsc clean). After the review fixes, the sessions, CLI and fan-out tests pass (76) and tsc is clean. New tests cover the library bound (before, after, window), parseUntil (dates, timestamps, nonexistent days, zone-less text), mixed stored timestamp spellings against one cutoff and the CLI (--until filtering and a refused value).

Review: a read-only review before this PR found three issues and the bot reviewer then found a fourth. All four are fixed with a failing test first: nonexistent calendar dates, zone-less timestamps, and stored timestamps whose spelling does not sort by time as text (12:00:00Z after 12:00:00.500Z; +00:00 offsets). The until comparison now uses SQLite's julianday on both sides. The existing since bound still compares as text; that is unchanged here.

README rows checked: the codegraph sessions flag list in README.md and site/.../reference/cli.md now includes --until; the server instructions and the CHANGELOG are updated.

@bompus bompus added the author:anthropic Pull request written by a anthropic model label Oct 30, 2026
@bompus

bompus commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@bompus-ai-review bompus-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bompus AI Review (GPT-6.1 Sol, xhigh reasoning): 1 finding(s).

Comment thread src/sessions/index.ts Resolved

@bompus-ai-review bompus-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bompus AI Review (GPT-6.1 Sol, xhigh reasoning): 1 finding(s).

Comment thread src/sessions/index.ts Resolved

@bompus-ai-review bompus-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bompus AI Review (GPT-6.1 Sol, xhigh reasoning): 0 finding(s).

Review 3: only high findings and above are posted from here on.

@bompus
bompus merged commit 60594f9 into fork/consolidated Oct 30, 2026
3 checks passed
@bompus
bompus deleted the feat/sessions-until branch October 30, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:anthropic Pull request written by a anthropic model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant