mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
container.py hardcoded /tmp/infinito-rescue-diagnostics, a second copy of DIR_RESCUE_DIAGNOSTICS from group_vars/all/05_paths.yml. Move the value to a generated env key so the paths SPOT stays single: a new handler seeds INFINITO_RESCUE_LOCAL_DUMPS_DIR from read_group_path(), recurse() forwards it into nested runtimes, and an unset key now prints why the in-play role dumps are missing rather than silently collecting nothing. Registers the handler in ORDERED_HANDLERS - the registry is explicit, not discovered - and moves rescue_diagnostics_dir.py into the new rescue/ package so the two siblings satisfy the prefix-group lint. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
19 lines
659 B
Python
19 lines
659 B
Python
"""INFINITO_RESCUE_DIAGNOSTICS_DIR: rescue snapshot folder, read from the
|
|
group_vars paths SPOT (group_vars/all/05_paths.yml DIR_RESCUE_DIAGNOSTICS)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from utils.paths import read_group_path
|
|
|
|
if TYPE_CHECKING:
|
|
from utils.env.builder import BuildContext, EnvBuilder
|
|
|
|
KEY = "INFINITO_RESCUE_DIAGNOSTICS_DIR"
|
|
COMMENT = "Where rescue: blocks write their failure snapshot; CI uploads it (SPOT: group_vars/all/05_paths.yml DIR_RESCUE_DIAGNOSTICS)."
|
|
|
|
|
|
def apply(eb: EnvBuilder, ctx: BuildContext) -> None:
|
|
eb.setdefault(KEY, read_group_path("DIR_RESCUE_DIAGNOSTICS"), comment=COMMENT)
|