Skip to content

fix: reject named_session entries referencing pool agents (#574) #2204

fix: reject named_session entries referencing pool agents (#574)

fix: reject named_session entries referencing pool agents (#574) #2204

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
# Detect which paths changed to gate conditional jobs.
changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
mail: ${{ steps.filter.outputs.mail }}
docker: ${{ steps.filter.outputs.docker }}
k8s: ${{ steps.filter.outputs.k8s }}
beads: ${{ steps.filter.outputs.beads }}
packs: ${{ steps.filter.outputs.packs }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: filter
with:
filters: |
mail:
- 'internal/mail/**'
- 'contrib/mail-scripts/**'
docker:
- 'internal/session/**'
- 'scripts/gc-session-docker'
- 'scripts/test-docker-session'
- 'contrib/session-scripts/**'
k8s:
- 'internal/session/**'
- 'contrib/session-scripts/gc-session-k8s*'
- 'test/integration/session_k8s_test.go'
beads:
- 'go.mod'
- 'internal/beads/**'
packs:
- 'examples/gastown/packs/**'
- 'internal/config/pack.go'
- 'internal/config/compose.go'
- 'cmd/gc/embed_builtin_packs.go'
# Always runs: lint, fmt, vet, unit tests, integration tests, coverage.
check:
name: Check
runs-on: ubuntu-latest
env:
# Pinned dependency versions — keep in sync with deps.env.
DOLT_VERSION: "1.86.1"
BD_VERSION: "v1.0.0"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: "1.25.8"
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y tmux jq
- name: Install dolt v${{ env.DOLT_VERSION }}
run: |
curl -fsSL https://github.com/dolthub/dolt/releases/download/v${{ env.DOLT_VERSION }}/install.sh | sudo bash
dolt version
- name: Install released bd v${{ env.BD_VERSION }}
run: |
archive="beads_${BD_VERSION#v}_linux_amd64.tar.gz"
mkdir -p "$RUNNER_TEMP/beads"
curl -fsSL -o "$RUNNER_TEMP/$archive" \
"https://github.com/gastownhall/beads/releases/download/${BD_VERSION}/${archive}"
tar -xzf "$RUNNER_TEMP/$archive" -C "$RUNNER_TEMP/beads" bd
sudo install -m 0755 "$RUNNER_TEMP/beads/bd" /usr/local/bin/bd
bd version
- name: Install Claude CLI
run: npm install -g @anthropic-ai/claude-code
- name: Install tools
run: make install-tools
- name: Lint
run: make lint
- name: Format
run: make fmt-check
- name: Vet
run: make vet
- name: Test
run: make test-cover
- name: Docs
run: make check-docs
- name: Acceptance tests (Tier A)
run: make test-acceptance
- name: Integration tests
continue-on-error: true # requires provider binaries (claude/codex) not available in CI
timeout-minutes: 35
run: make test-integration
- name: Upload coverage to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
with:
files: coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
# Runs when pack-related files change — full gastown integration suite.
pack-gate:
name: Pack compatibility gate
needs: [changes, check]
if: needs.changes.outputs.packs == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: "1.25.8"
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y tmux jq
- name: Install dolt
run: |
curl -fsSL https://github.com/dolthub/dolt/releases/download/v${{ env.DOLT_VERSION }}/install.sh | sudo bash
- name: Install released bd v${{ env.BD_VERSION }}
run: |
archive="beads_${BD_VERSION#v}_linux_amd64.tar.gz"
mkdir -p "$RUNNER_TEMP/beads"
curl -fsSL -o "$RUNNER_TEMP/$archive" \
"https://github.com/gastownhall/beads/releases/download/${BD_VERSION}/${archive}"
tar -xzf "$RUNNER_TEMP/$archive" -C "$RUNNER_TEMP/beads" bd
sudo install -m 0755 "$RUNNER_TEMP/beads/bd" /usr/local/bin/bd
- name: Install Claude CLI
run: npm install -g @anthropic-ai/claude-code
- name: Install tools
run: make install-tools
- name: Pack compatibility tests
run: make test-acceptance
env:
DOLT_VERSION: "1.86.1"
BD_VERSION: "v1.0.0"
# Runs when mail-related source paths change.
mcp-mail:
name: MCP mail conformance
needs: changes
if: needs.changes.outputs.mail == 'true'
runs-on: ubuntu-latest
continue-on-error: true # upstream mcp_agent_mail API may drift
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version-file: go.mod
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y jq curl
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: '3.12'
- name: Install mcp_agent_mail
run: pip install 'mcp-agent-mail==0.1.0'
- name: MCP mail conformance test
run: make test-mcp-mail
# Runs when session/Docker-related source paths change.
docker-session:
name: Docker session
needs: changes
if: needs.changes.outputs.docker == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version-file: go.mod
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y jq
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Install tools
run: make install-tools
- name: Docker session tests
run: make test-docker
# Runs when session/K8s-related source paths change.
# Requires K8s CI infrastructure — no-op until secrets are configured.
k8s-session:
name: K8s session
needs: changes
if: needs.changes.outputs.k8s == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version-file: go.mod
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y jq
- name: K8s session tests
if: env.GC_K8S_AVAILABLE == 'true'
env:
GC_K8S_AVAILABLE: ${{ secrets.GC_K8S_AVAILABLE }}
run: make test-k8s