mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
The routine only carried an EXIT trap, so a run terminated by the enclosing `timeout` in distros.sh:128 left no rescue diagnostics, no playwright reports and no teardown — the exact case where the artifacts matter most. Add a TERM trap and make the handler take the status as an argument, so EXIT keeps using `$?` while TERM passes 143 explicitly. The `_teardown_done` latch is required because the EXIT trap still fires after the TERM trap; without it the whole collect-and-teardown block, including its 1500s and 900s timeouts, would run twice. This works because GNU timeout signals the whole process group: bash defers a trap while it waits on a foreground child, so a bare kill to the script PID alone would not surface it until that child exited. Reproduced under the real shape (timeout -k): TEARDOWN rc=143, exactly once, after 2.01s. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Script Collection
This directory contains automation scripts used across the project.
-
system/ contains host and system-facing helpers.
-
container/ contains helpers that run inside the local container.
-
github/ contains GitHub workflow helper scripts.
-
For the canonical Make target index, see make.md.
-
🛠️ Organize operational helpers for development, CI, release, and maintenance
-
🧭 Separate responsibilities into focused subdirectories with clear scope
-
📚 Keep script-based workflows discoverable and easier to navigate
The scope of this folder is script organization at the repository level. Detailed responsibilities belong in the README files of the respective subdirectories.