ci(limits): enforce numeric inventory drift on documentation changes (#12881)

* ci(limits): enforce numeric inventory drift on documentation changes

* fix(ci): invalidate cached lint when limits inventory changes
This commit is contained in:
morluto authored and GitHub committed 2026-11-20 16:33:27 +00:00
1 parent c2c8ad3d70
commit aaf151f5d6
3 files changed
+5 -18

No files matched your search

+4
View File
@@ -1149,6 +1149,10 @@ jobs:
- run: npm ci
- name: Reuse portable build outputs across runs
uses: ./.github/actions/portable-build-cache
# Code changes already run this verifier through the required lint lane.
- name: Check documented numeric limits
if: needs.changes.outputs.code != 'true'
run: node scripts/verify/rea-numeric-limits.mjs
- run: npm run docs:check
- name: Verify published routes, source links and local anchors
run: npm run verify:docs:routes
@@ -1,10 +1,8 @@
import { expect, it } from "vitest";
import { readFile } from "node:fs/promises";
import {
compareDocumentedNumericLimits,
discoverNumericLimitUses,
documentedLimitCell,
loadExportedNumericLimitBounds,
parseDocumentedNumericLimits,
parseNumericLimitRegistry,
parseRuntimeSettingEnvironments,
@@ -639,19 +637,3 @@ it("names a documented limit the code does not export", () => {
'REA_FIXED: documented Restart-only numeric limits default "30", floor "30", maximum "30", but code exports no bound',
]);
});
it("matches the inventory to the exported analysis settings and owner bounds", async () => {
const inventory = await readFile(
new URL("../../docs/reference/rea-limit-inventory.md", import.meta.url),
"utf8",
);
const exported = await loadExportedNumericLimitBounds();
expect(exported.failures).toEqual([]);
expect(
compareDocumentedNumericLimits(
parseDocumentedNumericLimits(inventory),
exported.bounds,
exported.names,
),
).toEqual([]);
});
+1
View File
@@ -86,6 +86,7 @@
"src/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",
"tests/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",
"docs/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",
"docs/reference/rea-limit-inventory.md",
".github/actions/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",
"website/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",
"src/**/*.{json,md,py,yaml,yml}",