Skip to content

size-ratchet: exempt generated skill INDEX.md from the raise-line requirement - #1969

Merged
remigiusz-antczak merged 2 commits into
mainfrom
fix/ratchet-generated-index
Oct 23, 2026
Merged

remigiusz-antczak merged 2 commits into
mainfrom
fix/ratchet-generated-index

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Stops the size ratchet from failing every lane PR on generated INDEX.md growth.

Each skill's INDEX.md is generated by scripts/skill_index.py from the skill's reference files, and CI regenerates it (regen-unlanded.sh). Lanes never commit it, per the lane contract. The ratchet still demanded a size-budget-raise: line whenever an INDEX.md grew, so any PR that added or grew a reference failed. #1960 and #1961 failed this way.

  • scripts/ci-gates.sh (cmd_size_ratchet): rows for the files scripts/skill_index.py generates (.claude/skills/INDEX.md, <skill>/INDEX.md, <skill>/INDEX-scripts.md, exact depth) skip the raise-line check. This moves the obligation and does not weaken it: the reference files that drive INDEX.md growth are still ratcheted. Their budget rows may rise freely; the silent row-deletion check still applies, and hand-written files such as docs/INDEX.md still need a raise line.
  • On a missing raise line, the failure message now prints the exact line to paste into changelog.d/<slug>.md.
  • scripts/test-ci-gates.sh: 3 self-tests. Generated INDEX.md growth with no raise line passes; NOTES.md and docs/INDEX.md growth with no raise line still fail.

Tests: 3/3 (new size-ratchet self-tests), run on the commit's own tree.

🤖 Generated with Claude Code

https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z

Remigiusz Antczak and others added 2 commits October 24, 2026 00:06
…uirement

Lanes never commit INDEX.md and CI regenerates it from reference files that
are ratcheted themselves, so every PR adding or growing a reference failed on
the derived index. size-ratchet now skips the raise-line check only for the
files scripts/skill_index.py generates (.claude/skills/INDEX.md,
<skill>/INDEX.md, <skill>/INDEX-scripts.md, exact depth); hand-written
INDEX.md files such as docs/INDEX.md still need the marker, as does every other
file, and the silent row-deletion check is unchanged. The RATCHET FAIL message
now prints the exact size-budget-raise line to paste into changelog.d/<slug>.md.
Three self-tests cover generated INDEX.md growth passing and non-generated
growth (NOTES.md, docs/INDEX.md) still failing.

Tests: 3/3 new size-ratchet self-tests pass; 7 unrelated dcr-gates opt-in cases FAIL in this sandbox (network/git denied), not touched by this change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z
@remigiusz-antczak
remigiusz-antczak merged commit 4d55571 into main Oct 23, 2026
1 check passed
@remigiusz-antczak
remigiusz-antczak deleted the fix/ratchet-generated-index branch October 23, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant