ci: считать раунды ревью по опубликованным документам

User-Visible: no
Issue: #454
This commit is contained in:
Codex
2026-09-04 16:58:31 +00:00
committed by claude[bot]
parent cc9387163e
commit 8d8263202f
4 changed files with 477 additions and 1 deletions
+35
View File
@@ -2439,6 +2439,41 @@ const MUTANT_DEFINITIONS = [
replace: ' if (true) return null;',
}],
},
{
id: 'review-round-counts-files-not-max',
guard: 'node --test --test-name-pattern="от максимума номеров" test/review-doc-guard.test.mjs',
because: 'counting how many round documents exist instead of taking the highest number '
+ 'hands out an occupied file name whenever the numbering has a hole — and a hole is '
+ 'exactly what the collision this fixes leaves behind (#454)',
patches: [{
file: 'scripts/review-doc-guard.mjs',
find: ' return known.length ? Math.max(...known) + 1 : 1;',
replace: ' return known.length + 1;',
}],
},
{
id: 'review-round-drops-file-source',
guard: 'node --test --test-name-pattern="прожитая уже с исправлением|момент коллизии" '
+ 'test/review-doc-guard.test.mjs',
because: 'without the published documents the counter is back to reading prose, and a '
+ 'verdict that never named its file silently reuses the round number (#454, #449)',
patches: [{
file: 'scripts/review-doc-guard.mjs',
find: ' const attemptFiles = attemptFromRounds(rounds);',
replace: ' const attemptFiles = 1;',
}],
},
{
id: 'review-round-drops-comment-insurance',
guard: 'node --test --test-name-pattern="отказ публикации" test/review-doc-guard.test.mjs',
because: 'the publish step can fail after the verdict is already posted; trusting only '
+ 'the documents then loses a spent cycle and hands out a used round number (#454)',
patches: [{
file: 'scripts/review-doc-guard.mjs',
find: ' attempt: Math.max(attemptFiles, attemptComments),',
replace: ' attempt: attemptFiles,',
}],
},
{
id: 'review-doc-guard-matches-by-substring',
guard: 'node --test --test-name-pattern="соседний каталог" test/review-doc-guard.test.mjs',