Repository navigation
test(subagent): wait on signals in the captured-deadline recovery tests - #19478
Conversation
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
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
Quick fix on main test issues |
Problem / Motivation
Goal:
mainlints clean again fortest/test_subagent_turn_resilience.py, so that file stops redding the lint job on every PR.On
mainat 446e4ef,flake8reports F821 for_START_TIMEOUT/_RESPAWN_TIMEOUTintest/test_subagent_turn_resilience.pyat lines 457, 469, 692 and 710. The four tests that reach those waits raiseNameError.Why it matters
Backend Lint & Type Check is red on every open PR until
mainis fixed, so no PR can reach a green readiness verdict.Not a goal
mainin other files.What changed (motivation → approach → change)
Symptom: F821 /
NameErroron four waits. Root cause: #19334 removed both constants and moved the file's positive waits ontoawait_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.
asyncio.wait_for(event.wait(), timeout=...)→await_until(event, what=...)time.monotonic()deadline poll oninfo._exec_started→async_wait_until(...)with adescribenaming the tasks andinfo.errorThe 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→ cleanpython3 -m black --check test/test_subagent_turn_resilience.py→ unchangedpython3 -m pytest test/test_subagent_turn_resilience.py→ 68 passedManual 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
Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.