Skip to content

fix(windows): native Windows support — 0 failures on windows-latest (2.1.1) - #142

Merged
sandstream merged 2 commits into
mainfrom
windows-ci/native-port
Jun 27, 2026
Merged

fix(windows): native Windows support — 0 failures on windows-latest (2.1.1)#142
sandstream merged 2 commits into
mainfrom
windows-ci/native-port

Conversation

@sandstream

Copy link
Copy Markdown
Owner

kit 2.1 reach — native Windows. Verified on a real windows-latest runner via the windows.yml probe loop: 17 → 3 → 0 failures, now 1798/1798 pass. kit runs natively on Windows (PowerShell/cmd), not only via WSL2.

Cross-platform fixes (all separator/shell/perm-safe; macOS suite stays green at 1802/1803, only the known iCloud ' 2' junk):

  • Path handling: path.isAbsolute, path.relative containment, path.posix.join for shell-profile content, manual /+\ repo-name split.
  • Bare-tool resolution uses where on win32; plugin adapters import via pathToFileURL.
  • ~/.kit/bin/kit emits a managed kit.cmd shim on win32 (marker verbatim).
  • Secret-file hardening asserts the platform guarantee (icacls on NTFS, 0600 on POSIX); bumblebee cache-reuse no longer short-circuits on the platform gate.
  • public-surface golden canonicalized (forward-slash + LF, .gitattributes eol=lf) so one snapshot matches all OSes.
  • A real cross-platform test bug fixed: clone.test used execSync('git commit -m \'…\'') which cmd.exe tokenizes wrong on Windows (empty source repo → failing clone); now execFileSync('git', [...]).
  • PLATFORM_SUPPORT.md updated; residual gaps honest (bumblebee binary ships POSIX-only → honest-skip).

🤖 Generated with Claude Code

sandstream and others added 2 commits June 27, 2026 11:58
kit 2.1 reach — native Windows. Build + ~all tests already ran on windows-latest;
this closes the remaining 17 failures so kit runs natively on Windows (not only WSL2).
Verified cross-platform-safe (macOS suite stays green); windows-latest CI is the
Windows verifier.

- Path handling separator-agnostic: path.isAbsolute (not startsWith('/')),
  path.relative containment (memoryDirInsideRepo), path.posix.join for shell-profile
  content (mise-path), manual / + \ split for repo-name derivation (clone).
- Bare-tool resolution uses `where` on win32 (mise which fast path already worked).
- Plugin adapters import via pathToFileURL (a bare C:\... path is not a valid ESM URL).
- ~/.kit/bin/kit also emits a managed kit.cmd shim on win32 (the sh wrapper can't run).
- Secret-file hardening asserts the platform guarantee (icacls on NTFS, 0600 on POSIX).
- bumblebee cache-reuse + integrity no longer short-circuit on the platform gate.
- public-surface golden canonicalized (forward-slash + LF, pinned via .gitattributes
  eol=lf) so ONE committed snapshot matches macOS/Linux/Windows.
- PLATFORM_SUPPORT.md updated (native Windows builds + passes; residual gaps honest,
  e.g. bumblebee binary ships POSIX-only -> honest-skip on Windows).

macOS Node 22: build clean, 1802/1803 (only the known iCloud ' 2' junk), self-audit 0 fail.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…c (no cmd.exe quote bug)

Last 3 native-Windows subtests. (1) generateKitCmdWrapper wrote the marker minus
its leading '# ' so the managed-check missed the shim; emit WRAPPER_MARKER verbatim
after 'rem'. (2+3) clone.test before() used execSync('git commit -m ...') which
cmd.exe tokenizes wrong on Windows -> empty source repo -> clone had no files ->
haskitToml=false + README ENOENT. Use execFileSync('git',[...]) (no shell) so the
setup commit succeeds on every OS. macOS stays green (1802/1803, only known junk).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

@sandstream
sandstream merged commit b339d28 into main Jun 27, 2026
18 checks passed
@sandstream
sandstream deleted the windows-ci/native-port branch June 27, 2026 10:16
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.

1 participant