Repository navigation
fix(sessions): bound the transcript indexer (v0.461.2) - #872
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
readConversationBoundedreads at most 1 MB (256 KB head + tail), cut at line boundaries. The console keeps its full on-demand read.<command-*>/<local-command-*>tags) is stripped from digests.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-testnow has 52 checks (bounded read, mtime skip, re-read floor, harness strip). Full governance suite passes.🤖 Generated with Claude Code