Repository navigation
fix(skills): let the poll runtime, not the cycle cap, end prepare-pr and babysit loops - #22200
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Check that #20869 really expects the legacy babysit loop to keep spending a full model turn every 300 s for all four hours. That doubles its worst-case turns from 24 to 48. Inventory (4 items) — 4 justifiedIntent: make the prepare-pr and babysit watchers run for the whole runtime their skills promise instead of quitting early on the cycle cap. FIX.
[FIRST-PRINCIPLES-REVIEWED] 1bb668d Description read[DESCRIPTION-READ] c224a856fa9d0368d4e8260dec815aea754c3af98f22fc4d8576ee9b6857422e That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Before merge, confirm the old [DESIGN-REVIEWED] 1bb668d Description read[DESCRIPTION-READ] 835a257a48b0215fdf406a95ef953731de539bdfe03b45993c6ef3f0ad3f04ce 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: |
|
Harness Parity Gate is red on main too (fast-gate on main 602ba3c: |
|
First Principles punchline: was the deleted pin the bug?
|
…and babysit loops
544ffb6 to
1bb668d
Compare
|
Design punchline: was the old
|
|
First Principles punchline: does #20869 expect the babysit legacy loop to run all four hours?
|
|
Review-ready at 1bb668d: PR Readiness passed, all 103 checks green, mergeable, green age fresh on main 3e39e7a. GPT and Opus left no findings; Design and First Principles passed and their punchlines are answered above. Waiting for maintainer review. This Crew will not merge, approve or enable auto-merge. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (5 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: raises the babysit (24 to 48) and prepare-pr (280 to 288) monitor cycle caps so interval x max_cycles covers max_runtime_secs and the runtime, not the cycle cap, ends each loop; tests pin that relation. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/learn-cron-dashboard.md.
Problem / Motivation
Goal: The kirocrew-prepare-pr and babysit poll loops run for their full stated runtime instead of stopping early when the cycle count runs out.
The kirocrew-prepare-pr recipe arms
monitor_startwithinterval_secs=300,max_cycles=280andmax_runtime_secs=86400. 300 s x 280 = 84,000 s, under 86,400 s, so the cycle cap ends the loop up to 40 minutes before the 24 hours the skill promises. The babysit legacy recipe has the same shape and a bigger gap: 300 s x 24 = 7,200 s against a 14,400 s runtime, so it stops after about two of its four hours.Why it matters
A loop that runs out of cycles first deactivates before its runtime ends. A PR that is still being reviewed or rebased then loses its watcher early, and the agent never gets the turn in which it would have reported or renewed.
Not a goal
max_cycles/max_runtime_secs(24 cycles, 14,400 s).What changed (motivation → approach → change)
Both recipes counted cycles that end before their runtime does. The rule the conductor skills already use is interval x
max_cycles>=max_runtime_secs, so the runtime, not the cycle count, ends the loop.In
kirocrew-prepare-pr/SKILL.mdthe bound line and themonitor_startexample both carry 288;babysit/SKILL.mdcarries 48. The learn-cron-dashboard spec states the same numbers and the rule.Backwards compatibility
Compatible: only the example numbers an agent copies change; no API, validator or default changes. A loop already armed keeps its own bounds.
Removes nothing: the loops get more cycles, nothing is hidden or rejected.
Tests
test/test_review_repair_routing_skill.py::test_comment_aware_recipes_are_finite_ungated_and_keep_repair_routingassertedmax_runtime_secs > interval x max_cycles, which pinned the bug. It now assertsinterval x max_cycles >= max_runtime_secsfor both recipes, and pins(288, 86400),(48, 14400)and the prose line.test/test_babysit_monitor_scenarios.py: the prepare-pr scenario now asserts that the runtime is spent once every cycle has run, through the realruntime_budget_exceeded. The babysit legacy scenario pins 48 cycles and the same rule on the decodedmonitor_startarguments.>=rule, the runtime check, the babysit rule); restored, 34 pass.-n0 -p no:testmon, 34 passed each time.Manual verification
N/A — unit coverage sufficient: the change is two example numbers, and the tests run them through the real
monitor_startandruntime_budget_exceeded.Related Issues
Closes #20869
Pattern harvest
Rule candidate: lint
Pattern: a skill's
monitor_startexample whose interval xmax_cyclesis under itsmax_runtime_secs; a test could scan every built-in skill recipe the waygoal-conductor/scripts/patrol_budget.py checkdoes.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)