Repository navigation
Conversation
|
Thanks for picking up #21070 so quickly. I had started on #21070 too. I will not open a second PR, so the fix stays here. I ran a set of scenario tests against head 86e664b and found these gaps. Each test drives the real GitHub provider with fake GraphQL answers, then
If they help, the scenario tests are here: https://github.com/kirodotdev/KiroCrew/blob/3deb0aa57b9080891c5ac0a5f16f82fcb775e8ba/test/test_monitor_watch_settle_wake.py . The fake GitHub host in that file answers each GraphQL document by what it selects, so it should run against this branch after a small change to the reviews answer: add |
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Design Review (Opus 5.5, fork) — 🔴 BLOCK (blocking)Design-level review of Design-Verdict: BLOCK Untested against live GitHub: the new Blockers"Manual verification: N/A" on a path only live GitHub exercises
WatchOld human activity wakes like new activity
[DESIGN-REVIEWED] fe04367 Description read[DESCRIPTION-READ] 39bd33e149624e7a753df6356c76ee881f697c5e0d9c1de6ba7bfe01687e5cac 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 |
First Principles Review (Opus 5.5, fork) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK product-shape change without accepted RFC: a successful PR now costs a model turn, which the implemented monitor RFC forbids. Not justified as shipped
What this change shipsInventory (7 items) — 4 justifiedIntent: let a session hear when its watched PR goes green or a person comments or reviews. This is a FIX.
Blockers
[FIRST-PRINCIPLES-REVIEWED] fe04367 Description read[DESCRIPTION-READ] cd417708ca6492e41ffe9a11509a5c39dcc9cceb6f92bb78a266caf65838d0c1 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings that block the merge. FINDING — docs/system-specs/modules/monitor-architecture.md:1262 — the PR adds human comment/review activity digests, wakes from PENDING and SUCCESS conditions, and stops counting passing-check overflow as an incomplete board, but changes no spec. The owning spec still says a structured observation carries "a digest over the PR-level comment bodies, and nothing else", which AGENTS.md requires be updated in the same commit → Fix: in this commit, document in monitor-architecture.md the [OPUS-REVIEWED] fe04367 |
GPT 6.1 Review (fork) — 🔴 changes requested (blocking)Reviewed Adjudication upheld 1 of 1 blocking finding(s); those must be resolved before merging. BLOCKING -- src/kiro_crew/monitoring/github_pull_request.py:1362 -- Passing-check truncation loses its overflow accounting
[BLOCK-MERGE] fe04367 Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 is an UPHOLD under the AUTOSDE blocking rule. The finding cites |
3b4649d to
fe04367
Compare
A review-only watch could only hear a new revision, so a pull request parked at "review required" stayed silent while its checks went green or a person commented or reviewed. The GitHub adapter now digests comments and reviews by people other than the PR author beside the existing all-comment body digest, a pending or terminal-success PR carries those signals as named conditions, and the decision layer routes exactly those signals through the same coalescing window, one wake per re-alert interval. A watch's first readable observation records whatever signals it sees as a baseline, so activity that predates the watch never reads as new. Passing-check overflow is cut and carried as its own marker beside the verdict instead of being folded into board completeness, and the paging and fingerprint readers move whole into monitoring/github_pull_request_pages.py to hold the adapter under the 2,000-line cap.
Address the changes-requested review and the scenario gaps: - keep passing-row overflow evidence: the adapter reports the cut as its own flag, the canonical carries `checks_passed_overflow` beside the untouched verdict, and monitor_inspect names `passed_incomplete` beside the count, so a saturated passed list is never read or counted as the whole list (blocking finding at github_pull_request.py:1355); - a refused reviews-only continuation invalidates only connections the round never finished, so a completed comment read keeps its bot-edit and human-activity wakes through a reviews-only rate limit (github_pull_request.py:922); - the contract text says the named signals wake once per re-alert interval, which is what the engine does (control.py, monitoring.md, monitor-loops.md, decision.py); - a watch armed on a PR that is already green or already approved baselines its first readable observation instead of waking on the pre-existing level, in decision.py with tests; - an empty check board is no longer "all checks completed successfully", and checks finishing wake the session even when the PR waits on something other than review (no review_required gate); - a deleted account's comment is fingerprinted unattributed instead of blanking the human digest, so one deleted account cannot silence person wakes for the PR's lifetime; - delete `_pr_comment_page`, whose only remaining callers were tests, and point TestRetentionIsBounded at `_pr_comment_activity_page`; - record in docs/system-specs/modules/monitor-architecture.md which statuses carry conditions and why.
fe04367 to
e33d365
Compare
|
Closing this to keep the queue tidy: it has conflicts with the current main, CI is no longer green, and there has been no movement for several days. Happy to reopen or resend a fresh rebased fix if this is still useful — thanks! |
Problem / Motivation
Goal: Make
monitor_watchwake its session when a pull request it watches finishes its checks green, or receives a comment or review from a person, instead of staying silent while the PR only waits for review.The structured GitHub pull-request monitor never woke its session during a 3-hour observe-only watch of PR #20852: review lanes posted CONCERNS while checks ran, then 112 checks went green, then a maintainer commented — the monitor stayed silent through all three events, while a plain timer loop woke 32 times. Three causes were confirmed on
main(0600e2804): more than 100 passing checks keep the check board incomplete forever (_bounded_checksinsrc/kiro_crew/monitoring/github_pull_request.py,canonical_pull_request_factsinsrc/kiro_crew/monitoring/pull_request.py); aPENDINGreading never wakes (_decide_effectinsrc/kiro_crew/monitoring/decision.py); and the comment read carried no author, so a person cannot be told apart from a bot and conditions were attached only toACTIONABLEreadings.Why it matters
The monitor exists so a session can stop polling and still hear about its pull request. Anyone watching a heavily-checked PR (the very PRs that benefit most from watching) hears nothing during the two moments the author must act: when the PR becomes ready for review and when a maintainer asks for something. The author falls back to a timer loop, which wakes far more often and costs more — exactly the waste the monitor was built to remove.
Not a goal
pr_status.pyor the unanswered-CONCERNS stop under--reviewers(covered by prepare-pr: the --reviewers pin turns off pr_status.py's unanswered CONCERNS stop #19652 / fix(prepare-pr): keep unanswered CONCERNS stop under --reviewers pin #19658).What changed (motivation → approach → change)
Observed symptom → root causes → change:
_bounded_checksmarked the board incomplete when any state bucket exceeded the 100-row cap, so a PR with 112 passing checks wasPENDING/checks_incompleteforever. Change: only truncated verdict-bearing buckets (failed/pending/unknown) mark incompleteness; extra passing rows cannot change the verdict, so bounding them silently is safe (src/kiro_crew/monitoring/github_pull_request.py:_bounded_checks,src/kiro_crew/monitoring/pull_request.py:canonical_pull_request_facts).PENDINGreading with news had no path to a wake. Change:_decide_effectroutes aPENDINGobservation that carries named conditions through the same coalescing window asACTIONABLE; a terminalSUCCESScarrying a fresh activity condition gets one wake before the terminal stop, then the condition is masked and normal success handling stops the watch. The stall count is untouched: pending ticks still never advance it (src/kiro_crew/monitoring/decision.py).nodes{body}only. Change: the core selection readsauthor{login}, the comments read gains an independentreviewsconnection (per-subject bound cursor, same GraphQL-variable discipline), and two new digests keep only bounded fingerprints of activity byUseraccounts that are neither the PR author nor[bot]accounts. Missing author data fails closed for the new digests; the legacy all-bodies digest (bot in-place verdict edits still wake) is unchanged (src/kiro_crew/monitoring/github_pull_request.py).pull_request_conditionsis now status-aware:ACTIONABLEkeeps every existing blocker;PENDINGaddschecks_complete(only when checks are complete with none failed/pending/unknown, review still required, non-draft open PR) plus the human comment/review activity conditions; terminal success carries only activity that arrived with the transition.MAX_MONITOR_FIXED_CONDITIONS5 → 7 because six fixed keys can now co-occur (src/kiro_crew/monitoring/pull_request.py,src/kiro_crew/monitoring/models.py).Backwards compatibility
Compatible: no field, kind, key or validator is rejected, renamed or removed. The two new digest fields are absent from the canonical shape when empty, preserving the established projection; the new conditions only add wakes that did not exist before, and every existing wake path is byte-for-byte the same for
ACTIONABLEsubjects.Removes nothing: the change only adds read fields to two GraphQL selections, adds two digest inputs, and widens wake routing; no reader of any existing surface changes behavior.
Tests
New
test/test_issue_21070_monitor_wakes.py:test_green_checks_waiting_for_review_wake_once_and_do_not_stall— checks finishing green on a review-required PR wake exactly once; 14 further ticks areNO_CHANGEwithstall_streak == 0(no repeated wake, no stall trip).test_human_comment_on_a_pending_pr_wakes_once_but_own_and_bot_comments_do_not— a human comment wakes once, an in-place edit wakes again, the PR author's own and a[bot]comment produce none.test_human_review_wakes_a_pending_or_newly_ready_pr— a human review wakes a pending PR once and also surfaces on the success transition before the terminal stop.test/test_github_pull_request_monitor.py:test_more_than_one_hundred_passing_checks_still_yields_a_complete_board(112 green checks → complete board, singlechecks_completecondition), independent comment/review cursor paging, human-vs-bot-vs-author digest separation, bot in-place edits still changing the legacy digest.Verification run: 34 monitoring test files — 1077 passed, 300 skipped (marker-isolated integration/real_network), exit 0; focused run 6 passed; wheel build from the fix tree exit 0;
git diff --check origin/main...HEADclean.Manual verification
N/A — unit coverage sufficient: every wake path is exercised through
decide_monitorwith realMonitorStatetransitions, and the GraphQL reads are exercised against recorded envelope fixtures.Related Issues
Fixes #21070
Pattern harvest
Rule candidate: review-prompt
Pattern: a completion signal (check board) computed with an overflow sentinel treats verdictless rows as verdict-bearing, so scale alone (many green checks) permanently suppresses the "ready" state it exists to report.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.