Skip to content

Skill sandbox + execution-log fixes (read-only fs, image resolution, dark-mode labels) - #314

Merged
mbakgun merged 5 commits into
mainfrom
fix/skill-sandbox-readonly-fs
Jul 11, 2026
Merged

Skill sandbox + execution-log fixes (read-only fs, image resolution, dark-mode labels)#314
mbakgun merged 5 commits into
mainfrom
fix/skill-sandbox-readonly-fs

Conversation

@mbakgun

@mbakgun mbakgun commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Follow-up fixes after the skill sandbox landed (GHSA-hcv7-mg77-pg73). Three independent issues, one PR.

1. uv project discovery on the read-only filesystem (deploy.sh)

Running a skill in the Docker sandbox on a Compose deployment failed with:

error: failed to remove directory `/app/.venv/bin`: Read-only file system (os error 30)

The sandbox --workdir is the per-run workspace under /app/data/codex-workspaces/.... In the Compose backend image, /app is the backend's own uv project, so uv run walked up, discovered it, found the venv Python link broken in the throwaway sibling, and tried to recreate the venv on the read-only root filesystem. Fix: run skills with uv run --no-project (both Docker and subprocess paths) so uv runs the skill in its own isolated environment. Inline PEP 723 dependencies are still honored; writes go to UV_CACHE_DIR/HOME under the writable workspace. Verified by reproducing the exact error locally and confirming the fix.

2. Runner image could not be resolved (single container image)

Single container deployments failed with:

Skill Docker sandbox is enabled but the runner image could not be resolved.

docker inspect <hostname> does not reliably return the running image in that deployment. Fix: fall back to HEYM_CODEX_DOCKER_IMAGE, which the release image and Compose already set to the backend image (it always carries uv), and set an explicit HEYM_SKILL_IMAGE in the release Dockerfile.

3. Unreadable purple execution-log labels in dark mode

The Skills Used, MCP, and Skill badges in the execution console and history dialogs used bg-primary/20 text-primary; the primary violet text on the translucent primary background is too low contrast in dark mode. Switched to the app's readable violet badge pattern (text-violet-700 dark:text-violet-300).

Verification

  • Backend: full suite passes (2054 tests); ruff clean.
  • Frontend: lint and typecheck pass.

🤖 Generated with Claude Code

mbakgun added 3 commits July 11, 2026 14:33
The Docker skill sandbox runs uv from a workdir under /app, which in the
Compose backend image is the backend's own uv project. uv discovered that
project, found the venv Python interpreter link broken in the throwaway
sibling container, and tried to recreate the venv, failing on the read-only
root filesystem. Run skills with 'uv run --no-project' so uv never discovers
a surrounding project and runs the skill in its own isolated environment.
Applied to both the Docker and subprocess paths.
The Skills Used, MCP, and Skill badges in the execution console and history
dialogs used 'bg-primary/20 text-primary'. In dark mode the primary violet
text on the translucent primary background has too little contrast. Switch to
the app's readable violet badge pattern (text-violet-700 dark:text-violet-300)
so the labels are legible in both light and dark themes.
Single container deployments failed with 'Skill Docker sandbox is enabled but
the runner image could not be resolved' because 'docker inspect <hostname>'
does not reliably return the running image there. Fall back to
HEYM_CODEX_DOCKER_IMAGE, which the release image and Compose already set to the
backend image (it always carries uv), and set an explicit HEYM_SKILL_IMAGE in
the release Dockerfile.
@mbakgun mbakgun changed the title Fix skill sandbox uv project discovery on read-only filesystem Skill sandbox + execution-log fixes (read-only fs, image resolution, dark-mode labels) Jul 11, 2026
mbakgun added 2 commits July 11, 2026 15:00
Skills rely on the backend's installed packages (python-docx, pypdf, ...), but
the sandbox ran them in an isolated environment that lacked those packages, so
real skills failed. Run skills with the backend's own venv interpreter
(sys.executable, valid in the sibling because it uses the backend image)
instead of uv, which also avoids uv discovering and repairing the backend
project on the read-only filesystem. This supersedes the earlier uv
--no-project approach.

Also add a .dockerignore: without it, 'COPY backend/ .' copied the host .venv
into the image, clobbering the clean uv-synced venv with host-path symlinks and
leaving a broken Python interpreter (the source of the read-only repair error).

Verified end to end on the single-container image: a python-docx skill runs
non-root, with no Docker socket, no leaked secrets, and produces a real docx.
@mbakgun
mbakgun merged commit 08836e1 into main Jul 11, 2026
2 checks passed
@mbakgun
mbakgun deleted the fix/skill-sandbox-readonly-fs branch July 11, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant