fix(native): keep signature failure evidence instead of collapsing it (#1084)

A regular CodeResources file replaced by a directory or FIFO before open
was reported absent. That hid the replacement; it is now unreadable with
reason changed.

A failed anchor apple probe kept only an exit code. The caller-visible
limitation now includes the probe's diagnostic.

Definitive codesign rejections are a phrase list, including unrecognized
bundle format, instead of one growing regular expression. Unlisted
nonzero diagnostics stay unknown.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
morluto
2026-10-08 22:41:28 +08:00
committed by GitHub
co-authored by Cursor Agent
parent 1325bf936f
commit d46449e54b
5 changed files with 97 additions and 12 deletions
+10 -1
View File
@@ -89,7 +89,16 @@ export const stapledTicket = async (
);
try {
const opened = await handle.stat();
if (!opened.isFile()) return absent;
// The path was a regular file at lstat. A directory or FIFO now means
// the ticket was replaced; absence would hide that change.
if (!opened.isFile())
return {
status: "unreadable",
path: relative,
sha256: null,
size: null,
reason: "changed",
};
// If the path was replaced between lstat and open, or mutated while
// hashing, the digest would describe the wrong bytes: dev and ino catch
// replacement, while size and mtime catch same-inode writes. Report any