fix(rectification): drop duplicate collect cards and false run_failed
Independent Staging Quality Gate / validate (push) Successful in 10m23s
Independent Staging Quality Gate / publish (push) Failing after 8m59s

Spoken collect no longer renders a second visual prompt; choice legends stay screen-reader only and live cards share the assistant inset. Exhaustion collect avoids colliding with the opening question id, and a successful billed turn no longer surfaces run_failed after the exit gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-01 15:19:00 +08:00
co-authored by Cursor
parent e404b6f42b
commit 75fc456d7e
13 changed files with 365 additions and 72 deletions
@@ -716,12 +716,17 @@ export async function POST(request: Request) {
} else {
// Shared gate owns persistNextInterviewIfIdle then ensureNonTerminalTurnExit;
// The shared gate replaces the old message/opening-only cleanup.
await finalizeSuccessfulTurnExit({
accounting: accounting as never,
userId,
caseId,
action,
});
try {
await finalizeSuccessfulTurnExit({
accounting: accounting as never,
userId,
caseId,
action,
});
} catch (error) {
const code = error instanceof RectificationToolServiceError ? error.code : "run_failed";
console.warn(`[rectification-v9] turn exit after success case=${caseId} code=${code}`);
}
send({ type: "done", emitted: true });
}
} catch (error) {