orca/config
Jinjing 5887b36eff
fix(updater): recover Linux .deb/.rpm installs that fail escalation (#12183)
* fix(updater): recover Linux .deb/.rpm installs that fail escalation

A `.deb` install fails with `No authentication agent found` when the session
has no polkit agent. Orca reported "Quit and reopen Orca, then try again" —
wrong advice — and its only action was Retry Download, discarding a verified
160 MB package that was still in the updater cache.

Keep the one-click install path, but make a failed root-package install
recoverable without downloading again:

- Retain the downloaded package and its expected SHA-512 from the
  `update-downloaded` event, mirroring electron-updater's cache-name rule.
- Capture the child stderr that BaseUpdater logs but drops from the `error`
  event, redact it (ANSI, control bytes, `<home>`, `<package>`, `<user>`,
  1 KiB cap), and classify the failure. Classification reads the original
  text — redaction can rewrite a matched phrase.
- Send a structured `linux-package-install` recovery status and render a
  dedicated card: Copy Install Command / Try Automatic Install Again /
  Show Package.
- Revalidate on every action: cache containment, lstat, streamed SHA-512,
  timingSafeEqual. Concurrent requests coalesce into one hash pass.
- Build the command from fixed tokens plus one POSIX-single-quoted absolute
  path, resolving sudo and the package manager only from /usr/bin, /bin,
  /usr/sbin, /sbin. Orca never runs it.
- Disable `autoInstallOnAppQuit` for .deb/.rpm so an ordinary quit cannot
  trigger the same failing escalation after the UI is gone.

Extracts the error-card presentation into UpdateErrorCardContent so
UpdateCard does not absorb another stateful surface.

Lifecycle breadcrumbs carry package type, reason, exit code and version —
never a path, command, username or raw child output.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Improve Linux package install recovery diagnostics

- Distinguish invalid-package-path errors from missing package manager
- Expand ANSI escape sequence stripping to handle OSC hyperlinks and DCS
- Prevent generic error logs from overwriting specific diagnostic verdicts
- Add error handling for shell.openUrl in update UI
- Fix test isolation with proper afterEach hooks

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 20:46:49 -07:00
..
docker/headless-pairing Fix headless Linux serve pairing readiness (#9785) 2026-07-21 18:23:20 -07:00
nsis fix(windows): separate updater from orchestration migration (#11405) 2026-07-29 15:23:06 -07:00
oxlint-plugins perf(lint): consolidate code-quality gates into Oxlint (#11117) 2026-07-28 00:21:13 -07:00
patches fix(terminal): reconcile cross-platform IME composition lifecycle (#11293) 2026-07-29 16:12:20 -07:00
relay-assets fix(ssh): patch node-pty helper in Windows relay (#9638) 2026-07-20 19:09:18 -07:00
scripts fix(updater): recover Linux .deb/.rpm installs that fail escalation (#12183) 2026-08-02 20:46:49 -07:00
dev-app-update.yml
electron-builder.config.cjs feat(updater): add an adhoc release channel for branch builds (#12051) 2026-08-02 01:46:51 -07:00
electron-vite-target.config.ts ci: parallelize PR checks and accelerate Vite builds (#10989) 2026-07-27 13:32:29 -07:00
i18n-translation-source.md docs(i18n): adopt gettext PO as the canonical translation source (#11478) 2026-07-31 11:46:25 -07:00
i18next.config.ts chore: declutter top-level repo layout (#11890) 2026-08-01 00:25:35 -07:00
knip.json chore(dead-code): drop ~2k lines of unreachable exports and orphan modules (#12077) 2026-08-02 00:33:57 -07:00
localization-audit.md docs(i18n): adopt gettext PO as the canonical translation source (#11478) 2026-07-31 11:46:25 -07:00
localization-coverage-allowlist.json fix(ci): mirror missing lint steps in PR workflow (#10601) (#10623) 2026-07-27 16:26:43 -07:00
max-lines-baseline.txt chore(mobile): import the shared marine-creature corpus instead of mirroring it (#12090) 2026-08-02 01:44:03 -07:00
oxlint-code-quality-native-plugins.json perf(lint): consolidate code-quality gates into Oxlint (#11117) 2026-07-28 00:21:13 -07:00
oxlint-code-quality-type-aware.json perf(lint): consolidate code-quality gates into Oxlint (#11117) 2026-07-28 00:21:13 -07:00
oxlint-react-doctor.json chore(quality): ratchet Oxlint, React Doctor, and Zustand performance (#11034) 2026-07-27 18:58:36 -07:00
packaged-runtime-node-modules.cjs fix(cli): avoid Windows PATH status timeout (#9483) 2026-07-19 21:59:22 -04:00
reliability-gates.jsonc fix(terminal): bound paired-client renderer work (#12081) 2026-08-02 01:02:26 -07:00
tsconfig.cli.json Fix packaged skills CLI runtime ownership (#11627) 2026-07-30 18:27:16 -07:00
tsconfig.node.json fix(skills): stop calling the updater's own install a modified copy (#11249) 2026-07-28 17:27:26 -07:00
tsconfig.relay.json
tsconfig.tc.cli.json
tsconfig.tc.web.json [P1] fix(checks): stop skipped and manual checks reporting as failures (#11700) 2026-07-31 04:58:15 -07:00
tsconfig.web.json chore: enforce exhaustive switch handling 2026-05-30 13:18:12 -07:00
vitest.config.ts chore: declutter top-level repo layout (#11890) 2026-08-01 00:25:35 -07:00