Repository navigation
feat(autonudge): show a Done state when a goal loop finishes - #16352
Conversation
|
Disposition of the local GPT review lane's one advisory (
|
First Principles Review (Opus 5.5) — ✅ human override accepted@pepmach overrode this lane for |
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: |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Successful and failed endings both say "Done" in the same blue, so a pull request closed without merging reads as a success. Watch
Suggestions
[UX-REVIEWED] 01ea90e Description read[DESCRIPTION-READ] f2457ebbee394dd46a9d71bebb115d94bb4d5c5687b923958187aa8e57507454 That sha256 names everything this verdict read: the PR description, plus the 12 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 |
Design Review (Opus 5.5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Goals set from the popover itself still show no goal when they finish, because the default goal text ends through Watch
Suggestions
[DESIGN-REVIEWED] 01ea90e Description read[DESCRIPTION-READ] ba0fccc225392abb0bb0f5848a12aaf726749e42a05cea106fa5fe9ad170d989 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 |
173ba06 to
e86261c
Compare
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: |
e86261c to
611bd44
Compare
|
/ai-review override first-principles 611bd44: product owner decision (pepmach, 2026-10-02), recorded on this PR's thread and in the RFC this PR carries: the Done state is the follow-up #16030 deferred by design, specified by the owner's approved mock (kept record, Done title and line, read-only fields, dead Pause and Play, Clear finished goal as the only action). The base RFC lists Done as a deferred decision, not a rejected one, and this PR records that decision in the same in-progress RFC, as #16030 did for its own shape; merging the RFC first was ruled unnecessary for this follow-up. |
|
Disposition of the UX Review (Fable 5) verdict on
|
|
Disposition of the Design Review (Fable 5) CONCERNS on A |
|
AI-review override not recorded: keep the reason to 500 characters or fewer. |
|
/ai-review override first-principles 611bd44: product owner decision (pepmach, 2026-10-02), on this PR's thread and in the RFC it carries: Done is the follow-up #16030 deferred by design, specified by the owner's approved mock (kept record, Done title and line, read-only fields, dead Pause and Play, Clear as the only action). The base RFC lists Done as deferred, not rejected; this PR records the decision in the same in-progress RFC, as #16030 did for its own shape. Merging the RFC first was ruled unnecessary. |
Human judgment recorded@pepmach 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. |
|
Disposition of the UX Review (Fable 5) CONCERNS on
|
611bd44 to
dda90a7
Compare
|
/ai-review override first-principles dda90a7: product owner decision (pepmach, 2026-10-02), on this PR's thread and in the RFC it carries: Done is the follow-up #16030 deferred by design, specified by the owner's approved mock (kept record, Done title and line, read-only fields, dead Pause and Play, Clear as the only action). The base RFC lists Done as deferred, not rejected; this PR records the decision in the same in-progress RFC, as #16030 did for its own shape. Merging the RFC first was ruled unnecessary. |
|
Disposition of the Opus 5 Review advisory on Measured in the built SPA under the stub harness: computed |
1b3a6fa to
1aafa69
Compare
|
/ai-review override first-principles 1aafa69: product owner decision (pepmach, 2026-10-02), on this PR's thread and in the RFC it carries: Done is the follow-up #16030 deferred by design, specified by the owner's approved mock (kept record, Done title and line, read-only fields, dead Pause and Play, Clear as the only action). The base RFC lists Done as deferred, not rejected; this PR records the decision in the same in-progress RFC, as #16030 did for its own shape. Merging the RFC first was ruled unnecessary. |
|
Rebased onto No code change: the sorted +/- content lines of the pre- and post-rebase diffs differ only by main's own |
Human judgment recorded@pepmach 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. |
The stop file at stop_sentinel_path is how the agent declares a goal reached, and the timer answered it by removing the loop, so the goal popover fell back to its empty form with nothing saying the goal was met. The timer now deactivates the loop under a new reason, stop_sentinel, and keeps the record. Every other effect of the removal stays: the timer is retired, the WARNING stop line names the reason, no expired event is emitted, and the stop file is left where the agent wrote it (the arm path unlinks it before the next loop on the slot). stop_sentinel and monitor_terminal are the two finished reasons, and Done is a dead end: update(active=True) on a finished row is declined whoever asks (the popover's Play, monitor_update, the Research Lab and Issue Radar reconcilers), a reasonless pause or a bound landing on it keeps the finished reason, and the ways on are the person's Clear or a new arm, which may displace the row as it displaces a merged watch. monitor_update's paused-loop denial names the stop-file finish and points at a new goal. The autonudge_state frame carries monitor_outcome for every loop: the settled outcome of the loop's own watch, so the popover can tell a merged pull request from one closed without merging while the frame keeps withholding the monitor record itself.
A loop whose goal is reached is finished, not paused, and the goal popover now says so. When the record is inactive under stop_sentinel or monitor_terminal the title reads Done and the status line, boxed in the info tone, reads one of three lines: the agent created the stop file, the watched pull request merged, or the watched pull request was closed without merging. A check-mark glyph precedes the first two; the third ended on a question, so it carries none. Merged versus closed is read off the settled monitor_outcome the frame carries, never prose. The goal text and the two number fields stay visible, read-only and dimmed. The footer keeps its shape: Clear finished goal as the text link at the left, Pause and Play at the right, both disabled, with the Paused-state glyphs. Clear opens the existing confirm. Done is a dead end: no Play and no edits, because the service refuses to revive a finished loop; to run again the person clears the goal and sets a new one. The Crew Members patrol block words the two finished codes instead of printing the raw code. Catalogs gain the five popover keys and the two patrol keys in every locale, with the pseudolocale regenerated; the RFC records the state.
1aafa69 to
01ea90e
Compare
|
/ai-review override first-principles 01ea90e: product owner decision (pepmach, 2026-10-02), on this PR's thread and in the RFC it carries: Done is the follow-up #16030 deferred by design, specified by the owner's approved mock (kept record, Done title and line, read-only fields, dead Pause and Play, Clear as the only action). The base RFC lists Done as deferred, not rejected; this PR records the decision in the same in-progress RFC, as #16030 did for its own shape. Merging the RFC first was ruled unnecessary. |
|
CI on
Head |
Human judgment recorded@pepmach 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. |
|
CI on |
|
All green on |
|
Reviewed, not approving (crew-pr-reviewer). This is a new UI and state feature (+874/-60). Large features need a maintainer's review rather than an approval from this sweep. |
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed on behalf of the maintainers (sweep 2026-10-06): full diff read, callers verified against current main, readiness passed, required checks green, no blocking review threads. Maintainer review of the new Done state: a stop-file finish keeps an inactive stop_sentinel row instead of deleting it, the popover shows Done with a Clear link, and reconcilers can no longer re-launch a crew the operator stopped. Create-only POST on a finished slot answers 409 only from a stale client. Approving and merging.
Problem / Motivation
Goal: Keep a finished goal loop's record and show it as Done, so a loop that reached its end is not shown as Paused or as no goal at all.
Closes #16488
When the agent creates the stop file, the backend deletes the loop record, so the popover falls back to the empty Set a goal form: the goal text is gone and nothing says it was reached. When a watched pull request merges or closes, the record is kept with a reason the popover does not know, so it shows a bare Paused and offers Play, which would poll a finished pull request. This PR keeps the record in both cases and shows Done with the reason, with Clear as the only action.
Why it matters
A goal loop is the one feature a person leaves running unattended, so its popover has to say how the loop ended: it reached its goal, or its subject is gone. Today it says Paused, or nothing.
Not a goal
What changed (motivation → approach → change)
stopped_reason: stop_sentinelstop_sentinel,monitor_terminal)monitor_update/ app reconcilers could re-arm itautonudge_stateframestopped_reason,next_due_tsmonitor_outcome,monitor_kindon every loopPausedwith Play liveDonetitle, info-tone line naming the finish, read-only fields, dead Pause/Play,Clear finished goalBackend (
src/kiro_crew/autonudge_service/). A{{STOP_FILE}}goal's agent reports it reached by the stop file:firing.pydeactivates the loop underSTOP_SENTINEL_REASONinstead of removing it, keeping the removal's other effects: timer retired (the timer task pops its own registration first, so the shielded update cannot cancel it), the WARNING line, noexpired(that means stopped short). The stop file stays where the agent wrote it; an inactive loop's timer is never armed, andauthorize_and_add_nudgeunlinks the per-slot path before the next loop exists, so a goal set after Clear survives its first tick.model.pynames the finished reasons (FINISHED_LOOP_REASONS),stop_sentineldisplaceable by a new arm likemonitor_terminal;src/kiro_crew/autonudge.pyre-exports both.mutations.pydeclinesupdate(active=True)on a finished row, whoever asks (a bare declined revival writes and emits nothing), keeping a finished reason under a later reasonless pause or bound (_KEPT_STOP_REASONS). One exception: Issue Radar and Research Lab arm the stop file as an operator's kill switch, so astop_sentinelrow whose file is gone is revivable and their reconciler re-arms it; the popover never deletes it.dashboard/session_directive_apply.pynames the stop-file finish inmonitor_update's refusal;dashboard/chat_runner.py's/goal statusreads a kept record's state, not its presence. The frame builder inslack/gateway.pyaddsmonitor_outcomeandmonitor_kind(the watch's settled outcome and the class of subject; the kind redacted as the structured record is): the frame withholds the gated loop'smonitorrecord and the popover needs the two to tell merged from closed, pull request from work ledger. Its observer logs a finished loop'supdatedframe as a patrol stop.docs/system-specs/modules/learn-cron-dashboard.md,babysit-pr-watch.mdcarry it.Frontend (
website/src/).components/AutoNudgePopover.tsxrenders Done for an inactive loop under a finished reason: titleDone; an info-tone box readingDone · the agent created the stop file,Done · the watched pull request mergedorDone · the watched pull request was closed without merging(check glyph before the first two); another finished watch (a work ledger) readsDone · the watched subject finishedwith the glyph orDone · the watched subject ended without finishingwithout — two sentences, as a screen reader hears no glyph. The text is the info hue (text-info), like every info wash;--info-fgis black in dark themes. Fields stay visible, disabled, dimmed;Clear finished goalleft (the existing confirm), Pause and Play right, both disabled, Paused glyphs.components/autoNudgeLoop.tstypes the two fields and ownsloopFinished;monitoring/automation.tscarries them and reads a GATED REST row (nested monitor record, no scalars) as the goal loop it is, outcome and kind off that record — read as a bounded monitor it was dropped from the cold seed, so a finished goal reloaded as none;components/SessionAutomationPopover.tsxforwards them.website/src/i18n/locales/gain seven popover keys per locale; pseudolocale regenerated. (The Crew Members drawer's patrol block this PR also worded was removed onmainby #16317, so that part is gone from this PR.) The RFCdocs/request-for-change/rfc-goal-popover-pause-play-controls.md(#16030's record, in progress) records Done.Backwards compatibility
Compatible: no route, field or key the wire accepts today is rejected, renamed or removed. The frame gains two additive fields. A loop stopped by its stop file now leaves a record where it left none; the record is cleared by the same
DELETEevery paused goal uses, a directive re-arm may displace it exactly as it displaces a merged watch, and an Issue Radar crew or Research Lab campaign whose operator deletes the stop file is re-armed by its reconciler as before (crew_runtime.py,watchdog.py).One acceptance is taken away:
update(active=True)on astop_sentinelormonitor_terminalrow used to revive it and is now refused (while a stop file stands; a finished watch always). The readers that send it outside this patch:The stop-file path keeps a row it used to delete. The stop file is the finish of a goal whose text carries
{{STOP_FILE}}(the apps' patrols,/goal, a custom goal); the popover's default goal text has the agent callautonudge_stop, and that call still removes the row and shows no Done (the first Not-a-goal bullet). Two readers of that row's absence are updated to read its state instead: the/goal statusreply indashboard/chat_runner.py(a kept, inactive record is reported as finished or stopped, with/goal clearas the way out, not as an active goal) and the frame's observer inslack/gateway.py; the WARNING stop line still fires with the same reason.Tests
test/test_autonudge.py: the stop file keeps the record finished with the timer gone, the stop line, the file left in place,updatedand noexpired; a finished loop (both reasons) is not revived byupdate(active=True, fresh_run=True), a bare revival writes nothing and emits nothing while one carrying a field change still applies it, the reason survives a reasonless pause and a bound, and a stop-file finish is re-armed once its file is deleted while a finished watch never is; a finished row is displaced by a directive re-arm and refused by a create-only add; the re-homed sentinel test pins the kept record.test/test_autonudge_authz_cov80.py: end to end, a goal finished by its stop file, cleared, then a new goal on the same slot is not ended by the stale file.test/test_autonudge_manual_fire.py: a manual trigger still honours the stop file and the finished loop refuses a further fire.test/test_monitor_directive_apply.py:monitor_updateon a stop-file finish is refused with the finished wording and applies nothing.test/test_slack_gateway_coverage.py: the frame carriesmonitor_outcomeandmonitor_kindon every loop, settled for a finished gated watch, with the monitor record still withheld; a member patrol finished by its stop file is logged as a patrol stop and a plain pause is not.website/src/test/AutoNudgePopover.test.tsx: the Done renderings for the stop file, a merged and a closed pull request, and an accepted and a rejected work ledger (title, info box, check mark only on a finish that went well, read-only dimmed fields with values kept,Clear finished goal, dead Pause and Play with the Paused glyphs), dead controls send nothing, the confirm opens from the link with the Done line kept, and a finished code on a still-active loop is not Done.website/src/test/automationNormalizer.test.ts: the legacy record carriesmonitorOutcomeandmonitorKind..github/coverage-baselines/backend.txt: one entry removed,src/kiro_crew/apps/hooks_integration.py, because the Coverage Gate measured it above its graduation band on this PR's run (82.3% against the 80% floor plus a 2pp band; 81.4% onmain's own run at the same base) and refuses until the baseline shrinks; refreshed with the gate's own--update-baselinefrom that run's artifact, which only deletes entries.AutoNudgePopover.tsx95.81 / 91.97 / 92.30 / 98.11 → 95.87 / 92.64 / 92.30 / 98.14;autoNudgeLoop.ts97.14 / 97.61 / 85.71 / 96.55 → 97.29 / 97.87 / 87.50 / 96.77;SessionAutomationPopover.tsxandmonitoring/automation.tsunchanged (93.61 / 91.13 / 98.07 / 96.51 and 91.37 / 92.34 / 95.83 / 96.00).Manual verification
Gates on this head: black ratchet, subprocess encoding, isort, flake8, mypy,
scripts/docs-lint.sh,scripts/local-gate.py(backend related set 28,543 passed; two failures reproduce identically on a pristineorigin/mainworktree and are the host's sandbox class:test_store_ancestor_chain.pysymlink refusal andtest_auto_improvement_members.pytreating the scratchTMPDIRas managed state),npm run build,tsc, eslint,npm run i18n:checkwithI18N_BASE_REFset (19 checks pass), the touched vitest files. Thei18n:renderbrowser gate, the bundle-size analyze build and the Electron suite were not run locally. No local review lane ran; the server lanes are the first model read.The before frames and the running frame are a real pod of
origin/mainand of this worktree driven by Playwright: a loop armed throughPOST /api/autonudge, its stop file written, the 15 s tick observed, then the popover photographed (the kept record and its Done rendering were first observed there). The after frames are the built SPA behind the repository's gateway-free API stub (the harness #16030 used), fed the rows exactly asGET /api/autonudge/slotand the loop list return them (a gated loop's nested monitor record, no frame scalars — the cold read a reload makes) — the stub because a loop armed through the REST route carries no provider credential, so a pod's probe cannot read GitHub, and because the frames were re-taken after the status text took the info hue. Every frame passed its DOM assertions (title, status line, glyph, disabled controls and fields, link text) before being used here.Screenshots / video
Before (
origin/main): the stop file empties the form; a merged watch reads a barePausedwith Play offered.After (this head): Done.
A finished watch whose subject is not a pull request (a conductor's work ledger).
The running state the stop-file frames started from
Related Issues
no linked issue: the follow-up #16030 deferred in its "Not a goal" section, delivered through the crew conductor.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement