Repository navigation
fix(ask-user): gate a partial answer to a multi-question required call - #6283
surlymochan wants to merge 3 commits into
Conversation
|
Thanks @surlymochan. Gating a partial answer to a required multi-question call is the right idea, but the new gate drops the user's own words in one common case. Needs a change: Keeping the comment in the gated rendering (the Smaller: the partial rendering lists the real answers and then ends with the shared |
A comment-only reply to a required question still gates the action, but the gated rendering dropped the comment and ended with the contradictory 'No answer:' line. The reason now says what actually happened (comment-only / partial / unanswered), the comment renders exactly as the non-gated branch renders it, and a partial gate closes with its own 'The unanswered question still gates the action ... Keep that action pending and end the turn.' line. Follow-up for code-yeongyu#6283, addressing code-yeongyu's 2026-11-09 review.
|
Addressed in c828731 (just pushed). Decision: a comment-only reply still gates the action — a comment is not an answer to the gated question, so the action stays pending until the question is really answered. But the gated rendering no longer drops the comment or contradicts itself:
Tests: 3 new cases in |
Fixes #2966.
Gap 1 — partial answer to a required multi-question call
formatBodyonly took the gated branch for settlements other thananswered/comment-submitted, so a required call that settled asansweredwith some questions still inunansweredread as an ordinary partial answer ("Unanswered: ...") with no instruction to hold the gated action. Now a required call with any unanswered question renders the refusal ("The user answered only part of the question." + the answered lines + "Unanswered: ..." + "No answer: do not take the action it gates. ..."). A fully answered required call is unchanged, and non-required partial answers render exactly as before.Gap 2 — restart pass-through test
settleUnrestorablealready carriesrequiredonto the orphaned request, but nothing tested it. Added a resume test: a required call whose recorded arguments can no longer form a valid request (zero questions) is resumed and the delivered frame is asserted to contain the refusal and not "continue on best judgment". The test fails if the pass-through is removed (verified by mutation).Tests
test/suite/regressions/2966-ask-user-required-partial-gate.test.ts: RED before the fix (2 failed), GREEN after (4 passed).test/suite/ask-user-resume.test.ts: 16 passed; mutation check (pass-through removed) fails with the old "continue on best judgment" text.2949-required-question-gate, ask-user cancel suites): passed.bun run check(lint + fmt + tsc + gates): clean.Notes
changes/unreleased/<pr-number>.md, tracker + changelog blocks) to follow once the PR number is assigned.Summary by cubic
Fixes #2966. A required multi-question ask-user call that settles as
answeredorcomment-submittedwith some questions unanswered now refuses the gated action and names the unanswered questions, instead of reading as an ordinary partial answer with no instruction to hold the action. Fully answered required calls and non-required partial renderings are unchanged.Also handles the comment-only reply to a required question: it stays gated, keeps the user's comment in the rendering and in the model's
words, and its reason line says the question went unanswered instead of claiming a partial answer. A partial gated rendering now ends with a partial-specific closing line that names the still-gating question, rather than the contradictoryNo answer:line.formatBodyandformatGatedNoAnswerinpackages/coding-agent/src/core/extensions/builtin/ask-user/format.tsto gate required partial answers.changes/unreleased/6283.md.Written for commit c828731. Summary will update on new commits.