From 73b0cfff5b9cd766ca6573b3a608641c61a0c434 Mon Sep 17 00:00:00 2001 From: Matysh Date: Fri, 2 Oct 2026 10:49:59 +0300 Subject: [PATCH] =?UTF-8?q?test(process):=20=D0=BF=D0=BE=D0=B9=D0=BC=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BE=D0=B6=D0=B8=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=BE=D1=88=D0=BB=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=B0=20(#781)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: #781 User-Visible: no --- test/process-pending-round.test.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/process-pending-round.test.mjs b/test/process-pending-round.test.mjs index f1903d5d..685900e7 100644 --- a/test/process-pending-round.test.mjs +++ b/test/process-pending-round.test.mjs @@ -2,7 +2,9 @@ // witnesses, not a claim about GitHub's unsaved historical API responses. import test from 'node:test'; import assert from 'node:assert/strict'; -import { decideReconciliation, pendingEvidenceError, processRuns } from '../scripts/process-reconcile.mjs'; +import { + decideReconciliation, pendingEvidenceError, processRuns, reviewRunsForRequest, +} from '../scripts/process-reconcile.mjs'; import { decideResume, resume } from '../scripts/process-resume.mjs'; const LABEL = 'S7-code-review'; @@ -159,6 +161,8 @@ test('#775 reconciler uses the same request boundary, skipped-run handling and s assert.equal(decideReconciliation({ ...base, runs: [skipped, ready] }).action, 'retry'); assert.equal(decideReconciliation({ ...base, runs: [{ ...ready, resultArtifact: true }] }).action, 'escalate'); const justReapplied = { ...f.request, at: '2026-10-01T14:32:06Z' }; + assert.deepEqual(reviewRunsForRequest([ready], f.issue, justReapplied), [], + 'a run one second before the new label belongs only to the previous request'); assert.equal(decideReconciliation({ ...base, request: justReapplied, now: Date.parse(justReapplied.at), runs: [ready] }).action, 'wait', 'previous run one second before the new label cannot be recovered as the new request'); assert.equal(pendingEvidenceError(f.pending, { issue: f.issue, run: f.run }), null);