fix(hopper): recover provenance-verified Spotlight exits

Verify the native helper's sealed identifier and pinned Apple signing team in BridgeLauncher, then carry that provenance to HopperClient. Only a verified native helper's complete not-found exit confirms no document handoff, allowing runtime and target-lease cleanup and retry; wrappers retain unknown document state.

Share publisher identity with setup through the domain contract. Correct fixture teardown ordering and parameterized MCP coverage. Validation: 54 focused tests passed across boundary, CLI, MCP acceptance, diagnostics and installer coverage (one Linux-only case skipped); check:fast passed. Real codesign verification accepted the installed official Hopper helper; Spotlight failures and bridge recovery used process fixtures.
This commit is contained in:
morluto
2026-10-14 06:19:47 +08:00
parent 4d98123279
commit 4acda94b76
13 changed files with 286 additions and 112 deletions
+2 -1
View File
@@ -20,7 +20,8 @@ if (mode === "denied" || mode === "denied-after-handoff") {
},
);
} else if (mode === "not-found") {
// The native helper's Spotlight lookup fails before any Apple event.
// A custom wrapper can forward the native diagnostic after a handoff.
await writeFile(`${receiptPath}.document-created`, "unconfirmed");
process.stderr.write(
"Hopper has not been found.\nPlease make sure that Spotlight is active in order for this tool to find Hopper's executable.\n",
() => process.exit(3),