Repository navigation
fix(fusion): reject incomplete adviser drafts - #1036
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesRequire completed, non-refused, non-tool-calling adviser responses before including their text in Fusion synthesis. Example: local/rejected returns "discarded draft" with finish_reason="length" and usage totaling 10 tokens.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: current main still accepts incomplete adviser text, and this maintainer-authored PR provides a focused correction with no introduced code defect found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherFusion receives an explicitly selected chat request, invokes bounded advisers through normal proxy controls, and passes accepted drafts to the configured synthesizer. flowchart LR
A[Chat request] --> B[Fusion dispatch]
B --> C[Adviser proxy calls]
C --> D[Bounded response reader]
D --> E[Completion validation]
E --> F[Synthesizer]
C --> G[Usage accounting]
F --> G
F --> H[Client response]
Technical reviewBest possible solution: Keep completion validation in the existing parser after full bounded response consumption, preserving fail-open synthesis and normal accounting. Do we have a high-confidence way to reproduce the issue? Current-main source directly accepts nonempty first-choice text with finish_reason="length"; the submitted regressions exercise that input, but this review executed no target code. Is this the best way to solve the issue? This is the smallest complete correction for the stated completion-metadata defect and preserves the existing response reader, proposal assembly, and accounting owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ee1626510f59. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 13, 2026, 11:45 AM ET / 16:45 UTC. |
Fusion accepted text from truncated, filtered, or tool-calling adviser responses as draft evidence. Require the first Chat choice to finish with
stopand contain no refusal or tool call before including its text in synthesis. Fully consume each response so rejected advice retains normal usage accounting; completed advisers and aggregator-only fallback still work.Validation:
Deployment: not deployed. Nonconforming upstreams that omit
finish_reasonnow count as failed advisers. This is a correctness fix, not a benchmark claim of better answer quality.Follow-up validation: corrected the local Worker smoke fixture to return
finish_reason: "stop". The end-to-end local Worker smoke passes with Docker-backed containers disabled in the disposable validation environment; hosted CI checks the full configuration.