Skip to content

test: migrate the two fixed waits #19259 added past the wait-discipline baseline - #19495

Merged
buluoray merged 1 commit into
mainfrom
unflaky/spawn-receipt-effort-pendings
Oct 12, 2026
Merged

buluoray merged 1 commit into
mainfrom
unflaky/spawn-receipt-effort-pendings

Conversation

@CrysisDeu

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Migrate the two asyncio.wait_for fixed-wait sites #19259 added so the wait-discipline ratchet passes on main again.

Main has been red on test_wait_discipline_ratchet.py since the 17:2x merge burst on 2026-10-12. #19259 (e6f686b) added two test files with bare asyncio.wait_for calls 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) with await_until(asyncio.ensure_future(coro), what="...") from kiro_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 an asyncio.run(_answered()) wrapper. Baseline: 0 → 0.
  • test/test_webhook_permission_requests.py:440 — asyncio.wait_for(_run_hook_inner(...), timeout=_PROMPT_BOUND_S) in test_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_S is 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.py passes locally for the two files this PR touches (the remaining ratchet failure is test_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_for sites without migrating them onto kiro_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.py locally before merge.

Closes #19494
Part of the 17:2x main-red burst (siblings: #19478, #19485)

@CrysisDeu
CrysisDeu requested review from a team and KiroCrewCaptain as code owners October 12, 2026 18:31

@buluoray buluoray 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.

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.

@buluoray
buluoray enabled auto-merge (squash) October 12, 2026 18:33
@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

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision 2c2b62fceb7c9d8ccba3d3292965761ed440a756 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

UX Review (Opus 5.5) — ⏭️ skipped

Revision 2c2b62fceb7c9d8ccba3d3292965761ed440a756 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

Design Review (Opus 5.5) — ✅ PASS

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

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 .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 2c2b62fceb7c9d8ccba3d3292965761ed440a756 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 2c2b62f

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

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

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 2c2b62f

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

@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 12, 2026
@buluoray
buluoray merged commit 65df088 into main Oct 12, 2026
101 checks passed
@buluoray
buluoray deleted the unflaky/spawn-receipt-effort-pendings branch October 12, 2026 19:25
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision 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: wait-discipline ratchet red on main -- two new fixed-wait sites from #19259

2 participants