Repository navigation
Convert compares show over the whole Session - #1129
Merged
Merged
Conversation
2026-10-23T03:43:37Z, host stephens. Uncommitted work at the time of failure is included in this commit.
Round-trip show measured the live 64 KiB tail window, so Codex Sessions with recovered diffs over 64 KiB and Claude Sessions ending in a large tool call kept failing with show:false while every other reader passed. Read whole-Session events on both sides instead; the live show tail behavior is unchanged. Adds conversion-seam tests for both pass cases and a compare unit test proving a changed latest event is still caught.
The branch added a test module mid-file with harness() after it (items_after_test_module) and assert_eq! against bool literals (bool_assert_comparison). Moved the tests module to the end and switched to assert!/assert!(!). No behavior change.
Merged
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
Round-trip
showmeasured the live 64 KiB tail window, so Codex Sessions with recovered diffs over 64 KiB and Claude Sessions ending in a large tool call kept failing conversion withshowas the only differing reader. The check now measures whatshowwould report for the Session, over the whole Session, on both sides.Seams under test: the
thirdshift logs --convertround-trip report (conversion seam), andReadings::compare.Evidence
showthe only differing reader:{"passed":false,"readers":{"conversation":true,"model_evidence":true,"show":false,"waterfall":true},"error":"round-trip reader difference"}(Codex case also reports"codex_diffs":1).After:
cargo test --test convert_logsgives 13 passed, 0 failed;cargo test --bin thirdshift convert::readingsgives 1 passed;scripts/affected-tests mainexits 0.Merge Danger
Door: two-way
Trace bytes are unchanged by this fix (only the check changed), and no cleanup or live reader behavior is touched.
Blast Radius: conversion report
Sessions previously kept for show-only differences now pass and become eligible for
logs --remove-converted. No liveshow, conversation, waterfall, or model-evidence output changes.Unaddressed findings
Security (guidance-mode review of
git diff d05aa971f1e050efbc88744404c75d1433d9d5c4...HEAD, no introduced findings):showis computed over whole-Session events on both sides instead of the 64 KiB tail window; trace bytes and liveshow(src/logs/reading/selection.rs, stilltail_events) are unchanged. No new trust-boundary crossing, network, auth, crypto, path, or shell surface. The whole-Session read adds no new unbounded input:readalready held the full file viafs::read_to_stringand iterated all events at the merge base, so peak memory shape is unchanged, and this is operator-local CLI work with no shared-service impact per the resource-exhaustion rubric. Both sides use the samelatest_session_event, so no new false-pass masking beyond the intended fix;cargo test --test convert_logs(13 passed) andcargo test --bin thirdshift convert::readings(1 passed) observed green.Standards (both judgement calls, declined with rationale; no behavior claimed wrong):
src/logs/convert/readings.rs(read, event traversal runs twice: the condense loop andshow_eventscollect). Decision: keep. The iterators are lazy over bounded Sessions, a locality nit the codebase-design depth principle does not demand extracting.src/logs/convert.rs(amendment block repeats the collect-then-latest_session_eventshape). Decision: keep inline. Each site is two lines with different surrounding reasons (fresh read vs amendment-adjusted expectation); the reviewer calls inlining defensible.Spec (non-blocking note, accepted; no action available):
compare_still_catches_a_changed_latest_event, not alogs --convertseam test that mutates a trace's latest event. No such seam fixture can exist: the pipeline derives the trace deterministically from the original (record_atinsrc/session/trace.rsstores each raw event verbatim as its record body), so the trace's latest event cannot genuinely diverge at this seam. The comparator that would catch a divergence is pinned by the unit test. Noneeds-triageissue filed: there is nothing for the Spec or the Day shift to decide.Review coverage: no changed file left unread. Both axes read all three changed files (
src/logs/convert.rs,src/logs/convert/readings.rs,tests/convert_logs.rs); full reports are in.thirdshift-review-GdCfW5/(git-ignored, beside the Session log).Closes #1126
Built with muse · default model · default effort
Security review outcome
No unaddressed introduced findings.