Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 6 additions & 26 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,12 @@ jobs:
# store and the catalogue read would find no image. The runner's default builder loads it. The price
# is no gha layer cache: every run installs the CLI again, which is minutes, not tens of minutes.
#
# **spire-agent-claude-code is private, and its first push needs a person.** The CLI inside it is
# "All rights reserved", under Anthropic's Commercial Terms, which do not address redistribution
# (LICENSING.md, ADR-032 amended 2026-11-14). The image therefore carries no
# org.opencontainers.image.source label, so it is not linked to this public repository and inherits
# nothing from it. A new GHCR package is private unless someone changes it; after the first push the
# operator checks in the package settings that it still is (deploy/README.md, "Operator steps after
# merge"). Its Trivy findings go to the Security tab like every other image's.
# **spire-agent-claude-code is public, by operator decision (2026-11-15), and is removed if Anthropic asks.**
# The CLI inside it is "All rights reserved", under Anthropic's Commercial Terms, which say nothing about
# redistribution (LICENSING.md, ADR-032 amended 2026-11-15). Its source label links it to this public
# repository, which is also what lets the workflow's token create the package: a package linked to a public
# repository is created public, with no manual visibility step. If Anthropic asks for its removal, delete the
# package and drop it from the matrix. Its Trivy findings go to the Security tab like every other image's.
#
# `dockerfile` is not read by the steps (the scripts name their own); it is here so
# ApkUpgradeIsNotCachedTest can map every published image to the Dockerfile it comes from.
Expand Down Expand Up @@ -281,22 +280,3 @@ jobs:
"ghcr.io/artyomsv/${{ matrix.name }}:sha-${short}"
docker push "ghcr.io/artyomsv/${{ matrix.name }}:edge"
docker push "ghcr.io/artyomsv/${{ matrix.name }}:sha-${short}"

