feat: add CI pipeline, pin golangci-lint, fix tmux session ID race#9
Merged
Conversation
Three independent GitHub Actions jobs trigger on every pull request:
unit tests with the 80% coverage gate, integration tests (with tmux
installed via apt), and lint. Each job maps directly to a Makefile
target so CI commands stay in lockstep with `make check`. A concurrency
block cancels in-flight runs on new pushes.
`golangci-lint` is now pinned via the `tool` directive in `go.mod`.
`go tool golangci-lint` compiles the exact pinned version from the
module graph — no separate install needed, and CI uses the same binary
as a local `make lint`. `make setup` also gains `vendor` and `tools`
targets so a fresh clone is one command from a working environment.
Implementing the integration tests surfaced a race in session creation:
`NewSessionWithEnv` followed a separate `display-message` round-trip to
retrieve the session ID. If the session command exits quickly, tmux
destroys the session before the second call completes. The fix captures
the ID atomically at creation via `new-session -P -F "#{session_id}"`.
This also affects production: any agent with a fast-exit command would
previously have returned an error to the caller.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ed24918 to
62635e9
Compare
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
golangci-lintpinned viago.mod tooldirective;make setupexpanded withvendorandtoolstargets for one-command fresh-clone setupNewSessionWithEnvwhere a fast-exiting session command could destroy the tmux session before the session ID round-trip completed — captured atomically vianew-session -P -F "#{session_id}"Test plan
make setupfrom a clean state locally to verify end-to-end🤖 Generated with Claude Code