Repository navigation
test: migrate the two fixed waits #19259 added past the wait-discipline baseline - #19495
Conversation
buluoray
left a comment
There was a problem hiding this comment.
Approving at 2c2b62f. This clears the wait-discipline ratchet red on main.
On origin/main 63c155a, test_no_file_gains_a_short_fixed_wait fails with two files over baseline: test_surface_deny_notice_sites.py 0 -> 1 (:318) and test_webhook_permission_requests.py 2 -> 3 (:440). These are exactly the two sites this PR moves to await_until on the task itself, so each test now waits on the answer rather than a 10 s clock, and the bound only names a hang.
Verified: applied this diff onto 63c155a and ran test_wait_discipline_ratchet.py, test_surface_deny_notice_sites.py and test_webhook_permission_requests.py with -n0: 76 passed. flake8 clean on both files. No assertion was loosened; the two remaining 10 s waits in the webhook file are the ones already in the baseline.
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 2c2b62f Description read[DESCRIPTION-READ] 49b5eb10dbb6a43f0f47c527b8a78ba5c4f2d726c99252e0264435b2a6425470 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: |
Problem / Motivation
Goal: Migrate the two
asyncio.wait_forfixed-wait sites #19259 added so the wait-discipline ratchet passes on main again.Main has been red on
test_wait_discipline_ratchet.pysince the 17:2x merge burst on 2026-10-12. #19259 (e6f686b) added two test files with bareasyncio.wait_forcalls whose timeouts are below the ratchet's floor, pushing two baseline counts above their stored values.Why it matters
Every PR's CI fails the wait-discipline gate until this lands. All PRs are blocked.
Not a goal
Not fixing the sibling main-red breaks: #19478 (
test_subagent_turn_resilience) and #19485 (spawn.py F821).What changed (motivation → approach → change)
The ratchet counts fixed-duration waits that race against the clock instead of waiting for a signal. #19334 established the migration pattern: replace
asyncio.wait_for(coro, timeout=N)withawait_until(asyncio.ensure_future(coro), what="...")fromkiro_crew.testing.wait. The same pattern is applied here to the two new sites.test/test_surface_deny_notice_sites.py:318—asyncio.wait_for(_answer_permission(...), timeout=10)→await_until(ensure_future(...))inside anasyncio.run(_answered())wrapper. Baseline: 0 → 0.test/test_webhook_permission_requests.py:440—asyncio.wait_for(_run_hook_inner(...), timeout=_PROMPT_BOUND_S)intest_an_unauditable_auto_approve_steers_the_audit_cause→ same pattern. Baseline: 3 → 2 (back to baseline).Backwards compatibility
Compatible: test-only change; no product behaviour removed or changed.
_PROMPT_BOUND_Sis still defined and used elsewhere in the file; only the one new site is replaced.Removes nothing: only test helpers are changed; no product API, stored state or user-visible capability is removed.
Tests
test/test_wait_discipline_ratchet.pypasses locally for the two files this PR touches (the remaining ratchet failure istest_subagent_turn_resilience.py, fixed by the sibling #19478).The two affected test files pass with no new failures.
Manual verification
N/A — unit coverage sufficient. The ratchet is the automated gate; both affected files run and pass locally.
Screenshots / video
N/A — no user-visible frontend change.
Pattern harvest
Root cause: #19259 added new
asyncio.wait_forsites without migrating them ontokiro_crew.testing.wait; the wait-discipline baseline was not updated as part of that PR.Prevention: authors of new test files should run
python test/test_wait_discipline_ratchet.pylocally before merge.Closes #19494
Part of the 17:2x main-red burst (siblings: #19478, #19485)