Repository navigation
fix(windows): pin generated artifacts and source to LF so a Windows checkout can pass its own gates - #19291
fix(windows): pin generated artifacts and source to LF so a Windows checkout can pass its own gates#19291ShuheiKonno wants to merge 4 commits into
Conversation
📝 WalkthroughWalkthroughAdds Priority: ➖ Normal Merge Risk: 🔵 Low · up to The current transcript handling is preserved, but the added test does not detect a loss of raw bytes in the Git index. Adding the staged-blob assertion is a bounded follow-up; no production behavior defect is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
.gitattributesline-ending pins — four new rules pin LF for generated artifacts (/resources/skills/*.json,**/__snapshots__/*.snap) and the source tree (*.ts,*.tsx) so acore.autocrlf=trueWindows checkout stops producing phantom lint/test failures and phantom modified files.
ℹ️ Blanket *.ts also reclassifies two NUL-containing files
*.ts text eol=lf reaches two files that embed raw \0 bytes — src/main/runtime/browser-client-download-transfers.ts:333 and src/relay/dispatcher.test.ts:804 — which Git had been auto-detecting as binary (i/-text in git ls-files --eol). I verified this is content-safe: neither file contains a CR byte, and the clean-filtered blob (git hash-object --path=…) is byte-identical to the index blob, so renormalization is a no-op and no phantom diff results. The only observable change is that future diffs of those two files render NUL bytes as ^@ text rather than "Binary files differ". No change needed — flagging it only because the PR body's "every file was already LF in the index" is not quite true for these two.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
2f97277 to
0eb3e71
Compare
`verify:skill-bundle-manifest` regenerates `resources/skills/*.json` and compares the bytes. On a Windows checkout with `core.autocrlf=true` those files arrive CRLF while the generator writes LF, so the gate reported the committed artifacts as stale on a tree whose content diff is empty — `pnpm lint` could not pass at all, and the suggested fix (regenerate and commit) would have committed a pure line-ending churn. `/resources/plugins/**` and `en-runtime-required.json` are already pinned for exactly this reason; this is the same class of gap two directories over. Also pins `__snapshots__/*.snap`: Vitest writes LF, so any local test run on Windows left the worktree modified with a zero-content diff — phantom changes that invite an accidental commit. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Lc8yzNit7nZ6uPawXS63h
29 test files load repo source through `readFileSync` and assert on `\n`-joined text. On a Windows checkout with `core.autocrlf=true` those bytes arrive CRLF, so `SourceControl.host-context-boundary.test.ts` fails on a stock clone — and, as stablyai#14479 notes, every other file in that set is one multi-line assertion away from the same failure. Pins `.ts`/`.tsx`. TypeScript and the bundlers are line-ending agnostic, and the tree is authored LF everywhere else, so the only effect is that Windows stops receiving a translation its own tests reject. Two deliberate exclusions. `.mjs`: `config/scripts/**/*.mjs` is already pinned for the Vite shebang bug, and `shebang-script-line-ending-pin` asserts that pin stays narrow, so a blanket rule would defeat its own guard. `.cmd`/`.ps1`/`.nsh`: they run through Windows interpreters and no test reads them back. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Lc8yzNit7nZ6uPawXS63h
0eb3e71 to
6bf2f5e
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
config/scripts/generated-artifact-line-ending-pin.test.mjs (1)
39-46: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAssert the raw fixture bytes in the index before checkout.
The checkout assertion checks only the working tree. It can pass when Git stores LF in the index and converts it back to CRLF during checkout. Compare the staged blob as a
Buffer:Suggested fix
git(['-c', 'core.autocrlf=input', 'add', '--', '.']) + expect( + git(['show', ':src/main/daemon/__fixtures__/pty-transcripts/example.txt']), + ).toEqual(Buffer.from(crlf)) for (const path of paths.keys()) {
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
b1e6a869-4015-4160-9bde-50c90b321dd6
📥 Commits
Reviewing files that changed from the base of the PR and between 0eb3e715739a45d56db1868c3e501070d822e4ea and 6bf2f5e.
📒 Files selected for processing (1)
src/shared/protocol-version.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
|
@ShuheiKonno Sorry for delays, I'm tryign to merge some of the work I saw you closed the PR, I will open a new one + hope you don't mind if I add you as co-author Apologies again for this being so late. And thank you for your PRs 🙏 |
|
Hi @nwparker,
No worries at all, and thanks for picking this up.
Please feel free to open a new PR and add me as a co-author. I’m happy for
you to reuse or modify the work from #19291 as needed.
Thanks again for taking the time to get this merged!
2026年10月7日(水) 6:34 Neil ***@***.***>:
… *nwparker* left a comment (stablyai/orca#19291)
<#19291 (comment)>
@ShuheiKonno <https://github.com/ShuheiKonno> Sorry for delays, I'm
tryign to merge some of the work
I saw you closed the PR, I will open a new one + hope you don't mind if I
add you as co-author
Apologies again for this being so late. And thank you for your PRs 🙏
—
Reply to this email directly, view it on GitHub
<#19291?email_source=notifications&email_token=AOEFXFTPGXXT7SYQ655RJJ35SVQOTA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBSGU4DOMRXHAY2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6025872781>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOEFXFSBELG7QPG5NOUIEQT5SVQOTAVCNFSNUABGKJSXA33TNF2G64TZHMYTCOBTHA4DQMZUGI5US43TOVSTWNJTG42DGNBZHAYDJILWAI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|

ELI5
A normal Windows checkout converts text to CRLF, while generated skill manifests and some source-reading tests expect LF. Pin those files to LF so an unchanged checkout can pass its gates.
What Changed
Pin generated skill JSON, Vitest snapshots, and TypeScript source to LF in
.gitattributes. Preserve the newer rules from current main, including raw terminal transcript handling. Add a real Git checkout regression covering the pinned files and exclusions.Why
This fixes the checkout policy for the whole affected file class instead of normalizing individual tests. Windows script files and unrelated
.mjsfiles retain their existing handling.Linked Issue
Fixes #14479
Visual Proof
N/A — Git checkout policy and regression tests; no application UI changes.
Testing
Adversarial re-review rebased onto main
a2f197fde7ef. A realcore.autocrlf=truecheckout reproduced the stale skill-manifest gate on main; the fixed branch passed the same check. The checkout regression covers 15 pinned/excluded paths, including raw CRLF terminal transcript bytes. Eight related suites: 83 passed, 32 conditional tests skipped. Changed-code quality, focused lint, formatting, and diff checks passed on macOS. On Windowsawinwithcore.autocrlf=true, both checkout-policy suites passed (7 tests), and the actual manifest gate passed after refreshing the existing CRLF artifacts. Full application build and full test suite were not rerun for this attribute-only change.AI Disclosure
Original implementation prepared with Claude; follow-up adversarial review, rebase, and regression coverage prepared with Codex.
Review
The rebase preserves all newer main attributes. Checked tracked TypeScript sources for literal CR bytes before applying the broad source policy; none found. No outstanding code finding from this review. Also repaired an inherited main-branch lint blocker by changing the protocol capability import shape: counted lines fall from 301 to 298, with all 115 runtime exports proven equal, including array order. Full anti-slop audit and node typecheck passed.
Agent skill upstream boundary
Notes
Existing Windows worktrees may retain old CRLF files until they are refreshed. Use a fresh checkout, or refresh only the affected clean files after preserving local work; changing attributes alone does not rewrite every existing file. No runtime, SSH, remote wire, mobile, or folder-workspace behavior changes.
Checklist