Skip to content

feat: add Windows (x64) build and CI smoke test#20

Merged
rhuanbarreto merged 2 commits into
mainfrom
claude/stupefied-swirles
Feb 28, 2026
Merged

feat: add Windows (x64) build and CI smoke test#20
rhuanbarreto merged 2 commits into
mainfrom
claude/stupefied-swirles

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Adds native Windows (x64) support across the full stack: npm wrapper, CLI runtime guard, platform package, release workflow, and CI
  • Fixes cross-platform path handling bugs in the engine (glob, import, relative paths) that caused backslash issues on Windows
  • Adds a windows-smoke-test.yml CI workflow that runs lint, typecheck, format, tests, and a compiled binary smoke test on windows-latest

Changes

Platform support

  • bin/archgate.cjs: resolves archgate.exe on win32, maps win32/x64 to archgate-win32-x64
  • src/cli.ts: platform guard now accepts win32
  • src/helpers/git.ts: actionable error message with install URL when git is missing on Windows
  • package.json: added win32 to os field and archgate-win32-x64 to optionalDependencies; cross-platform build:check cleanup
  • packages/archgate-win32-x64/: new platform package with bin/archgate.exe

Path handling fixes

  • src/helpers/adr-writer.ts: use basename() instead of .split("/").pop() (backslash-safe)
  • src/engine/loader.ts: use pathToFileURL() for dynamic import() (Windows paths break bare specifiers)
  • src/engine/runner.ts: normalize Bun.Glob.scan() and relative() output to forward slashes
  • src/engine/git-files.ts: normalize glob output to match git ls-files forward-slash convention
  • Tests: use forward-slash paths in dynamically written import specifiers

CI

  • .github/workflows/release-binaries.yml: added bun-windows-x64 matrix entry with Windows-specific build/publish steps
  • .github/workflows/windows-smoke-test.yml: new workflow — runs on PRs to main, validates the full test suite + binary smoke test on windows-latest

Docs

  • README, CONTRIBUTING, CLAUDE.md updated to reflect Windows support

Test plan

  • bun run validate passes on Windows (all 220 tests, 9 ADR rules, build check)
  • Windows smoke test CI workflow runs successfully on this PR
  • Existing Linux CI (code-pull-request.yml) still passes

🤖 Generated with Claude Code

rhuanbarreto and others added 2 commits February 28, 2026 02:14
- Add win32/x64 platform support across all layers:
  - npm package wrapper (bin/archgate.cjs) resolves .exe binary
  - Platform guard in src/cli.ts accepts win32
  - package.json os field and optionalDependencies
  - Git helper gives actionable install URL on Windows
- Add archgate-win32-x64 platform package (packages/)
- Add bun-windows-x64 target to release-binaries workflow
  with Windows-specific build and publish steps
- Add windows-smoke-test.yml CI workflow that runs lint,
  typecheck, format, tests, and binary smoke test on PRs
- Fix cross-platform path handling throughout the codebase:
  - adr-writer: use basename() instead of split("/").pop()
  - loader: use file:// URLs for dynamic import on Windows
  - runner: normalize glob/relative paths to forward slashes
  - git-files: normalize glob scan output to match git output
- Fix tests: use forward-slash paths in import specifiers
- Update docs (README, CONTRIBUTING, CLAUDE.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Windows git auto-converts LF to CRLF on checkout, which
causes Prettier format checks to fail in CI. Force LF
for all text files via .gitattributes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rhuanbarreto rhuanbarreto merged commit c59eec4 into main Feb 28, 2026
3 checks passed
@archgatebot archgatebot Bot mentioned this pull request Feb 28, 2026
rhuanbarreto added a commit that referenced this pull request Feb 28, 2026
* feat: add Windows (x64) build and CI smoke test

- Add win32/x64 platform support across all layers:
  - npm package wrapper (bin/archgate.cjs) resolves .exe binary
  - Platform guard in src/cli.ts accepts win32
  - package.json os field and optionalDependencies
  - Git helper gives actionable install URL on Windows
- Add archgate-win32-x64 platform package (packages/)
- Add bun-windows-x64 target to release-binaries workflow
  with Windows-specific build and publish steps
- Add windows-smoke-test.yml CI workflow that runs lint,
  typecheck, format, tests, and binary smoke test on PRs
- Fix cross-platform path handling throughout the codebase:
  - adr-writer: use basename() instead of split("/").pop()
  - loader: use file:// URLs for dynamic import on Windows
  - runner: normalize glob/relative paths to forward slashes
  - git-files: normalize glob scan output to match git output
- Fix tests: use forward-slash paths in import specifiers
- Update docs (README, CONTRIBUTING, CLAUDE.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add .gitattributes to enforce LF line endings

Windows git auto-converts LF to CRLF on checkout, which
causes Prettier format checks to fail in CI. Force LF
for all text files via .gitattributes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@rhuanbarreto rhuanbarreto deleted the claude/stupefied-swirles branch March 3, 2026 22:09
rhuanbarreto added a commit that referenced this pull request Mar 3, 2026
* feat: add Windows (x64) build and CI smoke test

- Add win32/x64 platform support across all layers:
  - npm package wrapper (bin/archgate.cjs) resolves .exe binary
  - Platform guard in src/cli.ts accepts win32
  - package.json os field and optionalDependencies
  - Git helper gives actionable install URL on Windows
- Add archgate-win32-x64 platform package (packages/)
- Add bun-windows-x64 target to release-binaries workflow
  with Windows-specific build and publish steps
- Add windows-smoke-test.yml CI workflow that runs lint,
  typecheck, format, tests, and binary smoke test on PRs
- Fix cross-platform path handling throughout the codebase:
  - adr-writer: use basename() instead of split("/").pop()
  - loader: use file:// URLs for dynamic import on Windows
  - runner: normalize glob/relative paths to forward slashes
  - git-files: normalize glob scan output to match git output
- Fix tests: use forward-slash paths in import specifiers
- Update docs (README, CONTRIBUTING, CLAUDE.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add .gitattributes to enforce LF line endings

Windows git auto-converts LF to CRLF on checkout, which
causes Prettier format checks to fail in CI. Force LF
for all text files via .gitattributes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
rhuanbarreto added a commit that referenced this pull request Mar 4, 2026
* feat: add Windows (x64) build and CI smoke test

- Add win32/x64 platform support across all layers:
  - npm package wrapper (bin/archgate.cjs) resolves .exe binary
  - Platform guard in src/cli.ts accepts win32
  - package.json os field and optionalDependencies
  - Git helper gives actionable install URL on Windows
- Add archgate-win32-x64 platform package (packages/)
- Add bun-windows-x64 target to release-binaries workflow
  with Windows-specific build and publish steps
- Add windows-smoke-test.yml CI workflow that runs lint,
  typecheck, format, tests, and binary smoke test on PRs
- Fix cross-platform path handling throughout the codebase:
  - adr-writer: use basename() instead of split("/").pop()
  - loader: use file:// URLs for dynamic import on Windows
  - runner: normalize glob/relative paths to forward slashes
  - git-files: normalize glob scan output to match git output
- Fix tests: use forward-slash paths in import specifiers
- Update docs (README, CONTRIBUTING, CLAUDE.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add .gitattributes to enforce LF line endings

Windows git auto-converts LF to CRLF on checkout, which
causes Prettier format checks to fail in CI. Force LF
for all text files via .gitattributes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 4, 2026
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