Skip to content

Convert compares show over the whole Session - #1129

Merged
JacobStephens2 merged 5 commits into
mainfrom
issue-1126
Oct 23, 2026
Merged

JacobStephens2 merged 5 commits into
mainfrom
issue-1126

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

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 conversion with show as the only differing reader. The check now measures what show would report for the Session, over the whole Session, on both sides.

 readings::read (round-trip check only)
-  show over session::tail_events (64 KiB window)
+  show over session::events (whole Session)
 convert expected side, amendments present
+  expected.show rebuilt from original + amendments, as conversation does
 live show (src/logs/reading/selection.rs)
   unchanged, still tail_events

Seams under test: the thirdshift logs --convert round-trip report (conversion seam), and Readings::compare.

Evidence

  • Before: on main code both new tests fail with show the 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_logs gives 13 passed, 0 failed; cargo test --bin thirdshift convert::readings gives 1 passed; scripts/affected-tests main exits 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 live show, conversation, waterfall, or model-evidence output changes.

Unaddressed findings

Security (guidance-mode review of git diff d05aa971f1e050efbc88744404c75d1433d9d5c4...HEAD, no introduced findings):

  • No introduced Security findings. The diff only changes the round-trip check: show is computed over whole-Session events on both sides instead of the 64 KiB tail window; trace bytes and live show (src/logs/reading/selection.rs, still tail_events) are unchanged. No new trust-boundary crossing, network, auth, crypto, path, or shell surface. The whole-Session read adds no new unbounded input: read already held the full file via fs::read_to_string and 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 same latest_session_event, so no new false-pass masking beyond the intended fix; cargo test --test convert_logs (13 passed) and cargo 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 and show_events collect). 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_event shape). 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):

  • The "real show difference is still caught" pin is the unit test compare_still_catches_a_changed_latest_event, not a logs --convert seam test that mutates a trace's latest event. No such seam fixture can exist: the pipeline derives the trace deterministically from the original (record_at in src/session/trace.rs stores 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. No needs-triage issue 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.

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.
@JacobStephens2
JacobStephens2 merged commit 7deebce into main Oct 23, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1126 branch October 23, 2026 04:56
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 23, 2026
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.

Conversion's show check fails Sessions whose last 64 KiB differs: recovered Codex diffs and large final events

1 participant