fix(rectification): keep spoken collect from silencing the agent
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user