Skip to content

test(subagent): wait on signals in the captured-deadline recovery tests - #19478

Merged
iamwhatever merged 1 commit into
mainfrom
fix/subagent-resilience-timeouts-f821
Oct 12, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
fix/subagent-resilience-timeouts-f821

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: main lints clean again for test/test_subagent_turn_resilience.py, so that file stops redding the lint job on every PR.

On main at 446e4ef, flake8 reports F821 for _START_TIMEOUT / _RESPAWN_TIMEOUT in test/test_subagent_turn_resilience.py at lines 457, 469, 692 and 710. The four tests that reach those waits raise NameError.

Why it matters

Backend Lint & Type Check is red on every open PR until main is fixed, so no PR can reach a green readiness verdict.

Not a goal

  • Any change to test behaviour beyond the four waits.
  • Other F821 reds on main in other files.

What changed (motivation → approach → change)

Symptom: F821 / NameError on four waits. Root cause: #19334 removed both constants and moved the file's positive waits onto await_until / async_wait_until; #7195 added four waits written against the older file, and both merged cleanly.

Change: point the four waits at the helpers the rest of the file uses.

  • three asyncio.wait_for(event.wait(), timeout=...) → await_until(event, what=...)
  • one time.monotonic() deadline poll on info._exec_started → async_wait_until(...) with a describe naming the tasks and info.error

The assertions after each wait are unchanged. Restoring the constants instead would bring back the clock-bound wait style this file no longer uses.

Backwards compatibility

Compatible: test-only change.

Removes nothing: only four test waits change form; no product code is touched.

Tests

  • python3 -m flake8 test/test_subagent_turn_resilience.py → clean
  • python3 -m black --check test/test_subagent_turn_resilience.py → unchanged
  • python3 -m pytest test/test_subagent_turn_resilience.py → 68 passed

Manual verification

N/A — unit coverage sufficient; the change is test-only.

Related Issues

Closes #19477

Pattern harvest

Rule candidate: lint
Pattern: two PRs merge cleanly but one removes a module constant the other's new lines still use; a merge queue that runs flake8 on the merged tree catches it.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • 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

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

Four waits in test_subagent_turn_resilience.py still named
_START_TIMEOUT and _RESPAWN_TIMEOUT after the file dropped both
constants for the await_until / async_wait_until helpers. flake8
reported F821 at each one and the tests raised NameError.

Point the three event waits at await_until and the _exec_started poll
at async_wait_until, the same helpers and lost-run bound the rest of
the file uses. The assertions after each wait are unchanged.

Closes #19477
@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 12, 2026 17:29
@iamwhatever
iamwhatever requested a review from CrysisDeu October 12, 2026 17:29
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision b3fa299d099513666a53dcd5da000127d6ef424c 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

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

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

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of b3fa299d099513666a53dcd5da000127d6ef424c — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Nothing to check.

[DESIGN-REVIEWED] b3fa299

Description read

[DESCRIPTION-READ] 0c5c40c432166c58cb2eb164a1254765676725f436578ea265d1336b1fee1c9a

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

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed b3fa299d099513666a53dcd5da000127d6ef424c — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] b3fa299

Verdict parsed from the review's SHA-scoped output markers for commit b3fa299d099513666a53dcd5da000127d6ef424c.

False positive or not applicable? A repository writer can comment:
/ai-review override fable b3fa299d099513666a53dcd5da000127d6ef424c: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of b3fa299d099513666a53dcd5da000127d6ef424c and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] b3fa299

False positive or not applicable? A repository writer can comment:
/ai-review override gpt b3fa299d099513666a53dcd5da000127d6ef424c: <one-sentence reason>

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Quick fix on main test issues

@iamwhatever
iamwhatever merged commit 63c155a into main Oct 12, 2026
93 of 110 checks passed
@iamwhatever
iamwhatever deleted the fix/subagent-resilience-timeouts-f821 branch October 12, 2026 18:19
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 12, 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.

test: undefined _START_TIMEOUT/_RESPAWN_TIMEOUT in test_subagent_turn_resilience.py reds lint on main

1 participant