# The Claude Code CLI may not be redistributed, so this package must stay private. It is private
# only because it has no source label and a new GHCR package starts private; a later label or a
# visibility change would publish it with no signal. An anonymous pull that succeeds fails the
# job, so the next master build turns that change into a red check. It cannot undo a push.
- name: Check the package is still private
if: github.event_name == 'push' && matrix.name == 'spire-agent-claude-code'
run: |
short="${GITHUB_SHA::7}"
docker logout ghcr.io
for tag in edge "sha-${short}"; do
image="ghcr.io/artyomsv/${{ matrix.name }}:${tag}"
if docker pull "${image}" >/dev/null 2>&1; then
docker rmi "${image}" || true
echo "::error::${image} was pulled without credentials, so the package is public. The Claude Code CLI must not be redistributed: make the package private in its GHCR package settings."
exit 1
fi
echo "${image}: the package refused an anonymous pull, as expected"
done
13 changes: 7 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,10 @@ its ticket told. M5 is next; harness reviews are being built alongside it.
- **The automated GitLab run-unit gap is still open.** RunUnitSpec has no network field, so a
run unit cannot reach the e2e stack's GitLab. A live GitHub run does not close it.
- **The factory images are published on merge to master but not yet live-pulled.** docker.yml builds the run
worker, publisher, model proxy, egress proxy and Codex agent as public GHCR packages and the Claude Code agent as a
private one (ADR-032 amended 2026-11-14); no deployment has run a unit from them yet, the packages' visibility is
set by hand after the first push (deploy/README.md), and they are amd64 only, unsigned and without an SBOM.
worker, publisher, model proxy, egress proxy, Codex agent and Claude Code agent as public GHCR packages (each links to
this public repository by its source label; the Claude Code one by operator decision 2026-11-15, removed if Anthropic
asks; ADR-032 amended 2026-11-14 and 2026-11-15); no deployment has run a unit from them yet, and they are amd64
only, unsigned and without an SBOM.
- **Claude Code ran on one model and one CLI version** (`claude-sonnet-5-5`, 2.1.319): its charge is not reconciled
with the vendor, only the measured canaries are proven absent, and a re-review, a reply and a rate limit on it have
no live run (docs/UNVERIFIED.md, the 3b entry).
Expand All @@ -301,9 +302,9 @@ docker compose up -d # Postgres :34432 + Redpanda :34092
cd spire-ui && npm install && npm run dev # React dashboard :34000 (UI_PORT)
```

**The factory's images** are on GHCR (`ghcr.io/artyomsv/spire-{run-worker,publisher,model-proxy,egress-proxy,agent-codex}`,
`:edge` and `:sha-<short>` from docker.yml; `compose.ghcr.yml` defaults to them). The Claude Code agent is a **private**
package only (its CLI may not be redistributed; LICENSING.md). The run worker pulls a unit image only when its daemon
**The factory's images** are on GHCR (`ghcr.io/artyomsv/spire-{run-worker,publisher,model-proxy,egress-proxy,agent-codex,agent-claude-code}`,
`:edge` and `:sha-<short>` from docker.yml; `compose.ghcr.yml` defaults to them). The Claude Code agent is public by operator
decision and removed if Anthropic asks (its CLI's terms do not address redistribution; LICENSING.md). The run worker pulls a unit image only when its daemon
lacks it, so pin `SPIRE_VERSION` or pull `edge` by hand on upgrade. For the dev stack and `compose.yml` they are still
built locally (SMOKE-TEST Mode Q, Mode R §7):

Expand Down
6 changes: 3 additions & 3 deletions LICENSING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ libraries you build *against* are Apache-2.0, the services you *run* are FSL.
| `spire-worksource-gitlab` | Apache-2.0 | Reference GitLab ticket work source with separate write facade. |
| `spire-harness` | Apache-2.0 | The agent-execution SPI. Every harness arm compiles against it (ADR-030). |
| `spire-harness-codex` | Apache-2.0 | Reference harness arm — the worked example a second arm copies. |
| `spire-harness-claude-code` | Apache-2.0 | Harness arm for Claude Code: review runs only, behind the model proxy, paid with an API key. The CLI itself is not redistributed: its image goes only to a private package (see "Published images"). |
| `spire-harness-claude-code` | Apache-2.0 | Harness arm for Claude Code: review runs only, behind the model proxy, paid with an API key. Its image is published publicly, though the CLI is Anthropic's (see "Published images"). |
| `spire-secrets` | Apache-2.0 | One credential scrubber, for every process that writes a failure message a human reads. JDK-only ON PURPOSE: the run worker must not inherit a git library to obtain it. |
| `spire-workspace` | Apache-2.0 | The publisher's git library: bare clone, bundle fetch, diff, gated push. |
| `spire-runtime` | Apache-2.0 | The run-placement SPI. Every runtime arm implements it (ADR-039). |
Expand Down Expand Up @@ -61,12 +61,12 @@ inside it: the services, the dashboard, `spire-publisher` and `spire-model-proxy
are FSL-1.1-ALv2; `spire-egress-proxy` and `spire-agent-codex` are Apache-2.0.

The two agent images also hold a third-party harness CLI, and the two are
treated differently (ADR-032, amended 2026-11-14):
treated differently (ADR-032, amended 2026-11-14 and 2026-11-15):

| Image | Harness licence | Published |
|---|---|---|
| `spire-agent-codex` | `@openai/codex`, Apache-2.0 | **Public**, with the CLI's notice in `/usr/share/licenses/` (`deploy/agent/codex/NOTICE`). |
| `spire-agent-claude-code` | `@anthropic-ai/claude-code`, "All rights reserved", Anthropic's Commercial Terms | **Private** package only, for the operator's own cluster, and with no source label linking it to this repository. Those terms do not address redistribution, so a public image needs Anthropic's written permission. Anyone else builds it from the recipe with `deploy/agent/build-claude-code.sh`. |
| `spire-agent-claude-code` | `@anthropic-ai/claude-code`, "All rights reserved", Anthropic's Commercial Terms | **Public**, by operator decision (2026-11-15), with the source label linking it to this repository. Those terms do not address redistribution and Anthropic has not given written permission; if Anthropic asks for its removal, the package is removed. Anyone can also build it from the recipe with `deploy/agent/build-claude-code.sh`. |

## What FSL-1.1-ALv2 lets you do

Expand Down
6 changes: 3 additions & 3 deletions deploy/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ SPIRE_OIDC_RUN_WORKER_SECRET=CHANGE_ME
# SPIRE_RUN_EGRESS_IMAGE=spire-egress-proxy:latest

