mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
The image runs this module from a layer that holds three files of utils: __init__.py, install/__init__.py and install/collections.py, the sliceef45d69dc3cut so the source tree cannot invalidate the collection install.67f5398985established that the module therefore stays on the standard library, andd4ae5cf9f0broke it 15 minutes later by routing the reads through utils.cache.files to satisfy the cache-read lint. The import raises ModuleNotFoundError: No module named 'utils.cache' in that layer, which no import inside a full checkout can show, because this repository installs utils into site-packages. Nothing turned red. The caller reads only the exit code, and the module's contract is exit 1 with the missing collections on stdout, so a crash - exit 1, nothing on stdout - is indistinguishable from work to do. Every image build since has reinstalled every collection with --force-with-deps, which is the cost the check exists to avoid. The deploy job the traceback was found in finished green. The reads go back to Path.read_text with a cache-read marker each. The cache was never earning its place here: read_text is an lru_cache keyed on the path, and one run reads the requirements file once and one MANIFEST.json per collection, eight distinct paths, none of them twice. Copying utils/cache into the slice instead would work - the closure is three stdlib-only files - but it binds a package with 51 commits in the last twelve months to the layer that installs ansible, in front of a cache with no possible hit. The caller now exits 3 when a non-zero status arrives with an empty stdout, a state the contract cannot produce, so the next crash stops the install instead of quietly reinstalling everything. all.sh runs under set -e and touches the stamp only after ansible.sh returns, so the failure also leaves the stamp stale rather than recording an install that did not happen. The probe that would have caught this builds the slice in a tempdir from the Dockerfile's own COPY lines and runs the module inside it. It has to pass python -S: without it the interpreter resolves every submodule from the installed checkout however the slice is built, and the test passes on a module that cannot import in the image. Verified by injecting the import back into the tempdir copy, which reproduces the traceback verbatim. Delta measured by loading the committed module and this one side by side: identical on both requirements files, against the real collections directory and an empty one, on a missing file, on non-UTF-8 input and on a corrupt MANIFEST.json. The one behavioural difference is that a file changed within a process is now read fresh rather than from the memo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Install Scripts
This directory contains scripts that install and bootstrap host-side tooling used by the project.
- 📦 Install Python, Ansible, and lint dependencies for supported environments
- 🐧 Install ad-hoc APT packages for CI and workflow jobs via
apt.sh - 📦 Build and install distro package metadata via
package.sh(Arch/Debian/Ubuntu/Fedora) - 🪞 Point an Ubuntu image's apt sources at
INFINITO_APT_UBUNTU_MIRRORSviaapt-mirrors.sh, run first in the image build: apt tries the mirrors in list order and moves on when one fails or stays silent for 10 s; images of other distros are left untouched - 🏖️ Install OS-level Claude Code sandbox dependencies (
bubblewrap,socat) viasandbox.sh, covering Debian, Ubuntu, Fedora, CentOS/RHEL/Rocky/Alma, and Arch; also exposed asmake install-agent - 🧊 Install the ext4, btrfs and zfs userlands via
filesystem.sh(distro packages, EPEL for btrfs on CentOS, the AUR PKGBUILD for zfs on Arch, the zfsonlinux repository on Fedora/CentOS); the kernel side comes from the host - 🐍 Bootstrap virtual environments and editable project dependencies
- 🛠️ Keep host preparation separate from lint, build, and test execution
The scope of this folder is installation and bootstrap. Lint execution, build workflows, and test orchestration should stay in their dedicated script directories.