Repository navigation
test(workflows): replace the fixed wait in injection identity test - #20136
Conversation
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] 88615d2 Description read[DESCRIPTION-READ] 8fdd36d28c643f85c657178e82594734f256a11144983091af1f6708d03a2fd0 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 |
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: |
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: |
|
Closing and reopening so CI runs on hosted runners: same-repo runs from this account queue on the fleet label without a runner (details on #19683). |
test_completion_rechecks_target_after_binding waited for the paused session binding with a 2 s asyncio.wait_for, which the wait-discipline ratchet counts against test_workflow_injection_identity.py. Await the event with kiro_crew.testing.wait.await_until, whose ceiling is a lost-run bound that fails by name, and delete the file's baseline line.
7c79846 to
88615d2
Compare
|
Closing and reopening so CI runs on hosted runners: same-repo runs from this account queue on the fleet label without a runner (details on #19683). |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (2 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: test-only; replaces a fixed asyncio.wait_for timeout in test_workflow_injection_identity.py with await_until and drops the file from the wait-discipline baseline.
Problem / Motivation
Goal: Take
test/test_workflow_injection_identity.pyto zero short fixed waits, so the wait-discipline ratchet no longer carries a baseline line for it.test/test_workflow_injection_identity.pyholds one short fixed wait thattest/test_wait_discipline_ratchet.pycounts against the baseline line1 test_workflow_injection_identity.py: at:43,await asyncio.wait_for(bound.wait(), 2)intest_completion_rechecks_target_after_binding.Why it matters
Fixed waits are the repo's flake source: a loaded runner turns a generous-looking timeout into a red that has nothing to do with the code under test. The ratchet keeps a baseline of such sites per file and lets a count only go down; this change takes one file to zero.
Not a goal
What changed (motivation → approach → change)
The 2 s ceiling bets that the runner reaches the paused session binding within two seconds.
boundis the event the test's pausedasyncio.to_threadshim sets oncebind_session_executionhas run, so the test already holds the real signal.The test now awaits that event with
await_untilfromkiro_crew.testing.wait, under the helper's lost-run bound (half the test's timeout). A hang fails by name instead of by a 2 s guess.:43asyncio.wait_for(bound.wait(), 2)becomesawait await_until(bound, what="the session binding finishing"), now at:44.1 test_workflow_injection_identity.pyis deleted.Backwards compatibility
Compatible: a test-only change; no production code, API or protocol changes.
Removes nothing: the test asserts what it asserted before. The fixed wait is replaced by a wait on the same event, and the baseline line that counted it is deleted.
Tests
test/test_wait_discipline_ratchet.py1 failed, 38 passed. The failure namestest/test_workflow_injection_identity.py: 0 -> 1at:43.test/test_workflow_injection_identity.pytogether, 45 passed on each of three runs at-n0. The file's own tests are 6 passed before and 6 passed after.-W error::RuntimeWarning -W error::pytest.PytestUnraisableExceptionWarning, and a copy of the file with theawaitdropped fails under those flags.-W error::RuntimeWarningalone does not catch a droppedawait: the warning is raised inside the coroutine finalizer, and pytest reports it as a warning.asyncio.to_thread, so the file ran first in one process at-n0withtest/test_workflows_inject.py,test/test_workflows_private_outputs.py,test/test_taskrunner_atomic_persistence.py,test/test_taskrunner_execution_capture_async.py,test/test_unattended_slot_guardrails.pyandtest/test_wheel_apply.py: 141 passed.In short: the 2 s
wait_foronboundis nowawait await_until(bound, ...). The ratchet fails without the baseline deletion (1 failed, 38 passed) and passes with it (45 passed alongside the file's six tests).Manual verification
N/A — the tests above exercise the change, and nothing renders.
Related Issues
No issue exists; burn-down of the wait-discipline baseline (precedents #19928, #20014, #19527).
Pattern harvest
Not generalizable: one baseline line taken to zero; the ratchet already holds the rule for every file.
Checklist
Contribution License Agreement
Contributed under the project's Apache-2.0 license.