Repository navigation
test(session-control): cover session_retry failure tails - #18345
Conversation
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5, fork) — ⏭️ skippedRevision |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 744baaf Description read[DESCRIPTION-READ] de1963d829e6164905056960b71ffd753bf9f1815f37ccff00aecc8adc5bdbab That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed on behalf of the maintainers (sweep 2026-10-09): readiness passed, required checks green on 744baaf, no blocking review threads, security posture unchanged. Approving and merging.
Problem / Motivation
Goal: Lock in that
session_retryaccepts the two failure tails a patrol loop meets after a turn dies partway through.The review that approved #15436 asked for a test showing
_is_interruptedcovers a backend error mid-turn and a gateway restart mid-turn. The existing retry tests cover a start failure and a turn that got no reply at all. Neither covers a turn that streamed some text and ran a tool before it died, which is the common shape for a long worker turn.Why it matters
A conductor that patrols workers uses
session_retryto restart a failed turn. If either tail stopped being read as interrupted, the call would answerturn_not_failedand the worker would sit idle behind a Resume button nobody presses.Not a goal
is_turn_interruptedor the restore path. Both tails already pass on main.What changed (motivation → approach → change)
Three tests in
test/test_session_control_retry.py, all throughsc.retry_target, on a transcript of user row, partial assistant row and tool row:gateway_restart_interruptionrow appended, using the constants_reconcile_local_turn_markerwrites, the retry is accepted.turn_not_failed. This pins why the restart case depends on the marker writing its row.No source file changes.
Backwards compatibility
Compatible: tests only.
Removes nothing: the diff adds tests and touches no source.
Tests
The three tests above.
test/test_session_control_retry.pyandtest/test_local_turn_restart_marker.pypass locally, 81 tests.Manual verification
N/A. The tests drive the same
retry_targetcall the MCP tool makes.Related Issues
Follow-up to #15436.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Fixes #18344