fix(rectification): feed cluster span into confirmation-gate refresh paths
Independent Staging Quality Gate / validate (push) Failing after 9m55s
Independent Staging Quality Gate / publish (push) Has been skipped

Representative minutes still undercounted width on dossier refresh and parsed snapshots even after the engine used cluster coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-10 17:51:07 +08:00
co-authored by Cursor
parent a998b6ec53
commit a1db6fe550
7 changed files with 69 additions and 5 deletions
@@ -96,6 +96,10 @@ export type DecisionDossier = Readonly<{
relativeSupport?: number;
posterior_score?: number;
tiedMinuteCount?: number;
clusterStart?: string;
clusterEnd?: string;
cluster_start?: string;
cluster_end?: string;
}>[];
representativeTime?: string | null;
evidenceLedgerFingerprint?: string | null;
@@ -667,6 +671,12 @@ export function decideFromDossier(
time: candidate.time,
rank: candidate.rank ?? Number.MAX_SAFE_INTEGER,
tiedMinuteCount: candidate.tiedMinuteCount ?? Number.MAX_SAFE_INTEGER,
...(candidate.clusterStart ?? candidate.cluster_start
? { clusterStart: candidate.clusterStart ?? candidate.cluster_start }
: {}),
...(candidate.clusterEnd ?? candidate.cluster_end
? { clusterEnd: candidate.clusterEnd ?? candidate.cluster_end }
: {}),
})),
decisionReceipt: latest?.decisionReceipt ?? null,
});
@@ -115,7 +115,6 @@ import {
isEventQualityProbe,
sameYearProbeAsked,
SEMANTIC_YEAR_KEY,
EXISTENCE_STYLE_OPTIONS,
type DroppedProbe,
type ProbeStyleOption,
} from "./probe-question-contract.ts";
@@ -44,6 +44,8 @@ export type RectificationCandidate = Readonly<{
time: string;
relativeSupport: number;
tiedMinuteCount: number;
clusterStart?: string;
clusterEnd?: string;
}>;
export type RectificationHouseRow = Readonly<{
@@ -329,7 +331,17 @@ export function parseRectificationCandidateResult(value: unknown): Rectification
|| relativeSupport === null || !Number.isInteger(relativeSupport) || relativeSupport < 0 || relativeSupport > 100
|| tiedMinuteCount === null || !Number.isInteger(tiedMinuteCount) || tiedMinuteCount < 1
) return null;
candidates.push({ candidateId, rank, time: candidateTime, relativeSupport, tiedMinuteCount });
const clusterStart = time(candidate.clusterStart ?? candidate.cluster_start);
const clusterEnd = time(candidate.clusterEnd ?? candidate.cluster_end);
candidates.push({
candidateId,
rank,
time: candidateTime,
relativeSupport,
tiedMinuteCount,
...(clusterStart ? { clusterStart } : {}),
...(clusterEnd ? { clusterEnd } : {}),
});
}
const receipt = receiptFromSnapshot(snapshot);