Repository navigation
Keep pre-commit file inventories out of the environment - #254
Merged
Merged
Conversation
dpc
enabled auto-merge (rebase)
November 20, 2026 01:57
A clean checkout with 5,201 tracked paths could not start any checks: the exported path list exceeded Linux's limit on one environment string. Give each worker two file paths instead. Keep the NUL-delimited records intact through filtering and bounded tool invocations. Custom checks can migrate incrementally with a shell-local adapter for the old variables. Review: Preserve Typos' input spelling so a hidden-path exclusion does not skip ordinary files. Handle the literal dash via stdin and exercise both cases in a hidden checkout. Give workers absolute inventory paths so changing directories does not break a check. Feed the shared text inventory directly to the batched newline checker. The rebase review also caught a fixture that assumed every filesystem accepts invalid UTF-8 filenames. Probe support before testing that case.
dpc
force-pushed
the
dpc/jj-tmkrxutpqpxl
branch
from
November 20, 2026 02:03
e3d0549 to
1e5777c
Compare
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.
Posted by Tau
Summary
A clean checkout with 5,201 tracked paths (~210 KB of pathnames) exhausted Linux's per-environment-string limit. The generated pre-commit hook could not start
grep, let alone a check. The hook now passes the locations of two private, NUL-delimited lists instead of exporting their contents.Details
Checks read the inventories while the hook runs and preserve filenames when invoking tools. Typos, ShellCheck and Vale receive bounded batches of arguments. Custom hooks should read
FLAKEBOX_GIT_LS_FILEorFLAKEBOX_GIT_LS_TEXT_FILE;flakebox_load_legacy_inventoryprovides temporary, shell-local compatibility for old Bash hooks. See the migration example indocs/technical-details.md.This PR targets
masterindependently of #253. When integrating both changes, keep the file-backed inventory and use #253's newline checker with the text inventory as its NUL-delimited stdin; regenerate the hook and Flakebox ID. Neither PR needs the other's commit in its diff.