Repository navigation
ci: ratchet one-function-per-file to max_lines = 15 - #1048
Merged
Merged
Conversation
Config-only step under #1042 (parent tracker #1020). The enumeration on main at fb432f7, with testing-conventions@0.0.111 pinned, showed every scan root already clean at 15 -- the first violations appear at 14, so 16 -> 15 costs no file splits. The embeddings plugin goes to 10 rather than 15: it was left at 24 by the earlier 16 step because it belonged to neither lane, and its largest shared-file function is 8 lines. Verified clean at 10 against the gate. No exemptions added; none golfed under the limit. The exemption count for this rule stays zero.
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.
Part of #1042 (parent tracker #1020).
PR A of the sequence in #1042: ratchet the
one-function-per-filegate frommax_lines = 16toward 10. This step is config-only and costs zero code changes.What changed
testing-conventions.toml[python]testing-conventions.toml[typescript]packages/python/testing-conventions.tomlpackages/ts/testing-conventions.tomlinternals/checks/testing-conventions.tomlplugins/dirsql-plugin-embeddings/testing-conventions.tomlSix lines across five files. No source file moves, no function is split, no function is golfed under the limit.
Why 15 is free
The enumeration in #1042 (against
mainatfb432f7,testing-conventions@0.0.111pinned) swept the whole ladder: every scan root is already clean at 15, and the first violations appear at 14. So16 -> 15is a strict tightening that costs nothing.Why the plugin goes to 10, not 15
plugins/dirsql-plugin-embeddingswas left at 24 by the earlier 16 step (#1040) because it belonged to neither that PR's lane. It is already clean at 10 -- its largest shared-file function isbuild_search_sqlat 8 lines -- so there is no reason to leave it looser than it needs to be.Verified rather than assumed. At
max_lines = 10the gate exits 0; atmax_lines = 1the same root reports 6 violations with the largest at 8 lines, confirming the gate is actually inspecting the tree and not silently no-opping.Verification
Per-root, at the values this PR sets, with the tool version pinned explicitly (a bare
npx testing-conventionsresolves engine-aware and can silently pick an older release, #1018):internals/checks/srcinternals/checks/testing-conventions.tomlpackages/python/dirsqlpackages/python/testing-conventions.tomlpackages/ts/srcpackages/ts/testing-conventions.tomlinternals/distcheck/srctesting-conventions.toml(passes noconfig:)plugins/dirsql-plugin-embeddings/srcplugins/dirsql-plugin-embeddings/testing-conventions.tomlThen the full
just preflight, which derives the (source, gate) pairs from the CI workflows rather than restating them:The three skips are the
packagingpairs (python-sdk, rust, typescript-sdk), which need a built artifact CI builds from the manifest.@latestresolved to0.0.111in that run, matching the pin above.Exemptions
None added. This gate's exemption count is deliberately zero and stays there.
Red/green
Does not apply. This is a config tightening with no behavior change and no new functionality -- nothing to write a failing test against. The verification above is the proof, and it is a set of gate exit codes rather than a test suite.
Changelog / Migrations
internals/checks/src/checks/changelog_gate/decide.pysets_ROOTS = ("packages", "plugins"), so the roottesting-conventions.tomlandinternals/checks/testing-conventions.tomlare outside the gate entirely. For the three files that are under those roots,_is_exemptwaives a package-roottesting-conventions.tomlby name (re.fullmatch(rf"{p}/testing-conventions\.toml", path)) -- which is the only kind of file this PR touches there.PARITY.md
No change. No SDK public API is touched -- this PR edits only gate configuration, in no
src/tree.E2E Verification
N/A - CI gate configuration only, no source change.
packages/python/e2e-attestations/<branch>.jsonreceipt: not owedpackages/ts/e2e-attestations/<branch>.jsonreceipt: not owedgit diff --name-only fb432f7..HEADagainst each lane's e2e scopepackages/python/dirsql,packages/python/src,packages/ts/src,packages/ts/napi,packages/rust/src,internals/checks/src, norplugins/dirsql-plugin-embeddings/src. Every lane'se2e-verifypair ran green underjust preflight, which is the gate itself agreeing that no receipt is owed.