Skip to content

Templates ship a .gitattributes so a Windows clone of a scaffolded project passes its own gate (follow-up of #49) #51

Closed

Description

@brettheap

Lane: xfactory-2 (xFactory-2)

Follow-up of #49 (native Windows path), filed by the lane that is building it; NOT claimed.

What

There is no .gitattributes anywhere in this repository or in the two root templates. A project scaffolded under the shape pins its copied files by sha256 (contracts/shape-pin.yaml); with Git for Windows' installer default core.autocrlf=true, a later git clone of that project writes CRLF into the worktree, scripts/validate-pins.py digests CRLF bytes against an LF pin, and make validate fails on every pinned file for a colleague who did nothing wrong.

#49 covers the path the tool controls: setup-project.py clones with -c core.autocrlf=false, sets it in the clone it makes, warns when the user's global setting is true, and the README names git config --global core.autocrlf false as the one machine setting. It does NOT cover the next person who clones the finished project.

What lands

A .gitattributes with * text=auto eol=lf (or a tighter rule for the pinned paths) in templates/assembly-root/ and templates/family-root/, so the project itself says what its bytes are and no clone-time setting is needed.

Why it is not in #49

The file must join the copy lists in scripts/shape_materialize.py, the shipped-file inventory in tests/test_repo_hygiene.py, the shape-pin files: block, and update-shape.py's upstream-added path — every existing project would report it as upstream-added on its next update-shape check, which is correct and is exactly the machinery #29 built, but it is a separate blast radius from "does the Python entry point run on Windows".

Lane: xfactory-2 (xFactory-2)

Activity

  1. brettheap commented on Sep 5, 2026

    @brettheap
    ContributorAuthor

    Lane: xfactory-2 (xFactory-2)

    CLAIMED — lane xfactory-2 (xFactory-2), session harness 6bdb2e35-cbc8-4b10-b13f-11d9b421fef9, 2026-09-05T21:40Z, for the whole of this issue: the two root templates ship a .gitattributes.

    RULING this claim executes — Brett Heap, 2026-09-05 ~21:40Z, in session, verbatim: "pick up #50 and #51 too".

    Rule 1 reads: (1) this issue: no comments, no other claim; (2) gh pr list --state all --search "gitattributes": #1 MERGED v0: naming policy, assembly-root templates, scaffold, bootstrap, and the agent procedure
    #53 MERGED A native Windows path: setup-project.py, a windows-latest job, and the README route (#49); (3) git ls-remote --heads origin | grep -iE 'gitattributes|autocrlf': no branch. Siblings: second window openreposhape-b1 on #54 (README/tests.yml — no template files); xFactory-1 on update-shape.py messages (this PR touches update-shape's upstream-added PATH only through the copy lists it reads, not its code, unless a test shows otherwise). #50 is claimed by this same window in parallel; different files; sequenced at merge.

    Shape of the change: .gitattributes (* text=auto eol=lf, with the WHY in a comment) in templates/assembly-root/ and templates/family-root/, joining the verbatim copy lists in scripts/shape_materialize.py, the shipped-file inventory in tests/test_repo_hygiene.py, and therefore the shape-pin files: rows — so every existing project's next update-shape.py check reports it upstream-added and apply --add .gitattributes takes it (#29's machinery; tested). Proof that it does what it claims: a Linux-runnable test clones a scaffolded project with -c core.autocrlf=true (git honours that on every platform) and runs the project's own validate-pins.py — green only because the attributes file pins LF. Worktree fix/templates-gitattributes from origin/main 4fe7840.

    Lane: xfactory-2 (xFactory-2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions