Skip to content

feat(harness): support OCI image mounts - #9396

Draft
ralphbean wants to merge 9 commits into
docs/adr-0173-compose-imagesfrom
feat/harness-image-mounts
Draft

ralphbean wants to merge 9 commits into
docs/adr-0173-compose-imagesfrom
feat/harness-image-mounts

Conversation

@ralphbean

@ralphbean ralphbean commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Repositories can use their development image as the sandbox base while Fullsend's tools remain available from a separate image mounted at /opt/fullsend.

  • Add image_mounts to harness composition and validation, merging entries by destination.
  • Pre-pull mounted GHCR images and pass read-only OCI mounts to OpenShell's Podman backend.
  • Move Fullsend runtime paths under /opt/fullsend, with a Node startup check before repository setup.
  • Update the harness references and sandbox image documentation.

Related: #5680 tracks custom code-agent images; #491 tracks broader per-repository toolchain discovery. This covers the image-composition path, not enrollment-time detection or devcontainer sidecars.

Validation: make lint passed; git diff --check passed after rebasing on current main.

Signed-off-by: Ralph Bean <rbean@redhat.com>
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Support read-only OCI image mounts in harness sandboxes

✨ Enhancement 📝 Documentation ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Let repositories use their own sandbox image while mounting Fullsend’s pinned tools separately.
• Validate and compose image mounts, then pass them to OpenShell’s Podman backend.
• Publish a mount-ready tools image and document its runtime and gateway requirements.
Diagram

graph TD
  H["Harness config"] --> R["CLI runner"] --> O["OpenShell CLI"] --> P["Podman backend"] --> S["Sandbox filesystem"] --> T["Agent runtimes"]
  B[("Project image")] --> P
  I[("Fullsend tools image")] -->|"read-only mount"| P
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Bake Fullsend tools into every project image
  • ➕ Works without Podman image-mount support or gateway configuration.
  • ➖ Couples each project image to Fullsend tool releases and repeats image builds.
2. Distribute tools through a host directory mount
  • ➕ Could avoid depending on Podman’s OCI image-mount configuration.
  • ➖ Requires separate host-side distribution and version management of the tool tree.

Recommendation: Use the PR’s separate OCI tools image for the targeted Podman backend: it preserves independent project images and distributes pinned tools through the existing registry. Documented ABI, policy, and gateway prerequisites remain important deployment constraints.

Files changed (36) +570 / -97

Enhancement (13) +261 / -42
run.goPass resolved mounts into sandbox creation and check mounted Node +56/-12

Pass resolved mounts into sandbox creation and check mounted Node

• Pre-pulls mounted GHCR images, translates harness entries for sandbox creation, and checks '/opt/fullsend' Node before repository setup. Prepends Fullsend tool paths to the runner PATH.

internal/cli/run.go

run_image_pull.goGeneralize GHCR pull messaging to mounted images +9/-9

Generalize GHCR pull messaging to mounted images

• Clarifies that the existing workflow-token pull helper serves both sandbox and mounted images, with matching status messages.

internal/cli/run_image_pull.go

compose.goCompose inherited image mounts by destination +8/-1

Compose inherited image mounts by destination

• Merges mounts across base harnesses and forge configurations, letting later entries replace earlier ones at the same destination.

internal/harness/compose.go

forge.goSupport image mounts in forge-specific harness configuration +11/-0

Support image mounts in forge-specific harness configuration

• Adds forge-level mounts, validates their destinations, and merges them into the resolved harness.

internal/harness/forge.go

harness.goAdd image mounts to the harness schema +21/-0

Add image mounts to the harness schema

• Defines the YAML mount entry, deduplicates parsed layers by destination, and validates top-level mounts.

internal/harness/harness.go

image_mount.goImplement mount merging and destination validation +68/-0

Implement mount merging and destination validation

• Provides last-writer-wins merging and rejects invalid image references, non-clean destinations, root replacement, and overlapping image or host-file mounts.

internal/harness/image_mount.go

codex_bootstrap.goPrefer mounted Fullsend tools for Codex preflight +1/-1

Prefer mounted Fullsend tools for Codex preflight

• Runs the Codex version check with Fullsend tool directories ahead of the ambient PATH.

internal/runtime/codex_bootstrap.go

env_data.goInclude mounted tools in trusted runtime command paths +11/-4

Include mounted tools in trusted runtime command paths

• Adds a Fullsend-first command helper and incorporates mounted tool directories into trusted PATH construction.

internal/runtime/env_data.go

opencode_bootstrap.goPrefer mounted Fullsend tools for OpenCode preflight +1/-1

Prefer mounted Fullsend tools for OpenCode preflight

• Runs the OpenCode version check with the mounted tool paths ahead of the sandbox PATH.

internal/runtime/opencode_bootstrap.go

opencode_run.goPin OpenCode utilities to Fullsend tool directories +1/-1

Pin OpenCode utilities to Fullsend tool directories

• Resolves required OpenCode utilities from '/opt/fullsend' rather than the project image’s system directories.

internal/runtime/opencode_run.go

pi_bootstrap.goProbe and preflight pi through mounted tool paths +2/-2

Probe and preflight pi through mounted tool paths

• Uses the Fullsend-first PATH for pi discovery and version checks while retaining explicit provider-extension probing.

internal/runtime/pi_bootstrap.go

sandbox.goSend read-only image mounts to OpenShell’s Podman backend +57/-6

Send read-only image mounts to OpenShell’s Podman backend

• Defines shared Fullsend paths and carries optional mounts through sandbox creation and retries. Serializes mounts into OpenShell’s '--driver-config-json' argument.

internal/sandbox/sandbox.go

fullsend-check-outputValidate output with mounted Fullsend Python +15/-5

Validate output with mounted Fullsend Python

• Invokes '/opt/fullsend' Python with isolated environment settings and bundled 'jsonschema', avoiding dependence on packages in the project image.

internal/scaffold/fullsend-repo/scripts/fullsend-check-output

Tests (10) +22 / -21
run_env_path_test.goAssert the Fullsend-first runner PATH +1/-1

Assert the Fullsend-first runner PATH

• Updates the PATH expectation to include mounted Fullsend tool directories before project-image paths.

internal/cli/run_env_path_test.go

run_image_pull_test.goUpdate authenticated-pull status assertion +1/-1

Update authenticated-pull status assertion

• Matches the generalized success message emitted by the GHCR pull helper.

internal/cli/run_image_pull_test.go

pi_bootstrap_test.goUpdate pi probe fixtures for mounted paths +5/-4

Update pi probe fixtures for mounted paths

• Changes fake probe output and assertions to expect pi and its extensions under '/opt/fullsend'.

internal/runtime/pi_bootstrap_test.go

fullsend-agent.test.mjsExercise child-agent extension paths under '/opt/fullsend' +6/-6

Exercise child-agent extension paths under '/opt/fullsend'

• Updates child-agent fixtures and expected launch arguments to use mounted provider-extension locations.

internal/runtime/pi_extension/fullsend-agent.test.mjs

pi_extensions_test.goUpdate pi extension command expectations +2/-2

Update pi extension command expectations

• Asserts that generated pi commands load the Anthropic Vertex extension from '/opt/fullsend'.

internal/runtime/pi_extensions_test.go

pi_run_test.goAlign pi run assertions with mounted extension paths +3/-3

Align pi run assertions with mounted extension paths

• Updates provider-extension presence and absence checks to the new Fullsend root.

internal/runtime/pi_run_test.go

launch-delegating.txtRefresh delegated Codex launch PATH golden +1/-1

Refresh delegated Codex launch PATH golden

• Records Fullsend tool directories at the start of the trusted launch PATH.

internal/runtime/testdata/codex/golden/launch-delegating.txt

launch-gateway.txtRefresh gateway Codex launch PATH golden +1/-1

Refresh gateway Codex launch PATH golden

• Records Fullsend tool directories at the start of the trusted launch PATH.

internal/runtime/testdata/codex/golden/launch-gateway.txt

launch-hooks.txtRefresh hooked Codex launch PATH golden +1/-1

Refresh hooked Codex launch PATH golden

• Records Fullsend tool directories at the start of the trusted launch PATH.

internal/runtime/testdata/codex/golden/launch-hooks.txt

launch-nohooks.txtRefresh unhooked Codex launch PATH golden +1/-1

Refresh unhooked Codex launch PATH golden

• Records Fullsend tool directories at the start of the trusted launch PATH.

internal/runtime/testdata/codex/golden/launch-nohooks.txt

Documentation (10) +120 / -23
architecture.mdRecord the separate project tool-image decision +4/-0

Record the separate project tool-image decision

• Documents read-only OCI tool mounts as part of sandbox architecture and links the relevant ADR.

docs/architecture.md

run.mdDocument authenticated pulls for mounted GHCR images +6/-5

Document authenticated pulls for mounted GHCR images

• Extends the workflow-token pull guidance to 'image_mounts' and clarifies private-package permissions.

docs/cli/run.md

harness-fields.mdDefine image-mount field and merge semantics +7/-3

Define image-mount field and merge semantics

• Adds image references and destinations to the harness field taxonomy, including destination-based inheritance and forge behavior.

docs/contributing/harness-fields.md

runtime-implementation.mdSpecify the Fullsend tool-image runtime contract +36/-7

Specify the Fullsend tool-image runtime contract

• Documents mounted tool paths, image compatibility, policy and gateway requirements, and updated pi extension locations.

docs/contributing/runtime-implementation.md

cli-internals.mdUpdate documented runner PATH and extension locations +4/-4

Update documented runner PATH and extension locations

• Reflects the '/opt/fullsend' tool paths in the CLI execution diagram and sandbox constants.

docs/guides/dev/cli-internals.md

bring-your-own-agent.mdAdd a user guide for mounting Fullsend runtime tools +29/-1

Add a user guide for mounting Fullsend runtime tools

• Provides an 'image_mounts' example and explains read-only policy, gateway, compatibility, and destination restrictions.

docs/guides/user/bring-your-own-agent.md

agent-infrastructure.mdClarify the remaining sandbox-image ownership question +4/-1

Clarify the remaining sandbox-image ownership question

• Notes that repositories can supply toolchain images separately while the decision to maintain a dedicated base image remains open.

docs/problems/agent-infrastructure.md

harness-reference.mdReference the new 'image_mounts' harness field +5/-0

Reference the new 'image_mounts' harness field

• Adds an example and documents validation, merge behavior, backend limitations, and recommended tool-image usage.

docs/reference/harness-reference.md

README.mdDocument the mount-ready sandbox tools image +24/-1

Document the mount-ready sandbox tools image

• Adds the tools image to the image inventory and explains its filesystem layout, compatibility link, and mount prerequisites.

images/README.md

fullsend-agent.jsClarify mounted pi extension trust boundary +1/-1

Clarify mounted pi extension trust boundary

• Updates the comment describing the read-only, image-provided provider extensions.

internal/runtime/pi_extension/fullsend-agent.js

Other (3) +167 / -11
sandbox-images.ymlBuild and publish multi-architecture Fullsend tools images +133/-4

Build and publish multi-architecture Fullsend tools images

• Adds per-platform tools-image builds and a digest-verified manifest publication step alongside the existing sandbox image pipeline.

.github/workflows/sandbox-images.yml

ContainerfileProduce separate ordinary and mount-ready sandbox targets +33/-6

Produce separate ordinary and mount-ready sandbox targets

• Keeps '/opt/fullsend/usr' linked to '/usr' in the ordinary image but removes the link in the tools target. Makes CLI links relative and installs isolated Python schema dependencies for mounted-tool use.

images/sandbox/Containerfile

base.yamlAllow read-only access to the Fullsend mount point +1/-1

Allow read-only access to the Fullsend mount point

• Adds '/opt/fullsend' to the generated sandbox policy’s read-only paths.

internal/agentnew/templates/policies/base.yaml

@ralphbean
ralphbean added this pull request to stack #9397 November 12, 2026 21:59
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:59 PM UTC · Completed 10:12 PM UTC

Commit: 45e59e4 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.16

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Site preview

Preview: https://fbca3908-site.fullsend-ai.workers.dev

Commit: c7d364b260b3f68da91e000c14d3d329c69fe19a

@qodo-code-review

qodo-code-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (1)

Grey Divider


Action required

1. Agents cannot validate pinned-image output ✓ Resolved

Resolving commit: 2fee05f

