ci: SHA отчёта mutation-gate — от чекаута dev, не github.sha (#472 r1)

Issue: #472
User-Visible: no
This commit is contained in:
Codex
2026-09-06 15:29:50 +03:00
parent d77d1953c7
commit 57a4a0ed69
2 changed files with 12 additions and 1 deletions
+4 -1
View File
@@ -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 @ <SHA main>» (ревью r1). Образец — process.yml.
SHA=$(git rev-parse HEAD)
mkdir -p artifacts
node scripts/mutation-gate-report.mjs \
--logs=artifacts/mutation-logs --shards=4 \
+8
View File
@@ -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');