# A private registry for the unit images: all three or none (a partial set stops the worker). The
# public GHCR images need none. A private package does, such as a Claude Code image in your own
# public GHCR images need none. A private package does, such as an image of your own in your
# GHCR namespace: host ghcr.io, your GitHub user, and a token with read:packages.
# SPIRE_RUN_REGISTRY_HOST=ghcr.io
# SPIRE_RUN_REGISTRY_USERNAME=CHANGE_ME
Expand All @@ -116,8 +116,8 @@ SPIRE_OIDC_RUN_WORKER_SECRET=CHANGE_ME
# ghcr.io/artyomsv/spire-agent-codex:${SPIRE_VERSION}.
# SPIRE_FACTORY_AGENT_IMAGE_CODEX=spire-agent-codex:latest
# Claude Code reviews pull requests only, on an Anthropic API key, behind the model proxy. Opt-in:
# unset (or `none`) leaves it unconfigured. Its image is never public (LICENSING.md, "Published
# images"): build it with ./deploy/agent/build-claude-code.sh, or name your own private package
# unset (or `none`) leaves it unconfigured. Its image is public on GHCR, removed if Anthropic asks
# (LICENSING.md, "Published images"): build it with ./deploy/agent/build-claude-code.sh, or name your own private package
# and set SPIRE_RUN_REGISTRY_* above so the run worker can pull it.
# SPIRE_FACTORY_AGENT_IMAGE_CLAUDE_CODE=spire-agent-claude-code:latest

Expand Down
22 changes: 12 additions & 10 deletions deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,11 @@ file (LICENSING.md, "Published images").
| `ghcr.io/artyomsv/spire-model-proxy` | Run unit: holds the model credential | FSL-1.1-ALv2 | public |
| `ghcr.io/artyomsv/spire-egress-proxy` | Run unit: the agent's only way out | Apache-2.0 | public |
| `ghcr.io/artyomsv/spire-agent-codex` | Reference Codex agent, model catalogue baked in | Apache-2.0 (Codex CLI: Apache-2.0) | public |
| `ghcr.io/artyomsv/spire-agent-claude-code` | Reference Claude Code agent, reviews only | Apache-2.0 recipe; the CLI is Anthropic's | **private** |
| `ghcr.io/artyomsv/spire-agent-claude-code` | Reference Claude Code agent, reviews only | Apache-2.0 recipe; the CLI is Anthropic's | public |

The Claude Code image is not public and cannot be: the CLI is "All rights reserved", under
Anthropic's Commercial Terms. Build your own with `./deploy/agent/build-claude-code.sh` and push it
The Claude Code CLI is "All rights reserved", under Anthropic's Commercial Terms, which say nothing
about redistribution. The image is published publicly by operator decision (2026-11-15) and removed on
Anthropic's request. You can also build your own with `./deploy/agent/build-claude-code.sh` and push it
to a registry only you can read; set `SPIRE_FACTORY_AGENT_IMAGE_CLAUDE_CODE` to it and the three
`SPIRE_RUN_REGISTRY_*` values so the run worker can pull it (`deploy/.env.example`).

Expand All @@ -245,10 +246,11 @@ done
### Operator steps after merge

docker.yml pushes the factory images for the first time on the first master build after the PR that
added them. A new GHCR package is private until someone changes it, so once that build is green:

1. In each package's settings on GitHub (Packages → package → Package settings → Change visibility),
make these five **public**: `spire-run-worker`, `spire-publisher`, `spire-model-proxy`,
`spire-egress-proxy`, `spire-agent-codex`.
2. Open `spire-agent-claude-code` and confirm it is **private** and not linked to the repository. It
carries no source label, so nothing should have linked it; check rather than assume.
added them. No manual visibility step remains: each of the six images (`spire-run-worker`,
`spire-publisher`, `spire-model-proxy`, `spire-egress-proxy`, `spire-agent-codex`,
`spire-agent-claude-code`) carries the `org.opencontainers.image.source` label, so GHCR links it to this
public repository, the workflow's token may create it, and it is created **public**. Once the build is green,
pull each anonymously to check.

