arc: install rescue — SSHSIG-prefer verification + darwin codesign rescue + POST wiring (#23 #24) #25

Merged
jsutter merged 3 commits from arc/23-24-installer-rescue into main 2026-10-06 22:28:02 +00:00
Owner

Closes deepnet/dit-releases#23, closes deepnet/dit-releases#24.

  • #23: SSHSIG-prefer release verification (namespace dit-releases), minisign as fallback; installer verification rework.
  • #24: darwin codesign rescue path, classified install-failure marker, and failure POST wiring to feedbackd's /v1/report (feedbackd#13 endpoint-layer scope).

Authorization note: the Operator explicitly authorized push → PR → merge → release for this install-arc batch (substantial tier). This is the worker's own tested work; merged under that standing authorization. The .sshsig publishing step (#23 scope item 1) is completed in a follow-up commit on dit-client main before the release cut.

Closes deepnet/dit-releases#23, closes deepnet/dit-releases#24. - #23: SSHSIG-prefer release verification (namespace `dit-releases`), minisign as fallback; installer verification rework. - #24: darwin codesign rescue path, classified install-failure marker, and failure POST wiring to feedbackd's `/v1/report` (feedbackd#13 endpoint-layer scope). **Authorization note:** the Operator explicitly authorized push → PR → merge → release for this install-arc batch (substantial tier). This is the worker's own tested work; merged under that standing authorization. The `.sshsig` publishing step (#23 scope item 1) is completed in a follow-up commit on dit-client main before the release cut.
Replace the up-front minisign hard gate with a pre-network ssh-keygen
gate (dit-releases#23): SSHSIG via 'ssh-keygen -Y verify' against an
embedded allowed-signers block carrying BOTH tool identities
(ditc-release@deepnet, dito-release@deepnet) is the primary verifier;
a release with no .sshsig asset (pre-transition) falls back to minisign
verification when minisign is installed, and a minisig-only release on a
machine without minisign refuses — the dit-client#216 fail-closed
property holds for every release shape.

- A present-but-failing signature is a tamper signal: the retry loop
  re-attempts the SAME verifier, then fails closed; it never falls
  through to the other verifier (#543 retry semantics unchanged).
- ssh-keygen -Y verify reads the message on stdin (-r is a revocation
  list, not the data file) — the exact SHA256SUMS bytes are redirected;
  install.ps1 feeds them through a raw ProcessStartInfo stdin pipe
  because PowerShell object piping appends a trailing newline.
- SSHSIG allowed-signers keys are not minted yet: clearly-marked
  PLACEHOLDER tokens ship with a TODO naming the minting step and the
  namespace release CI must sign with; one-line-per-identity swap when
  real keys land. The minisign fallback keeps today's REAL keys, so the
  installer stays fully functional until dual-signing begins.
- Attribution corrected: the mandatory-verification gate and the shared
  key retirement are dit-client#216, not dit-releases#216 (which does
  not exist).
- Removed the piped-invocation usage lines from both installers — a
  piped run bypasses the hash pin that anchors the installer itself.

Tests: tests/install-signing.sh covers the new gate structurally and
behaviorally (absent ssh-keygen refuses pre-network; a present minisign
does not substitute); tests/install-e2e.sh is a new container suite
proving the sshsig path, the minisign fallback, tamper fail-closed with
no fallthrough, and both refusals against a local fixture release.

Assisted-by: worker:synthetic/hf:zai-org/GLM-5.3-Flash
Repair the install experience for releases that already shipped so a
broken binary cannot strand the user (dit-releases#24):

- Darwin rescue: after install and before the --version check, run
  'codesign --force -s -' on macOS — idempotent, unconditional; the
  release bytes were already proven authentic, so the ad-hoc re-sign
  asserts no new trust, it only restores exec-ability for the
  invalidated-embedded-signature class (the v3.5.0 page-0 SIGKILL). A
  failing rescue is non-fatal: warn, continue, let --version classify.
- Failure classification with the fleet wire vocabulary (produced here,
  pinned by feedbackd#13): download-failed, verify-failed,
  exec-failed-signature (darwin SIGKILL/137), exec-failed-other,
  swap-failed. On --version failure the class + remediation + a
  copy-ready diagnostics block print, PATH/Next-steps success messaging
  is suppressed, and the exit stays non-zero (3).
- Failure marker: <config dir>/install-failure.json (platform split via
  the same helper the config.toml write now uses) with exactly tool,
  version, class, os, arch, binary_sha256, machine_hint {hostname,
  username}, correlation — written BEFORE the <tool>.broken rename.
  download-failed (nothing downloaded) writes no marker.
- Best-effort direct submission (dit-client#298): POST the classified
  payload wrapped in the feedbackd FeedbackReport envelope to
  /v1/feedback with the report-only bearer key (REPORT_KEY placeholder
  SET-AT-RELEASE + TODO — the swap activates the POST; skipped on
  DITC_FEEDBACK=off). Bounded ~5s, silent failure; the marker always
  lands so a later successful ditc run files it (FR-9/FR-10).
- Correlation fingerprint, identical fleet-wide: first 16 hex of
  sha256('<tool>|install|<class>').
- install.ps1 parity: same classification + marker (%APPDATA% split) +
  report POST + fingerprint; every --version failure classifies
  exec-failed-other (Windows has no SIGKILL/137 semantics) and now also
  checks the native exit code, which the old try/catch missed;
  codesign rescue is N/A on Windows. The vendored-minisign and .minisig
  fetches classify verify-failed.
- INSTALL.md: prerequisites/verification story for the sshsig-prefer
  installer, download-then-run quick install (no piped invocation),
  failure-class table + marker lifecycle in Troubleshooting.

Tests: install-signing.sh pins all five class strings in both
installers and the sh marker/report constants; install-ps1-signing.ps1
pins the ps1 classification surface + the fingerprint algorithm;
tests/install-e2e.sh gains the darwin-shim rescue/classification/rename
proof, exec-failed-other, swap-failed, the POST contract (bearer key,
endpoint, valid FeedbackReport envelope, exit-code invariance) and the
DITC_FEEDBACK=off zero-network proof.

Assisted-by: worker:synthetic/hf:zai-org/GLM-5.3-Flash
Assisted-by: deepnet:synthetic/hf:zai-org/GLM-5.3-Flash
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
deepnet/dit-releases!25
No description provided.