Repository navigation
Windows install: interpreter probe, UTF-8 I/O and LF line endings - #57
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every text open(), os.fdopen() and text=True subprocess call in lib/sync.py and smoke/drive.py names encoding="utf-8", so a cp1252-locale Windows run handles non-ASCII skill text. Generated files (rewritten skill files, frontmatter, codex agents/openai.yaml, managed marker, lock file, saved patches) are written with newline="\n"; provider instructions files keep newline="", and the git ignore append gains only the encoding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sync.sh now runs the first candidate that passes a 3.9+ check (the Windows Store shim and older Pythons are skipped), with -I -X utf8. When none qualifies it names the floor and every candidate tried and exits 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dows-install-fixes--t55
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ore.autocrlf says - .gitattributes declares `* text=auto eol=lf` (renormalize changed no file). - New vendor clones are made with `-c core.autocrlf=false`, recorded in their config. An existing clone whose effective core.autocrlf is true gets a local false and one index drop plus hard reset; otherwise it is left untouched. - Patches are read as UTF-8, CRLF turned into LF, and fed to `git -c core.autocrlf=false apply` on stdin, in both the build and `sync.sh edit`. - sh() can send stdin input, as UTF-8 bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dows-install-fixes--t54
PNG signatures contain a CR byte; line endings only apply to text files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Forces core.autocrlf true before checkout, uses setup-python's python, and checks the install and a no-change re-sync like fresh-install. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tart Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the reset succeeds The one-time CRLF repair of a vendor clone wrote core.autocrlf=false before `git rm --cached` and `git reset --hard`. A failed reset (a locked file on Windows) left an empty index and CRLF files, and the repair never retried. Run rm/reset under `-c core.autocrlf=false` and persist the local setting last; `--ignore-unmatch` lets the retry run on the emptied index. Co-Authored-By: Claude Opus 5.5 <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
A fresh Windows clone (Git Bash, Git for Windows' default
core.autocrlf=true, Python from python.org) can now run./sync.shand install every skill. Linux and macOS behave as before.Encoding: an AST test fails if any text-mode
open,os.fdopenorsubprocesscall in the sync library or the smoke driver doesn't passencoding="utf-8".Evidence
core.autocrlf=trueconverts LF to CRLF on checkout on any OS, so the Windows failures reproduce in the sandbox tests on Linux and macOS.develop:FAIL … patch failed: patches/<name>.patchand exit 1.core.autocrlf=true→ installed skill files contain\r.python3→ exit 49, "Python was not found…".DEVFLOW_REQUIRE_VENDORS=1 python3 -m unittest→ 323 passed, 0 failed (baseline 267; 56 new tests).core.autocrlf=true, and a re-sync reports no change.python3→python→py -3, skips an interpreter below 3.9, and reports the failure.windows-installjob runs for the first time on this PR.Merge Danger
Door: two-way
The only step that rewrites anything on a user's machine is the one-time vendor-clone repair. It runs
git reset --hardinsidevendor/, which is regenerable and never edited (AGENTS.md), and only when the clone's effectivecore.autocrlfistrue. Default Linux and macOS setups never trigger it. The.gitattributesrenormalize changed no file content.Blast Radius: installer
Every
./sync.shrun goes through the new interpreter probe and the stdin patch path. The new tests cover both on Linux and macOS. Windows coverage is the new CI job only; the unit suite's Windows port is #51.Tickets
324c8711c5386ad05b6000ff2d7770de2deRulings made during the build:
core.autocrlf=true,git applywrites CRLF even for LF input. A test now pins that installed skills are LF, and patches are applied with autocrlf off.Follow-ups
Ruling for the maintainer
windows-installjob copiesfresh-install's managed-skill check and its re-sync check, so the status-word list now lives in three places: twice inci.ymland once intests/test_line_endings.py. Either fix (an OS matrix, or a shared check script) would break Windows CI job and README #56's acceptance tests, which pin awindows-latestjob containing the check. Decide whether to restructure and update those tests together.Minor findings from the final review
core.autocrlfto the stringtrue. git's other true spellings (yes,on,1) skip the repair; usegit config --type=bool.sh()decodes git output strictly as UTF-8, so a non-UTF-8 byte (e.g. a Latin-1 vendor commit message in--update) now raises. Considererrors="replace", as the stdin path already does.sync.sh savewrites LF and UTF-8.devflow.local.json, the git ignore append and the smoke driver's writes still use platform newlines.apply_patchconverts every CRLF, including any inside content lines. This has no effect today, because no vendor file has CRLF in its index.NAMESdict intest_interpreter_probe.py;WindowsQuickstartTestborrowingReadmeFirstRunTest.quickstart; the harness re-readingmanifest.jsonin three places.Closes #52
Closes #53
Closes #54
Closes #55
Closes #56
Closes #48
Closes #49
Closes #50
🤖 Generated with Claude Code