`spire-agent-claude-code` is public by operator decision (2026-11-15). If Anthropic asks for its removal,
delete the package in GHCR and drop it from the `agents` matrix in `docker.yml`.
20 changes: 10 additions & 10 deletions deploy/agent/claude-code/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The reference agent image for the Claude Code arm (harness reviews 3b, ADR-050).
#
# A copy of deploy/agent/codex/Dockerfile with four changes: the npm package, the harness label,
# CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC, and the licence labels (no source label; see below). Build it with the script, which bakes in the model
# CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC, and the licence labels. Build it with the script, which bakes in the model
# list:
#
# ./deploy/agent/build-claude-code.sh
Expand All @@ -23,18 +23,18 @@ RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
# workspace is measured on this version (harness reviews 3b, Task 3).
RUN npm i -g @anthropic-ai/claude-code@2.1.319 && npm cache clean --force

# CI pushes this image to a PRIVATE package (ghcr.io/artyomsv/spire-agent-claude-code) for the
# operator's own cluster; it is never public. The CLI above is "All rights reserved", under Anthropic's
# Commercial Terms, which do not address redistribution (LICENSING.md; ADR-032 as amended 2026-11-14).
# CI pushes this image to a PUBLIC package (ghcr.io/artyomsv/spire-agent-claude-code). The CLI above is
# "All rights reserved", under Anthropic's Commercial Terms, which say nothing about redistribution.
# Operator decision, 2026-11-15: publish it publicly, and if Anthropic asks for its removal we comply
# (delete the package and stop publishing it; LICENSING.md; ADR-032 as amended 2026-11-15).
#
# **No org.opencontainers.image.source label, on purpose.** GHCR links a package to the repository that
# label names, and a linked package takes its access from that repository — here a public one. Left
# unlinked, the package is the operator's own, private by default; the operator confirms it after the
# first push (deploy/README.md). The licences label names both parts: the recipe and entrypoint
# (Apache-2.0, LICENSE) and the CLI, which has no SPDX identifier.
# The source label is what links the package to this public repository, and a linked package is created
# public and may be pushed by the workflow's token; the licences label names both parts: the recipe and
# entrypoint (Apache-2.0, LICENSE) and the CLI, which has no SPDX identifier.
COPY LICENSE /usr/share/licenses/code-spire/
LABEL org.opencontainers.image.title="spire-agent-claude-code" \
org.opencontainers.image.description="Code Spire reference agent image for Claude Code reviews (private build)" \
org.opencontainers.image.description="Code Spire reference agent image for Claude Code reviews" \
org.opencontainers.image.source="https://github.com/artyomsv/code-spire" \
org.opencontainers.image.licenses="Apache-2.0 AND LicenseRef-Anthropic-Commercial-Terms"

