mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
Every Ansible rescue: block used to carry ad-hoc per-role failure dumps that drifted apart and captured different subsets. Replace them all with one diagnostics script (scripts/system/diagnostics/rescue.sh) that snapshots containers (full logs plus inspect per container), swarm services (ps plus logs per service), journal, host resources, runtime info and stats into a per-run folder and always exits 1 so the deploy still fails. A new lint enforces the shape: every rescue ends with the script, at most one nocheck-justified extra task before it (postgres pg_hba dump, xwiki extension-repo probe), and a nocheck rescue-recovery exemption for the one block that must genuinely recover: keycloak object updates, where a cross-node reschedule needs a swarm-wide node re-resolve plus a delegate_to change that only a rescue can express; its recovery is kept and now also captures diagnostics before the terminal failure. The snapshot folder path is a group_vars SPOT: DIR_RESCUE_DIAGNOSTICS and DIR_VAR_LIB live in group_vars/all/05_paths.yml as plain strings; new env handlers derive INFINITO_RESCUE_DIAGNOSTICS_DIR and INFINITO_DIR_VAR_LIB from it for the generated .env, replacing the default.env entries, and the play-level environment forwards the value to every task host so rescue.sh needs no second default. CI uploads the folder like the inventory and playwright artifacts: compose copies it out of the deploy container in dedicated.sh, swarm captures per node (manager and both workers) into node-named subfolders. Deleting the ad-hoc dumps orphaned helper files (postgres inspect_container, terminator docker_diagnostics, peertube diagnostics, matomo bootstrap debug, xwiki and openresty rescue includes) and 14 role vars; all removed. Generic pieces of those dumps (runtime version and info, stats, dmesg oom evidence, swapon) moved into the SPOT script instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Test Utilities 🧪
This directory holds the operational side of testing in Infinito.Nexus.
These assets are meant to support confidence, not ceremony. They help the project validate real-world behavior across local development, CI environments, and deployment-oriented smoke tests. The emphasis is on practical feedback: when something breaks, the surrounding test tooling should make the failure easier to understand, easier to reproduce, and easier to clean up. 🚀
Good changes in this area usually make the test experience more:
- repeatable
- diagnosable
- environment-aware
- safe to rerun
The ideal outcome is boring reliability: contributors should be able to trust that a test run says something meaningful about the system, not just about the machine that happened to execute it. ✅