fix(rectification): keep spoken collect from silencing the agent
Independent Staging Quality Gate / validate (push) Successful in 22m22s
Independent Staging Quality Gate / publish (push) Successful in 10m14s

Collect focus was leaking discriminator probes into the agent prompt and
inheriting choice identity. Mark spoken questions, hide current_probe
unless a real choice card exists, strip fallback identity, log persist
failures, and align the decision probe with the plan including birthDate.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-29 11:47:57 +08:00
co-authored by Cursor
parent a50c62a66c
commit 57e5f92d40
12 changed files with 337 additions and 35 deletions
@@ -386,19 +386,19 @@ export async function POST(request: Request) {
return completedMessageResponse(applied.narration, requestId, caseId);
}
} else {
const decision = decideFromDossier(dossier);
let birthDate: string | null = null;
try {
const compute = await loadV9CaseCompute(accounting, userId, caseId);
birthDate = String(compute.baselineBirthSnapshot.birth_date ?? "") || null;
} catch {
// Ranking stays fail-open when compute is unavailable.
}
const decision = decideFromDossier(dossier, { birthDate });
if (decision.nextAction === "ask_candidate_discriminator") {
const catalog = rectificationFollowupCatalog(
dossier.latestResult,
dossier.evidence,
);
let birthDate: string | null = null;
try {
const compute = await loadV9CaseCompute(accounting, userId, caseId);
birthDate = String(compute.baselineBirthSnapshot.birth_date ?? "") || null;
} catch {
// Ranking stays fail-open when compute is unavailable.
}
const plan = buildMethodFollowupPlan({
evidence: dossier.evidence,
declinedTopics: dossier.conversationSummary.declinedSkippedTopics,
@@ -588,8 +588,16 @@ export async function POST(request: Request) {
let decision;
try {
const dossier = await loadV9CaseDossier(accounting as never, userId, caseId);
let birthDate: string | null = null;
try {
const compute = await loadV9CaseCompute(accounting as never, userId, caseId);
birthDate = String(compute.baselineBirthSnapshot.birth_date ?? "") || null;
} catch {
// Ranking stays fail-open when compute is unavailable.
}
decision = decideFromDossier(dossier, {
currentEvidenceFingerprint: evidenceLedgerFingerprint(dossier.evidence),
birthDate,
});
} catch {
decision = undefined;