mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
INFINITO_DOMAIN_RE carried an already escaped regex through the env chain: EnvBuilder.setdefault prefers a value already in the process env, quote_for_dotenv escapes every backslash, and load.sh unescapes it again. One inherited value with a doubled backslash was enough to write "infinito\\\\.test" into .env, the rendered Corefile then matched a literal backslash, and getent hosts test.infinito.test failed with rc 2. The renderer now substitutes DOMAIN_RE = re.escape(INFINITO_DOMAIN) at render time, so no backslash travels through the env or .env at all. The template placeholder is renamed because it is a derived render value, not an env key, and INFINITO_DOMAIN_RE is removed from default.env and the passthrough keys, leaving INFINITO_DOMAIN as the single source. A renderer test renders the real template and requires a single-escaped match with no doubled backslash and no leftover placeholder. Verified live: the Corefile renders ^infinito\.test\.$, test.infinito.test resolves to 172.30.0.10 and test.infinitoXtest does not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>