Skip to content

fix(#2623): pin dsh.bundle.patch.yml to LF checkout so windows-latest CI goes green - #2632

Closed
ranxianglei wants to merge 2 commits into
masterfrom
2026-10-10_dsh-bundle-eol-lf
Closed

ranxianglei wants to merge 2 commits into
masterfrom
2026-10-10_dsh-bundle-eol-lf

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #2623

Root cause

tests/issue2605-dsh-retry-patch.test.ts (added by eb0e4d2, #2605) asserts includes() against LF-anchored row constants read from the committed dsh.bundle.patch.yml. The blob is pure LF, but .gitattributes only pinned text eol=lf for tests/golden/wire-contract/*.json (#1305). On windows-latest runners Git-for-Windows' default core.autocrlf=true materializes the yml as CRLF at checkout, so every exact match fails — the two test (windows-latest, *) jobs have been red on every commit since eb0e4d2.

Verified locally through git's own conversion path, not just sed:

scenario checkout EOL result
fresh clone of master, core.autocrlf=true CRLF (32 CR bytes) the #2605 bundle-lane test fails with the exact CI assertion error
fresh clone of this branch, core.autocrlf=true LF (0 CR bytes) both #2605 tests pass
this branch, file manually CRLF'd CRLF both tests still pass (consumer hardening)

Fix (two layers, one mechanism)

  1. .gitattributes: /dsh.bundle.patch.yml text eol=lf — fixes the producer (checkout materialization) at the VCS layer, same precedent as the test: wire-contract anti-regression system — parity fakes, goldens, unified ledger #1305 golden pin. Explicit eol=lf overrides autocrlf=true, proven above. Also protects any future byte-exact consumer of the shipped file.
  2. tests/issue2605-dsh-retry-patch.test.ts: normalize \r\n → \n before matching — pins logical row content instead of EOL bytes, so a stray CRLF checkout (existing Windows clones until they re-checkout the file, or any non-git materialization) cannot red the gate again. All teeth remain: any drift in the restated rows/codes still fails.

Behavior changes

None. CI hygiene only — user-facing patch content is generated in-memory with LF (writeDshAcpPatch) and the shipped blob is unchanged (still pure LF).

Note: pre-existing Windows developer clones keep their CRLF worktree copy of this file until they re-checkout it (git checkout -- dsh.bundle.patch.yml); irrelevant to CI, which always checks out fresh.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-10_dsh-bundle-eol-lf (a4fb252)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.2841-pr.2632.6f33daf

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr2632.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

Superseded by #2634 (merged as 7cf6796, on master as 2d31e42).

A parallel report of the same root cause (#2631) landed first with a functionally identical two-layer fix:

  • .gitattributes: dsh.bundle.patch.yml text eol=lf (this PR used the root-anchored /dsh.bundle.patch.yml form — equivalent for a file that only exists at the repo root)
  • tests/issue2605-dsh-retry-patch.test.ts: CRLF→LF normalization before the byte-exact includes() (.replaceAll("\r\n", "\n") here vs .replace(/\r\n/g, "\n") on this branch — same semantics)

Line-by-line diff of this branch against current master shows only comment wording differs; merging would churn already-fixed lines with zero functional gain. This PR's own CI already proved the mechanism on a real windows-latest runner (test (windows-latest, 24) green on head a4fb252).

Closing as superseded — the fix ships via #2634.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

windows-latest CI red on master: #2605 bundle-patch test breaks under CRLF checkout (dsh.bundle.patch.yml missing from .gitattributes eol=lf)

1 participant