Repository navigation
fix(guards): ratchet the docstring-restatement reach floor to its measured population (#17517) - #17520
Conversation
…sured population (#17517)
|
Warning Review limit reachedNext included review available in 27 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: mrveiss/AutoBot-AI/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
Thinking Path
Two unrelated PRs (#17505, #17502) went red on the same two shards immediately after their authors cleared every review thread. Same shards, same test, different work — that is a shared-cause signature, so I measured before anyone started debugging their own branch.
Measured on
origin/main(9ea37f7cb3) with the CI-parity interpreter:mainpasses with exactly zero headroom. Any branch adding one public function, method or class reaches 24,001 and fails. Neither PR was defective; they were the first two to arrive after the population saturated the guard.The declaration's own note at
:74-78anticipates this maintenance — "re-measure and ratchet down perRATCHET_BASELINES.mdif it is ever found loose". It has been found tight, which is the same re-measurement in the other direction.What Changed
repo_tests/docstring_restatement_guard_17165_test.py—floorratcheted23_000 → 24_000, the measured live population, withgrowth=1_000unchanged so the working margin is restored.Raising a floor tightens this guard: it asserts the sweep reaches at least this many symbols, so a future regression that silently narrows discovery still trips. This is the correct ratchet direction and is not a relaxation.
Verification
len(_public_symbols(REPO_ROOT))on9ea37f7cb3= 24000._public_symbolsis AST-based overtracked_paths(root, "*.py"), so the count is of the tree, not of an import graph.6 passed, 1 warning in 13.84s.~/.venv-python-suite, Python 3.14.6 / pytest 9.1.1), not the shell default 3.10.12 — that distinction cost a day elsewhere (bug(hooks): pre-push announces a 132s pytest budget and enforces 200s — the printed value is the vitest one #17409).Single-issue rationale
A ratchet baseline is a hub file, explicitly exempt from the same-file batching rule, and it shares no reviewer surface with any open PR. It also must land alone and first: #17505 and #17502 are both blocked behind it and rebase onto it.
Follow-up left open, deliberately
#17517's third acceptance criterion is not addressed here: the guard's only symptom of saturation was an unrelated PR turning red. There was no signal at margin 0 — no warning, no headroom in the pass output — so margin-zero and margin-plenty are indistinguishable until someone else pays for it. Reporting remaining headroom belongs in a separate change; raising the floor buys ~1,000 symbols and does not fix the blindness.
Refs #17517
Model Used
Claude Opus 5 (1M context)