Repository navigation
build(sz): raise every core cap by 10 lines, and re-ratchet the baseline - #771
Merged
Merged
Conversation
Merging #156 put `core/didkey.py` at 59 code lines against a cap of 57, so `sz.py --check` fails on `main`: once for growth past the ratchet, and once for the cap itself. Rather than shave the two lines back off a fix that reads well as written, this raises each policy ceiling by 10 and regenerates the ratchet from the tree with `sz.py --update-baseline`. Four of the five core files had 0-1 lines of headroom before this, which is the condition #656 reports: ordinary changes were failing as cap breaches rather than as ratchet growth, and the cap stops being a decision anyone makes deliberately. Caps are policy, so they move only by hand: core/app.py 1020 -> 1030 core/limit.py 183 -> 193 core/config.py 63 -> 73 core/store.py 1000 -> 1010 core/didkey.py 57 -> 67 core_total 3000 -> 3010 The `files` block is measurement, not policy: `--update-baseline` refreshes it from the tree and carries the caps forward untouched. It also absorbs drift already on `main` from earlier merges — `core/app.py` comment lines, and `core/store.py` down 994 -> 992, which the ratchet allows since it only moves down. Nothing outside `sz-baseline.json` changes; no core code is touched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013sbowG1MTBENc8kd9tJknM
|
Open pull requests citing the same issues:
If one already covers this change, review or build on it instead of racing it (CONTRIBUTING.md "Overlapping work"). |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 9, 2026
5 of 6 tasks
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Raises each per-file core cap in
sz-baseline.jsonby 10 lines, and regenerates the ratchet withsz.py --update-baseline. Onlysz-baseline.jsonchanges — no core code is touched, and nothing a caller of the service or the MCP wrapper sees changes.Why
mainis currently red. Merging #156 (e7675dc) putcore/didkey.pyat 59 code lines against a cap of 57, sosz.py --checkfails twice over — for growth past the ratchet, and for the cap itself:The alternative was shaving two lines back off #156, which is the wrong trade: the leading-zero fix reads well as written, and CONTRIBUTING is explicit that a low line count is a constraint rather than a score.
Headroom before this was 1, 0, -2, 0 and 8 lines across the five core files, which is the condition #656 reports — ordinary changes were failing as cap breaches rather than as ratchet growth, so the ceiling stopped being a decision anyone made deliberately. 10 lines each restores that without moving
core_totalfar (694 lines of headroom remain).Caps are policy and were edited by hand; the
filesblock is measurement and comes from--update-baseline, which carries caps forward untouched. That regeneration also absorbs drift already onmainfrom earlier merges:core/app.pycomment lines, andcore/store.pydown 994 -> 992, which the ratchet permits since it only moves down.This is the maintainer-side half of the
sz-baseline.jsonrule in CONTRIBUTING, so it deliberately does not come from a fork.Checks
uv run coverage run -m pytest tests -q && uv run coverage report— 750 passed, 1 skipped; 97.97% totaluv run ruff check . && uv run ruff format --check .anduv run ty check— all cleanuv run sz.py --checkanduv run sz.py --capsboth exit 0 with this applied.🤖 Generated with Claude Code
https://claude.ai/code/session_013sbowG1MTBENc8kd9tJknM
Generated by Claude Code