fix(windows): enforce LF line endings for shell scripts and Dockerfile#47
Merged
Conversation
…ributes Without this, a fresh checkout on Windows has CRLF on test.sh; the Linux kernel inside the benchmark sandbox reads `#!/bin/bash\r` as the shebang and every trial fails with `bash: required file not found`. - Repo: .gitattributes locks LF for *.sh, Dockerfile, etc; CRLF for *.ps1. - Scaffold: nasde init writes .gitattributes and uses `Path.write_text(..., newline="")` so freshly-scaffolded files are LF on Windows too (Python's default text mode translates \n -> \r\n). - Skills: nasde-benchmark-creator, nasde-benchmark-from-history, and nasde-benchmark-from-public-repos got a "Critical: line endings on Windows" section warning AI agents authoring benchmarks. docs/windows-issues-2026-05-09.md: companion report listing 3 remaining Windows issues (Unicode crashes on cp1250 console, missing harbor[daytona] extra) that need separate tickets. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
macOS smoke test results (2026-05-09)Ran the first two items of the Linux/macOS regression checklist on macOS (Darwin 25.4.0, Python 3.13.11):
The third item ( Verdict: macOS-safe — no regression from |
The report belongs in a separate deliverable; this PR is the code/scaffold fix only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
szjanikowski
pushed a commit
that referenced
this pull request
May 9, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
szjanikowski
added a commit
that referenced
this pull request
May 9, 2026
* docs(changelog): record Windows compat + skill bundling under [Unreleased] Captures everything that landed since v0.3.2 (PRs #42, #43, #44, #45) so the release notes are queued up. Keeps the section under [Unreleased] deliberately — more fixes are still expected before cutting v0.3.3, and release docs say the version header should be added at release-cut time. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(changelog): record .gitattributes LF enforcement (#47) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(changelog): record harbor[cloud] dependency switch (#48) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: release v0.3.3 Cuts v0.3.3 from the accumulated [Unreleased] section. Patch bump (pre-1.0 policy): no breaking changes to user-facing CLI, nasde.toml schema, or benchmark project layout — Windows compat, OAuth-script bundling, harbor[cloud] dep switch are all transparent to users. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Szymon Janikowski <szymon.janikowski@itlibrium.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.gitattributeslocks*.sh,Dockerfile, and other Linux-bound files to LF; PowerShell/batch keep CRLF. Fixes the silent failure where Windowscore.autocrlf=truechecked outtest.shwith CRLF and Linux benchmark sandboxes read#!/bin/bash\ras the shebang, producingbash: required file not foundandRewardFileNotFoundErroron every trial.nasde initnow scaffolds.gitattributesand writes files withPath.write_text(..., encoding="utf-8", newline="")so freshly-scaffoldedtest.shis LF on Windows too (Python's default text mode translates\n→\r\non Windows).nasde-benchmark-creator,nasde-benchmark-from-history,nasde-benchmark-from-public-repos) got a "Critical: line endings on Windows" section so AI agents authoring benchmarks in user repos enforce the same policy.Test plan
Linux/macOS — cross-platform regression check
git checkout fix/gitattributes-lf && git status --porcelain→ empty (no working-tree renormalization for files already LF in repo)uv run pytest -x→ 147 passed (verifies_write_if_missing(newline="")doesn't break anything; on Linux/macOS\nwas always written literally, so behavior is identical)uv run nasde init /tmp/x -n x; file /tmp/x/tasks/example-task/tests/test.sh→ "ASCII text" without "CRLF"Windows — verified end-to-end during PR development
nasde install-skills --force→ 4 skills installednasde run --variant claude-vanilla --tasks python-gilded-rose-polymorphism -C examples/refactoring-skill --harbor-env daytona --without-eval→n_completed_trials: 1, n_errored_trials: 0; verifier ran the full pytest suite (23/23 passed); trial received a legitimate reward score (the agent's solution didn't satisfy all rubric criteria, but the system scored it correctly rather than crashing — that's the point: pipeline is healthy)uv run nasde initproduced.gitattributes(1038 B) andtest.sh(69 B, no\rbyte) on Windows🤖 Generated with Claude Code