Repository navigation
test(skill-projection): let refusal-count walks finish on a slow runner - #28718
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: the test removes the real-time budget dependency, and no product code changes. [DESIGN-REVIEWED] 2bc69d8 Description read[DESCRIPTION-READ] 413de4cd49388376e0d1406eae731ee70dd3f15b94e0d27488fee1a7b652c44f 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: |
370e950 to
2bc69d8
Compare
|
iamwhatever
left a comment
There was a problem hiding this comment.
APPROVE at 2bc69d8.
The three refusal-count tests now run the projection modules on a test-moved monotonic clock, so the 0.4 s prune budget cannot run out mid-walk and drop a count. The facade is a mirrored module, so replacing projection.time reaches the part modules where the deadline and the throttle read time.monotonic():
KiroCrew/src/kiro_crew/acp/skill_projection_parts/alias_reclaim.py
Lines 711 to 722 in 2bc69d8
KiroCrew/src/kiro_crew/acp/skill_projection_parts/side_files.py
Lines 863 to 871 in 2bc69d8
The earlier GPT finding about widening the deadline was fixed by dropping the widening; current-head AI lanes have no findings, and checks plus PR Readiness are green.
— crew-pr-reviewer (r143)
Problem / Motivation
Goal: The skill-projection refusal-count tests stop failing on a slow CI runner.
test_a_refused_lease_unlink_reports_through_the_same_throttlefailed in run 41534699427 with2 similar refusal(s)where it expects 3. The prune walk has a real-time budget,_PRUNE_MAX_SECONDS_PER_RUN= 0.4 s. A slow runner spends it after two of the three candidates, so one refusal is never counted.Why it matters
A red that the diff did not cause costs every PR author a re-run and a diagnosis. Two sibling tests in the same file count refusals from the same walk and carry the same risk.
Not a goal
What changed (motivation → approach → change)
Symptom: a refusal count one short. Cause: the 0.4 s prune budget runs out mid-walk on a slow runner. Fix: a test helper,
_ProjectionClock, gives the projection modules their own monotonic clock that only the test moves. No time passes during the walk, so the 0.4 s budget is never spent and stays as is. The clock starts at 1000.0, because the throttle reads a last-report time of 0.0 as "never reported". The interval step moves the same clock withadvance(), not a real-time offset. Othertimenames fall through to the real module. The three tests:test_a_refused_lease_unlink_reports_through_the_same_throttle(the CI red)test_a_refused_unlink_is_reported_once_per_interval_with_its_counttest_a_refusal_that_is_not_a_permission_problem_is_worded_neutrallyBackwards compatibility
Compatible: test-only change; no product code is touched.
Removes nothing: no product path, record or key changes.
Tests
Proof: not provable -- test-only change
Forced condition (testing-conventions, proving a determinism fix): a scratch probe, not committed, made each refused unlink sleep 0.25 s of real time, which is the slow-runner path.
2 similar refusal(s), the exact CI message; the 5-candidate sibling failed with4 similar refusal(s)expected.Repeats:
test/test_native_skill_projection_scan_bounds.pypassed 5 runs with-n0, once with-n 4, and once in a shuffled order (seed 7193), 44 tests each. The sibling filestest_native_skill_projection_alias_reclaim.pyandtest_native_skill_projection_lease_scan.pypass (85 tests).Manual verification
N/A — unit coverage sufficient: the change is to tests only, and the forced slow path above reproduces the CI failure.
Related Issues
Fixes #28685
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement