Repository navigation
ci: ratchet one-function-per-file to max_lines = 12 - #1051
Merged
Merged
Conversation
Drops the five opted-in configs still at 15 to 12, the target Kevin chose for #1042 in place of the issue's original 10. Every split needed to be green at 12 landed first (#1045, #1046, #1047, #1049, #1050), so this is the ceiling drop alone -- no code changes. The plugin config stays at 10; it was already ahead of the campaign and raising it would loosen the rule there. Verified with testing-conventions@0.0.111 pinned: all five scan roots report zero violations at the values set here, and `just preflight` is green with the three packaging pairs skipped. skip-changelog: gate config only -- changelog_gate._is_exempt waives a package-root testing-conventions.toml by exact match, and the root and internals/checks files sit outside its _ROOTS entirely.
This was referenced Sep 5, 2026
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.
Final step of the
one-function-per-fileratchet opened in #1042. Every split that step needed has landed (#1045 distcheck, #1046 checks-B1, #1047 python, #1048 the 16 -> 15 config step, #1049 ts, #1050 checks-B2), so this PR is the ceiling drop and nothing else.Fixes #1042
The change
Five
max_linesvalues,15->12. No code changes.testing-conventions.toml[python]testing-conventions.toml[typescript]packages/python/testing-conventions.toml[python]packages/ts/testing-conventions.toml[typescript]internals/checks/testing-conventions.toml[python]plugins/dirsql-plugin-embeddings/testing-conventions.tomlstays at 10 -- it was already ahead of the campaign and raising it to 12 would loosen the rule for that package.Why 12 and not 10
#1042 proposed the ladder down to 10; the campaign stops at 12. That is a decision, not an abandonment -- 12 is Kevin's explicit call, and it matches the issue's own recommendation.
Per #1042's analysis, the remaining four moves to reach 10 are the gate rearranging cohesive modules rather than finding real problems:
packages/ts/src/resolve-config-extensions.ts--resolveConfigsExtensionSpecs, 11 linespackages/python/dirsql/resolve_config_extensions.py--_resolve_entries, 12 linesinternals/checks/src/checks/artifact_completeness/gate.py--run, 11 linespackages/ts/src/resolve-extension.ts--resolveExtensionPath, 10 linesEach is a marginal private helper or a
runorchestrator flagged only because a slightly longer sibling sits above it in the file. Parent issue #1020 (ratchet toward the default of 1) stays open and carries the remaining distance.Verification
testing-conventions@0.0.111pinned explicitly (a barenpx testing-conventionsresolves engine-aware and can silently pick an older release, #1018). Every scan root CI runs this gate on, at the value set here:internals/checks/srcinternals/checks/testing-conventions.toml(12)packages/python/dirsqlpackages/python/testing-conventions.toml(12)packages/ts/srcpackages/ts/testing-conventions.toml(12)internals/distcheck/srctesting-conventions.toml(12; passes noconfig:)plugins/dirsql-plugin-embeddings/srcplugins/dirsql-plugin-embeddings/testing-conventions.toml(10)Zero violations, zero exemptions -- the exemption count for this gate stays at zero. Harness sanity-checked by re-running
internals/checks/srcatmax_lines = 8, which correctly reports 5 violations.just preflight(derives the (source, gate) pairs from the CI workflows) finishespreflight: 0 failing pair(s), 3 skipped-- the three skips are thepackagingpairs, which need a built artifact. The threee2e-verifypairs that run locally (packages/ts,internals/checks,plugins/dirsql-plugin-embeddings) all pass with no receipt in the diff, which is the gate agreeing that none is owed.Red / green
Not applicable. This is a config tightening with no behavior change and no new functionality -- there is nothing to assert red. Per AGENTS.md, red/green governs adding or changing behavior; the gate's own CI run is the proof, and every affected root was verified clean locally before push.
Obligations
Re-confirmed against the repo, not assumed:
internals/checks/src/checks/changelog_gate/decide.pysets_ROOTS = ("packages", "plugins"), so the root andinternals/checksfiles are outside the gate entirely. For the two package files that are inside it,_is_exemptwaives<pkg>/testing-conventions.tomlby exact match (re.fullmatch(rf"{p}/testing-conventions\.toml", path)) -- gate config that ships in no published artifact.packages/python/dirsqlplus[e2e] extra_scope = ["packages/rust/src", "packages/python/src"]; the ts lanepackages/ts/srcplus["packages/rust/src", "packages/ts/napi"];internals/checksits owninternals/checks/src. A package-roottesting-conventions.tomlis in none of them, andinternals/distcheckdeclares noe2e-verifygate at all.Changelog / Migrations
<root>/<pkg>/changelog.d/for each changed package (or:skip-changelogtrailer on a commit with reason) -- not required: both package files are_is_exemptmatches (see Obligations)<root>/<pkg>/migrations.d/(or: not required -- additive/bugfix only) -- not requiredE2E Verification
N/A - CI gate config only, no source change in any scoped lane.
packages/python/e2e-attestations/<branch>.jsonreceipt written ifpackages/pythonchanged (just e2e-attest-python) -- not owed: no scoped source changepackages/ts/e2e-attestations/<branch>.jsonreceipt written ifpackages/tschanged (just e2e-attest-ts) -- not owed: no scoped source changenpx -y testing-conventions@0.0.111 unit one-function-per-fileacross all five scan roots;just preflight