Repository navigation
Conversation
Keep the last cap bytes without repeatedly shifting retained data. Production LOC: 102831 -> 102838 (delta +7) Scope: core 38395 -> 38395; engine 61777 -> 61784; api 2659 -> 2659. Method: tools/production_loc.py --root <snapshot> --json on archived first-parent and staged trees, using the same counter from 582bc78. Reference absent (retired R9c; last counted 65,417 at tree 498dd19).
This was referenced Oct 30, 2026
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.
Sandbox::log_tailpreviously appended each incoming chunk to aVecand drained excess bytes from the front, repeatedly shifting retained data once the buffer filled.Use
VecDequeto discard old bytes without shifting the retained suffix. When a chunk reaches or exceeds the byte cap, replace the buffer with that chunk's suffix.Add tests covering capacity boundaries, repeated wraps, interleaved stdout/stderr, fragmented frames, binary bytes, and malformed responses with zero capacity.
Validation: all 3 tests in
engine_log_tailpass on macOS with Rust 1.85.1;git diff --checkpasses.Production LOC: 102831 -> 102838 (delta +7)
Scope: core 38395 -> 38395; engine 61777 -> 61784; api 2659 -> 2659.
Method: tools/production_loc.py --root --json on archived first-parent and staged trees, using the same counter from 582bc78.
Reference absent (retired R9c; last counted 65,417 at tree 498dd1917812).