Files
computer-playbook/scripts/github/runner
kevinveenbirkenbachandClaude Opus 5 e44778afaa fix(ci): assert the architecture that the context actually promises
INFINITO_ARCHITECTURE means two different things. In CI it is the runner's
hardware, delivered by `runs-on`. Locally it is the platform app containers are
created for, delivered by qemu. The check asserted the first everywhere, so a
local run that honoured the assignment by emulation was reported as a mismatch,
with an error blaming RUNNERS where nothing was wrong.

Each context is now checked against its own promise. On a real runner the
uname must match, unchanged. Anywhere else the host must be able to execute the
assigned platform, which is verified by running a container of it rather than
by reading /proc/sys/fs/binfmt_misc, since that directory reads as empty from a
sandboxed shell whether or not a handler is registered.

Nothing is skipped and nothing passes quietly. A host that cannot deliver the
assigned architecture fails here, in the first second of the job, and names the
two commands that fix it. Five arm64 deploys died instead at
`exec /bin/sh: exec format error` deep inside an Ansible role, each after
fifteen to twenty minutes of setup.

This replaces the `exit 0` under act that an earlier version of this change
introduced. That version swallowed exactly what this check exists to catch: a
row assigned arm64 ran entirely on amd64 and would have reported green.

Verified, all four branches: amd64 native passes; arm64 with emulation present
passes as emulated; arm64 without it exits 1 with the remedy; a real-CI
mismatch exits 1 with the RUNNERS hint. shellcheck clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 09:29:13 +02:00
..
…

Runner Hygiene 🧹

Shell helpers that prepare and inspect the GitHub-hosted runner host around image-build and deploy steps.

Scope 📋

This directory contains host-level helpers: disk-space reclamation and reporting, swap-file enlargement, Docker-daemon cleanup, and post-failure diagnostic dumps. Helpers MUST be invoked from workflow run: blocks under .github/workflows/ and MUST NOT be called from application code, Ansible roles, or any runtime path outside CI. They assume a GitHub-hosted Ubuntu runner and modify host-kernel state (mount points, swap, Docker storage) that does not exist inside the infinito container.

For the rationale behind disk reclamation and swap enlargement in deploy workflows see the "Disk space" and "Swap" sections in workflow.md. For the workflow catalog that drives these calls see workflows.md.