Skip to content

[Story] Publish a digest-pinned fullsend-opencode sandbox image #511

Description

@beatrizmcouto

👤 User Story

As a
FullSend operator for the unbound-force repo

I want to
a custom sandbox image ghcr.io/unbound-force/fullsend-opencode with OpenCode + the uf CLI, Dewey/Ollama omitted

So that
BYOA harnesses have a known, digest-pinned runtime instead of installing tools at start time

🎯 Acceptance Criteria

  • Image extends ghcr.io/fullsend-ai/fullsend-sandbox:latest
  • opencode-ai installed at a pinned version (Jay's note: 1.18.5 as starting pin)
  • uf CLI installed from a release RPM with SHA256 verification
  • Runs as USER 1000; Dewey/Ollama are not in the image
  • Multi-arch + digest-pinned per ADR 0036
  • docs/runtimes.md OpenCode row + security matrix noting the hook gap (upstream PR 2 docs, can ship with the image PR)
  • Image is pullable and usable as image: on a FullSend harness

🚫 Out of Scope

  • OpenCodeRuntime Go implementation
  • Write-capable security hooks
  • Bundling the full uf methodology into the image (methodology stays in repo .opencode/)

Dependencies

  • Can proceed in parallel with OpenCodeRuntime; blocked only if Phase 0 is NO-GO

Infra + pin + docs glue. Comparable to ComplyTime reusable Homebrew/image workflow (M), not a greenfield cluster (L).

🏁 Definition of Done — 🛠️ Quality & Testing

  • Code has been peer-reviewed for bugs and vulnerabilities.
  • Proper testing has been completed and passes (Unit, Integration, E2E via GitHub Actions).
  • The feature has been demonstrated/validated successfully in the target environment.

🏁 Definition of Done — 📝 Architecture & Docs

  • Usage documentation or changelog updated (if user-facing changes introduced).
  • Local ADR written and verified by Tech Lead if technical architecture deviated.
  • Any newly introduced technical debt has been logged as a GitHub issue.

Context


Implementation Notes (added by @jflowers, Aug 2026)

Image name: ghcr.io/unbound-force/fullsend-opencode (unbound-force org owns it; cosign-signed).

Base image: ghcr.io/fullsend-ai/fullsend-sandbox:latest — Ubuntu/Debian (apt-based), confirmed in images/sandbox/Containerfile. NOT Fedora — do not use dnf/rpm.

Draft Containerfile:

# fullsend-opencode: extends fullsend-sandbox with opencode + uf CLI
ARG FULLSEND_SANDBOX_DIGEST=sha256:<pin-from-latest>
FROM ghcr.io/fullsend-ai/fullsend-sandbox@${FULLSEND_SANDBOX_DIGEST}

# --- opencode ---
ARG OPENCODE_VERSION=1.18.5
USER root
RUN npm install -g opencode-ai@${OPENCODE_VERSION}

# --- uf CLI (release tarball + SHA256 verification) ---
ARG UF_VERSION=0.x.x
ARG TARGETARCH
# Per-arch SHA256 checksums from release checksums.txt
ARG UF_SHA256_AMD64=<sha256>
ARG UF_SHA256_ARM64=<sha256>

RUN set -eux; \
    case "${TARGETARCH}" in \
      amd64) UF_SHA256="${UF_SHA256_AMD64}" ;; \
      arm64) UF_SHA256="${UF_SHA256_ARM64}" ;; \
      *) echo "unsupported arch: ${TARGETARCH}" && exit 1 ;; \
    esac; \
    curl -fsSL "https://github.com/unbound-force/unbound-force/releases/download/v${UF_VERSION}/unbound-force_${UF_VERSION}_linux_${TARGETARCH}.tar.gz" \
      -o /tmp/uf.tar.gz; \
    echo "${UF_SHA256}  /tmp/uf.tar.gz" | sha256sum -c; \
    tar -xzf /tmp/uf.tar.gz -C /usr/local/bin uf; \
    rm /tmp/uf.tar.gz; \
    chmod +x /usr/local/bin/uf

USER sandbox

Hardening checklist:

Check Status Notes
Digest-pinned parent image Required Use @sha256:… not :latest tag
Multi-arch (amd64+arm64) Required Per ADR 0036; use TARGETARCH
Non-root runtime user Required USER sandbox (uid 998 in base)
opencode-ai pinned version Required ARG OPENCODE_VERSION tracked by Renovate
uf pinned version + SHA256 Required Same pattern as gitleaks/tirith in base Containerfile
Cosign image signing Required ADR 0036 mandates; use keyless (Sigstore)
No Dewey/Ollama Correct Deferred per RFC; keyword fallback acceptable
SBOM generation Recommended uf releases already include SBOM (Syft)

