Repository navigation
fix(acp): answer KAS user-input questions instead of letting Deny read as yes - #30195
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns. Declaring the capability and adding the handler in one change, and building every reply from the request's Notes
[DESIGN-REVIEWED] 1d894de Description read[DESCRIPTION-READ] 3d5d2d56d9092feb446735c27089c6638a2ade460fc8a076429aeb36fba971c6 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) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The fix declares Notes
What this change shipsInventory (6 items) — 5 justifiedIntent: on KAS, when someone says "no" to the model's question, or nobody is there to answer, the model never reads it as "yes". This is a FIX (closes #30194).
[FIRST-PRINCIPLES-REVIEWED] 1d894de Description read[DESCRIPTION-READ] 90d79d3e3103d19267dccc186fb529932060953060f5322afbade8d4a7f75423 That sha256 names the PR description this verdict read. Recompute it with |
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: |
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: |
82b2bc3 to
1d894de
Compare
Cherry-picked with -x from main onto release/0.12.0 for 0.12.1, in main merge order. Every pick applied clean. - #29990 fix(approvals): resolve an approval by id only in the session it was shown in (cherry picked from commit 4d2b8a5) - #30129 fix(session): don't resume in an earlier process's hidden scratch dir (cherry picked from commit 599e33e) - #30205 fix(acp): let Crew's MCP servers defer on the KAS engine bundle (cherry picked from commit 3d4e4a6) - #30279 fix: keep one more credential value out of log output (cherry picked from commit 9fcf80f) - #30195 fix(acp): answer KAS user-input questions instead of letting Deny read as yes (cherry picked from commit bbf4e6d) - #30199 fix: redact four log lines and tighten two small checks (cherry picked from commit 16ff876) Co-authored-by: Bolin Chen <17506219+bolichen97@users.noreply.github.com> Co-authored-by: Joe Guo <12429733+iamwhatever@users.noreply.github.com>
Cherry-picked with -x from main onto release/0.12.0 for 0.12.1, in main merge order. Every pick applied clean. - #29990 fix(approvals): resolve an approval by id only in the session it was shown in (cherry picked from commit 4d2b8a5) - #30129 fix(session): don't resume in an earlier process's hidden scratch dir (cherry picked from commit 599e33e) - #30205 fix(acp): let Crew's MCP servers defer on the KAS engine bundle (cherry picked from commit 3d4e4a6) - #30279 fix: keep one more credential value out of log output (cherry picked from commit 9fcf80f) - #30195 fix(acp): answer KAS user-input questions instead of letting Deny read as yes (cherry picked from commit bbf4e6d) - #30199 fix: redact four log lines and tighten two small checks (cherry picked from commit 16ff876) Co-authored-by: Bolin Chen <17506219+bolichen97@users.noreply.github.com> Co-authored-by: Joe Guo <12429733+iamwhatever@users.noreply.github.com>
Problem / Motivation
Goal: On KAS, when the model asks the user a question, a Deny (or no person at all) never reaches the model as "yes".
Kiro Crew does not declare
_meta.kiro.userInputto KAS. KAS then asks throughsession/request_permission; a Deny with no reject option answerscancelled, KAS maps it tonext-phase, and itsuser_inputtool tells the model to read that as agreement. Cron, channel and sub-agent turns take the same path.Why it matters
Every KAS user who answers "no" to the model's question gets the opposite. This is row P0-19 of the kiro-cli to KAS migration: kiro-cli users moving to KAS lose a working "no".
Not a goal
What changed (motivation → approach → change)
Symptom: Deny reads as yes. Root cause: no
userInputcapability, and KAS reads every_kiro/userInputreply other thanansweredwith a non-emptyanswer(itsdismissedand errors included) as "move on". So declaring the flag alone would not help; the flag and the handler ship together.Approach:
_kiro/userInputrides the existing MCP elicitation path (same classifier action, card, pending registry, Stop/turn-boundary/stranded cancel paths), as a form: an optional choice of the offered titles and a free-text answer (required when no option is offered). Reusing the path gives the card, reload of the card row, and every "nobody answered" exit for free, instead of a second copy of each.Change:
acp/types.pydeclaresuserInput: true.acp/elicitation.pyparses the request and addselicitation_reply/user_input_response, which every driver now answers through; the request'smethodalone picks the reply shape, andanswer_elicitationtakesperson=Falsefor a caller that showed the ask to nobody. For a user-input request the reply is always{"action": "answered", "answer": <text>}: the choice, the typed text, orchoice: text; a person's Deny sends text saying they declined and it is not agreement; every exit with no person (no consumer can ask, unrenderable, a card the dashboard refuses for a tainted value, text-only path, turn boundary, stranded, trust sweep, window expired, Stop) sends text saying nobody could answer. MCP elicitation replies are unchanged. KAS replays a pending question onsession/loadonly as a history row and does not re-send_kiro/userInputafter a restart, so there is nothing for Crew to re-answer. The ACP client spec documents the third wire.Backwards compatibility
Compatible: MCP elicitation keeps its
accept/decline/cancelreplies; the only new wire is a KAS request Crew never received before.Removes nothing: adds one capability and one handled method; no path, key or validator is taken away.
Tests
test/test_acp_user_input.py: flag declared on KAS only; both classifiers route the method; parse of options, string options, duplicates and refusals; the card row validating an answer as the driver does; every reply action yieldsansweredwith text; session handle and single-session client paths for accept, Deny, no person, unrenderable, text-only and turn-boundary cancel.test/test_dashboard_elicitation.py: a real session handle behind the dashboard card for choice, Deny, reject, trust sweeps, Stop and a tainted option; each putsansweredwith text on the wire.answer_elicitationupdated intest/test_acp_bindings.py,test/test_client_bindings.py,test/test_session_handle_bindings.py.test/test_acp_harness_contract.pyandtest/test_acp_harness_wire_parity.py.Proof: not provable -- other: prove.py stops at BASELINE_RED from copilot tests that fail on main in this environment; with
src/reverted to origin/main the new tests fail (7 failed, 1 error).Manual verification
N/A — unit coverage sufficient: the wire shapes are taken from the KAS source (
acp/acp-event-adapter.tshandleUserInputViaCapability) and driven end to end through the handle and the card.Related Issues
Closes #30194
Sibling sweep
Swept: git grep -n "elicitation_response(" -- src/
Sibling: src/kiro_crew/acp/session_handle_turn.py -- changed here
Sibling: src/kiro_crew/acp/client_elicitation.py -- changed here
Sibling: src/kiro_crew/acp/session_handle_elicitation.py -- changed here
Pattern harvest
Not generalizable: the defect is KAS's specific mapping of every non-
answeredreply to "next phase", handled once in the reply builder.Checklist
Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.