feat(quality): add anti-inert gate registry

This commit is contained in:
2026-08-01 09:58:46 -05:00
parent f4fd5967fc
commit 0b4aa4751a
18 changed files with 3247 additions and 3 deletions
+22
View File
@@ -0,0 +1,22 @@
import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
import test from 'node:test';
const root = process.cwd();
test('package.json exposes the canonical gate:verify command', async () => {
const packageJson = JSON.parse(await readFile(`${root}/package.json`, 'utf8'));
assert.equal(packageJson.scripts['gate:verify'], 'node scripts/gate-verify.mjs');
});
test('Woodpecker runs gate verification on every pipeline without a path filter', async () => {
const pipeline = await readFile(`${root}/.woodpecker/ci.yml`, 'utf8');
assert.match(pipeline, /\n gate-verify:\n/);
const step =
pipeline.match(/\n gate-verify:\n([\s\S]*?)(?=\n [a-z][a-z0-9-]+:|\nservices:)/)?.[1] ?? '';
assert.match(
step,
/commands:\n - \*enable_pnpm\n - apk add --no-cache bubblewrap\n - pnpm gate:verify\n/,
);
assert.doesNotMatch(step, /\bwhen:|\bpath:/);
});