fix(rectification): hold time cards until an offer turn
Independent Staging Quality Gate / validate (push) Successful in 11m37s
Independent Staging Quality Gate / publish (push) Failing after 9m4s

Keep collecting while a method follow-up can still distinguish candidates, and show adoption cards only after offer-candidates. Align the natal house snapshot with the agent text column.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-20 00:50:40 +08:00
co-authored by Cursor
parent 4d872c68b2
commit a732ff4b58
19 changed files with 167 additions and 51 deletions
@@ -168,6 +168,30 @@ test("user-stop action explains the window when follow-up remains but the user s
assert.doesNotMatch(JSON.stringify(plan), FORBIDDEN_LABELS);
});
test("selectionAllowed with remaining method follow-up keeps collecting and only adopts on stop", () => {
const plan = buildMethodFollowupPlan({
evidence: [{
status: "confirmed",
domain: "education",
datePrecision: "month",
occurredFrom: "2016-06-01",
occurredTo: null,
}],
});
const action = buildNextUserAction({
scorableCount: 3,
evidenceCount: 3,
hasLatestResult: true,
selectionAllowed: true,
sessionOutcome: "collect_evidence",
nextFollowup: plan.next_followup,
workingTime: "05:07",
});
assert.equal(plan.next_followup?.method_id, "d9_relationship");
assert.equal(action.id, "ask_method_followup");
assert.equal(action.on_user_stop.id, "adopt_representative");
});
test("adopt_representative defers method follow-up instead of asking this turn", () => {
const plan = buildMethodFollowupPlan({
evidence: [{
@@ -311,19 +335,19 @@ test("read-case follows method plan and hides D9/D10 labels even when SQL missin
}>;
}).execute({ caseId: CASE_ID });
assert.deepEqual(projection.conversation_summary.missing_evidence_categories, ["relocation", "health", "finance"]);
assert.equal(projection.method_followup_plan.next_followup, null);
assert.equal(projection.method_followup_plan.deferred_followup?.method_id, "d9_relationship");
assert.equal(projection.method_followup_plan.deferred_followup?.domain, "relationship");
assert.equal(projection.method_followup_plan.session_outcome, "adopt_representative");
assert.equal(projection.method_followup_plan.next_followup?.method_id, "d9_relationship");
assert.equal(projection.method_followup_plan.next_followup?.domain, "relationship");
assert.equal(projection.method_followup_plan.deferred_followup, null);
assert.equal(projection.method_followup_plan.session_outcome, "collect_evidence");
assert.equal(
(projection as { next_user_action?: { id?: string; on_user_stop?: { id?: string } } }).next_user_action?.id,
"adopt_representative",
"ask_method_followup",
);
assert.equal(
(projection as { next_user_action?: { on_user_stop?: { id?: string } } }).next_user_action?.on_user_stop?.id,
"adopt_representative",
);
assert.equal(projection.latest_result.session_outcome.kind, "adopt_representative");
assert.equal(projection.latest_result.session_outcome.kind, "collect_evidence");
assert.equal(projection.internal_observations.find((item) => item.layer === "d9")?.ask_theme, "relationship_style");
assert.equal(projection.latest_result.confirmation_allowed, false);
assert.ok(projection.latest_result.indistinguishable_width_minutes >= 25);