Repository navigation
fix(omp): trim oversized conversations for session capture - #337
Merged
Merged
Conversation
Keep the head 60% and tail 40% of the 25 MiB stdin budget, with a marker, so a long session is still captured.
A linear shrink by JSON overflow dropped quote-heavy sessions to the marker. Search the text byte budget instead.
A head/tail cut can split a secret off its key. Scrub the joined text with the canonical write-safety guard before measuring the payload.
Binary search escaped prefix sums instead of re-serializing the payload on every probe.
A 100MiB branch must not allocate prefix arrays. Scan escaped lengths from each end and serialize the payload once.
Escaped-length budgeting already fits. Keep one skip if the serialized payload still exceeds 25MiB.
edheltzel
added a commit
that referenced
this pull request
Oct 17, 2026
* feat(omp): trim oversized session_stop captures instead of skipping Keep the head 60% and tail 40% of the 25 MiB stdin budget, with a marker, so a long session is still captured. * fix(omp): binary-search capture trim so escaped text is not marker-only A linear shrink by JSON overflow dropped quote-heavy sessions to the marker. Search the text byte budget instead. * fix(omp): scrub conversation text before capture trim A head/tail cut can split a secret off its key. Scrub the joined text with the canonical write-safety guard before measuring the payload. * fix(omp): scan capture text once before the head/tail trim Binary search escaped prefix sums instead of re-serializing the payload on every probe. * fix(omp): stream the capture trim instead of allocating prefix sums A 100MiB branch must not allocate prefix arrays. Scan escaped lengths from each end and serialize the payload once. * fix(omp): drop the capture trim recut Escaped-length budgeting already fits. Keep one skip if the serialized payload still exceeds 25MiB. * no-mistakes(document): Clarify omp capture trimming and payload limits --------- Co-authored-by: Atlas-Key <296298943+Atlas-Key@users.noreply.github.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.
What Changed
Risk Assessment
✅ Low: The capture change is bounded, preserves payload limits and secret redaction, and introduces no substantiated defects.
Testing
The production build, focused tests, existing native smoke check, and native omp boundary scenarios passed against an isolated localhost model endpoint. Evidence records the base failure, persisted captures, byte counts, searches, and uninstall behavior. All required children exited successfully and disposable files were removed. This CLI capture change required no screenshots.
Evidence: Native capture outcomes and persisted-state readbacks
Evidence: Base extension reproduces oversized-capture skip
Evidence: Updated extension captures oversized text
Evidence: Resume, search, and uninstall readbacks
Pipeline
Updates from git push no-mistakes
⏭️ **Intent** - skipped
Step was skipped.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bun install --frozen-lockfile --ignore-scriptswith worktree-local HOME, TMPDIR, and BUN_INSTALL.bun run buildwith the isolated environment.bun test tests/omp-integration.test.tswith disposable Recall paths.bun run scripts/e2e-omp.tswith the isolated environment.bun ~/.no-mistakes/evidence/01M555QW0R26CKKWJABC6REZ6N/native-boundaries.tsdrove native omp sessions, compared the base extension, and checked persisted capture text and byte counts.bun ~/.no-mistakes/evidence/01M555QW0R26CKKWJABC6REZ6N/native-resume-search.tsdrove resume, public CLI searches, and post-uninstall capture checks.Removed disposable data, dependencies, and build outputs; confirmed no disposable processes remained.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.