Repository navigation
Description
Installing a drive app while its node is disconnected can leave an app that never recovers after reconnecting. App resources sync, but the generated signing key is discarded after the one-shot POST /app-agent fails. Google Keep View exposed this while registering supported row classes: the app's resources exist, but its node holds no signing key.
Reproduction:
- Disconnect the local node through Sync while keeping the browser drive available.
- Install a drive app.
- Reconnect the node and let resource writes finish.
- Open the app: writes fail because the key handover was never retried. A reload does not help.
The tested fix is in PR #2407: Recover interrupted drive app signing-key handovers.
The host retains pending handovers in browser-only IndexedDB, encrypted with an HKDF-derived subkey of the existing per-agent local database key. Authenticated metadata binds each record to its owner, original node endpoint, drive and app. Startup/reconnect retries wait until resource sync drains; success removes the encrypted record and remounts the affected app frame. No identity rotation, new provider delegation, synced secret or secret logging is introduced.
The server advertises an initialization-only handshake. Repeating the same identity is idempotent and durably acknowledged. Initialization, replacement and revocation serialize on the same per-app lock; a pending retry cannot replace another active key or revive a tombstone. Existing online installs still work against older nodes, while automatic replay requires advertised support for the safe protocol. Requests reject redirects and have bounded timeouts.
Validation:
- Original browser-side regression failed with an empty queue after a failed handover; it passes with the fix.
- 94 focused AppPage/local-key tests passed on the updated branch, including 17 handover cases covering reload, resource sync, account/node/lock isolation, device-only hosts, authenticated metadata, old nodes, failure/retry and revocation/replacement.
- All 11 app endpoint handler tests passed again against real stores after merging develop and preserving the device-host path.
- Two real Chromium journeys passed against the freshly built server: normal install/render/write, and a blocked handover POST followed by page reload, restored connectivity, automatic frame remount, successful app write and another reload preserving that write.
- Frontend and native builds, data-browser/e2e TypeScript checks, full browser lint, React compiler checks and the required staged-snapshot Rust Clippy check passed. No hooks bypassed; the commit hook used the repo-declared pnpm 11.10.0.
- WASM was built with
--no-optbecause the optional optimizer download was unavailable. The unrelated server-executed plugin runtime was skipped; these checks exercise iframe apps and their native write endpoints.
Already-discarded keys cannot be reconstructed: those existing installations still need reinstalling once while connected. This patch prevents future interrupted installations from losing the key.
Michiel lifted the freeze on new atomic-server PRs on 2026-10-30; the shared policy update is merged in atomic-plugins#718. PR #2407 is updated against develop, conflict-free and open for normal host review and CI. Device-only hosts retain their native key storage, and queued server handovers remain dormant without a server. Joep's merge responsibility remains unchanged; no merge into develop, pin bump or deployment performed. The user's localhost does not yet contain this host update.
Activity