cmds.secrets.lib.FilesContext: Write the compile output unfiltered #173

Merged
Jan Lindemann merged 1 commit from jan/fix/20261109-cmds-secrets-lib-filescontext-write-the-compile-output-unfiltered into master 2026-11-09 20:13:28 +01:00 AGit
Owner

cmds.secrets.lib.FilesContext: Write the compile output unfiltered

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.

#### cmds.secrets.lib.FilesContext: Write the compile output unfiltered 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.
cmds.secrets.lib.FilesContext: Write the compile output unfiltered
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m21s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m10s
CI / Packaging test (pull_request) Successful in 0s
508bbd613d
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>
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-11-09 20:02:54 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
janware/jw-pkg!173
No description provided.