fix: add overflow assembly diagnostics#512
Merged
Merged
Conversation
jalehman
pushed a commit
to electricsheephq/lossless-claw-test
that referenced
this pull request
May 18, 2026
…vations Two bootstrap-side followups to v0.9.3: * D1: PR Martian-Engineering#510 replaced bulk createMessagesBulk + appendContextMessages with N×ingestSingle inside a single withTransaction so the interceptor pipeline runs on first import. Correct for sessions whose transcripts contain interceptor-triggering content (oversized files/images/tool- results); slow for the common case. Pre-scan now restores the bulk- insert fast path when no message would trigger an interceptor; otherwise chunked transactions of K=100. * F10: PR Martian-Engineering#512's recentBootstrapImportsByConversation Map had no time- based expiry — stale "7 imports" tags trailed conversations indefinitely (LRU only evicts at 100 conversations). Add 30-minute TTL gated in formatOverflowDiagnosticsForLog so operator log lines reflect recent activity only. Closes Martian-Engineering#568. Refs Martian-Engineering#489, Martian-Engineering#510, Martian-Engineering#512, Martian-Engineering#495.
jalehman
pushed a commit
to electricsheephq/lossless-claw-test
that referenced
this pull request
May 18, 2026
…vations Two bootstrap-side followups to v0.9.3: * D1: PR Martian-Engineering#510 replaced bulk createMessagesBulk + appendContextMessages with N×ingestSingle inside a single withTransaction so the interceptor pipeline runs on first import. Correct for sessions whose transcripts contain interceptor-triggering content (oversized files/images/tool- results); slow for the common case. Pre-scan now restores the bulk- insert fast path when no message would trigger an interceptor; otherwise chunked transactions of K=100. * F10: PR Martian-Engineering#512's recentBootstrapImportsByConversation Map had no time- based expiry — stale "7 imports" tags trailed conversations indefinitely (LRU only evicts at 100 conversations). Add 30-minute TTL gated in formatOverflowDiagnosticsForLog so operator log lines reflect recent activity only. Closes Martian-Engineering#568. Refs Martian-Engineering#489, Martian-Engineering#510, Martian-Engineering#512, Martian-Engineering#495.
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.
What
Adds compact, depersonalized overflow diagnostics to LCM assembly debug output for stressed prompt budgets. References #495.
Why
Large assembled prompts need observability that explains token pressure, duplicate context, and largest contributors without dumping private message or summary content.
Changes
Testing
npm testnpm run build