# The mount points exist, owned by the agent user, so a fresh named volume mounted there inherits
Expand Down
10 changes: 5 additions & 5 deletions deploy/compose.ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ services:
# GHCR when its daemon lacks it. Pulled ONCE — see SPIRE_VERSION in deploy/.env.example.
SPIRE_FACTORY_AGENT_IMAGE_CODEX: ${SPIRE_FACTORY_AGENT_IMAGE_CODEX:-ghcr.io/artyomsv/spire-agent-codex:${SPIRE_VERSION:-edge}}
# Claude Code is opt-in: unset passes `none`, which the orchestrator reads as "not configured" (an empty
# value would fail its startup). Its image is a PRIVATE package (LICENSING.md, "Published images"), so
# there is no public default to name: set this to your own build or private package, and set the
# run worker's SPIRE_RUN_REGISTRY_* below so the pull is authenticated.
# value would fail its startup). The image is published (ghcr.io/artyomsv/spire-agent-claude-code,
# LICENSING.md "Published images"), but Claude Code stays opt-in, so the default is `none`: set this to
# the published image at SPIRE_VERSION, or to your own build.
SPIRE_FACTORY_AGENT_IMAGE_CLAUDE_CODE: ${SPIRE_FACTORY_AGENT_IMAGE_CLAUDE_CODE:-none}
SPIRE_FACTORY_FIX_HARNESS: ${SPIRE_FACTORY_FIX_HARNESS:-}
SPIRE_FACTORY_FIX_MODEL: ${SPIRE_FACTORY_FIX_MODEL:-}
Expand Down Expand Up @@ -211,8 +211,8 @@ services:
SPIRE_RUN_CREDENTIAL_PROXY_MODE: ${SPIRE_RUN_CREDENTIAL_PROXY_MODE:-REVIEWS}
Comment thread
artyomsv marked this conversation as resolved.
Resolved
SPIRE_RUN_CREDENTIAL_PROXY_IMAGE: ${SPIRE_RUN_CREDENTIAL_PROXY_IMAGE:-ghcr.io/artyomsv/spire-model-proxy:${SPIRE_VERSION:-edge}}
SPIRE_RUN_EGRESS_IMAGE: ${SPIRE_RUN_EGRESS_IMAGE:-ghcr.io/artyomsv/spire-egress-proxy:${SPIRE_VERSION:-edge}}
# A private registry for unit images: all three or none (the worker refuses a partial set). Needed for
# a private Claude Code package; the public images pull anonymously. Empty is "unset" here: the worker
# A private registry for unit images: all three or none (the worker refuses a partial set). Needed only
# for a private image of your own; the published images pull anonymously. Empty is "unset" here: the worker
# reads these as optional.
SPIRE_RUN_REGISTRY_HOST: ${SPIRE_RUN_REGISTRY_HOST:-}
SPIRE_RUN_REGISTRY_USERNAME: ${SPIRE_RUN_REGISTRY_USERNAME:-}
Expand Down
2 changes: 1 addition & 1 deletion docs/CICD-AND-PACKAGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ master, scans and pushes `:edge` and `:sha-<short>` for all of them:
| `spire-publisher`, `spire-model-proxy` | `images` | `:<module>:installDist` on JDK 25, then the module's Dockerfile | public |
| `spire-egress-proxy` | `images` | `deploy/egress/Dockerfile` | public |
| `spire-agent-codex` | `agents` | `deploy/agent/build-codex.sh`: two builds around `codex debug models` | public |
| `spire-agent-claude-code` | `agents` | `deploy/agent/build-claude-code.sh` | **private**, no source label |
| `spire-agent-claude-code` | `agents` | `deploy/agent/build-claude-code.sh` | public (operator decision 2026-11-15; removed on Anthropic's request) |

The agent images build through their scripts rather than `build-push-action`, so CI publishes the recipe an
operator runs and a vendor change to the catalogue command fails the build. They get no gha layer cache.
Expand Down
13 changes: 13 additions & 0 deletions docs/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,19 @@ first use, or to ask Anthropic. A third harness follows whichever rule its own l
rule above still holds for how an image is built. The publisher, model proxy and egress proxy images are published
beside the services (docker.yml, `:edge` and `:sha-<short>` on master).

**Amended 2026-11-15 — the Claude Code image is published publicly too.** Operator decision: "Publish the Claude Code
agent image on GHCR publicly; if Anthropic asks to remove it, we comply." The private package above could not be
created: on the first master build (docker.yml run 43649996289) its push was denied, because the workflow's
`GITHUB_TOKEN` can create only packages linked to this repository through the `org.opencontainers.image.source`
label, and a package linked to a public repository is created public. `spire-agent-claude-code` therefore now carries
the label like every other image and is public; the anonymous-pull check that guarded its privacy is removed. The CLI
stays "All rights reserved", under Anthropic's Commercial Terms, which say nothing about redistribution; Docker Inc.
Comment thread
artyomsv marked this conversation as resolved.
Resolved
publishes `docker/sandbox-templates:claude-code` publicly (Docker Hub,
https://hub.docker.com/layers/docker/sandbox-templates/claude-code/images/sha256-f25e81d33f0129a6a6551d82feaf1bc96a287e63df691ab4162ae360a91e0504,
pointed out by the operator on 2026-11-15). Anthropic has not given permission. If it asks for the image's
removal, the package is deleted and dropped from the `agents` matrix, and the recipe (`deploy/agent/build-claude-code.sh`)
remains. The 2026-11-14 paragraph's private-package reasoning is superseded; the rest of it stands.

---

## ADR-031 — Model credentials belong to the operator; API key is the default and only sanctioned mode, subscription auth is operator-owned
Expand Down
Loading
Loading