Repository navigation
fix(length): close three length-cap gaps from #383 - #452
Merged
Merged
Conversation
added 2 commits
October 20, 2026 16:33
…d entry Three of the deferred minor findings from the length-caps review: - lint-length.sh refused only the literal patterns `*`, `**` and `**/*`. `/**`, `**/**`, `/**/*` and `***` also exempt every file. It now asks git: a pattern is refused when check-attr matches it to a top-level file, a dotfile and a nested file. `/*` (top level only) and `*/**` stay allowed, which a string normalizer would have got wrong. - Run by hand from a subdirectory, the hook missed the root .gitattributes and passed top-relative paths to check-attr as if they were cwd-relative, so a root `/lib.py length-caps=off` was lost. It now cd's to the repository top first. - pre-commit/config.yaml is a symlink into this repo, so a pull changes it at once, while lint-length.sh is linked only by install.sh --sync. The entry now fails closed with a message naming install.sh --sync and SKIP=length-caps instead of bash's bare "No such file" (exit 127). The gh api `-X POST` cap-kind item was already fixed by #442. The block headline still keys on gate-review's reason text; a stable signal needs a gate-review.sh change in claude-config, left for a decision. pre-commit/README.md still lists only `*`, `**` and `**/*`; its update is copy-gated and waits for approval. Advances #383
The three probe paths shared characters, so `*9*` or `*z*` matched all three and was refused as exempting every file. The probes now share no character (zq9, .AB, x/y/k_7); tests pin `*9*` and `*z*` as allowed. Found by the commit-time code reviewer. Advances #383
4 of 5 tasks
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.
Works through the deferred minor findings in #383.
Fixed
lint-length.shrefused only the literal*,**and**/*./**,**/**,/**/*,**/**/*and***also exempt every file and passed. The hook now asks git: alength-caps=offpattern is refused whencheck-attrmatches it to three probe paths (top level, dotfile, nested) that share no characters. The string normalization the issue suggested was not used, because it would refuse/*(top level only) and miss***./*,*/**,/vendor/**,*9*and*z*stay allowed.cds to the repository top. Before,git ls-filesmissed the root.gitattributes, andcheck-attr --stdinread the diff's top-relative paths as cwd-relative, so a root/lib.py length-caps=offwas also lost.~/.config/pre-commit/config.yamlis a symlink into the repo, so a pull changes it at once.lint-length.shis linked only byinstall.sh --sync, and symlink repair skips missing links. The entry now fails closed with a message naminginstall.sh --syncandSKIP=length-caps. Before, it exited 127 with bash's bare "No such file".Already resolved
gh api -X POST repos/o/r/pulls/5/commentscap kind: fixed by fix(gh-wrapper): read the gh api endpoint past value-taking flags #442. Against the pre-fix(gh-wrapper): read the gh api endpoint past value-taking flags #442 wrapper the existing test printschecker saw '--kind pr-comment'. On main it passes.Not done (needs a decision)
gate-review.sh checkchange in claude-config.pre-commit/README.mdstill lists only*,**,**/*. Its update is copy-gated and waits for approval.Tests
bash/tests/test-lint-length.sh: new refusal, allow and subdirectory cases. They failed on the old hook first.bash/tests/test-length-caps-entry.sh(new): reads the real entry fromconfig.yaml, splits it with shlex as pre-commit does, and runs it with no linked script and with a linked one.Advances #383