← Back to Pull requests

build(release): publish the claudecode harness node image #290

Merged
aramase merged 7 files (168 lines) on Nov 23, 2026 20:04 UTC
View on GitHub
aramase aramase commented on Nov 20, 2026 07:53 UTC
Author

The Claude Code harness node lives in the nested integrations/claudecode module, whose replace directive stops go install ...@<version> from working, and releases only built the root harnessnode. Embedders therefore had to build it from a source checkout. This publishes it as an image they can copy the binary out of.

  • Adds a goreleaser build and ko image ghcr.io/agent-primitives/sessions/claudecode-harnessnode (linux amd64/arm64, distroless static, bare, no archive, same ldflags), with the binary at /ko-app/harnessnode like the existing harnessnode image.

  • Builds in integrations/claudecode, so its replace picks up the root module of the tagged commit. The image carries the root release tag; integrations/claudecode/vX.Y.Z tags publish nothing.

  • The image does not include the claude CLI. The new integrations/claudecode/README.md says so and lists the env the harness node reads.

  • release-check now expects the new image id and also triggers on the nested go.mod and go.sum. The release verify job tests integrations/claudecode at the tagged commit.

  • Adds a changelog fragment.
  • Tested with hack/release-tags-test.sh, goreleaser check and the snapshot release from CONTRIBUTING.md; dist/artifacts.json lists agentsessionsd, claudecode-harnessnode and harnessnode. The snapshot image holds only ko-app/harnessnode and, with no env, exits 1 with find claude binary, a config error rather than a build or module error. The claudecode module's build, vet and race tests also pass.

    Diff: 168 lines (+156 / -12) across 7 files Reviewer: Tatsinnit Review duration: 5050m
    All Vouch review confidence checks passed
    Residual risk 0.13 = Change Risk (0.47) × (1 − Review Confidence (0.73)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 168 lines diff across 7 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.49 · 4 substantive comment(s)
    0.49
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    73%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.307
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    9 items
    copilot-pull-request-reviewer[bot] copilot-pull-request-reviewer[bot] commented on Nov 20, 2026 07:55 UTC
    Reviewer

    <!-- 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:

  • Adds an image-only build for Linux amd64 and arm64, using the tagged checkout’s root module.

  • Extends release verification and snapshot checks to cover the nested module and new image.

  • Documents image usage, configuration, and tagging behavior, and adds a changelog fragment.
  • | 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>

    Tatsinnit Tatsinnit requested changes on Nov 22, 2026 23:44 UTC
    Changes Requested Reviewer

    ❤️ 🧙 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.

    Tatsinnit Tatsinnit commented on code on Nov 22, 2026 23:46 UTC
    Code Review
    integrations/claudecode/README.md:1
    @@ -0,0 +1,73 @@
    +# integrations/claudecode
    +
    +An [unmediated](../../docs/harness-authoring.md#unmediated-harnesses) harness that runs Claude Code,
    +and the `harnessnode` that serves it over harnesswire. It is a separate Go module so the root module
    +names no model provider.
    +
    +## Image
    +
    +Releases after v0.4.0 publish the harness node as an image:
    +
    +```
    +ghcr.io/agent-primitives/sessions/claudecode-harnessnode:<tag>
    +```
    +
    +- It holds only the statically linked Go binary, at `/ko-app/harnessnode` (the entrypoint), on
    +  `gcr.io/distroless/static-debian13`, for linux/amd64 and linux/arm64. It runs as root, like the
    +  `harnessnode` image, because the default `HARNESS_ADDR` is port 80.
    +- **It does not include the `claude` CLI.** Install the CLI in your own image and copy the binary
    +  into it:
    +
    +  ```dockerfile
    +  FROM ghcr.io/agent-primitives/sessions/claudecode-harnessnode:<tag> AS harnessnode

    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.

    Tatsinnit Tatsinnit commented on code on Nov 22, 2026 23:46 UTC
    Code Review
    .goreleaser.yaml:1
    @@ -112,6 +132,27 @@ kos:
         sbom: spdx
         labels: *image_labels
     
    +  # The Claude Code harness node alone, at /ko-app/harnessnode, for an embedder to copy into its own
    +  # image. It does not contain the claude CLI: the embedder adds it. Named for the module it serves,
    +  # beside the generic harnessnode. The tag is the root release tag; an integrations/claudecode/v*
    +  # module tag publishes nothing (see hack/release-tags.sh).
    +  - id: claudecode-harnessnode
    +    build: claudecode-harnessnode
    +    # Relative to the build's dir, integrations/claudecode.
    +    main: ./cmd/harnessnode
    +    base_image: gcr.io/distroless/static-debian13
    +    repositories:
    +      - ghcr.io/agent-primitives/sessions/claudecode-harnessnode
    +    bare: true
    +    platforms: [linux/amd64, linux/arm64]
    +    tags:
    +      - "{{ .Tag }}"
    +      - "{{ if not .Prerelease }}latest{{ end }}"
    +    creation_time: "{{ .CommitTimestamp }}"
    +    ko_data_creation_time: "{{ .CommitTimestamp }}"
    +    sbom: spdx

    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.

    Tatsinnit Tatsinnit approved these changes on Nov 22, 2026 23:53 UTC
    Approved Reviewer

    Approved these changes.

    gambtho gambtho approved these changes on Nov 23, 2026 13:51 UTC
    Approved Reviewer

    Approved these changes.

    aramase aramase commented on code on Nov 23, 2026 20:01 UTC
    Code Review
    integrations/claudecode/README.md:1
    @@ -0,0 +1,73 @@
    +# integrations/claudecode
    +
    +An [unmediated](../../docs/harness-authoring.md#unmediated-harnesses) harness that runs Claude Code,
    +and the `harnessnode` that serves it over harnesswire. It is a separate Go module so the root module
    +names no model provider.
    +
    +## Image
    +
    +Releases after v0.4.0 publish the harness node as an image:
    +
    +```
    +ghcr.io/agent-primitives/sessions/claudecode-harnessnode:<tag>
    +```
    +
    +- It holds only the statically linked Go binary, at `/ko-app/harnessnode` (the entrypoint), on
    +  `gcr.io/distroless/static-debian13`, for linux/amd64 and linux/arm64. It runs as root, like the
    +  `harnessnode` image, because the default `HARNESS_ADDR` is port 80.
    +- **It does not include the `claude` CLI.** Install the CLI in your own image and copy the binary
    +  into it:
    +
    +  ```dockerfile
    +  FROM ghcr.io/agent-primitives/sessions/claudecode-harnessnode:<tag> AS harnessnode

    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.

    aramase aramase commented on code on Nov 23, 2026 20:01 UTC
    Code Review
    .goreleaser.yaml:1
    @@ -112,6 +132,27 @@ kos:
         sbom: spdx
         labels: *image_labels
     
    +  # The Claude Code harness node alone, at /ko-app/harnessnode, for an embedder to copy into its own
    +  # image. It does not contain the claude CLI: the embedder adds it. Named for the module it serves,
    +  # beside the generic harnessnode. The tag is the root release tag; an integrations/claudecode/v*
    +  # module tag publishes nothing (see hack/release-tags.sh).
    +  - id: claudecode-harnessnode
    +    build: claudecode-harnessnode
    +    # Relative to the build's dir, integrations/claudecode.
    +    main: ./cmd/harnessnode
    +    base_image: gcr.io/distroless/static-debian13
    +    repositories:
    +      - ghcr.io/agent-primitives/sessions/claudecode-harnessnode
    +    bare: true
    +    platforms: [linux/amd64, linux/arm64]
    +    tags:
    +      - "{{ .Tag }}"
    +      - "{{ if not .Prerelease }}latest{{ end }}"
    +    creation_time: "{{ .CommitTimestamp }}"
    +    ko_data_creation_time: "{{ .CommitTimestamp }}"
    +    sbom: spdx

    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.

    Reviewers
    Assignees
    aramase aramase
    Labels
    risk: low confidence: 73.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.5% (MEDIUM) · Higher = larger blast radius
    47.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 73.5% · Lower = rushed or shallow review
    73.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 12.6% · Safe to merge
    12.6%