Repository navigation
test(auto-improvement): drop the 10 s bound from the coverage suite's watcher waits - #39544
bolichen97 wants to merge 1 commit into
Conversation
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 blocks: this is a test-only change. The fixed 10 s wait is replaced by Notes
[DESIGN-REVIEWED] 03edaa6 Description read[DESCRIPTION-READ] 9d0a545fc080cdc3dcebdd0894bc16d9523e8b0c4277d68365eabdbb27a7a337 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: |
85a377b to
3612373
Compare
3612373 to
03edaa6
Compare
|
Closing: the same fix landed on main in #39545 (test_pr_watchers.py now waits on the wait_until lost-run bound; this branch's copy of that file is identical to main). The only remaining diff was the 10 s cap in test_ai_pr_watchers_coverage.py, whose one status wait reads a READY verdict with no git work and has never failed, plus a docs sentence that #39545's docs change already covers. Nothing here is worth a separate merge. |
Problem / Motivation
Goal: Stop
test_the_pass_fix_is_exported_to_the_pr_queuefrom failing Windows backend shard 5 on unrelated PRs.Since this morning the test fails on
Backend Tests (Windows) (5)withAssertionError: watcher never reached {'exhausted'}, also on rerun. The last snapshot is alwaysstatus: nudging, nudges: 1, lastNote: pass 1/1: the watcher is still inside its one pass when the test gives up.Why it matters
The shard is required, so every PR it lands on is red, whatever it changes. #39485 records it on #39301, #39479, #38940 and #39475 within a few hours.
Not a goal
gitchildren a pass starts.test/test_wait_discipline_ratchet.pyto the in-package app suites (the docs now say it does not scan them).What changed (motivation → approach → change)
#39545 has since landed the same fix for
test_pr_watchers.pyitself, so this PR now carries only what that one did not.Cause, for the record: one watcher pass with an isolated clone starts about 40
gitchildren. That is 0.24 s on Linux and more than 10 s on a Windows shard running 6 xdist workers (#39390), so a wait capped at a fixed 10 s gave up mid-pass.Change:
test_ai_pr_watchers_coverage.pyhad the same 10 s cap (WAIT_S) on its_await_statushelper and on oneis_alivewait. Both now usewait_until's default lost-run bound (half the test's--timeout). They still return as soon as the watcher's state is reached.test/test_wait_discipline_ratchet.pyscanstest/only. That is why the in-package watcher suites were never flagged, sowait_untilis the default there.Backwards compatibility
Compatible: one test helper and one docs paragraph; no product code.
Removes nothing: only a test helper's optional
timeoutparameter, which no caller passed.Tests
Proof: not provable -- test-only change
test_ai_pr_watchers_coverage.py5/5 at-n 4; withtest_pr_watchers.py, 237 passed at-n 4.test_pr_watchers.pychange. Its forced condition (eachgitchild of the watcher thread delayed 0.3 s) failed 0/5 on main 5036a64 with the CI snapshot and passed 5/5 on the fix.Backend Tests (Windows) (5)passed on both of this PR's earlier heads (85a377b, 3612373).test/test_flake_pattern_ratchet.py, diff-scoped semgrep and the comment-history gate pass.Manual verification
N/A -- unit coverage sufficient; the change is a test wait helper.
Real-machine verification
Machine: cloud desktop, Amazon Linux 2, x86_64, 32 vCPU / 123 GiB. No Windows machine is available, so the Windows evidence is CI.
Before (main 5036a64): the export test 20/20 passed under 40 busy loops on 32 cores (Linux does not reproduce). Forced 0.3 s per git spawn -> 0/5 passed.
After (earlier heads 85a377b and 3612373): forced condition 5/5 passed;
Backend Tests (Windows) (5)green on both.Cleanup: own computer, no machine created.
Related Issues
Part of #39485
Sibling sweep
Swept: git grep -nE "WAIT_S|deadline = time.monotonic() +|PRWatcherRegistry(" -- src/kiro_crew/apps/builtins/auto_improvement/tests test
Sibling: src/kiro_crew/apps/builtins/auto_improvement/tests/test_pr_watchers.py -- not affected -- fixed on main by #39545
Sibling: src/kiro_crew/apps/builtins/auto_improvement/tests/test_ai_pr_watchers_coverage.py -- changed here
Sibling: src/kiro_crew/apps/builtins/auto_improvement/tests/test_reconcile_and_publish.py -- not affected -- it joins a stub thread it owns and starts no watcher pass
Sibling: src/kiro_crew/apps/builtins/auto_improvement/tests/test_dogfood_learnings_credentials.py -- not affected -- its registries never wait on a watcher status
Pattern harvest
Rule candidate: lint
Pattern: a fixed short poll deadline (
time.monotonic() + N) in an in-package app suite, whichtest/test_wait_discipline_ratchet.pydoes not scanChecklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commits