log_viewer: parse the whole info.log instead of the last 8MB - #152
Closed
yichao-liang wants to merge 1 commit into
Closed
log_viewer: parse the whole info.log instead of the last 8MB#152yichao-liang wants to merge 1 commit into
yichao-liang wants to merge 1 commit into
Conversation
_parse_info_log read only the tail 8MB of info.log, silently dropping the head of long runs' logs: early test rounds lost their env verdicts (grey agent-reported chips instead of green/red), explore sessions whose transcript-save lines fell outside the window got no mark at all, and partial cycles mis-paired interaction verdicts. A 27MB bridge run showed only 1 of 6 explore verdicts and none of its test rounds; a 16.6MB run hid its only SOLVED test round. Stream the file line by line with no size cap: memory stays O(line), a 27MB log parses in ~0.5s, and the result is already cached by (mtime, size) in _cached.
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.
Summary
_parse_info_logread only the tail 8MB ofinfo.log(viaread_text(max_bytes=...), which seeks to the tail and whosetruncatedflag was discarded), silently dropping the head of long runs' logs.Testing
[SOLVED, failed], seed2 all 6 explore verdicts + 2 failed rounds), seed1 (7.7MB, previously unaffected) unchanged.🤖 Generated with Claude Code