fix(rectification): show question stems and unblock adopt after occupation
Independent Staging Quality Gate / validate (push) Successful in 13m40s
Independent Staging Quality Gate / publish (push) Successful in 9m59s

Choice legends and spoken collect prompts were hidden after BUG-461, and occupation still blocked canAdopt once dated coverage was done. Restore visible stems and stop polling extra collects when adopt is allowed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-02 11:09:56 +08:00
co-authored by Cursor
parent 058e5db9b5
commit 1a3e14e726
17 changed files with 272 additions and 164 deletions
@@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
import { buildMethodFollowupPlan, buildNextUserAction, conversationalSessionOutcome, isOfferBlockingFollowup, spokenFollowupForUser } from "../src/lib/rectification-agentic/v9/method-followup.ts";
import { buildMethodFollowupPlan, buildNextUserAction, conversationalSessionOutcome, isOfferBlockingFollowup, spokenFollowupForUser, blockingMethodsCovered } from "../src/lib/rectification-agentic/v9/method-followup.ts";
import { trainingScoreableGate } from "../src/lib/rectification-agentic/v9/evidence-model.ts";
import {
mentionedVargaKeysFromLedgerEvidence,
@@ -1830,7 +1830,7 @@ test("d9_refine after relationship still asks uncovered career first", () => {
}), "collect_evidence");
});
test("career evidence does not cover occupation; occupation still blocks until asked", () => {
test("career evidence does not cover occupation method; occupation no longer blocks adopt", () => {
const plan = buildMethodFollowupPlan({
evidence: [
{ status: "confirmed", domain: "education", datePrecision: "year", occurredFrom: "2016-01-01", occurredTo: null },
@@ -1841,13 +1841,19 @@ test("career evidence does not cover occupation; occupation still blocks until a
});
assert.equal(plan.next_followup?.method_id, "occupation");
assert.equal(plan.methods.find((item) => item.method_id === "occupation")?.status, "uncovered");
assert.equal(blockingMethodsCovered(plan.methods), true);
assert.equal(conversationalSessionOutcome({
selectionAllowed: true,
proposeAllowed: true,
confirmationAllowed: false,
nextFollowup: plan.next_followup,
methods: plan.methods,
}), "collect_evidence");
candidateScores: [
{ time: "05:00", score: 34 },
{ time: "05:01", score: 33 },
{ time: "05:02", score: 33 },
],
}), "adopt_representative");
});
test("draft occupation_note without a date covers occupation and does not adopt a tie", () => {