Skip to content

log_viewer: parse the whole info.log instead of the last 8MB - #152

Closed
yichao-liang wants to merge 1 commit into
masterfrom
log-viewer-full-parse
Closed

log_viewer: parse the whole info.log instead of the last 8MB#152
yichao-liang wants to merge 1 commit into
masterfrom
log-viewer-full-parse

Conversation

@yichao-liang

Copy link
Copy Markdown
Collaborator

Summary

  • _parse_info_log read only the tail 8MB of info.log (via read_text(max_bytes=...), which seeks to the tail and whose truncated flag was discarded), silently dropping the head of long runs' logs.
  • Symptoms on the 2026-08-20 bridge runs: seed2 (27MB log) showed only 1 of 6 explore verdicts (one cycle-2 episode green-checked, its sibling unmarked) and no env verdict on either test round (grey agent-reported "(✓)" chips for episodes the env actually failed); seed0 (16.6MB) hid its only SOLVED test round entirely.
  • Fix: stream the file line by line with no size cap. Memory stays O(line), a 27MB log parses in ~0.5s, and results are already cached by (mtime, size).

Testing

  • Re-ran the parser on all three 2026-08-20 bridge runs: all explore/test verdicts now present and correctly paired (seed0 rounds [SOLVED, failed], seed2 all 6 explore verdicts + 2 failed rounds), seed1 (7.7MB, previously unaffected) unchanged.
  • yapf / isort / docformatter / pylint (rcfile) / mypy all clean on the file.

🤖 Generated with Claude Code

_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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant