Add macOS runner to Go CI and optimize linter#486
Conversation
- Added `macos-latest` to the Go workflow matrix to catch macOS-specific regressions. - Restricted `golangci-lint` to run only on `ubuntu-latest` to save CI resources. Addresses: #485 Co-authored-by: F1bonacc1 <806740+F1bonacc1@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…em tests with state polling
ShutDownProject returns once child processes have exited, but each process's stdout-reader goroutine is abandoned during shutdown (process.go waitForStdOutErr → procRunCtx.Done) and may still be flushing the bash trap output to the project log file. Reading the file once after ShutDownProject is a race: on Linux the flush usually beats the test; on macOS CI it doesn't, leaving the file empty and failing the assertion. Poll the file with a 5s deadline instead, breaking out as soon as the expected exit order materializes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous fixture relied on a bash trap printing "X: exit" to
stdout when SIGTERM arrived, then read those lines back out of the
process-compose project log. That depended on three racy things that
all happen to line up on Linux but not on macOS CI:
- bash having installed its trap and being parked in `sleep` by
the time SIGTERM arrives at the process group;
- the trap's stdout write reaching the pipe before process-compose's
waitForStdOutErr abandons the drain via procRunCtx.Done; and
- the per-process handleOutput goroutine reading those bytes before
the pipe is closed (macOS surfaced "read |0: file already closed"
errors and exit_code=-1 instead of 143 here).
Switch each process to use shutdown.command instead. shutdown.command
runs synchronously from doConfiguredStop, which is invoked in exactly
the order shutDownInOrder enforces, with no signal-delivery race and
no dependency on stdout pipe drain timing. Each command appends its
marker to $PC_TEST_SHUTDOWN_LOG (set per-run via t.Setenv to a
t.TempDir path) and then exits non-zero so process-compose SIGKILLs
the original `sleep 30`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|



This PR adds a macOS runner to the Go CI workflow as requested in issue #485. It also optimizes the workflow by ensuring that
golangci-lintonly runs on theubuntu-latestrunner, avoiding redundant linting on Windows and macOS.Key changes:
.github/workflows/go.ymlmatrix to includemacos-latest.if: matrix.os == 'ubuntu-latest'to theRun golangci-lintstep.PR created automatically by Jules for task 518654296387858214 started by @F1bonacc1