From 65690d8cf10c3904d8c1477647fe1c8e7c716162 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Sat, 4 Jul 2026 14:27:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(doc-budgets):=20address=20Codex=20review=20?= =?UTF-8?q?=E2=80=94=20exact-freeze=20ceilings,=20list=20missing=20entries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The manifest now freezes each budgeted doc at its exact current wc -w count, matching the documented policy (a ceiling starts at the doc's current size); the headroom that contradicted the freeze claim is gone. Post-rewrite ratchets may still land at new-size-plus-headroom, per the skill's ratchet rule — that is a different moment than the initial freeze. - --list now renders MISS/BAD rows for missing files and malformed ceilings instead of silently dropping them (gate mode already failed correctly; the report mode no longer under-reports). --- scripts/doc-budgets.manifest.json | 12 ++++++------ scripts/verify-doc-budgets.ts | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/doc-budgets.manifest.json b/scripts/doc-budgets.manifest.json index 0f0e3b40bf..afcff11e2c 100644 --- a/scripts/doc-budgets.manifest.json +++ b/scripts/doc-budgets.manifest.json @@ -1,8 +1,8 @@ { - "AGENTS.md": 8200, - "docs/AGENTS.md": 1000, - "docs/architecture.md": 3950, - "examples/AGENTS.md": 600, - "packages/AGENTS.md": 600, - "packages/README.md": 1900 + "AGENTS.md": 8130, + "docs/AGENTS.md": 982, + "docs/architecture.md": 3897, + "examples/AGENTS.md": 579, + "packages/AGENTS.md": 577, + "packages/README.md": 1856 } diff --git a/scripts/verify-doc-budgets.ts b/scripts/verify-doc-budgets.ts index a64275e9fa..fb27e84473 100644 --- a/scripts/verify-doc-budgets.ts +++ b/scripts/verify-doc-budgets.ts @@ -46,11 +46,13 @@ const rows: string[] = [] for (const [path, ceiling] of Object.entries(manifest)) { if (!Number.isInteger(ceiling) || ceiling <= 0) { + rows.push(`BAD ${'—'.padStart(6)} / ${String(ceiling).padEnd(6)} ${path}`) failures.push(`${path}: ceiling must be a positive integer, got ${ceiling}`) continue } const abs = resolve(root, path) if (!existsSync(abs)) { + rows.push(`MISS ${'—'.padStart(6)} / ${String(ceiling).padEnd(6)} ${path}`) failures.push(`${path}: budgeted file does not exist (renamed or deleted? update scripts/doc-budgets.manifest.json in the same change)`) continue }