From 57a4a0ed69d01f0e1bf710f44f287cdc32c1e8fd Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 6 Sep 2026 15:17:52 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20SHA=20=D0=BE=D1=82=D1=87=D1=91=D1=82?= =?UTF-8?q?=D0=B0=20mutation-gate=20=E2=80=94=20=D0=BE=D1=82=20=D1=87?= =?UTF-8?q?=D0=B5=D0=BA=D0=B0=D1=83=D1=82=D0=B0=20dev,=20=D0=BD=D0=B5=20gi?= =?UTF-8?q?thub.sha=20(#472=20r1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: #472 User-Visible: no --- .github/workflows/mutation-gate.yml | 5 ++++- test/mutation-gate.test.mjs | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mutation-gate.yml b/.github/workflows/mutation-gate.yml index b8e9caf8..984bf18a 100644 --- a/.github/workflows/mutation-gate.yml +++ b/.github/workflows/mutation-gate.yml @@ -142,8 +142,11 @@ jobs: id: report env: RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - SHA: ${{ github.sha }} run: | + # SHA — того дерева, которое чекаутили и гоняли (dev), а не + # github.sha: для расписания это вершина default-ветки main, и отчёт + # называл бы «dev @ » (ревью r1). Образец — process.yml. + SHA=$(git rev-parse HEAD) mkdir -p artifacts node scripts/mutation-gate-report.mjs \ --logs=artifacts/mutation-logs --shards=4 \ diff --git a/test/mutation-gate.test.mjs b/test/mutation-gate.test.mjs index d83b2139..2bd5069c 100644 --- a/test/mutation-gate.test.mjs +++ b/test/mutation-gate.test.mjs @@ -250,6 +250,14 @@ test('#472 AC5: job report — только по расписанию, толь assert.match(report, /node scripts\/mutation-gate-report\.mjs/); }); +test('#472 r1: SHA отчёта — от чекаута dev, а не github.sha (вершина main у расписания)', () => { + const report = mutationWorkflow.slice(mutationWorkflow.indexOf('\n report:\n')); + assert.match(report, /ref: dev/); + assert.match(report, /SHA=\$\(git rev-parse HEAD\)/); + assert.ok(!report.includes('${{ github.sha }}'), 'github.sha у schedule указывает на main, не на проверенный dev'); + assert.match(report, /--ref=dev --sha="\$SHA"/); +}); + test('#472 AC6: повторный отказ дописывает открытое issue, а не создаёт второе', () => { const report = mutationWorkflow.slice(mutationWorkflow.indexOf(' report:')); const search = report.indexOf('gh issue list');