@sanity/ailf 7.3.0 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1479,9 +1479,15 @@ export async function calculateAndWriteScores(options) {
|
|
|
1479
1479
|
logger: log,
|
|
1480
1480
|
});
|
|
1481
1481
|
// Mutate-in-place so subsequent steps (validateGraderJudgmentsCalibration,
|
|
1482
|
-
// persist) see the consensus-merged scores.
|
|
1482
|
+
// persist) see the consensus-merged scores. Snapshot first: the runner's
|
|
1483
|
+
// no-borderline fast path returns the SAME array reference it received,
|
|
1484
|
+
// so `regraded` may alias `judgments`. Truncating `judgments` would then
|
|
1485
|
+
// empty `regraded` before the spread reads it, silently wiping every
|
|
1486
|
+
// judgment (extract N, persist 0) — the divergence the post-persist guard
|
|
1487
|
+
// aborts on. Copying breaks the alias regardless of what the runner returns.
|
|
1488
|
+
const merged = [...regraded];
|
|
1483
1489
|
judgments.length = 0;
|
|
1484
|
-
judgments.push(...
|
|
1490
|
+
judgments.push(...merged);
|
|
1485
1491
|
if (consistencyByJudgment.size > 0) {
|
|
1486
1492
|
log.info(`Borderline consensus merged ${consistencyByJudgment.size} judgment(s)`);
|
|
1487
1493
|
}
|