Conversation
…ract tests) Substitutability itself stays the live pinned mypy gauge (credit-existing, anchored green: an incompatible override is a NEW [override] error through 'mypy | mypy-baseline filter', and the one token that silences it is pinned as the hole the registry closes). The build delta under test: cf-exemptions scans the measured tree for '# type: ignore[override]' tokens; every occurrence must trace to a five-field exemptions.json entry (rule 'override') or the gate fails UNREGISTERED_SUPPRESSION naming the site; registered sites pass LOUDLY with the entry and the frozen count printed; the family rides the same shrink-only frozen_count ratchet and 1:1 entry discipline as the noqa families. Estate measurement 2026-06-11: 4 live sites, registered at mount. Signal-honesty note for the design record: the estate is composition-dominant (max inheritance depth 3-4 by convention), so the signal is honest but WEAK by construction — the gate's value is keeping it that way. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Substitutability itself stays the live pinned mypy gauge (credit-existing, nothing rebuilt). The build delta lands in cf-exemptions: coded 'type: ignore[override]' comments — the one token that silences the gauge's [override] (Liskov) error entirely — are now a registry-gated family (rule 'override'), scanned via the same tokenize COMMENT surface, so string literals never trip it and a multi-code ignore hiding the token in a list is gated too. Other type-ignore codes and the bare form stay the mypy gauge's jurisdiction (warn_unused_ignores). Registered sites now pass LOUDLY: every covered suppression prints its site, rule, enclosing symbol, and covering entry beside the ratchet banner — a visible exemption, never a silent one. The family rides the same shrink-only frozen_count ratchet and 1:1 entry discipline as the noqa families (EXEMPTION_ENTRY_OVERLOADED on collapse). Oracle: .venv/bin/python -m pytest -q — 276 passed (was 7 failed / 269 passed at the RED commit). Budgets hold: file 492 lines, max function 23 statements, ruff C901<=10 clean, pinned mypy clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 this gate adds
Substitutability (Liskov) enforcement has two surfaces; only one is new:
[override]error underconfigs/mypy-base.toml(mypy's own note names the Liskov substitution principle), surfacing as a NEW error throughmypy | mypy-baseline filterperconfigs/BASELINE-CONVENTIONS.md. Nothing rebuilt.cf-exemptions: every# type: ignore[override]token in the measured tree must trace to a five-fieldexemptions.jsonentry ({file, symbol_or_line, ruleoverride, reason, approver}) or the gate failsUNREGISTERED_SUPPRESSIONnaming the site. Same mechanism and entry shape as the noqa/nosec families.Budget
# type: ignore[override]suppressions — every site traces to a reasoned, approved registry entry, or the gate fails.frozen_countratchet, shrink-only.TestKitSelfCompliance).Control rods
overridecode is registry-gated — the one token that silences the substitutability gauge entirely. Other type-ignore codes and bare# type: ignorestay the mypy gauge's jurisdiction (warn_unused_ignores), so the gate isolates exactly one factor and cannot creep.[override, misc]) is still gated — hiding the token in a code list is the obvious bypass. Tokens inside string literals never trip the gate (comments are read viatokenize, COMMENT tokens only).frozen_countdiscipline as every other gated family; 1:1 entry coverage (EXEMPTION_ENTRY_OVERLOADED) blocks the collision undercount.Verification (oracle outputs)
cf-exemptions --root .exits 0 (existing S603 entry covered, ratchet 1/1; no override tokens in the measured tree).ruff check .clean.mypy srcclean (0 errors).tests/test_packaging.pypattern): wheel built from this branch, installed into a clean venv with no source tree — the unregistered fixture fails exit 1 namingsrc/mod.py:7; the registered fixture passes exit 0 with the loud entry line.Do not merge — pending maintainer review.