mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 03:38:23 +00:00
GitHub cancels a job queued for 24h. A line starting swarm, compose and host at once queues its whole matrix in one go, so with more roles than runner slots the tail waits past that cut and dies unrun -- 54 of 241 jobs in run 30937913632. Deploy the modes one after the other instead, heaviest first, which restarts the queue clock per mode. cli.meta.ci.sequencing counts a line's matrix jobs on the row basis the discover steps use and serialises above INFINITO_CI_SEQUENTIAL_THRESHOLD; below it the modes still start together, so a small diff pays no wall-clock for this. A needs: edge is static, so both layouts exist as jobs and the decision skips one. Their conditions are structurally asserted, not evaluated: ten near-identical if expressions invite a copied sentinel or a missing chain edge, and both failures are silent at runtime. mode_fail_fast stops a serial line at its first failed mode, on by default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
utils/env 📐
This directory hosts the Python implementation behind make dotenv.
For the general rules that govern READMEs in code directories see documentation.md.
For the per-variable defaults that this code consumes see default.env.
Purpose 🎯
The package converts the committed default.env plus a small runtime context into the gitignored .env at the repo root.
Every module here belongs to one of four roles: parse, resolve, orchestrate, write.
Structure 🗂️
| File | Role |
|---|---|
parser.py |
Read default.env into (values, comments) tuples. |
runtime.py |
Resolve host-context lookups (disk, RAM, hostname, GHA/Act flags, /proc/version, helper-script invocation). |
builder.py |
Thin orchestrator that defines EnvBuilder, BuildContext, and build_env(). Walks the handler registry. |
writer.py |
Serialise an EnvBuilder into a docker-compose-compatible .env on disk. |
handlers/ |
One module per dynamically-computed variable. See handlers README. |
The CLI entry point lives at __main__.py under cli/meta/env/.
Shell consumers source load.sh under scripts/meta/env/.
File Naming 🏷️
- Module names MUST stay lowercase snake_case.
- Pure passthrough or simple parser/writer helpers MUST live directly under
utils/env/. - Per-variable computation MUST live under
handlers/(see handlers README for the naming convention used there). - Test files live in tests/unit/utils/env/ and mirror the module name with a
test_prefix.
Import Rules 🔗
parser.py,runtime.py, andwriter.pyMUST NOT import frombuilder.pyorhandlers/.builder.pyMUST NOT import individual handler modules; it MUST go through theORDERED_HANDLERSlist exposed byhandlers/__init__.py.- Handler modules MUST NOT import each other (see handlers README).