Repository navigation
Conversation
GPT 6.1 Review (fork) — 🔴 changes requested (blocking)Reviewed 1 of 2 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands. BLOCKING -- src/kiro_crew/dashboard/chat_handlers.py:1553 -- Restored transcript metadata can manufacture private-store authority
BLOCKING -- test/test_openai_compat.py:1032 -- Unbounded race barriers hang when dispatch never occurs
[BLOCK-MERGE] 6aa0df7 Adjudication (Opus 5.5) — is blocking on each finding proportionate?F2 harm: LOW to MEDIUM. If the second request's validation never sees a dispatch, a test hangs and CI times out, but the cost is a lost CI run, not anything that ships. The unbounded awaits are confirmed in the diff at patch lines 3747, 3749, 3751, 3772 and 3776 ( F1 (fenced): I did not verify every condition at |
First Principles Review (Opus 5.5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS Delaying the member bind until the first send adds a new persisted Not justified as shipped
What this change shipsInventory (8 items) — 4 justifiedIntent: let a user change their mind about a new chat's Crew Member until they send the first message. FIX.
[FIRST-PRINCIPLES-REVIEWED] 6aa0df7 Description read[DESCRIPTION-READ] 50ed944092d9d86eea23f059cf189f1d110b4f154291d7156c9861c2311af0a0 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS The rewritten tests reverse a pinned behaviour: an empty chat used to bind its member at create or pick time, and now the first send binds it. No decision record covers either rule. Watch
Suggestions
[DESIGN-REVIEWED] 6aa0df7 Description read[DESCRIPTION-READ] be26584b6181d3c6236a7f61ec79f81ead0bae9a0dd2471199a073ad13da4af0 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 (fork) — ✅ no blocking findingsReviewed |
f35b8a5 to
c5211bb
Compare
c5211bb to
3251ef7
Compare
3251ef7 to
5f6f86c
Compare
5f6f86c to
7245496
Compare
c568222 to
7a42019
Compare
7a42019 to
d507d28
Compare
cruisercohen
left a comment
There was a problem hiding this comment.
Requesting changes on head d507d28d3acc60be4cb8afc240e4d9b78d175a16. The targeted backend tests pass locally against this branch's own base (513 tests across the touched test files plus test_openai_compat*), but the PR can't land as it is:
- Merge conflicts with main. The branch is about 770 commits behind, and
chat_handlers.py,chat_persistence.py,openai_compat.py,chat_api/resume.py,slot_persistence/metadata_line.py, the dashboard system spec and four of the touched test files all conflict. Please rebase, then re-run the suites above on the rebased head. - Upheld blocking finding in
openai_compat.api_completions. The new_unbound_member_refusalawaits twoasyncio.to_threadcalls on every first send to an empty slot. Those awaits sit after theslot.runningbusy check and beforeslot.append("user", ...)and the turn dispatch, so two concurrent first sends can both pass the busy check and both drain the same pending queue. Re-checkslot.runningafter the refusal check and return409 slot_busy, with no await between that check and the dispatch, and add a test that runs two concurrent first sends. - Behaviour change needs a maintainer decision. This replaces bind-at-pick with first-send binding and rewrites
test_owner_second_member_pick_on_pinned_empty_chat_is_refused, which asserted the old behaviour on purpose. A maintainer has to confirm the new rule on #14701 before this can merge.
Backend Tests (Windows) (7) is also red on this head, but its four failures are in test_run_bg_oneliner.py, which this PR doesn't touch, so they look unrelated. Re-running after the rebase should show whether that's true. On scope: this fixes #14701 (an empty chat whose default is a member can't change agent). It doesn't add the crew picker to the New Chat flow that #4560 asks for, so #4560 should stay open.
Defer private member binding for plain dashboard chats until the first send. Validate private choices at create and switch time, record each choice as `member_choice`, and preserve empty chats across restart. Withdraw template selections when a member is picked and restore agent-menu metadata together on rollback. Use `slot_defers_member_binding` as the shared empty-chat predicate. Keep `_may_run_unbound_member` config-only and perform named-store path checks through `asyncio.to_thread` in the locked first-send path. Apply `member_choice_refusal` to first sends through `/api/chat` and `/v1/chat/completions`. Reject missing, removed, downgraded, or replaced choices before the user row with `503 store_unavailable`. Record a member adopted by the first send so the runner validates the same identity for app, taskrunner, and queued-prompt dispatch. Recheck OpenAI slot busyness after member validation and before append or dispatch. Concurrent first sends dispatch one turn and return `409 slot_busy` for the other request. Publish one private execution record before the first owner user row and withdraw it if the slot rebounds. Drain first-send publication under cancellation and restore its exact prior selection before releasing the send locks. Preserve explicit member and template namespaces through eager spawn and turn dispatch. Persist `member_choice` through the shared slot metadata codec and cover create, switch, restart, concurrency, rollback, caller identity, unavailable selections, same-name replacement, History resume, namespace collisions, event-loop isolation, adopted members, and non-endpoint first turns. Black-format `test/test_chat_slot_create_folder.py` and remove it from `.github/black-baseline.txt`. Tests: 3,953 passed across 68 targeted test files. Backend lint and Fast Gate pass.
d507d28 to
6aa0df7
Compare
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
cruisercohen
left a comment
There was a problem hiding this comment.
Re-reviewed on 6aa0df7. Thanks for the slot_busy re-check and its concurrency test; that ask is met. Three gaps remain.
- Trust boundary (chat_handlers.py:1553). A member choice restored from the transcript is enough, on the first send, for
pin_private_agent_storeto pin that member's private memory store to the session. The transcript is agent-writable, and main's pin deliberately refuses a member name recovered from history for that reason. Please require an explicit owner re-selection before the first send binds, or check that the restored member is one this chat was legitimately bound to, and add a test that a transcript-only member choice does not get a private-store pin. - Merge conflict: the branch conflicts with main again and needs a rebase.
- The new
selection_kindargument breaks test_eager_spawn_config_load_off_loop.py, which is red on Linux, Windows and macOS on this head.
Our earlier ask for a maintainer ruling on first-send binding (#14701) also still stands.
|
Closing this because #18342 changed a New chat without an agent to start on the default template, so current main no longer binds it immediately to the default Crew Member and this fix is no longer needed. |
Problem / Motivation
Goal: A new dashboard chat can choose another agent before its first message and sends that first message to the selected Crew Member.
Goal: A new dashboard chat can switch to any agent until its first message, regardless of how its Crew Member is chosen, and runs on the chosen member's private memory from that first message.
A plain empty dashboard chat keeps its private member choice reversible until the first message. The first send publishes the chosen member's execution identity.
Why it matters
A member choice stays editable while the chat has no message or provider context. The first send binds the conversation to the exact private member identity selected for it.
Not a goal
409 member_session_pinnedresponse after a session is bound.What changed (motivation → approach → change)
/agent <name>persistmember_choicewithout publishing the member execution record. Another agent can be selected before the first send./api/chatand/v1/chat/completionsreturn503 store_unavailablebefore appending a user row when the recorded member is missing, downgraded, or replaced.409 slot_busy.Backwards compatibility
Compatible: request shapes are unchanged,
member_choiceis optional persisted metadata, and established member-bound sessions retain their pin.Removes nothing: existing member threads, linked tabs, channel tabs, agent controls, and response contracts remain available.
Tests
409 slot_busyresponse.test/test_openai_compat*.py.Manual verification
Not performed against a running gateway. Verify a New chat with a member default can switch agents before sending, that the first message uses the selected member, and that a later member switch returns
409.Screenshots / video
Why no screenshot: The change is backend-only and preserves the existing dashboard controls and payloads.
Related Issues
Fixes #14701
Pattern harvest
Rule candidate: review-prompt
Pattern: persist immutable selection identity when publication is deferred, validate it at publication, and preserve the explicit selection namespace across every resolver.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement