Build and test on Windows - #43
Merged
Merged
Conversation
internal/osrun used Setpgid and syscall.Kill without a build constraint, so any module importing runner, v2/runner, or clienthost failed to compile on Windows (seen via `go install github.com/BrokkAi/micro-acp@latest`). Process-group setup and tree kill now live in kill_unix.go and kill_windows.go; Windows uses taskkill /T with a direct-kill fallback. Tests used Unix-rooted fixture paths that host-absolute validation rejects on Windows; internal/testpath roots them on a drive there. The FIFO test is Unix-only, symlink tests skip without the Windows symlink privilege, and the v2 MCP cookbook example (Unix path in its fixed output) is excluded on Windows. CI gains a windows-latest job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clienthost kills every terminal again after Wait so Unix can reap orphans in the process group. On Windows, Wait releases Go's handle, so taskkill /T by PID could hit an unrelated process that reused it. Kill now opens its own handle, confirms Go has not reaped the command, and returns os.ErrProcessDone otherwise, as Unix does. TestTerminalSymlinkWorkspace ran pwd, which Git Bash prints as /c/...; Windows now uses cmd /c cd for the native spelling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Problem
go install github.com/BrokkAi/micro-acp@latestfails on Windows:internal/osrunused Unix-only syscalls without a build constraint, so anything importingrunner,v2/runner, orclienthostcould not compile on Windows. CI only covered Linux and macOS.Changes
internal/osrun: process-group setup andKillsplit intokill_unix.go(unchangedSetpgid+ groupSIGKILL) andkill_windows.go(CREATE_NEW_PROCESS_GROUP,taskkill /T /Ffor the tree, direct kill fallback).acpvalidate.AbsolutePathis intentionally host-absolute, so Unix fixtures like/tmpfail on Windows. Newinternal/testpath.Root(""on Unix,"C:"on Windows) prefixes those fixtures; Unix behavior is byte-identical.clienthost/regression_unix_test.go; symlink tests skip only onERROR_PRIVILEGE_NOT_HELD;Example_v2McpServers(Unix path in fixed// Output:) is!windows.windows-latestadded withfail-fast: false. License and Python script checks stay on Linux/macOS (CRLF checkout changes the hashed LICENSE bytes; they're OS-independent anyway).Verification
go build ./...,go vet ./...,go test -count=1 ./...all pass (race not run locally: no cgo).GOOS=linux/GOOS=darwin go vet ./...clean.🤖 Generated with Claude Code