fix(rectification): deliver range cards on tied first place instead of falling back to collect (BUG-680/681/682)
Independent Staging Quality Gate / validate (push) Successful in 17m18s
Independent Staging Quality Gate / publish (push) Successful in 13m52s

Refresh persist failures no longer count as attempts. tied_first completes with a range before stillNeedNarrowing. Delivery narration and cards share DELIVERY_OUTCOMES. The question gap gets a delivered terminal so the unavailable copy does not appear after a range is given.
This commit is contained in:
jesse-ux
2026-09-14 15:41:04 +08:00
parent e59ef9fbfd
commit d5a8db0a4e
16 changed files with 644 additions and 9 deletions
@@ -22,6 +22,7 @@ import { MIN_SEPARATION_LEAD } from "./rectification-agentic/core/candidate-sepa
import {
engineCapabilityCeilingFromReceipt,
sessionOutcomeAllowsAdopt,
sessionOutcomeAllowsDelivery,
type DecisionSessionOutcome,
} from "./rectification-agentic/core/rectification-decision";
import {
@@ -426,8 +427,11 @@ export function canRenderRectificationSelectionCards(
export function canShowRectificationSelectionCards(
result: RectificationCandidateResult | null,
): boolean {
return canRenderRectificationSelectionCards(result)
&& sessionOutcomeAllowsAdopt(result?.sessionOutcome);
if (!result || !sessionOutcomeAllowsDelivery(result.sessionOutcome)) return false;
if (sessionOutcomeAllowsAdopt(result.sessionOutcome)) {
return canRenderRectificationSelectionCards(result);
}
return result.selectionAllowed === true;
}
export function canShowRectificationReadonlyRange(
@@ -435,6 +439,9 @@ export function canShowRectificationReadonlyRange(
): boolean {
if (!result?.credibleRange) return false;
const outcome = result.sessionOutcome;
if (sessionOutcomeAllowsDelivery(outcome)) {
return result.selectionAllowed !== true;
}
return outcome === "collect_evidence" || outcome === "discriminate_candidates";
}