Repository navigation
fix(monitor): wake a briefless watch when the board settles green - #14733
Conversation
75c3c4f to
d505ebf
Compare
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsFINDING -- src/kiro_crew/autonudge_judge.py:934 -- after a wake, False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS One judge-eval transcript showing the model actually wakes on a rendered green board would close the model-lane gap the tests cannot reach. [DESIGN-REVIEWED] 8437f35 |
First Principles Review (Fable 5) — ✅ human override accepted@buluoray overrode this lane for |
Opus 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: |
d505ebf to
421054b
Compare
The wake judge's DEFAULT_WAKE_WHEN named a failing check but no settled, all-passed board, so a monitoring loop that armed no wake criteria of its own slept through the board going green -- the very state an owner arming a plain watch most often waits FOR. Nothing pinned the intended verdict either way, and the ack test's docstring described a wake set the code does not have. - autonudge_judge.py: add "a fully settled board whose every check has passed" to DEFAULT_WAKE_WHEN, with a doc-comment on why a missed "it is green now" (a stranded owner) is worse than a spurious wake (one self-correcting turn), and that last_verdict guards against re-waking. - test_autonudge_wake_judge.py: pin the criterion -- the default brief names a settled green board -- and prove a fully-passed board renders as one the clause matches. - test_monitor_start_ack.py: correct the ack docstring to describe the screened ack its assertions check. - rfc-wake-judge.md: document the settled-green clause and the behaviour for a briefless loop in the built-in-brief section an owner reads. Fixes #14072
421054b to
8437f35
Compare
|
🤖 Kiro Crew [operator: dwu96#8c08bee0]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input: State: Why I did not take this one: the BLOCK is premise-level, not a code defect. It holds that the changed default wake criterion is a product-shape decision whose only record is the
One advisory, non-blocking note you may want to fold in while you are here: the GPT 5.6 lane (overall ✅, finding is in its details block) reads When you've addressed these, the pipeline will re-assess on its next cycle. |
buluoray
left a comment
There was a problem hiding this comment.
Approving on head 8437f35.
Verified on the PR head:
DEFAULT_WAKE_WHENnow names "a fully settled board whose every check has passed" (autonudge_judge.py), andtest_autonudge_wake_judge.pypins the clause. This is the first of the two resolutions #14072 offered.- The stale docstring in
test/test_monitor_start_ack.pyis corrected.
Maintainer decision (First Principles BLOCK): widening the default wake condition for briefless watches to include a green board is accepted. A missed "it is green now" strands the owner, while a spurious wake costs one turn, so the wider default is the right trade. Recording it here and via override so the decision does not live only in the RFC edit.
Security Scope Review: the red run on this SHA (run 37364683631) was cancelled before its candidate jobs ran, so it failed closed on an empty scope. Two other Security Scope runs on this SHA succeeded, and the diff does not touch the deny composite. It needs a re-run, not a change.
Non-blocking follow-up: the new comment (and the RFC) says last_verdict lets the judge answer quiet on a board it already woke on, but nudge_wake.build_state sends recent_verdicts instead once any verdict history exists. The pre-existing line above repeats the same wording. Worth a one-line comment fix.
|
/ai-review override first-principles 8437f35: maintainer decision, widening the default wake condition for briefless watches to a fully settled green board is accepted; a missed green strands the owner while a spurious wake costs one turn. |
Human judgment recorded@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
iamwhatever
left a comment
There was a problem hiding this comment.
The new clause in DEFAULT_WAKE_WHEN is small and well argued. The test checks both the wording and that a fully passed board renders as one the clause can match. buluoray recorded the product decision as a maintainer override on this head, and CI is now fully green on 8437f351. The fixed test_monitor_start_ack.py docstring now describes the screened ack. One non-blocking follow-up: the new comment and the RFC say last_verdict lets the judge answer quiet on a board it already woke on. But once any verdict history exists, build_state sends recent_verdicts instead, so a one-line wording fix would make that accurate.
Problem / Motivation
Goal: A monitoring loop that arms no wake criteria of its own now wakes its owner the moment the board it watches settles green.
The wake judge's
DEFAULT_WAKE_WHEN— the brief a briefless loop runs under — named a failing check but no settled, all-passed board. So a loop that armed no criteria slept through the board going green and surfaced it only when the starvation backstop happened to fire for another reason. Nothing in the tests pinned the intended criterion either way, andtest_monitor_start_ack.py's docstring described a wake set the code does not have.Why it matters
The board going green is the state an owner arming a plain watch is most often waiting FOR — the thing they watched is done. A missed "it is green now" strands the owner, who keeps waiting on work already finished; a spurious wake costs one model turn and is self-correcting. Leaving the choice to "whatever the judge says on the day" is worse than either fixed answer, because the behaviour then drifts with the model.
Not a goal
wake_when— that brief is the owner's to write; only the shipped default gains the clause.What changed (motivation → approach → change)
Symptom: a briefless gated loop does not wake when its watched PR's board settles green. Root cause:
DEFAULT_WAKE_WHEN(src/kiro_crew/autonudge_judge.py) enumerates wake reasons and omits a settled/all-passed board, so the judge has no criterion to match a green board against. This is a product-shape decision (a changed default for what a briefless loop wakes on); the settled-green wake is load-bearing (#8926 records a briefless loop taking ~35 min to wake on its own PR settling), and the failure mode of having the clause (an occasional extra wake) is cheaper and self-correcting versus the failure mode of omitting it (a stranded owner). The decision is recorded indocs/request-for-change/rfc-wake-judge.md(§3.3 built-in brief) as part of this change.Change:
src/kiro_crew/autonudge_judge.py: add"a fully settled board whose every check has passed"toDEFAULT_WAKE_WHEN, with a doc-comment on the asymmetry (missed-green strands the owner vs a self-correcting spurious wake) and thatlast_verdictgives the judge advisory context to answer quiet on a board it already woke on.docs/request-for-change/rfc-wake-judge.md: add the settled-green clause to the built-in-brief text and a rationale paragraph in the section an owner reads — this is where the changed default is documented for owners (the CHANGELOG holds shipped releases only and is written by the release PR).test/test_autonudge_wake_judge.py: add the case that pins the criterion (the default brief names a settled green board) and proves a fully-passed board renders as one the clause matches.test/test_monitor_start_ack.py: correct the ack docstring so it describes the screened ack its assertions check.Backwards compatibility
Compatible: the change widens the default wake criterion (one more reason to wake); it rejects, renames, or removes nothing. A loop that names its own
wake_whenis unaffected. The only behavioural delta is that a briefless loop now wakes on a settled green board where before it did not — the intended fix, documented in the RFC.Tests
test_the_default_brief_wakes_on_a_settled_green_board(new): assertsDEFAULT_WAKE_WHENnames a fully settled, all-passed board, and thatrender_pr_checksrenders a 3-passed board as one the clause can match (passed 3, no failed, not INCOMPLETE).test_the_default_brief_names_a_failing_check(unchanged): still passes — the failing-check clause is untouched.test_the_gated_ack_names_what_actually_raises_a_wake(docstring corrected): assertions unchanged and still pass.test_autonudge_wake_judge.py+test_monitor_start_ack.py: 293 passed locally.Manual verification
The wake decision is the judge model's at runtime, so this change pins the criterion (the constant text and the rendered board it must match), not an end-to-end wake — matching how the existing failing-check criterion is pinned. There is no deterministic in-process wake path to assert against; a judge-eval transcript would exercise the model lane, not this diff. The criterion + rendering coverage is the same discipline the surrounding wake-criteria tests use.
Related Issues
Fixes #14072
Pattern harvest
Not generalizable: this is a single omitted clause in one enumerated default constant, introduced when the deterministic settled-green wake moved into the judge criterion and the criterion was not given the corresponding clause. No broader class — a lint/semgrep rule cannot know which enumerated defaults are meant to be exhaustive.
Checklist
fix: ...)