Skip to content

fix(core): paginate durable session history - #437

Merged
lg2m merged 1 commit into
fix/compaction-recoveryfrom
fix/history-recall
Oct 23, 2026
Merged

lg2m merged 1 commit into
fix/compaction-recoveryfrom
fix/history-recall

Conversation

@lg2m

@lg2m lg2m commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

History searches can now reach evidence beyond their first bounded page, including applied steering and earlier work in the active run. Previously, every query rescanned only the newest 8 MiB, while the result incorrectly suggested narrowing the query to look further back. Stacked on #436.

search_history returns a cursor at the next unvisited source when its byte budget, step budget or match limit ends a page. Indexed keyset seeks replace the archive-sized prompt collection. Large units are examined once before advancing; retrieval calls/results are excluded from search echoes. Unicode matching uses a linear scan with original byte boundaries. History and saved-output reads share one session-scoped reader. Results now show newest prompts first and newest turns within each prompt; older matches require following the cursor. No protocol/schema change or dependency added.

Verified commit e5fa5981: cargo xtask check --base origin/fix/compaction-recovery passed (2,422 tests, 15 skipped), plus 13 focused history/spill tests and all 11 smoke scenarios. The original current-run exclusion failed a regression before the fix. A 48 MiB archive test now actually retrieves its oldest prompt across pages; the old query's nonexistent trailing space was corrected. Additional cases cover oversized units, applied/queued steering, search echoes, foreign-session cursors and Unicode boundary matching. An isolated real server automatically compacted, retrieved active-run evidence, paged through all three earlier instructions, and wrote the verified artifact once without manual compaction. Reviewed the diff, query bounds and reader isolation locally.

This supplies bounded history recall; exact instruction retention beyond the compaction record cap remains the next task #5 slice. These deterministic checks do not establish comparative model quality or multi-day production qualification.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-23T05:06:54.044596Z e5fa598 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

lg2m commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@lg2m
lg2m added this pull request to stack #438 October 23, 2026 05:20
@lg2m
lg2m merged commit 3122856 into main Oct 23, 2026
7 checks passed
@lg2m
lg2m deleted the fix/history-recall branch October 23, 2026 06:07
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