Skip to content

fix(windows): keep generated skills and snapshots LF - #25972

Merged
nwparker merged 1 commit into
mainfrom
nwparker/shuhei-lf-replacement
Oct 7, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/shuhei-lf-replacement

Conversation

@nwparker

@nwparker nwparker commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​49 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​49
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4

ELI5

A fresh Windows checkout should pass the generated-file checks without first rewriting files.

What Changed

Pin generated skill JSON and Vitest snapshots to LF in .gitattributes. Add a real Git checkout test with core.autocrlf=true, including checks that Windows scripts and captured terminal transcripts retain their existing line-ending rules.

Carries forward Shuhei Konno’s work from #19291, with his co-author credit retained. Current main already pins TypeScript source to LF, so this replacement includes only the remaining rules. The regression fixture also passes the Windows command-spawn ratchet without adding exemptions.

Why

The skill verifier compares exact text, while Git for Windows normally writes CRLF. Pinning the generated files fixes checkout bytes at the source instead of relaxing verification or requiring each contributor to change Git settings.

Linked Issue

Fixes #14479

Visual Proof

N/A — checkout policy and test coverage; no application UI change.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated

Actual Git autocrlf checkout: main fails all three generated skill JSON checks; replacement passes. Nine focused suites pass on macOS (86 tests, 32 conditional skips), including the Windows command-spawn ratchet. Generated skill manifests, bundled skill guides, formatting, root lint, and changed-code quality pass. On native Windows (awin), the real checkout regression and command-spawn ratchet pass (4 tests); freshly checked-out generated JSON also passes the manifest verifier. Existing worktrees may need to re-checkout previously converted files once after the attribute update. Rebased onto current main; its existing fixture fixes make the previous extra repair unnecessary, so the final diff contains only the LF rules and checkout regression. CI covers the full suite.

Review

Merge risk: low. No application runtime, SSH execution, wire protocol, or folder-workspace behavior changes.

Agent skill upstream boundary

  • Not applicable; no upstream skill source or fixtures copied.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • N/A with reason for visual proof
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path impact considered
  • Full lint, typecheck, test, and build: CI will cover

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 65b4cb57-e303-4b24-a29d-e886ba4d79f7
📥 Commits

Reviewing files that changed from the base of the PR and between 28ed544 and ddd4aa4.

📒 Files selected for processing (3)
  • .gitattributes
  • config/scripts/generated-artifact-line-ending-pin.test.mjs
  • src/main/runtime/agent-session-record-store-slot.test.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.


📝 Walkthrough

Walkthrough

The change adds Git attributes for LF line endings on generated skill JSON files and Vitest snapshot files. A regression test checks line endings after staging and checkout with different Git autocrlf settings. A host setup test now provides a resolveLaunchArgs callback that returns an empty array.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to ddd4a

No actionable merge-blocking risk is established for the Windows line-ending change. Complete the planned CI checks before merging.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The change to src/main/runtime/agent-session-record-store-slot.test.ts adds resolveLaunchArgs to an existing runtime test fixture. The PR description says this repairs a pre-existing fixture so no… Remove the unrelated resolveLaunchArgs fixture change from this PR, or submit it in a separate change.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue [#14479] requires a fresh Windows checkout with core.autocrlf=true to preserve generated skill JSON and source line endings so verification and the reported source-reading test pass without re…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Title check ✅ Passed The title clearly and concisely describes the main change: keeping generated skill files and snapshots at LF on Windows.
Description check ✅ Passed The description covers the required sections, links issue #14479, explains the change and rationale, and reports testing. It identifies full lint, typecheck, test, and build as pending CI coverage.
Full details: Out of Scope Changes check

Explanation

The change to src/main/runtime/agent-session-record-store-slot.test.ts adds resolveLaunchArgs to an existing runtime test fixture. The PR description says this repairs a pre-existing fixture so node typecheck passes. It has no connection to issue [#14479] or the line-ending policy.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Pin byte-compared skill artifacts and Vitest snapshots to LF on every checkout. Verify real Git autocrlf checkout conversion while preserving Windows script and terminal transcript policies.

Co-authored-by: Shuhei Konno <[email protected]>
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.

[Bug]: pnpm lint cannot pass on a stock Windows checkout (CRLF line endings)

1 participant