Resolution reason
The commit adds legacy fallbacks in the runtime for pi extensions: pi_bootstrap.go probes both the
/opt/fullsend and legacy /usr/local/share/pi-extensions paths (piAgentProbeExtension), pi_run.go
pins the provider extension to whichever exists (piProviderExtensionPin, falling back to the legacy
path), and pi.go defines the legacy constants. OpenCode utility search (opencode_run.go) now takes a
dir list, and the runtime's trusted PATH in env_data.go includes $PATH after the fullsend dirs. It
does not add the /usr/local/bin,/usr/bin,/bin fallback for OpenCode in production code (only in a
test helper), and it does not touch fullsend-check-output's python3 invocation, which still
hard-requires /opt/fullsend/usr/bin/python3 with no fallback. The pi extension fallback addresses
part of the finding, but the checker and OpenCode issues remain.
Description
The runner’s fullsend-check-output, pi extension lookup, and OpenCode utility search now rely on
/opt/fullsend paths without falling back to the locations used by older images. When the runner
uploads its helper or launches pi or OpenCode in an immutable pre-PR image—including the agents
harness pins, default image digests, and fleet-pinned digests—or a custom image without a tools
mount, output checks fail, provider extensions cannot load, and OpenCode exits 127.

2. Default gateway rejects image mounts ✓ Resolved

Resolving commit: c7d364b

Resolution reason
Added an allow-image-mounts action input (default false) that, when enabled, configures the local
Podman gateway with allow_driver_config and disables resource admission; otherwise sandbox creation
fails with an explicit diagnostic naming that input. Docs explain the security trade-off of
disabling resource admission.
Description
createOnce passes image mounts through --driver-config-json, but the shipped action starts a
Podman gateway without enabling caller driver configuration or disabling resource admission. A run
with image_mounts using that action’s local gateway therefore reaches sandbox creation with
settings that reject the requested mount.


Remediation recommended

3. Image mount rules ship without tests ✓ Resolved

Resolving commit: 981b462

