diff --git a/Dockerfile b/Dockerfile index d957181..b84ea08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -148,6 +148,14 @@ RUN set -eu; \ PI_CONFIG_FILES=/etc/codebox/omp-config.yml /usr/local/bin/omp config path && \ rm -rf /tmp/omp-build && \ chmod -R a+rX,go-w /usr/local/lib/omp && \ + # omp >= 19.1.1 sets explicit timestamps on natives/ at + # every start (utimes), which only the owner may do: a root-owned + # dir aborts with "EPERM ... utime". Hand it to coder (uid 1000 = + # the session user under podman keep-id and in the k8s pod). + # ponytail: an OpenShell sandbox uid still hits EPERM; drop this + # chown once can1357/oh-my-pi#20267 (use a present addon without + # the touch) ships. + chown -R coder:coder /usr/local/lib/omp && \ # Build guard: the native addon for this arch must have extracted find /usr/local/lib/omp/natives -name 'pi_natives.*.node' | grep -q . && \ printf '%s\n' /sandbox/.omp > /etc/codebox/sandbox-state-dirs ;; \ diff --git a/docs/architecture.md b/docs/architecture.md index c760320..f5f1fe1 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -38,7 +38,7 @@ The harness stage is small and fast, and each harness build is independent of th - `opencode` → `npm install -g opencode-ai@` - `qwencode` → `npm install -g @qwen-code/qwen-code@`, plus a baked `/etc/qwen-code/settings.json` that disables auto-update and Qwen's own sandbox (to avoid sandbox-in-container nesting) - `codex` → `npm install -g @openai/codex@` (npm wrapper that resolves to a per-platform native binary). Codex has no system-level config, so the `cxbox` launcher disables Codex's own sandbox (`sandbox_mode="danger-full-access"`, the container is the sandbox and bubblewrap/Landlock cannot nest in it) and the startup update check via `-c` overrides - - `omp` → no npm: the prebuilt release binary (`omp-linux-{x64,arm64}`) is downloaded from GitHub Releases and checksum-verified against `SHA256SUMS.txt`. Oh My Pi's native addons (~340 MB) are extracted at build time (`omp config path`) into `/usr/local/lib/omp/natives` (not `~/.omp/natives`), readable by any uid and read-only beyond build time, via `PI_NATIVES_DIR`; the startup update check is disabled through a baked config overlay loaded via `PI_CONFIG_FILES` + - `omp` → no npm: the prebuilt release binary (`omp-linux-{x64,arm64}`) is downloaded from GitHub Releases and checksum-verified against `SHA256SUMS.txt`. Oh My Pi's native addons (~340 MB) are extracted at build time (`omp config path`) into `/usr/local/lib/omp/natives` (not `~/.omp/natives`), readable by any uid and owned by `coder` (omp touches the version dir at startup, which needs ownership), via `PI_NATIVES_DIR`; the startup update check is disabled through a baked config overlay loaded via `PI_CONFIG_FILES` 3. Writes the harness's state-dir manifest, `/etc/codebox/sandbox-state-dirs` (one absolute path per line), and a common root block pre-creates each listed `/sandbox/...` dir at mode 0777 and installs `/etc/profile.d/zz-codebox-openshell.sh`. See "OpenShell runtime contract" below — this step only matters to the OpenShell sandbox launch path, not to the Podman/Apptainer launchers on this page. Auto-updaters are disabled for all harnesses — versions are controlled by the pin files and image builds.