Apply published_mode(asm/spv) to temporary files before atomic replacement,
and restore write permission (0o600) before directory cleanup in exception block
when replace fails, preventing Windows PermissionError [WinError 5] and
stranded temporary files.
agent: yes
AI-assisted: yes
A non-object VS or PS entry crashed --pair with AttributeError; it now
exits 1 with a one-line error naming the entry and the index path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eleven tools treated a nonexistent input folder as a failed run (1). They now print one ERROR line and return 2, while real read failures keep exit 1. image_query_probe imports the hardware oracle only for a GPU run, so --help stays prompt. A table-driven subprocess test covers all eleven; existing expectations are updated.
A failed rebuild could overwrite the validated helper with a binary that rendering could no longer load. Keep the previous helper available until validation of its replacement succeeds.