Resolution reason
The commit adds internal/harness/image_mount_test.go with the requested coverage:
TestMergeImageMountsChildWinsByDestination (child replaces base at same dest, keeps position, no
input mutation), TestValidateImageMounts (table covering image reference rejection for whitespace,
${ variable and URL forms; relative, "..", unclean, and "/" destinations; host_files overlap;
overlapping image mounts), TestPathsOverlap, plus harness-level tests for LoadWithBase,
ResolveForge, ResolveOverlays, and forge/overlay validation. This addresses the finding with a
different structure than the suggested prompt.
Description
mergeImageMounts, validateImageMounts and pathsOverlap are new in
internal/harness/image_mount.go with no accompanying test file, and no existing test references
ImageMount. A regression in the same-destination override or in the overlap and path checks that
block mounts over / or over host_files destinations would pass go test ./... unnoticed.

4. Guide uses OCI without a definition ✓ Resolved

Resolving commit: c7d364b

Resolution reason
The first occurrence of the term in the guide is now expanded inline as "Open Container Initiative
(OCI)", so a reader no longer meets an undefined acronym at that point.
Description
The new image_mounts section in the bring-your-own-agent guide uses the acronym OCI at its first
occurrence, "a separate OCI image", with no inline expansion and no glossary link.
docs/glossary.md has no OCI entry, and the term recurs in the same section ("Its OCI ENV, user,
working directory and entrypoint"), so a reader cannot look it up in the glossary.

5. Mounts can block runner setup ✓ Resolved

Resolving commit: c7d364b

Resolution reason
validateImageMounts now rejects any image mount destination that overlaps a runner-owned path.
reservedImageMountPaths() collects reservedHostFileBinDir (the workspace bin directory),
/sandbox/opencode-config, reservedHostFileExact and reservedHostFileDirs, and each mount Dest is
checked with pathsOverlap against them, returning "overlaps runner-owned path". Tests cover
/sandbox/workspace/bin, workspace metadata, runtime config, and ancestors such as /sandbox. The
mandated /opt/fullsend destination is not in the reserved list, so it is preserved.
Description
validateImageMounts accepts clean destinations such as /sandbox/workspace/bin without checking
runner-owned paths. A read-only image mounted there hides the directory where setup uploads the
runner binary, so an otherwise accepted harness can fail during bootstrap.

View medium (3)
6. Agent shell commands pick up Fullsend's tools instead of the repo's ✓ Resolved

Resolving commit: c7d364b

Resolution reason
runnerPathLines was rewritten so the agent PATH is
/usr/local/go/bin:$HOME/go/bin:$PATH:/sandbox/workspace/bin and only then the mounted Fullsend tool
path (appended last). Project toolchain binaries (python3, node, npm, git) now win over Fullsend
copies, with a test asserting project tools precede mounted ones. Fullsend's tools remain as a
fallback. This matches the suggested fix's "move the Fullsend path after $PATH" direction, though it
moves both directories (including /usr/bin) rather than only keeping /usr/local/bin first, and the
runner's trusted PATH is handled separately.
Description
runnerPathLines now puts SandboxFullsendToolPath
(/opt/fullsend/usr/local/bin:/opt/fullsend/usr/bin, the tool image's whole /usr/bin) ahead of
$PATH and /usr/local/go/bin in the agent's .env PATH. When a repo uses its own development
image with the tools image mounted, a bare python3, node, npm, git or find in the agent's
Bash commands resolves to Fullsend's copy instead of the project's. The project's interpreter
version and its system-installed packages (for example python3 -m pytest relying on packages in
the dev image's site-packages) are silently bypassed, which defeats the PR's stated goal of letting
repositories use their development image.

7. User guide includes operator-only setup 📜 Skill insight ⌂ Architecture
Description
The new image_mounts subsection in the bring-your-own-agent guide tells harness authors to
configure the OpenShell Podman gateway with allow_driver_config and disabled resource admission,
which is platform-operator material placed in docs/guides/user/. A reader cannot tell which parts
of the section apply to them, so the guide now addresses two audiences.
Code

docs/guides/user/bring-your-own-agent.md[R535-536]

+in `filesystem_policy.read_only`. The OpenShell Podman gateway must enable
+`allow_driver_config` and disable resource admission. The `fullsend-sandbox`
Relevance

●● Moderate

Audience-separation concern is plausible, but no close precedent found on operator material in user
guides.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added text in a user-directory guide instructs readers to change the gateway's driver and
admission configuration, which is operator material. The rule requires each guide to address one
audience, so that requirement belongs in an operator guide linked from this section.

docs/guides/user/bring-your-own-agent.md[533-544]
Skill: writing-user-docs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The `image_mounts` subsection in `docs/guides/user/bring-your-own-agent.md` tells harness authors to configure the OpenShell Podman gateway (`allow_driver_config`, resource admission). Compliance rule 1062077 requires each guide to address a single audience.

## Fix Focus Areas
- docs/guides/user/bring-your-own-agent.md[533-544]

## Recommended Fix
Keep the harness and policy steps (`image_mounts` entry, `/opt/fullsend` in `read_only`, choosing the tools image) in the user guide. Move the gateway configuration requirement to the operator or infrastructure guide, and link to it from this section in one sentence.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


8. Private mounts fail on remote gateways ✓ Resolved

Resolving commit: c7d364b

Resolution reason
prePullGHCRImage returns early with a StepWarn when OPENSHELL_GATEWAY_ENDPOINT is non-empty, so the
runner no longer performs a local Podman pull that cannot help a remote gateway; the warning tells
the operator that private images need gateway-host registry authentication or a pre-cached image.
Docs were updated to describe this behavior and the remote-gateway limits.
Description
runAgent pre-pulls every mounted GHCR image into the runner’s local Podman store, not the store
used by a configured remote gateway. When Actions uses OPENSHELL_GATEWAY_ENDPOINT, even a
successful authenticated local pull cannot supply that gateway’s private mount image, and its
subsequent pull has no workflow-token credentials.

Grey Divider

Context sources
✅ Compliance rules (platform): 103 rules
✅ Skills: 5 invoked
  writing-user-docs
  writing-adrs
  check-patch-coverage
  cutting-releases
  adr-corner
✅ Web pages:
  +5 more
✅ Cross-repo context — repo relationships
  Explored: repo: fullsend-ai/experiments (sha: d4292120) — View relationship
  Explored: repo: fullsend-ai/scribe (sha: 6902ed57) — View relationship
  Explored: repo: fullsend-ai/agents (sha: f75c13bd) — View relationship
  Explored: repo: fullsend-ai/mlflow-assessments (sha: 0058f877) — View relationship
  Explored: repo: fullsend-ai/test-creator (sha: a5082d20) — View relationship
  Explored: repo: fullsend-ai/pi-inference-gateway (sha: 8168429d) — View relationship
  Explored: repo: fullsend-ai/pi-anthropic-vertex (sha: d2ecd039) — View relationship
  Explored: repo: fullsend-ai/pi-xai-vertex (sha: a86139bf) — View relationship
  Explored: repo: fullsend-ai/.fullsend (sha: 01477500) — View relationship
  Explored: repo: fullsend-ai/metrics (sha: 685bcfed) — View relationship
✅ Context preparation
  Past issues: summarized; full text retained for this review
Review mode: Auto: 🧠 Deep: Cross-cutting sandbox, harness, runtime, image, and CI changes create dense independent risk.

Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread internal/harness/image_mount.go Resolved
Comment on lines +535 to +536
in `filesystem_policy.read_only`. The OpenShell Podman gateway must enable
`allow_driver_config` and disable resource admission. The `fullsend-sandbox`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

5. User guide includes operator-only setup 📜 Skill insight ⌂ Architecture

The new image_mounts subsection in the bring-your-own-agent guide tells harness authors to
configure the OpenShell Podman gateway with allow_driver_config and disabled resource admission,
which is platform-operator material placed in docs/guides/user/. A reader cannot tell which parts
of the section apply to them, so the guide now addresses two audiences.
Agent Prompt
## Issue description
The `image_mounts` subsection in `docs/guides/user/bring-your-own-agent.md` tells harness authors to configure the OpenShell Podman gateway (`allow_driver_config`, resource admission). Compliance rule 1062077 requires each guide to address a single audience.

## Fix Focus Areas
- docs/guides/user/bring-your-own-agent.md[533-544]

## Recommended Fix
Keep the harness and policy steps (`image_mounts` entry, `/opt/fullsend` in `read_only`, choosing the tools image) in the user guide. Move the gateway configuration requirement to the operator or infrastructure guide, and link to it from this section in one sentence.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗

Comment thread internal/sandbox/sandbox.go Resolved
Comment thread internal/harness/image_mount.go Resolved
Comment thread internal/cli/run.go Resolved
Comment thread internal/cli/run.go Resolved
@fullsend-ai-review fullsend-ai-review Bot added the risk/elevated PR risk: elevated label Nov 12, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Risk Assessment: elevated (3/5)

Details

Score remains elevated at 3 despite PR expansion from 36 to 63 files because modifications to protected paths, CI workflows, and high-churn runtime components are balanced by solid test coverage (38%), an established author, and no dependency changes.

Previous run

Risk Assessment: elevated (3/5)

Details

Large multi-file feature touching protected paths and CI workflows across high-churn runtime components, balanced by an accepted ADR design and solid test coverage.

Previous run (2)

Risk Assessment: elevated (3/5)

Details

Large feature adding OCI image mounts across 36 files with CI workflow and protected path modifications, moderate test coverage, and high churn on core runner components, with no linked issue.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Review

Findings

Medium

  • [logic-error] images/sandbox/Containerfile:478 — pre-commit and gitlint are installed with system pip into the default site-packages. pip writes their launchers with an absolute #!/usr/bin/python3 shebang. When the tools image is mounted at /opt/fullsend, the launchers sit in /opt/fullsend/usr/local/bin. That directory is prepended to PATH (SandboxFullsendToolPath), so the mounted launcher wins over any copy in the development image. It then runs under the development image's Python, whose sys.path does not include the mounted dist-packages, and fails with ModuleNotFoundError. The PR already installs jsonschema into a dedicated --target path for the mounted interpreter; pre-commit and gitlint get no equivalent handling.
    Remediation: Give pre-commit and gitlint mount-aware launchers, or install them under a dedicated target with wrappers as is done for jsonschema, that invoke the mounted interpreter with the mounted library paths. Add a smoke test that runs both tools against a development image that does not have them installed.
  • [protected-path] .github/workflows/sandbox-images.yml — This PR modifies protected governance/infrastructure paths: .github/scripts/sandbox-image-digests.sh, .github/scripts/sandbox-image-digests-test.sh, .github/workflows/sandbox-images.yml, images/README.md, and images/sandbox/Containerfile. The description explains the rationale and references related issues Create minimal sandbox image for custom code agent images #5680 and Sandbox needs per-repo dev environment discovery — every new repo onboarding breaks on missing tools #491, but human approval is always required for protected-path changes, regardless of context.
  • [breaking-config] internal/agentnew/templates/policies/base.yaml:16 — /opt/fullsend was added to filesystem_policy.read_only only in the scaffold template. Policies already generated from the template, and custom policies, do not list it, so the mounted tool tree may not be readable under those policies.
    Remediation: Add a migration note for repositories with existing or custom filesystem policies (add /opt/fullsend to read_only) and confirm that custom policies behave as intended without it.
  • [breaking-config] internal/runtime/env_data.go:139 — The runner's trusted PATH now always puts the mounted Fullsend tool paths (/opt/fullsend/usr/local/bin:/opt/fullsend/usr/bin) ahead of the ambient PATH. The ambient PATH is retained after them, and the default image links these paths to /usr, but harnesses or images that depend on the previous PATH ordering may resolve tools differently.

Low

  • [missing-authorization] internal/harness/harness.go:95 — The PR does not close a tracking issue. It cites Create minimal sandbox image for custom code agent images #5680 and Sandbox needs per-repo dev environment discovery — every new repo onboarding breaks on missing tools #491 as related only; both are open and cover the same use case. The PR is a draft stacked on the docs/adr-0173-compose-images branch.
    Remediation: State which issue authorizes this slice of work, or open a narrowly scoped tracking issue before the PR leaves draft.
  • [incomplete-doc] docs/reference/harness-reference.md:573 — The "Field merge rules (for base and overlays)" table has no image_mounts row, although docs/guides/user/bring-your-own-agent.md sends readers to that table for image_mounts merge behavior. The semantics are documented in the field description earlier on the page.
    Remediation: Add an image_mounts row (concatenated; child overrides by dest, keeping first position), or point the guide's link at the field description.
  • [misplaced-abstraction] internal/sandbox/sandbox.go:1620 — createOnce builds the Podman-specific podmanDriverConfig JSON and passes it through --driver-config-json inside the general sandbox creation lifecycle.
    Remediation: Optionally move the backend-specific driver payload construction into a small builder so that adding other backends does not touch createOnce.
  • [code-organization] internal/runtime/env_data.go:98 — sandboxFullsendToolPathCommand and sandboxFullsendToolPathCommandAt sit between EnvDataControlLines and its implementation envDataControlLines, splitting the pair.
    Remediation: Move the helpers below envDataControlLines or next to the other sandbox command helpers.
  • [code-organization] internal/sandbox/sandbox.go:1443 — The ImageMount type is declared between Create and CreateWithRetry, separating Create from the function it delegates to.
  • [pattern-inconsistency] internal/runtime/pi_run.go:836 — piProviderExtensionPin returns an unbraced if ... fi fragment joined into an && chain, whereas some other pin helpers use a { ...; } brace group. Cosmetic only.

Earlier findings

  • internal/scaffold/fullsend-repo/scripts/fullsend-check-output:21, backward-incompatible — resolved: fullsend_python now uses the mounted Python only when /opt/fullsend/usr/bin/python3 exists and otherwise falls back to system python3.
  • internal/runtime/opencode_bootstrap.go:409, logic-error — resolved: the agent-verification command is now wrapped with sandboxFullsendToolPathCommand.
  • internal/runtime/codex_bootstrap.go:549, logic-error — resolved: the bundled-catalog command is now wrapped with sandboxFullsendToolPathCommand.
  • docs/contributing/sandbox-topology.md:3, stale-doc — resolved: the topology section now documents the mount-only tools image at /opt/fullsend.
  • docs/contributing/harness-composition.md:30, incomplete-doc — resolved: mergeImageMounts was added to the composition merge table.
  • internal/harness/harness.go:511, pattern-inconsistency — resolved: image-mount normalization moved out of parseRaw into normalizeImageMounts in image_mount.go, called from forge and overlay resolution.
  • .github/workflows/sandbox-images.yml:309, injection-vuln — reclassified to info: diagnostic filenames come from digests already validated by regex in the same workflow's non-PR export steps, so the unescaped :: handling is defense-in-depth only.
  • internal/sandbox/sandbox.go:1439, backward-incompatible — reclassified to info: internal/sandbox cannot be imported outside the module and all in-repo call sites remain source-compatible with the trailing variadic parameter.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

2 finding(s) below the low severity threshold were not posted.

Previous run

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJoaWdoIiwiY2F0ZWdvcnkiOiJiYWNrd2FyZC1pbmNvbXBhdGlibGUiLCJmaWxlIjoiaW50ZXJuYWwvc2NhZmZvbGQvZnVsbHNlbmQtcmVwby9zY3JpcHRzL2Z1bGxzZW5kLWNoZWNrLW91dHB1dCIsImlkIjoiZl84MDg5MDVhM2QwMjQzOTBkIiwibGluZSI6MjEsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImNyb3NzLXJlcG8tY29udHJhY3RzIn0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoiaW50ZXJuYWwvcnVudGltZS9vcGVuY29kZV9ib290c3RyYXAu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mdvIiwiaWQiOiJmX2M5OTE0MTQxYjU5YWJhOGYiLCJsaW5lIjo5OCwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InN0eWxlLWNvbnZlbnRpb25zIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoicGF0dGVybi1pbmNvbnNpc3RlbmN5IiwiZmlsZSI6ImludGVybmFsL3J1bnRpbWUvcGlfcnVuLmdvIiwiaWQiOiJmXzVkZjdhNzcxNjI4MDkyZDMiLCJsaW5lIjo4MzYsImFjdGlvbmFibGUiOmZhbHNlLCJkaW1lbnNpb24iOiJzdHlsZS1jb252ZW50aW9ucyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImNvZGUtb3JnYW5pemF0aW9uIiwiZmlsZSI6ImludGVybmFsL3NhbmRib3gvc2FuZGJveC5nbyIsImlkIjoiZl9hOWFlNDJjYjYwMzI1NTJhIiwibGluZSI6MTQ0MywiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InN0eWxlLWNvbnZlbnRpb25zIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYmFja3dhcmQtaW5jb21wYXRpYmxlIiwiZmlsZSI6ImludGVybmFsL3NhbmRib3gvc2FuZGJveC5nbyIsImlkIjoiZl8zNTU2YWFhYmM3MTQzMjA2IiwibGluZSI6MTQzOSwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6ImNyb3NzLXJlcG8tY29udHJhY3RzIn1dfQ== -->

Review

Findings

High

  • [backward-incompatible] internal/scaffold/fullsend-repo/scripts/fullsend-check-output:21 — The scaffolded script now hardcodes /opt/fullsend/usr/bin/python3 (with PYTHONHOME/PYTHONPATH under /opt/fullsend/usr/...) and no longer falls back to the sandbox's python3. A sandbox without /opt/fullsend/usr now fails the output check: a pinned older fullsend-sandbox tag, a custom image not derived from the new Containerfile, or a harness with image: set and no image_mounts. No migration path or compatibility note is documented.
    Remediation: Fall back to the system python3 (and the previous jsonschema location) when /opt/fullsend/usr/bin/python3 is absent, or fail early with a clear, versioned error. Document the minimum compatible fullsend-sandbox tag and, if there is no fallback, mark the change as breaking (! marker per COMMITS.md).

Medium

  • [protected-path] .github/workflows/sandbox-images.yml — This PR modifies protected paths: .github/workflows/sandbox-images.yml, images/sandbox/Containerfile, and images/README.md. The description explains the rationale and the PR sits on the branch of the accepted ADR 0173 (PR docs(adr): compose multiple images into agent sandboxes #9395), but it links only related issues. Human approval is always required for protected-path changes, regardless of context.
  • [logic-error] internal/runtime/opencode_bootstrap.go:409 — The agent-verification command (opencode debug agent) still uses the ambient PATH. With OpenCode available only through the /opt/fullsend mount, the version preflight succeeds but verification fails with command-not-found, because each sandbox.Exec is a fresh sh -c. With another OpenCode in the project image, it verifies a different binary than the one launched.
    Remediation: Run the verification through sandboxFullsendToolPathCommand and add a bootstrap test where OpenCode exists only in the mounted tool directory.
  • [logic-error] internal/runtime/codex_bootstrap.go:549 — codex debug models --bundled runs in a separate sandbox.Exec with the original PATH, although codex --version was migrated. A delegating Codex harness on a project image without its own Codex fails during Bootstrap; an image with another Codex validates against the wrong catalog.
    Remediation: Run the catalog command through sandboxFullsendToolPathCommand and test catalog discovery with Codex available only via the mounted image.
  • [breaking-config] internal/agentnew/templates/policies/base.yaml:16 — /opt/fullsend was added to filesystem_policy.read_only only in the scaffold template. Existing scaffolded repos keep their old policies, so mounted /opt/fullsend content may be inaccessible to the agent under Landlock. No upgrade note exists.
    Remediation: Add upgrade notes, or have the CLI check/merge the /opt/fullsend entry into existing policies; document that policies must list it when image_mounts is used.
  • [breaking-config] internal/runtime/env_data.go:139 — The trusted PATH now always puts /opt/fullsend/usr/local/bin:/opt/fullsend/usr/bin ahead of the ambient PATH. On images with the new symlink or mount, runner-pinned tools shadow the project image's own tools.
    Remediation: Document the precedence change; consider limiting the prepend to runner-owned commands.
  • [stale-doc] docs/contributing/sandbox-topology.md:3 — Still says "Two images exist in a parent-child hierarchy" and lists only fullsend-sandbox and fullsend-code; this PR adds and publishes fullsend-sandbox-tools.
    Remediation: Add fullsend-sandbox-tools to the hierarchy and table.
  • [incomplete-doc] docs/contributing/harness-composition.md:30 — The "Merge side" table lists mergeHostFiles and mergeSkills but not the new mergeImageMounts (internal/harness/image_mount.go).
    Remediation: Add mergeImageMounts to the table, noting dedupe by destination with child-wins semantics.

Low

  • [injection-vuln] .github/workflows/sandbox-images.yml:309 — The manifest-publishing step interpolates hex into a ::error:: workflow command, and later prints registry-derived want/got after replacing only literal newlines. Exposure is limited (non-PR events, workflow-owned artifacts).
    Remediation: Escape every diagnostic interpolation for workflow commands or print as plain text.
  • [misplaced-abstraction] internal/sandbox/sandbox.go:1598 — createOnce serializes Podman-specific driver config into --driver-config-json, coupling the generic image_mounts feature to the Podman backend; other backends will fail. Only applies when mounts are present, and ADR 0173 notes support depends on the backend.
    Remediation: Encapsulate driver capability detection and fail with a clear error on unsupported backends.
  • [pattern-inconsistency] internal/harness/harness.go:511 — parseRaw normalizes ImageMounts via mergeImageMounts(nil, ...), unlike other list fields, so omitted fields become empty non-nil slices. Limited observable effect.
    Remediation: Drop the calls from parseRaw and dedupe during composition.
  • [code-organization] internal/runtime/env_data.go:98 — sandboxFullsendToolPathCommand may fit better in bootstrap.go; placement preference.
  • [pattern-inconsistency] internal/runtime/pi_run.go:836 — piProviderExtensionPin returns a bare if ...; fi fragment where sibling helpers use a { ...; } brace group. Valid sh; consistency only.
  • [code-organization] internal/sandbox/sandbox.go:1443 — type ImageMount sits between Create and CreateWithRetry; define it before the functions that use it.
  • [backward-incompatible] internal/sandbox/sandbox.go:1439 — Create/CreateWithRetry gain a trailing variadic imageMounts ...ImageMount. Source-compatible for direct callers; low risk within internal packages.

Labels: PR also changes documentation and the sandbox-images CI workflow, alongside the existing sandbox and harness component labels.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (2)

Review

Reason: tool-failure

This PR was NOT reviewed. Do not count this as an approval.

Previous run (3)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJoaWdoIiwiY2F0ZWdvcnkiOiJsb2dpYy1lcnJvciIsImZpbGUiOiJpbnRlcm5hbC9ydW50aW1lL2Vudl9kYXRhLmdvIiwiaWQiOiJmXzBkNmQ2YjRhMWI0NDAyM2MiLCJsaW5lIjoxMzgsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImNvcnJlY3RuZXNzIn0seyJzZXZlcml0eSI6ImhpZ2giLCJjYXRlZ29yeSI6ImJhY2t3YXJkLWluY29tcGF0aWJsZSIsImZpbGUiOiJpbnRlcm5hbC9zYW5kYm94L3NhbmRib3guZ28iLCJpZCI6ImZfZTlkN2Y3NTVmODVkYjkzNyIsImxpbmUiOjY4LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjcm9zcy1yZXBvLWNvbnRyYWN0cyJ9LHsic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6InBhdHRlcm4taW5jb25zaXN0ZW5jeSIsImZpbGUiOiJpbnRlcm5hbC9oYXJuZXNzL2hhcm5lc3MuZ28iLCJpZCI6ImZfYzFhYjA5YjgxMjc0ZTg5MSIsImxpbmUiOjUxMSwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoic3R5bGUtY29udmVudGlvbnMifSx7InNldmVyaXR5IjoibWVkaXVtIiwiY2F0ZWdvcnkiOiJzdGFsZS1kb2MiLCJmaWxlIjoiZG9jcy9jb250cmlidXRpbmcvc2FuZGJveC10b3BvbG9neS5tZCIsImlkIjoiZl85MDFiZGEwMzA4YTAzZjgzIiwibGluZSI6MywiYWN0aW9uYWJsZSI6dHJ1ZSwiZGlt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ZSI6ImludGVybmFsL2hhcm5lc3MvaW1hZ2VfbW91bnQuZ28iLCJpZCI6ImZfZTUyNzlkNmNkMThjMjJjMiIsImxpbmUiOjI4LCJhY3Rpb25hYmxlIjpmYWxzZSwiZGltZW5zaW9uIjoiY3Jvc3MtcmVwby1jb250cmFjdHMifV19 -->

Review

Findings

High

  • [logic-error] internal/runtime/env_data.go:138 — The generated trusted-PATH loop does not split the literal /opt/fullsend/usr/local/bin:/opt/fullsend/usr/bin: prefix on colons (field splitting only applies to the expanded $PATH). With PATH=/usr/bin:/bin the loop visits /opt/fullsend/usr/local/bin:/opt/fullsend/usr/bin:/usr/bin and /bin, discarding both mounted tool directories and the first ambient PATH entry. binaryPin then cannot find runtime CLIs that exist only in the mounted tools image. Golden-string tests do not catch this.
    Remediation: Build the full prefixed PATH in a variable and iterate its unquoted expansion with IFS=:, or iterate the two mounted directories as separate words first. Add an executable shell test that a CLI present only in the mounted directories is selected.
  • [backward-incompatible] internal/sandbox/sandbox.go:68 — The runner now hard-codes /opt/fullsend/usr/{bin,local/bin} and /opt/fullsend/usr/local/share/pi-extensions (PATH prefix, pi -e paths, preflights, opencode pin, fullsend-check-output). These exist only in images built from this PR's Containerfile or when a tools image is mounted. Harnesses pinning an older fullsend-sandbox/fullsend-code tag or digest, or a custom image, lose pi extensions, fullsend-check-output, and opencode (exit 127, old fallback search list removed). Nothing version-gates this, and the PR/commit uses feat without !.
    Remediation: Fall back to legacy locations when /opt/fullsend is absent, or mark the change breaking (feat!), document the required image tag, and add a preflight error naming the missing path.
  • [protected-path] .github/workflows/sandbox-images.yml — The PR modifies protected paths: .github/workflows/sandbox-images.yml, images/README.md, images/sandbox/Containerfile. There is no linked issue and the description does not justify changing CI/image-build governance files. Human approval is always required for protected-path changes.
    Remediation: Link an authorizing issue, explain why each protected file changes, and obtain human approval.

Medium

  • [pattern-inconsistency] internal/harness/harness.go:511 — parseRaw is documented as doing no validation/resolution/modification, yet calls mergeImageMounts(nil, ...) on top-level, forge and overlay ImageMounts. No other field is normalized at parse time, and same-dest duplicates within one file are silently collapsed so validateImageMounts never sees them. See also the design-smell observation at this location.
    Remediation: Remove these calls from parseRaw; keep deduplication in the composition/merge pipeline, or reject duplicate destinations in validateImageMounts.
  • [stale-doc] docs/contributing/sandbox-topology.md:3 — Still says "Two images exist in a parent-child hierarchy"; the PR adds a third published image, fullsend-sandbox-tools, for use with image_mounts at /opt/fullsend.
    Remediation: Add it to the topology and image table as a mountable tool-root sibling target.
  • [incomplete-doc] docs/contributing/harness-composition.md:31 — The "Merge side" paired-functions table omits the new mergeImageMounts (internal/harness/image_mount.go).
    Remediation: Add it to the table, noting it deduplicates by destination.

Low

  • [missing-authorization] internal/harness/harness.go:393 — Non-trivial change (667 lines, 36 files) with no linked issue, stacked on the unmerged ADR branch docs/adr-0173-compose-images rather than main.
    Remediation: Link a tracking issue and ensure ADR 0173 is accepted before landing on main.
  • [pattern-inconsistency] internal/harness/image_mount.go:52 — Overlap errors hardcode host_files[%d], so errors from forge and overlay blocks point at the wrong, unprefixed path.
    Remediation: Derive the host_files prefix from field.
  • [breaking-config] internal/agentnew/templates/policies/base.yaml:16 — Only the scaffold template gains /opt/fullsend in read_only; existing or custom policies are not migrated or validated, so repos mounting a tools image at /opt/fullsend with an old policy will be denied under landlock.
    Remediation: Validate or inject the entry when image_mounts targets /opt/fullsend; note the migration in release notes.
  • [breaking-schema] internal/harness/image_mount.go:28 — image_mounts has no documented minimum runner version, no way to remove an inherited mount, and non-Podman backends reject it only at sandbox creation rather than at validate time.
    Remediation: Document the minimum version and consider failing fast on non-Podman backends.

Labels: PR changes harness composition/validation and the sandbox image/runtime layout.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added component/harness Agent harness, config, and skills loading component/sandbox OpenShell sandbox environment labels Nov 12, 2026
@ralphbean
ralphbean marked this pull request as draft November 12, 2026 23:53
Signed-off-by: Ralph Bean <rbean@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🤖 Review · ❌ Terminated · Started 12:42 AM UTC · Ended 1:06 AM UTC

Commit: 2fee05f · View workflow run →

@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.30144% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/sandbox/sandbox.go 85.18% 5 Missing and 3 partials ⚠️
internal/cli/run_image_mount_policy.go 75.00% 3 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@fullsend-ai-review fullsend-ai-review Bot removed the risk/elevated PR risk: elevated label Nov 13, 2026
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Finished Review · ❌ Failure (post-script /home/runner/work/fullsend/fullsend/.fullsend/.fullsend-cache/resources/sha256/401c0ce973a89277564d7ecee02103ae504d2405692f0cf9618bcf9c48db6ba1/scripts/post-review.sh failed: exit status 1) · Started 12:42 AM UTC · Completed 1:05 AM UTC

Commit: 2fee05f · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.67

Signed-off-by: Ralph Bean <rbean@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:14 PM UTC · Completed 12:45 PM UTC

Commit: 981b462 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $4.33

fullsend-ai-review[bot]

This comment was marked as outdated.

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added component/docs User-facing documentation component/ci CI pipelines and checks labels Nov 13, 2026
Signed-off-by: Ralph Bean <rbean@redhat.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:46 PM UTC · Completed 9:06 PM UTC

Commit: c7d364b · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.76

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • docs/reference/harness-reference.md (file-level): Line 573 ·
    [low] incomplete-doc

The 'Field merge rules (for base and overlays)' table has no image_mounts row, although docs/guides/user/bring-your-own-agent.md sends readers to that table for image_mounts merge behavior. The semantics are documented in the field description earlier on the page.

Suggested fix: Add an image_mounts row (concatenated; child overrides by dest, keeping first position), or point the guide's link at the field description.

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.

@@ -472,6 +478,8 @@ RUN apt-get update \
&& pip install --no-cache-dir --break-system-packages \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] logic-error

pre-commit and gitlint are installed with system pip into default site-packages; their launchers use an absolute /usr/bin/python3 shebang. When the tools image is mounted at /opt/fullsend, its launchers are found first (SandboxFullsendToolPath is prepended to PATH) and run under the development image's Python, whose sys.path lacks the mounted dist-packages, failing with ModuleNotFoundError. jsonschema alone gets a dedicated --target path handled by the mounted interpreter.

Suggested fix: Give pre-commit and gitlint mount-aware launchers (or install them under a dedicated target with wrappers, as done for jsonschema) that call the mounted interpreter with the mounted library paths. Add a smoke test that runs both tools against a development image without them installed.

filesystem_policy:
include_workdir: true
read_only: [/usr, /lib, /proc, /dev/urandom, /app, /etc, /var/log]
read_only: [/usr, /lib, /proc, /dev/urandom, /app, /etc, /var/log, /opt/fullsend]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] breaking-config

/opt/fullsend was added to filesystem_policy.read_only only in the scaffold template. Policies already generated from the template, and custom policies, do not list it, so the mounted tool tree may not be readable under those policies.

Suggested fix: Add a migration note for repositories with existing or custom filesystem policies (add /opt/fullsend to read_only) and confirm custom policies behave as intended without it.

@@ -127,8 +138,13 @@ const envDataWritableAncestor = `while :; do if test -w "$p" || test -O "$p"; th
// the launch runs as the owner of / (root), nothing could be protected, so
// only relative and empty entries and missing directories are left out.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] breaking-config

The runner's trusted PATH now always puts /opt/fullsend/usr/local/bin:/opt/fullsend/usr/bin ahead of the ambient PATH (ambient PATH retained after them; the default image links these to /usr). Harnesses or images that depend on the previous PATH ordering may resolve tools differently.

// ImageMount describes an OCI image mounted read-only into the sandbox.
// Image is an OCI image reference; Dest is the absolute mount point in the
// sandbox. The mounted image's OCI environment and entrypoint are not applied.
type ImageMount struct {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] missing-authorization

The PR does not close a tracking issue. It cites #5680 and #491 as related only; both are open and cover the same use case. The PR is a draft stacked on the docs/adr-0173-compose-images branch.

Suggested fix: State which issue authorizes this slice of work, or open a narrowly scoped tracking issue before the PR leaves draft.

if err != nil {
return fmt.Errorf("encoding Podman image mounts: %w", err)
}
args = append(args, "--driver-config-json", string(config))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] misplaced-abstraction

createOnce builds the Podman-specific podmanDriverConfig JSON and passes it through --driver-config-json inside the general sandbox creation lifecycle.

Suggested fix: Optionally move the backend-specific driver payload construction into a small builder so adding other backends does not touch createOnce.


// sandboxFullsendToolPathCommand runs a fixed runner command with the
// mounted Fullsend tool image ahead of the sandbox's ambient PATH.
func sandboxFullsendToolPathCommand(command string) string {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] code-organization

sandboxFullsendToolPathCommand and sandboxFullsendToolPathCommandAt sit between EnvDataControlLines and its implementation envDataControlLines, splitting the pair.

Suggested fix: Move the helpers below envDataControlLines or next to the other sandbox command helpers.

return CreateWithRetry(name, providers, image, policy, DefaultMaxCreateAttempts, 0, false, imageMounts...)
}

// ImageMount is an OCI image mounted read-only into a Podman-backed sandbox.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] code-organization

The ImageMount type is declared between Create and CreateWithRetry, separating Create from the function it delegates to.

// piProviderExtensionPin prefers the relocated extension path and falls
// back to the path in the currently published sandbox image. The selected
// path is read-only before the agent-writable .env is processed.
func piProviderExtensionPin(variable, primary, legacy string) string {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] pattern-inconsistency

piProviderExtensionPin returns an unbraced if...fi fragment joined into an && chain, whereas some other pin helpers use a { ...; } brace group. Cosmetic only.

This branch was successfully deployed

1 active and 1 inactive deployments
site-preview — c7d364b2 Deployed Nov 13, 2026 by github-actions[bot]
dev — c7d364b2 Deployed Nov 13, 2026 by ralphbean via playback #20197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/ci CI pipelines and checks component/docs User-facing documentation component/harness Agent harness, config, and skills loading component/sandbox OpenShell sandbox environment risk/elevated PR risk: elevated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant