docs(release): the candidate checklist lowers the ratchets (#699 r1)

CODE-REVIEW-699-r1 M1: `node scripts/ratchets.mjs tighten` was named only
by the warning `release:prerelease` prints at publication, when the
candidate commit is already made. The candidate checklist in
docs/DEVELOPMENT.md now runs it after `npm run bundle:release`, so the
caps come from the fresh dist/ and land in the candidate commit.

- test/ratchets.test.mjs pins the step and its order.
- Mutant release-runbook-forgets-tighten.

Issue: #699
User-Visible: no
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd
This commit is contained in:
Claude
2026-09-28 22:39:36 +00:00
committed by claude[bot]
parent 258d1990c8
commit 6a8658cab9
3 changed files with 23 additions and 1 deletions
+4 -1
View File
@@ -528,7 +528,10 @@ above); the dev stand takes the head of `dev` from the `dev-build` branch
Prepare the candidate as usual: synchronize every version field, add dated RU
and EN changelog sections, update the production bundle snapshots with
`npm run bundle:release` (since #657 the only commit that may change them; it
carries the `Release:` trailer) and write the
carries the `Release:` trailer), then lower the ratchets to the candidate's
facts with `node scripts/ratchets.mjs tighten` (#699: it rewrites the core line
caps, the gzip graph ceilings and `scripts/monolith-baseline.json` from the
fresh `dist/`; commit them with the candidate) and write the
short bilingual body in `docs/RELEASE-NOTES.md`. That file is the one current
instance of the canonical `## Основное` / `## Highlights` template; its two
changelog links must be pinned to the new tag.
+11
View File
@@ -10448,6 +10448,17 @@ const MUTANT_DEFINITIONS = [
replace: '',
}],
},
{
id: 'release-runbook-forgets-tighten',
guard: 'node --test --test-name-pattern="#699 r1 M1" test/ratchets.test.mjs',
because: '#699 r1 M1: the second side of the ratchet lives in the candidate checklist; a warning '
+ 'at publication time comes after the candidate commit and is ignored systematically',
patches: [{
file: 'docs/DEVELOPMENT.md',
find: 'facts with `node scripts/ratchets.mjs tighten` (#699',
replace: 'facts with `node scripts/ratchets.mjs report` (#699',
}],
},
{
id: 'monolith-delegates-return-only',
guard: 'node --test --test-name-pattern="#624 делегаты" test/monolith-metrics.test.mjs',
+8
View File
@@ -65,3 +65,11 @@ test('#699 публикация беты напоминает о храпови
assert.match(main, /'scripts\/ratchets\.mjs', 'report', '--warn'/);
assert.match(main, /'scripts\/ratchets\.mjs', 'report', '--warn'\], \{ allowFailure: true, inherit: true \}\)/);
});
test('#699 r1 M1: runbook беты опускает храповики при подготовке кандидата, до публикации', () => {
const runbook = read('docs/DEVELOPMENT.md');
const prepare = runbook.slice(runbook.indexOf('Prepare the candidate as usual'), runbook.indexOf('npm run release:prerelease --'));
assert.ok(prepare.length > 0, 'раздел подготовки кандидата найден');
assert.match(prepare, /`npm run bundle:release`[\s\S]*`node scripts\/ratchets\.mjs tighten`/, 'tighten — после свежего dist/');
assert.match(prepare, /commit them with the candidate/);
});