Skip to content

feat: add CI pipeline, pin golangci-lint, fix tmux session ID race#9

Merged
xico42 merged 1 commit into
mainfrom
feat/control-plane
May 18, 2026
Merged

feat: add CI pipeline, pin golangci-lint, fix tmux session ID race#9
xico42 merged 1 commit into
mainfrom
feat/control-plane

Conversation

@xico42
Copy link
Copy Markdown
Owner

@xico42 xico42 commented May 18, 2026

Summary

  • Three parallel GitHub Actions jobs on every PR: unit tests (80% coverage gate), integration tests (tmux via apt), and lint — each mapping to a Makefile target
  • golangci-lint pinned via go.mod tool directive; make setup expanded with vendor and tools targets for one-command fresh-clone setup
  • Fixed a race in NewSessionWithEnv where a fast-exiting session command could destroy the tmux session before the session ID round-trip completed — captured atomically via new-session -P -F "#{session_id}"

Test plan

  • All three CI jobs pass on this PR
  • Push a new commit to the PR and confirm the previous run is cancelled (concurrency block)
  • Run make setup from a clean state locally to verify end-to-end

🤖 Generated with Claude Code

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>
@xico42 xico42 force-pushed the feat/control-plane branch from ed24918 to 62635e9 Compare May 18, 2026 22:40
@xico42 xico42 merged commit 7691bec into main May 18, 2026
3 checks passed
@xico42 xico42 deleted the feat/control-plane branch May 18, 2026 22:43
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