install.sh: darwin codesign rescue + failure classification so a broken binary can't strand a user #24
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Companion to the darwin page-0 signature pipeline ticket (filed the same day, deepnet/dit-client). The pipeline fix repairs FUTURE releases; this ticket repairs the install experience for releases that already shipped (v3.5.0 today) so the next macOS user is not stranded while the pipeline fix lands.
Motivating incident: ditc v3.5.0 on macOS 26 (Apple Silicon) — install completed,
ditc --versionkilled by the kernel (invalid embedded signature, page-0 hash mismatch). The installer printedWARNING: installed binary failed --version check, exited 3, and left the dead binary at~/.local/bin/ditcfor the next shell to find.Scope
--versioncheck, runcodesign --force -s - "$install_path"on macOS. Idempotent, unconditional, cheap. It re-signs a binary whose release authenticity was already proven (minisign/SSHSIG verification happened before install); it asserts nothing new about trust — it only restores exec-ability for the invalidated-embedded-signature class.--versioncheck fails, classify the failure (SIGKILL on darwin = signature class), print the class + exact remediation + a copy-ready diagnostics block, rename the binary toditc.broken(so no shell silently finds it), and suppress the PATH/"Next steps" success messaging. Never leave a dead binary silently in place.Acceptance criteria
codesignand a kill-simulating stub binary prove both branches: rescue applied before--version, and the failure branch renames + reports.Critic review amendments (2026-10-06):
Implemented on branch
arc/23-24-installer-rescue(unpushed):34c982acodesign rescue + classified marker (<config_dir>/install-failure.json, machine_hint, fingerprint) +<tool>.brokenrename + best-effort POST,74ce636endpoint alignment (/v1/report). Class vocabulary landed exactly as pinned. Pending: real-darwin confirmation (Operator), push/PR.