cmds.secrets.lib.FilesContext: Write the compile output unfiltered #173
Merged
Jan Lindemannmerged 1 commit from jan/fix/20261109-cmds-secrets-lib-filescontext-write-the-compile-output-unfiltered into master2026-11-09 20:13:28 +01:00
AGit
The path filter of the exec context filtered the compile's own file
operations: put() and rename() silently no-op on a filtered path, stat()
raises, and the compile swallows that into a false '<missing>' verdict.
A compile-templates run with a path filter therefore reported '@content'
for every template while installing nothing, and left the empty temp files
behind.
The filter scopes the distro's package selection, not the command's own
output. Write the compiled file and its temp unfiltered: put, stat, the
read of the previous output, rename, and unlink. The reads of the template
and of the attribute files keep the filter.
Add a unit test with a context whose package space holds only the template:
the output must be written and no temp must leak.
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.5.0
Signed-off-by: Jan Lindemann <jan@janware.com>