feat(pre-commit): generate a managed .gitattributes pinning the tree to LF #1164
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!1164
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/managed-gitattributes"
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?
* text=autois a trap that four repos are currently in. It marks a file as text without pinning what the working tree gets, so undercore.autocrlf=truea Windows checkout takes CRLF and a Linux one takes LF. The index agrees andgit diffis empty, so nothing looks wrong until a tool reads bytes.It has already cost us twice:
repo-coilysirenas a non-identical collision and refused to compose a role.shellcheckreportsSC1017on every line of the skill scripts here, which is why this repo's.gitattributeshad grown seven per-extension patches and anagentic-os#317comment.eol=lfis what those patches were reaching for, and it replaces all of them.Where the fleet stands
* text=auto eol=lf): agent-compose, cli-guard, infrastructure, ward, coilysiren* text=auto, noeol): agentic-os, agentic-os-kai, eco-mods, eco-ops*.shonly): agentic-os-xxx, deploy, eco-appShape
The rollout now writes a marker-delimited block into each consumer's
.gitattributes, beside the pre-commit block it already manages:Batch keeps CRLF as the one format where LF genuinely misbehaves. PowerShell does not need it: infrastructure already ships 13
.ps1files under this rule.The block goes first, never appended, because git takes the last matching pattern per attribute and a general
*below a repo's LFS lines would override them. A tree under[tool.agentic-os.managed-hooks] vendoredgets-textand keeps upstream's bytes, reusing the declaration the fixer excludes already read rather than inventing a second list.Vendor orgs
VENDOR_ORGSskips an org dir of upstream checkouts whole. This closes a hazard that predates the change:iter_workspace_reposis owner-agnostic by design, so a full run would have written a.pre-commit-config.yamlintoStrangeLoopGames/Eco, and a managed*rule would have overridden its deliberate*.cs text eol=crlf.Verified
pre-commit run --all-filesin this repo is clean for the first time on a Windows checkout,shellcheckincluded. Five new tests cover the pin, vendored-text, first-not-last placement, idempotent refresh, and the vendor-org skip.A dry run across the fleet covers 11 repos and skips four:
Not in this PR
Changing
.gitattributesdoes not convert anything already checked out.git add --renormalize .does, and it rewrites the working tree, so each repo wants a clean tree and a deliberate commit. eco-ops in particular has an uncommitted whitespace sweep sitting in it (per #1159), so it needs care rather than a fleet sweep.`* text=auto` is a trap that four repos are currently in. It marks a file as text without pinning what the working tree gets, so under core.autocrlf=true a Windows checkout takes CRLF and a Linux one takes LF. The index agrees and `git diff` is empty, so nothing looks wrong until a tool reads bytes. It has already cost us twice. agent-compose read two byte-identical copies of repo-coilysiren as a non-identical collision and refused to compose. shellcheck reports SC1017 on every line of the skill scripts in this repo, which is why this file had grown seven per-extension patches and an agentic-os#317 comment. `eol=lf` is what those patches were reaching for, and it replaces all of them. ## Shape The rollout now writes a marker-delimited block into each consumer's .gitattributes, beside the pre-commit block it already manages: * text=auto eol=lf *.bat text eol=crlf *.cmd text eol=crlf Batch keeps CRLF as the one format where LF genuinely misbehaves. PowerShell does not need it: infrastructure already ships 13 .ps1 files under this rule. The block goes first, never appended, because git takes the last matching pattern per attribute and a general `*` below a repo's LFS lines would override them. A tree under `[tool.agentic-os.managed-hooks] vendored` gets `-text` and keeps upstream's bytes, reusing the declaration the fixer excludes already read rather than inventing a second list. ## Vendor orgs VENDOR_ORGS skips an org dir of upstream checkouts whole. This closes a hazard that predates the change: iter_workspace_repos is owner-agnostic, so a full run would have written a .pre-commit-config.yaml into StrangeLoopGames/Eco, and a managed `*` rule would have overridden its deliberate `*.cs text eol=crlf`. ## Verified `pre-commit run --all-files` in this repo is clean for the first time on a Windows checkout, shellcheck included. A dry run across the fleet covers 11 repos and skips four: the source repo, an opted-out repo, and both vendor checkouts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>