From 1c427bb93bba75dc2ad2567a0f4195f09cc13c8a Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Sun, 21 Jun 2026 12:12:29 +0200 Subject: [PATCH 1/3] docs(build): record OSA disk policy and mother-build rationale (Sam & Codex) --- BUILD.md | 23 +++++++++++++++++++++++ docs/POUDRIERE-BUILD-SERVER.md | 17 +++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/BUILD.md b/BUILD.md index adf418de..1d8ca38c 100644 --- a/BUILD.md +++ b/BUILD.md @@ -603,6 +603,29 @@ closure and hardware behavior. The build is intentionally cache-friendly. If in doubt before validation, run the full `sudo ./build.sh` once after pulling current `main`. +### Build-host disk policy + +When OSA gets tight on disk, prefer deleting **repo-local build artifacts** +(`tmp/packages`, `tmp/cache/work.img`, cached FreeBSD memstick images, old output +artifacts) over pruning host packages. + +Do **not** treat the remaining host-side graphics/media stack as disposable "old +X11". On OSA it is not a full desktop environment anymore; it is a shared runtime +closure that supports current operator tooling and validation lanes: + +- `ffmpeg` + `py311-pillow` back the Hermes/image-render and screenshot path. +- `gtk3`, `cairo`, `pango`, `fontconfig`, `libX11`, `mesa-*`, `wayland`, + `wlroots`, and related libs are shared by Codex-adjacent tooling, VNC/screenshot + helpers, media/rendering packages, and Python operator tools. +- Dry-run package removal on OSA showed that reclaiming this subtree would remove + far more than a stale desktop: `codex`, `ffmpeg`, `py311-pillow`, ImageMagick, + graphviz, aider-adjacent Python packages, and remote-display helpers all rode on + the same dependency closure. + +In practice: if you need gigabytes quickly, clear build caches first. If host pkg +pressure becomes chronic, that is a signal to move more build/package work onto +`mother-build`, not to hollow out the FreeBSD operator host. + --- ## Boot Flow Produced by the Image diff --git a/docs/POUDRIERE-BUILD-SERVER.md b/docs/POUDRIERE-BUILD-SERVER.md index 12dd9338..541fdef8 100644 --- a/docs/POUDRIERE-BUILD-SERVER.md +++ b/docs/POUDRIERE-BUILD-SERVER.md @@ -47,6 +47,13 @@ Benefits: - `pkg upgrade colibri` on deployed machines - No Rust toolchain needed on the ISO build host - Proper `pkg info colibri` metadata +- Less pressure to treat the OSA ISO builder as disposable package scratch space. + OSA still needs a meaningful local operator/runtime toolkit (Codex, Hermes/image + helpers, media/rendering deps, VNC/screenshot helpers). In practice those pull a + shared GTK/X11/Wayland/media dependency closure. When disk gets tight, deleting + repo-local build caches is safer than trying to strip that host closure. A real + `mother-build` shifts bulky package-build churn off OSA instead of forcing the + builder host to choose between free space and capability. ## Memory split (reference sizing — ML350p 32 GB) @@ -352,6 +359,16 @@ vm-bhyve **Critical path:** provision `mother-build` → write the colibri port → run the two scripts → stand up nginx/DNS. The host purchase is gated on the HOST-MATRIX cost rows. +Why this matters operationally on OSA: + +- repo-local ISO artifacts (`tmp/packages`, sparse `work.img`, cached memsticks) + are the right things to delete under pressure +- host GUI/media/runtime packages are not just "old desktop leftovers" anymore; + they are shared dependencies for Codex-adjacent tooling, Hermes/image helpers, + and remote-display/debug paths +- pushing package-build churn to `mother-build` is the clean fix when OSA starts + trading free space against operator capability + ## Notes - Rust target `x86_64-unknown-freebsd` stays — that's the compiler triple. From 2d2a7576465d5739c12991b455f3b00fa8b4d332 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Sun, 21 Jun 2026 12:17:57 +0200 Subject: [PATCH 2/3] docs(build): add cleanup one-liner, /tmp note, mother-build PLANNED marker --- BUILD.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/BUILD.md b/BUILD.md index 1d8ca38c..a503b9a2 100644 --- a/BUILD.md +++ b/BUILD.md @@ -618,13 +618,24 @@ closure that supports current operator tooling and validation lanes: `wlroots`, and related libs are shared by Codex-adjacent tooling, VNC/screenshot helpers, media/rendering packages, and Python operator tools. - Dry-run package removal on OSA showed that reclaiming this subtree would remove - far more than a stale desktop: `codex`, `ffmpeg`, `py311-pillow`, ImageMagick, + far more than a stale desktop: `Codex`, `ffmpeg`, `py311-pillow`, ImageMagick, graphviz, aider-adjacent Python packages, and remote-display helpers all rode on the same dependency closure. -In practice: if you need gigabytes quickly, clear build caches first. If host pkg -pressure becomes chronic, that is a signal to move more build/package work onto -`mother-build`, not to hollow out the FreeBSD operator host. +In practice: if you need gigabytes quickly, clear build caches first: + + sudo rm -rf tmp/packages tmp/cache/work.img output/FreeBSD-*.img + +These caches typically reclaim 3-8 GB. If host pkg pressure becomes chronic, +that is a signal to move more build/package work onto +`mother-build` (PLANNED — see docs/POUDRIERE-BUILD-SERVER.md), not to hollow +out the FreeBSD operator host. + +Note: OSA's `/tmp` is a ZFS dataset separate from build caches. If shell +commands fail with "No space left on device" during agent operations, clear +`/tmp` independently: + + sudo rm -rf /tmp/* --- From 86b218ac6c62f6070766d17474342ab268e6dfaa Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Sun, 21 Jun 2026 12:24:51 +0200 Subject: [PATCH 3/3] fix(build): correct the disk-cleanup paths to real build artifacts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The one-liner's `output/FreeBSD-*.img` matched nothing — OUTPUT_DIR is tmp/output, the built image is clawdie-*.img, and the cached memstick lives in tmp/cache (FreeBSD-*-memstick.img). Replace with `tmp/packages tmp/cache tmp/output` — clears bundled packages, all caches (incl. work.img + the cached memstick), and built outputs; all regenerable, all under repo-local tmp/. Co-Authored-By: Claude Opus 4.8 --- BUILD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index a503b9a2..e468fefb 100644 --- a/BUILD.md +++ b/BUILD.md @@ -624,7 +624,7 @@ closure that supports current operator tooling and validation lanes: In practice: if you need gigabytes quickly, clear build caches first: - sudo rm -rf tmp/packages tmp/cache/work.img output/FreeBSD-*.img + sudo rm -rf tmp/packages tmp/cache tmp/output These caches typically reclaim 3-8 GB. If host pkg pressure becomes chronic, that is a signal to move more build/package work onto