pnpm,uv,mise: mode=rw on /persist state binds (engine default is ro) #34

Merged
chad merged 1 commit from glen/pnpm-persist-rw-bind into main 2026-10-27 16:51:56 -04:00
Collaborator

Why

pnpm install in polymer on the thinkpad died mid-fetch with Failed to write cafs: /persist/store/v11/files/xx: Read-only file system. Root cause: the bubblebox engine's default bind mode is ro (cli/src/config.rs default_mode), and the pnpm, uv, and mise entrypoints omitted mode on their $BUBBLEBOX_DATA_DIR → /persist binds. The bind reads fine, so every existing smoke (--version, store path, cache dir) passed — the failure only surfaced on the first real write, deep inside pnpm's content-addressed store writer.

Every other stateful package (nvim, tmux, atuin, pipx, tealdeer, zoxide, navi, osv-scanner, rust-dev) already carries mode = "rw" — these three were the stragglers.

What

  • mode = "rw" on the /persist binds of pnpm, uv, mise (with WHY-comments naming the incident).
  • verify.sh L6 lint: any create = true bind must carry mode = "rw" — this class of bug can't pass lint again.
  • Write-proving smokes:
    • pnpm: offline install from a committed file: tarball fixture (real sha512 integrity, pnpm-generated lockfile) — exercises cafs writes + hardlinks; verified to reproduce the exact EROFS error on a ro bind and pass on rw.
    • uv: cache clean (a real write to /persist/cache).

Evidence

Full tools/verify.sh pnpm uv mise green on bee (lint + build + smoke + footprint: 57/59/126 MB). Negative test: with mode = "rw" removed, the new pnpm smoke fails with the byte-exact incident error:

Failed to write cafs: Failed to create the parent directory at
"/persist/store/v11/files/65": Read-only file system (os error 30)

After merge

CI republishes the signed default entrypoints; on the thinkpad: bubblebox source update personal && bubblebox apply, then rerun the polymer install. (Interim workaround if needed sooner: a user-side override at ~/.config/bubblebox/entrypoints/pnpm.toml redeclaring the bind with mode = "rw".)

## Why `pnpm install` in polymer on the thinkpad died mid-fetch with `Failed to write cafs: /persist/store/v11/files/xx: Read-only file system`. Root cause: the bubblebox engine's **default bind mode is `ro`** (`cli/src/config.rs default_mode`), and the `pnpm`, `uv`, and `mise` entrypoints omitted `mode` on their `$BUBBLEBOX_DATA_DIR → /persist` binds. The bind *reads* fine, so every existing smoke (`--version`, `store path`, `cache dir`) passed — the failure only surfaced on the first real **write**, deep inside pnpm's content-addressed store writer. Every other stateful package (nvim, tmux, atuin, pipx, tealdeer, zoxide, navi, osv-scanner, rust-dev) already carries `mode = "rw"` — these three were the stragglers. ## What - `mode = "rw"` on the `/persist` binds of **pnpm**, **uv**, **mise** (with WHY-comments naming the incident). - **verify.sh L6 lint**: any `create = true` bind must carry `mode = "rw"` — this class of bug can't pass lint again. - **Write-proving smokes**: - pnpm: offline install from a committed `file:` tarball fixture (real sha512 integrity, pnpm-generated lockfile) — exercises cafs writes + hardlinks; **verified to reproduce the exact EROFS error on a ro bind** and pass on rw. - uv: `cache clean` (a real write to `/persist/cache`). ## Evidence Full `tools/verify.sh pnpm uv mise` green on bee (lint + build + smoke + footprint: 57/59/126 MB). Negative test: with `mode = "rw"` removed, the new pnpm smoke fails with the byte-exact incident error: ``` Failed to write cafs: Failed to create the parent directory at "/persist/store/v11/files/65": Read-only file system (os error 30) ``` ## After merge CI republishes the signed default entrypoints; on the thinkpad: `bubblebox source update personal && bubblebox apply`, then rerun the polymer install. (Interim workaround if needed sooner: a user-side override at `~/.config/bubblebox/entrypoints/pnpm.toml` redeclaring the bind with `mode = "rw"`.)
pnpm,uv,mise: mode=rw on /persist state binds (engine default is ro)
All checks were successful
verify / verify (pull_request) Successful in 14s
ad17320020
The engine's default bind mode is read-only (cli config.rs default_mode ->
"ro"), and these three entrypoints omitted mode on their $BUBBLEBOX_DATA_DIR
binds. The bind reads fine, so banner smokes (--version, store path, cache
dir) pass — but the first real WRITE dies deep inside the sandboxed tool:
Chad hit "Failed to write cafs: /persist/store/v11/files/xx: Read-only file
system" mid `pnpm install` in polymer on the thinkpad, after pnpm had already
resolved the lockfile and started fetching tarballs.

Fix: explicit mode = "rw" on all three /persist binds (matching nvim, tmux,
atuin, pipx, tealdeer, zoxide, navi, osv-scanner, rust-dev — every other
stateful package already had it).

Hardening so the class can't recur silently:
- verify.sh L6: a create=true bind must carry mode = "rw".
- pnpm smoke: offline install from a committed tarball fixture (file:
  tarball, real integrity hash) — exercises cafs writes + hardlinks, fails
  EROFS on a ro bind, no network.
- uv smoke: cache clean — a real write to /persist/cache.

Verified: lint locally (L6 proven to flag the pre-fix entrypoint);
full verify (build + smoke + footprint) on bee.
chad approved these changes 2026-10-27 16:51:52 -04:00
chad merged commit 84a388aa2c into main 2026-10-27 16:51:56 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chad/bubblebox-pkgs!34
No description provided.