Skip to content

fix(sessions): bound the transcript indexer (v0.461.2) - #872

Merged
vikasprogrammer merged 1 commit into
mainfrom
feat/bounded-index
Oct 13, 2026
Merged

vikasprogrammer merged 1 commit into
mainfrom
feat/bounded-index

Conversation

@vikasprogrammer

Copy link
Copy Markdown
Owner

v0.461.0's session-search indexer parsed each conversation's whole transcript on the event loop and re-read a live run on every tick. On expresstech one 89 MB transcript took 4.1s to parse, so v0.461.0 was rolled back there.

  • readConversationBounded reads at most 1 MB (256 KB head + tail), cut at line boundaries. The console keeps its full on-demand read.
  • No re-read while the transcript's mtime is unchanged; activity alone only moves the watermark.
  • A live run is re-read at most every 10 minutes.
  • Harness markup (system reminders, <command-*> / <local-command-*> tags) is stripped from digests.
  • Digests written by v0.461.0 are dropped once by the migration and rebuilt.

Measured on expresstech's real DB and transcripts (scratch copy, live checkout untouched): the 1,042-conversation backlog drains in 179 ticks (p50 166ms, p95 210ms, max 396ms per tick, against a 150ms budget). A steady-state sweep takes 11ms. "paypal credentials restored" returns the diagnosis run and the wp-ops fix run as the top two hits.

Tests: session-search-test now has 52 checks (bounded read, mtime skip, re-read floor, harness strip). Full governance suite passes.

🤖 Generated with Claude Code

…mtime skip, 10-min re-read floor (v0.461.2)

v0.461.0 parsed whole transcripts on the event loop and re-read a live run every tick; on expresstech an
89 MB transcript cost a 4.1s parse, so it was rolled back there. Now: <=1 MB head+tail read cut at line
boundaries (readConversationBounded), no re-read while the file's mtime is unchanged, a live run re-read at
most every 10 min, harness markup stripped from digests, and v0.461.0 digests dropped once. Measured on
expresstech's real data: 1,042-convo backlog in ~180 ticks of ~150ms, steady sweep ~11ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vikasprogrammer
vikasprogrammer merged commit 1886876 into main Oct 13, 2026
1 check 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