Skip to content

test(session-control): cover session_retry failure tails - #18345

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
Pearcekieser:test/session-retry-failure-tails
Oct 9, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
Pearcekieser:test/session-retry-failure-tails

Conversation

@Pearcekieser

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Lock in that session_retry accepts 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_interrupted covers 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_retry to restart a failed turn. If either tail stopped being read as interrupted, the call would answer turn_not_failed and the worker would sit idle behind a Resume button nobody presses.

Not a goal

What changed (motivation → approach → change)

Three tests in test/test_session_control_retry.py, all through sc.retry_target, on a transcript of user row, partial assistant row and tool row:

  1. With a backend error row appended, the retry queues Resume's message.
  2. With the restore's gateway_restart_interruption row appended, using the constants _reconcile_local_turn_marker writes, the retry is accepted.
  3. With no error row, the retry is refused with 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.py and test/test_local_turn_restart_marker.py pass locally, 81 tests.

Manual verification

N/A. The tests drive the same retry_target call the MCP tool makes.

Related Issues

Follow-up to #15436.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Fixes #18344

@Pearcekieser
Pearcekieser requested review from a team and KiroCrewCaptain as code owners October 9, 2026 05:44
@Pearcekieser
Pearcekieser requested a review from CrysisDeu October 9, 2026 05:44
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ⏭️ skipped

Revision 744baaf257eee16a6e38395907e4de4b9ad2df2b touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Advisory — does not block merge.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ⏭️ skipped

Revision 744baaf257eee16a6e38395907e4de4b9ad2df2b ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Advisory — does not block merge.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 744baaf257eee16a6e38395907e4de4b9ad2df2b via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 744baaf

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 744baaf257eee16a6e38395907e4de4b9ad2df2b via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 744baaf257eee16a6e38395907e4de4b9ad2df2b via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 744baaf

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 9, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bolichen97
bolichen97 merged commit d2f4a4f into kirodotdev:main Oct 9, 2026
103 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

session_retry: test the backend-error and restart failure tails

2 participants