Renovate integration: add customManagers regex entries for OPENCODE_VERSION and UF_VERSION ARGs (same pattern as base image's CLAUDE_CODE_VERSION).

Supply chain note: uf releases already ship cosign-signed checksums.txt + SBOM. The SHA256 verification in the Containerfile matches the pattern used for every third-party binary in the base image.


Clarification: external artifact references (added Aug 2026, per review feedback)

Two artifacts referenced in this story live in the fullsend repo (fullsend-ai/fullsend), not in unbound-force:

Reference Location Nature
ADR 0036 (digest pinning, image signing, BYOA) fullsend/docs/ADRs/0036-agent-execution-sandbox.md Existing fullsend decision record; referenced as external authority
docs/runtimes.md (security matrix, sandbox layout) fullsend/docs/runtimes.md Existing fullsend doc; this story delivers a net-new upstream edit (PR2) adding the OpenCode column to the security matrix

These are not phantom references — they are cross-repo dependencies on fullsend artifacts that this epic contributes to.

Activity

  1. added
    enhancement
    llm_assisted
    on Aug 17, 2026
  2. added this to the FullSend BYOA milestone on Aug 18, 2026
  3. yvonnedevlinrh commented on Aug 18, 2026

    @yvonnedevlinrh
    Contributor

    Review feedback

    The triage panel ran two rounds on this story. Round 2 reached NEEDS-CLARIFICATION (3/5). Three items need resolution:

    1. ADR 0036 does not exist. The acceptance criteria reference "digest-pinned per ADR 0036" but docs/decisions/ contains only
    ADR 001. Either create ADR 0036 before implementation, or update the AC to reference Constitution Principle V directly as the
    governing authority.

    2. UID discrepancy. The acceptance criteria specify USER 1000 but the implementation notes reference uid 998 (base image default). The existing sandbox code uses UID 1000 (--userns=keep-id:uid=1000,gid=1000). Which is correct? A mismatch will cause file permission conflicts at runtime.

    3. Containerfile location. The issue describes a Containerfile but doesn't specify where it lives in the project structure. Is this containers/, images/, or somewhere else?

    Two additional notes from the panel:

    • docs/runtimes.md is listed as in-scope work but does not exist. Clarify that this is a new file to be created.
    • SBOM generation is listed as "recommended" in the hardening checklist. Given that the existing release pipeline already uses Syft for SBOMs and Constitution Principle III requires machine-parseable provenance, this should be MUST, not recommended.
  4. jflowers commented on Aug 24, 2026

    @jflowers
    Contributor

    Image must bake binary + OpenCode hooks plugin (pi precedent)

    pi established the pattern: harness image: must be a sandbox build that includes the runtime binary (pi required PI_VERSION baked in; older images fail at preflight). For OpenCode the image must bake both the opencode binary and the fullsend-hooks OpenCode plugin (mirroring how pi's image carries fullsend-hooks.js). Keep the digest pin in the harness *.yaml in sync with the build that has these.

  5. moved this from Ready 🚀 to In Progress 📋 in Unbound Force Planningon Sep 3, 2026
  6. gxmiranda commented on Sep 8, 2026

    @gxmiranda
    Contributor

    As discussed with @yvonnedevlinrh on Slack, OpenCode hook plugin will be implemented when working on issue #515. Therefore, the initial implementation for the issue at hand will exclude the OpenCode hook plugin for the time being. Once issue 515 is completed, its outcomes will be included in this implementation.

  7. gxmiranda commented on Sep 9, 2026

    @gxmiranda
    Contributor

    Containerfile placement

    Research of FullSend's images/README.md confirms the repository convention is one image per directory with a canonical Containerfile, for example:

    • images/sandbox/Containerfile
    • images/code/Containerfile
    • images/runner/Containerfile

    Following that convention, the new organization-owned image should live in the unbound-force repository at:

    images/fullsend-opencode/Containerfile

    This location is appropriate because the resulting image is published as ghcr.io/unbound-force/fullsend-opencode; FullSend remains the owner of the base image and provides the directory convention. The image workflow should use images/fullsend-opencode as its build context and include images/fullsend-opencode/** in its path filters.

  8. gxmiranda commented on Sep 9, 2026

    @gxmiranda
    Contributor

    Runtime user decision

    The image will retain the FullSend base image’s named sandbox user:

    USER sandbox

    The current base image defines sandbox as UID 998. Using the inherited user preserves compatibility with FullSend’s filesystem ownership and sandbox execution model. Creating or forcing UID 1000 could cause permission conflicts with paths already owned by the base-image user.

    Therefore, the USER 1000 wording in the acceptance criteria should be interpreted as requiring non-root execution and updated to USER sandbox (UID 998). The Containerfile already implements this decision.

  9. gxmiranda commented on Sep 9, 2026

    @gxmiranda
    Contributor

    uf artifact format decision

    The Containerfile implementation for this issue will use the official uf release tarball rather than an RPM, with the following integrity controls:

    • Pin UF_VERSION.
    • Download the architecture-specific release tarball.
    • Select the expected AMD64 or ARM64 SHA256 explicitly.
    • Verify the downloaded artifact with sha256sum -c before installation.
    • Fail the build for unsupported architectures.
    • Validate the installed binary with uf --version.

    The original acceptance criterion mentions a release RPM, but the later implementation notes confirm that the FullSend base is Ubuntu/Debian and explicitly instruct us not to use dnf/RPM. The provided implementation pattern uses the release .tar.gz artifact.

    Using an RPM would require adding RPM tooling to the Debian-based image without improving artifact integrity. The planned .tar.gz implementation therefore supersedes the outdated RPM wording while preserving the required version pinning and SHA256 verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementllm_assisted

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions