build(release): publish the claudecode harness node image #290
<!-- ccr-overview-v2 -->
🟢 Approval recommended
No active review issues block the harness-node release image changes.
No open issues 🎉
<details>
<summary><strong>What changed in this PR</strong></summary>
Publishes the Claude Code harness node as a release image so embedders can copy its binary without building the nested module from source. The image uses the root release tag and does not include the claude CLI.
Changes:
| File | Description |
| ---- | ----------- |
| integrations/claudecode/README.md | Documents image usage, CLI requirements, configuration, and source builds. |
| hack/release-tags.sh | Clarifies root-tag image publishing in comments; no behavior change. |
| CONTRIBUTING.md | Updates release checks and publishing documentation. |
| changelog/unreleased/claudecode-harnessnode-image.md | Announces the new image and its intended use. |
| .goreleaser.yaml | Adds the nested-module build, multi-architecture image, and release-note entry. |
| .github/workflows/release.yml | Builds, vets, and race-tests the nested module before publishing. |
| .github/workflows/release-check.yml | Watches nested dependency files and requires the new image artifact. |
</details>
<sub>Review effort: Balanced</sub>
❤️ 🧙 Thank you for putting this together. The release wiring, multi-architecture build, nested-module validation, and documentation are thoughtfully done, and I appreciate the clear explanation of why the image contains only the harness binary.
While exercising the release path locally, I noticed two things and left the details inline. I am sharing them as observations rather than assumptions about the intended behavior, especially since you know this integration and release path much better than I do. Please do correct me if ko or existing organization-level configuration already accounts for either one.
For context, the amd64/arm64 builds, nested-module build/vet/race tests, tag-selection tests, doccheck, diff checks, and a synthetic merge with current main all passed on my side. Thank you again for the careful work here.
Thank you for documenting the exact multi-stage FROM usage. One small release-operations observation: GitHub's GHCR documentation says a newly published container package is private by default, and this introduces a new package name. I could not verify the organization-level package policy from my account.
Would you mind confirming whether an existing organization setting makes newly linked packages public? If it does, this is already covered. Otherwise, it may be worth documenting or automating the one-time visibility change, plus an anonymous-pull check. Please do correct me if I have missed an existing part of the release process.
Thank you for adding the SPDX alongside the new image. One observation from exercising the release path locally: with a temporary v0.5.0 tag at this PR head and ko v0.19.1, go version -m showed the binary using github.com/agent-primitives/sessions v0.4.0 => ../.. (devel), while the generated SPDX described the dependency as the unreplaced v0.4.0 proxy package. My reading is that the binary contains the tagged checkout while the SBOM identifies the previous root release.
I may be overlooking how this is intended to be handled at release time. If the observation is accurate, would it make sense to make the root version in the SBOM match the tagged source, or generate a replacement-aware SBOM, and add a small assertion to the release check? Since you know the ko/release setup better than I do, please do correct me if this metadata is expected.
Approved these changes.
Approved these changes.
Good point. The two existing packages, sessions/agentsessionsd and sessions/harnessnode, are anonymously pullable today, but I haven't confirmed whether a new package from the release workflow inherits that or starts private. I'll check the first release that publishes claudecode-harnessnode with an anonymous pull and flip the visibility if needed, and add that check to the release guide.
Thanks for exercising the release path. That reading makes sense: the nested module replaces the root with ../.., so the binary is the tagged tree while the SPDX names the v0.4.0 requirement. It doesn't change what ships, so I'd rather not hold this PR on it. I've opened a follow-up to make the SBOM match the tagged source and assert it in the release check.
Tatsinnit
aramase
The Claude Code harness node lives in the nested
integrations/claudecodemodule, whosereplacedirective stopsgo install ...@<version>from working, and releases only built the rootharnessnode. Embedders therefore had to build it from a source checkout. This publishes it as an image they can copy the binary out of.ghcr.io/agent-primitives/sessions/claudecode-harnessnode(linux amd64/arm64, distroless static, bare, no archive, same ldflags), with the binary at/ko-app/harnessnodelike the existingharnessnodeimage.integrations/claudecode, so itsreplacepicks up the root module of the tagged commit. The image carries the root release tag;integrations/claudecode/vX.Y.Ztags publish nothing.claudeCLI. The newintegrations/claudecode/README.mdsays so and lists the env the harness node reads.release-checknow expects the new image id and also triggers on the nestedgo.modandgo.sum. The release verify job testsintegrations/claudecodeat the tagged commit.Tested with
hack/release-tags-test.sh,goreleaser checkand the snapshot release from CONTRIBUTING.md;dist/artifacts.jsonlistsagentsessionsd,claudecode-harnessnodeandharnessnode. The snapshot image holds onlyko-app/harnessnodeand, with no env, exits 1 withfind claude binary, a config error rather than a build or module error. The claudecode module's build, vet and race tests also pass.