mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
The env generator runs on the bare bootstrap python, before any dependency is installed. utils/distros.py reached PyYAML through utils.cache.yaml, so `python -m cli.meta.env` died with ModuleNotFoundError on every dev-runtime image that ships python3 without PyYAML. utils/yaml_bootstrap.load_block reads the block-YAML subset the SPOT files use with stdlib only. It raises BootstrapYamlError on anything it cannot parse identically to yaml.safe_load, so meta/distros.yml fails loud instead of drifting. The per-line regex lint meant to guard this is gone: one hop of indirection defeated it and it stayed green while the invariant was broken. It is replaced by a test that runs the real generator with every non-stdlib import blocked. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Python Lint 🐍
Python-specific code conventions: unittest import shape, PROJECT_ROOT usage, ban on raw os.walk/Path.rglob/uncached read_text, noqa marker hygiene, redundant boolean patterns, and self-path-reference avoidance.
Tests in this directory MUST only cover Python source patterns. Dependency declarations MUST live under dependencies/; YAML/Jinja patterns MUST live under yaml/.
For framework and make test-lint usage see lint.md.