Repository navigation
Description
Found while building .squad/e2e/windows-test-baseline.md (EECOM, baseline commit 369bba8f).
Summary
#1790 adds *.mjs text eol=lf to .gitattributes, which fixes the #1788 dead-gate class on a fresh checkout. It does not fix a working tree that already exists — and every Windows developer running the E2E series has one.
Merging #1790 and pulling will leave check-changeset-drift.test.ts, promote-insider-tag.test.ts, and patch-esm-imports.test.ts still red, which will read as "the fix didn't work."
Mechanism
.gitattributes governs checkout, not files already on disk. Git only rewrites a working file when the merge changes its index content.
core.autocrlf = trueon Windows.- These three
.mjsare already stored LF in the index, so fix(ci): force LF on *.mjs so shebanged scripts stay loadable by vitest #1790 does not renormalize them (it renormalizes only the 9.mjsthat were CRLF in the index). - Index unchanged ⇒ working file untouched ⇒ stays CRLF on disk ⇒ Vite's shebang stripping still leaves a bare
#⇒ suite loads zero tests.
Controlled proof
Applied #1790's .gitattributes line locally without a re-checkout:
$ git ls-files --eol scripts/promote-insider-tag.mjs packages/squad-cli/scripts/patch-esm-imports.mjs
i/lf w/crlf attr/text eol=lf packages/squad-cli/scripts/patch-esm-imports.mjs
i/lf w/crlf attr/text eol=lf scripts/promote-insider-tag.mjs
$ npx vitest run test/promote-insider-tag.test.ts
Test Files 1 failed (1)
Tests no tests
Attribute applied. Disk still CRLF. Still zero tests.
Then forced a re-checkout of the same files:
$ Remove-Item <the .mjs files> -Force ; git checkout -- <the .mjs files>
$ git ls-files --eol ...
i/lf w/lf attr/text eol=lf packages/squad-cli/scripts/patch-esm-imports.mjs
i/lf w/lf attr/text eol=lf scripts/promote-insider-tag.mjs
$ npx vitest run test/promote-insider-tag.test.ts test/cli/patch-esm-imports.test.ts
Test Files 2 passed (2)
Tests 21 passed (21)
Suggested fix
This is a rollout gap, not a code bug in #1790. Options, cheapest first:
- Document it in fix(ci): force LF on *.mjs so shebanged scripts stay loadable by vitest #1790's PR body and in the release/upgrade notes: after merging, run
git rm --cached -r . ; git reset --hard(or targeted delete +git checkout --) and verify withgit ls-files --eol '*.mjs'→ expectw/lf. - Have
squad doctorcheckgit ls-files --eol '*.mjs'for anyw/crlfand emit a fix-it hint. This makes the condition self-diagnosing instead of presenting as mystery test failures.
Success criteria
- A developer with a pre-fix(ci): force LF on *.mjs so shebanged scripts stay loadable by vitest #1790 Windows checkout can follow one documented command and get
git ls-files --eol '*.mjs'reportingw/lffor every entry. - After that command,
check-changeset-drift,promote-insider-tag, andpatch-esm-importsall run their tests (8 + 15 + 6 = 29 tests, none reportingno tests). - Ideally:
squad doctorflags anyw/crlf.mjsso this never has to be remembered.
Related
- check-changeset-drift.test.ts silently runs zero tests on Windows (shebang + CRLF) #1788 / fix(ci): force LF on *.mjs so shebanged scripts stay loadable by vitest #1790 — the underlying CRLF shebang defect and its fix. This issue is the residual, not a duplicate.
.squad/e2e/windows-test-baseline.md§4 for the full measurement.
Activity
docs(e2e): authoritative Windows test baseline at 369bba8 (#1797)
docs(e2e): correct the Windows baseline — count is a range, and two d…
fix(test): stop init-scaffolding from mutating tracked repo files (#1798
docs(e2e): correct the Windows baseline - retract a wrong prediction,…
docs(e2e): post-condition must match w/mixed, not just w/crlf
docs(e2e): make the renormalize selector attribute-driven, not glob-s…
fix: repair CRLF working trees that .gitattributes cannot reach (#1793)
fix: repair CRLF working trees that .gitattributes cannot reach (#1793)…
fix(gh-aw): fail loudly when /squad parses no command (#1824) (#1832)
Align Step 3 validator with TG-2 certified set (#1812)
Certify roster set via emitting Team Guard Step TG-2 (Closes #1812) (#…
chore(squad): gh-aw wave-1 session records + repair 3 lost history ar…