Skip to content

Preserve latest events in long Session traces - #1115

Merged
JacobStephens2 merged 3 commits into
mainfrom
issue-1084
Oct 23, 2026
Merged

JacobStephens2 merged 3 commits into
mainfrom
issue-1084

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Preserve the latest tool call in long Session traces when trailing results fill the encoded tail.

read complete OTLP requests backward
  decode raw Harness events
  accumulate event bytes + line separators
  stop at 64 KiB decoded or file start
return events in file order

Closes #1084.

Evidence

  • Before: cargo test --test show_logs show_keeps_the_last_tool_call_after_large_session_trace_results -- --exact --nocapture failed: raw Session log returned Bash: cargo test; Session trace returned null.
    After: the exact regression passes for JSON and text output.
  • The kept-Session conversion regression passes all four reader comparisons after retrying a failed receipt.
  • cargo test --test show_logs --test convert_logs: 27 passed, 2 ignored fixture entry points.
  • cargo check --bin thirdshift, cargo fmt --check, and git diff --check passed.
  • CI on the final head 015bdbd: full cargo test passed (2,365 passed, 56 ignored); clippy, formatting, site and Console browser tests, and the macOS gate passed.
  • scripts/affected-tests main selected the full Rust suite. The local run was stopped after the same head's full CI suite passed, reusing CI per docs/testing.md; it had no failures before interruption.

Test seams: thirdshift show <Command> --json and text output over raw Session logs and Session traces; thirdshift logs --convert with a kept-Session receipt and round-trip reader comparisons.

Post-release verification remains: rerun thirdshift logs --convert on thirdshift and stephens to verify the 178 actual kept Sessions.

Review coverage

Reviewed against main (pinned at 99417ee): Standards' one P3 fixture-duplication finding was addressed with a shared result-tail fixture; Spec reported no code findings. Both reviewers inspected all four changed files, including the follow-up change. Unread changed files: none. Generated exclusions: none.

Unaddressed findings

Standards

None.

Spec

None. The post-release host reruns above remain external acceptance evidence.

Security

None. Guided review of the trace-tail change against the pinned merge base found no introduced finding to address.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Blast Radius: logs

Session-trace readers read a larger encoded suffix when necessary to cover the decoded tail budget.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit 1d9ac6e into main Oct 23, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1084 branch October 23, 2026 00:01
@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.

show's latest event is empty for long Session traces: the 64 KiB tail holds about 4× fewer events

1 participant