Repository navigation
Kiro: drop the private final answer when a real tool call shares the turn - #7434
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 47 seconds. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. Automatic draft conversion failed. Please convert this pull request to a draft manually until every box above is ticked. Hygiene✅ Deterministic PR hygiene checks passed. |
|
Follow-up intake at |
|
Triage note (2026-10-24, against Needs fixes before this can land: shard the new test registration; supply Summary/Verification/Checklist and current readiness evidence; obtain successful executable CI. Still needed on dev: yes. Both mixed-call orders remain protocol errors ( Exact-head CI at triage time: Please refresh onto current |
…turn Rebased onto current dev as one commit (lidge-jun#7434); the new test is registered in the providers layout shard instead of layout.json. Co-authored-by: hedging8563 <45883076+hedging8563@users.noreply.github.com>
7cbdc79 to
7c3b5af
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Maintainer integration into
Thank you @hedging8563. |
Summary
Problem: The model can send a real tool call and the private final-answer call in one turn. The parser treated both orders as a protocol error; the client got a non-retryable 502 and a combo cannot fall back once a tool event is out.
Fix: The turn continues through the real tools. The parser drops the completion call, ends the turn with endTurn false and logs "[kiro] dropped the private final-answer call". The answer is held until the stream ends and never relayed. Completion first then real tool: only ordinary prose is released as commentary. A second completion, a completion while explicit completion is disabled, and a malformed completion stay errors.
Verification
Author: new
tests/providers/kiro/kiro-completion-with-real-tools.test.ts(17 cases, 10 fail without the change); kiro-stream test updated. tsc --noEmit clean; tests/providers/kiro (665 pass, 0 fail); test-layout 27 pass.Maintainer carry (2026-10-28): the branch was rebased onto current
devas one commit (7c3b5af21, authorship kept, Co-authored-by trailer) and the new test registration moved fromscripts/test-layout/layout.jsoninto thelayout-providers.jsonshard, as the 2026-10-24 triage asked. On that head with Bun 1.4.4:kiro-completion-with-real-tools,kiro-stream,kiro-single-final, file-size ratchet and both layout guards: 183 pass / 0 fail;bun run typecheckandbun run structure:checkpass. NOT RUN locally: fullbun run test(left to PR CI).Checklist
structure/providers/kiro.md).Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.