feat(pre-commit): let a repo exempt vendored trees from the fixer hooks #1159
No reviewers
Labels
No labels
burndown-2026-06
burndown-2026-08
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agentic-os!1159
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/vendored-tree-exclude"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A consumer lists upstream-owned path prefixes under
[tool.agentic-os.managed-hooks] vendored, and the generated block puts anexclude:on the three hooks that rewrite file content:trailing-whitespace,end-of-file-fixer,mixed-line-ending.Reporting hooks are deliberately untouched, so a secret or a broken JSON inside a vendored tree is still caught. The secret scan is unaffected either way, since both trufflehog hooks are
pass_filenames: falseand scan the git repo directly rather than pre-commit's file list.Why
Two repos need it, and eco-ops needs it badly.
mods/Mods/against upstream (mod.io, GitHub, Discord) viajust check-drift. Apre-commit run --all-filesthere rewrites all of them to strip trailing whitespace, which is permanent drift against upstream and turns every future mod re-sync into a conflict. This is not hypothetical: that sweep is sitting uncommitted in the checkout right now, 777 lines across 172 files.configs/scripts/configs.pywritingjson.dumps(...)with no trailing newline at all three write sites.end-of-file-fixeradds one, the nextjust show-diffsstrips it, forever, across 20 files. (That one also deserves a generator fix, handled in eco-ops.)Shape
PRECOMMIT_HOOKSentries carry arewritesflag;vendored_exclude()reads the consumer'spyproject.tomlthrough the existingcfg.load_str_list, symmetric with howactionlint_args()already keys off a consumer file. No declaration means noexclude:line, so every existing consumer's generated block is byte-identical.Two tests cover both directions: that the three fixers get the exclude and the reporting hooks do not, and that an undeclared repo's block stays bare.
Refs coilyco-gaming/eco-ops#91