Repository navigation
Conversation
|
Intent: Keep a goal loop active until same-session sub-agent work and terminal delivery settle, while preserving the user-owned direct Stop control. |
GPT 6.1 Review (fork) — 🔴 changes requested (blocking)Reviewed 1 of 1 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands. BLOCKING -- test/test_autonudge_handlers_completion_release.py:71 -- Close task stores opened by the new manager tests
[BLOCK-MERGE] 457a14e Adjudication (Opus 5.5) — is blocking on each finding proportionate?Adjudication result: no adjudicable findings. The one fenced finding, F1, gets UPHOLD-FENCED, not FLAG, so it keeps blocking the merge. F1 — confirmed in the patch at [ADJUDICATION] 457a14e total=0 uphold=0 downgrade=0 [ADJUDICATION-FENCED] 457a14e fenced=1 flagged=0 |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change is reversible, and a person can still clear the new agent-stop refusal with direct Stop or Delete, or wait for the loop's budgets to run out. Notes
[DESIGN-REVIEWED] 457a14e Description read[DESCRIPTION-READ] 9908404626b3cc58f4245e800f114fe414b5a445d444d9fc65cecfe0943fa5dd 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: by default, the agent-issued Notes
What this change shipsInventory (8 items) — 6 justifiedIntent: keep a goal loop alive until the work it delegated has settled. Framed as a FIX, but it changes behavior.
Blockersproduct-shape change without accepted RFC — item 1 [FIRST-PRINCIPLES-REVIEWED] 457a14e Description read[DESCRIPTION-READ] ef9af29aeda7d84d5cf54d49f288d5b869f0db5ae653d93905dad57f07da5c28 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
cixuuz
left a comment
There was a problem hiding this comment.
Blocking: the slot-less child-work guard is wired only into the two Slack directive-consumer call sites. Discord and Webex are also nudge-able bindings, but their dispatcher-less fallbacks do not pass a subagent manager; without attached dashboard state, subagents_attached sees no registry and autonudge_stop can still remove the goal while child work or terminal delivery is pending. Pass each channel live subagent manager into build_directive_consumer and add slot-less regressions for Discord and Webex. Also state explicitly whether monitor_stop intentionally remains outside this guard.
9c93d6e to
afc2f1c
Compare
|
@cixuuz This change request reviewed
All current-head checks pass, and there are no unresolved review threads. Please re-review the current head so the stale |
|
|
|
|
|
Rebased onto
Tests:
|
|
Fixed the fenced GPT finding on
Main #23929 rewrote Tests:
|
|
Rebased onto
|
|
Fixed the fenced GPT finding on c20ca1d (
|
|
Addressed the GPT 6.1 blocking finding on b52579f (
|
|
Rebased onto 4acd9b7 to clear a conflict with #24706 in Scoped run: 7,326 passed, including main's new strict-xfail and lenient-read ratchets. The one failure is the dist-built boot pin, which passes dist-less (65 passed). Static gates passed. |
|
Rebased onto aeb5c02 to clear a conflict with #23388 in Scoped run: 25,044 passed, plus 156 in main's newest test delta. The two failures are main's strict XPASS in |
|
Addressed the Opus 5.5 blocking finding on 7dfc258 ( The prompt build now also records the slot's pending background-context entries (after foreign notes are dropped), and the session's cancelled-turn flag when its preamble was used.
|
|
Rebased onto main to resolve conflicts with #24714 and #22254.
This PR's tests, the tests main changed since the last push, the composition contracts and the static gates pass. The only failures are ones main shows on this host too. |
|
Pushed 8ca3e82, rebased onto main The PR's tests, the tests main changed since the last published base |
|
mechanism: the async queued count reads the window on both sides of the store await and counts the larger reading
|
|
Pushed 3d69749, rebased onto main
|
|
Pushed 24f9a5f, rebased onto main
|
|
Pushed 4609534, rebased onto main
|
|
self-added: yes
|
|
self-added: yes
|
|
Pushed ec94067, rebased onto main |
|
Pushed 68f6832, rebased onto main |
|
self-added: yes
|
|
Pushed 30eb5ea for GPT's blocking finding on 68f6832 ( |
|
self-added: yes
|
|
Pushed ef8f54b, rebased onto main |
|
|
Addressed the requested channel parity in |
|
Pushed f1b8afb, a conflict-resolving rebase onto main
Size: non-test lines go from +1365/-180 to +1372/-182 (net +5), with about 55 non-test lines rewritten in place of 46. Tests grow by 14 lines and lose 3. Every other conflict keeps both sides. The related backend suite passes except |
Keep agent-issued goal stops fenced while child execution or terminal delivery remains attached. Preserve popped queue-completion ownership across pre-entry cancellation, and distinguish one-shot discard failures that require restart orphan recovery.
|
Pushed 457a14e, rebased onto main
No other code, test or description changed. |
Problem / Motivation
Goal: Keep a goal or monitor active until every attached child and accepted completion delivery has settled, while preserving an explicit human stop path.
A goal driver could stop itself while delegated subagents still had running, queued, or accepted but unconsumed completion work. Queue handoffs and channel-specific slot-less turns could hide that ownership from the stop fence.
Why it matters
Terminal completion delivery must remain exactly once, fail closed, and observable. Losing ownership can drop a child result or leave its parent permanently fenced, while incomplete diagnostics can suggest a recovery action that cannot work.
Not a goal
What changed (motivation → approach → change)
A goal or monitor stays active while its child work owns a terminal report or accepted completion. Agent-issued
autonudge_stopandmonitor_stopuse this stop-only extension. Other session operations keep their running, queued, and active-handoff guard. Direct human Stop and Delete remain authoritative.src/kiro_crew/slack/gateway_runtime/subagent_injection.pytransfers completion ownership before queue or runner handoff, owns a completion parked behind its inline turn until the park ends, keeps prompt enrichment separate from delivery-debt identity, and clears report-only store debt without a result tombstone. A discard reads back only tombstones the writer persists (tombstone_persistsinsubagent_persistence_tombstones.py), so a dropped incognito or temporary completion releases the fence.src/kiro_crew/dashboard/chat_utils_completion.py). Session-mutation 409 bodies are unchanged.discord/,feishu/,imessage/,teams/,webex/,wecom/,weixin/,messaging/dispatch.pysrc/kiro_crew/subagent_parts/andsrc/kiro_crew/subagent_manager/admission/gate_reporting.py); queued report-only settlement waits for the store write before release (admission/taskq_bridge_expiry.py); queued counts read the window twice (run.py); a failed owed-report clear raises after the tombstones (waves.py).src/kiro_crew/apps/builtins/spec_builder/queue_discard_all(), so a dropped completion no longer fences the parent's stop.src/kiro_crew/dashboard/chat_runner.pyandchat_turn/docs/system-specs/test/No accepted RFC records the agent-issued stop refusal during child work, so the First Principles product-shape decision stays with maintainers.
Backwards compatibility
Breaking: an agent-issued
autonudge_stopormonitor_stopthat main accepts is refused while child delivery ownership remains. Writer sweep onorigin/main@6ccab43c14c0: both directive writers use the shared applier, and configured cycle or wall-clock budgets still deactivate their loops independently.Reader:
src/kiro_crew/dashboard/session_directive_apply_monitor.py:_autonudge_stop-- chat, channel, and cron turns -- shared attachment verdict refuses only the agent directive.Reader:
src/kiro_crew/dashboard/session_directive_apply_monitor.py:_monitor_stop-- structured and legacy monitors -- same verdict, agent directive only.Reader:
src/kiro_crew/dashboard/chat_api/turn_stop.py:stop_slot_turn-- dashboard Stop -- bypasses the agent-only refusal.Reader:
src/kiro_crew/dashboard/chat_api/slot_lifecycle.py:_close_slot-- dashboard Delete and session close -- bypasses the agent-only refusal and retires queued ownership exactly once, after its history commit.Reader:
src/kiro_crew/dashboard/chat_turn/queue_drain.py:_start_next_queued_turn-- every automatic drain -- runs past a held failed retry; a completion whose turn never starts is requeued with its retry held, and only a Stop or teardown discards it.Tests
test_completion_retry_ownership.py); Stop on an incognito or temporary child's queued completion releases the fence, while a persistent child whose tombstone write failed keeps it, and a tab closed during a busy-turn wait still rings the bell (test_cron_thread_routing.py); Spec Builder Pause and Delete release a queued completion's fence (test_routes_delete.py); dashboard Delete releases the ledger entry keyeddashboard:<slot>(test_autonudge_handlers_completion_release.py); agent stops wait for a failed child finalizing or one admitted mid-count, context-cap and cron teardown for one started then (test_autonudge_stop_auth.py,test_gateway_subagent_injection.py); a full queue keeps a held completion queued with its fence (test_session_deliver.py); a failed owed-report clear keeps the tombstones (test_subagent_delivery_ttl_anchor.py); idle-tab deliveries and the stall kick skip a held retry until a good turn end, a send, Run now or Stop (test_completion_retry_hold_drains.py); a stop in the turn that got a result inline waits for its reply (test_inline_park_completion_ownership.py).test_queue_cancel.pyguards that only the queue repository empties a slot queue;test_directive_consumer_subagents.pychecks every consumer call site; a stop in the turn reading the last completion applies, and a retry still reads the notices its attempt drained (fix(dashboard): settle a sub-agent notice only once the model reads it #32411) (test_completion_retry_ownership.py).Manual verification
N/A -- unit tests only.
Related Issues
Part of #8060
Pattern harvest
Rule candidate: review-prompt
Pattern: ownership handed over before an async handoff needs one release path per outcome.
Checklist
Contribution License Agreement
Contributions are accepted under the repository's Apache 2.0 license.