Skip to content

R4: Harden live Desktop pairing and packet validation - #100

Open
antuz123 wants to merge 6 commits into
mainfrom
codex/r3-desktop-pairing
Open

antuz123 wants to merge 6 commits into
mainfrom
codex/r3-desktop-pairing

Conversation

@antuz123

@antuz123 antuz123 commented Oct 6, 2026 •

Copy link
Copy Markdown

R4 / 2.6.4 scope

All unfinished R3 pairing work is carried into R4. This PR remains the Desktop source candidate; normal independent review, signing, notarization, and owner phone/Desktop/hardware acceptance gates still apply. No production release is created by this PR.

Changes

  • Use the live Keeper channel in development and release builds.
  • Validate AES-256-GCM keys, IVs, tags, and ciphertext before dispatching a channel request.
  • Require an incoming request to name the current QR room and to decrypt successfully. A refreshed QR therefore prevents old-room or plaintext requests from reaching Desktop actions, even though the relay may still deliver traffic to an earlier room.
  • Validate the decrypted action, signer, network, and required action fields before opening a device modal. Malformed authenticated requests now show an error instead of being overwritten by a Connect Device modal.
  • Add Rust protocol tests for mobile vectors, malformed crypto, current-room matching, plaintext rejection, and QR rotation; add seven frontend request-validation tests to CI.
  • Keep an explicit QA-only macOS build path with a separate app identity, ad hoc signing, and internal artifact upload. The production publishing job remains disabled for QA builds.

Verification

Current head ef050663d33be51f25fb10310d5a0549b111e273: local frontend request tests 7/7, ESLint, Prettier check, TypeScript/Vite build, and diff check passed. The build retains an existing CSS comment warning. Hosted CI run 37928029388 passed ESLint, Prettier, frontend request tests, Rustfmt, Clippy, and 9/9 Rust channel protocol tests. QA-only run 37928395053 built and uploaded artifact 11615331902 on this exact head; the production publish job was skipped. The artifact outer ZIP SHA-256 is 2a3ca33dd9a539323f41639d98fb36ab8d2cdc670f1b17b20f861b3528eaeea5, enclosed QA ZIP SHA-256 9ae0c39eefafd85a9234bf7a599f75e3b13a481ab0ad7f9418eee66990c34a69, executable SHA-256 13e252b7a7f339d24e327d8d14d7956946f21b929c037970edffa9e6e90fcb70. The evidence file names this source SHA, version 0.2.6-qa.1, separate identity com.keeper.desktop.r3qa, and live endpoint; local strict deep code-signature verification passed. A current-head UI/channel smoke is pending.

Previous head f8bb96a6143a2738a7653a964dd9e2491e9966f5 passed CI run 37627726045, including six Rust protocol tests. Its QA build 37627717543 produced artifact 11484613811: macOS arm64 version 0.2.6-qa.1, identity com.keeper.desktop.r3qa, QA zip SHA-256 1240f8d3132398b470d3a1870b4618c571f9d110110dc29530f4593ed0ba5c6b, executable SHA-256 56dc6a5aaad076eb4e771a060ac54e8800615584632fb1efe36ecbbea4d7ce2a. That artifact predates the current packet-validation changes.

On the previous QA app, a disposable live-channel smoke used the exact mobile #7024 AES-GCM module: an altered-tag TESTNET request left the QR screen unchanged, then a valid encrypted ADD_DEVICE/LEDGER request opened Connect Ledger. The session ended before Continue or any hardware action. This checks packaged Desktop receipt and decryption; it does not exercise Android scanning, request retries, or physical devices.

Open gates

Utkarsh approved exact head ef050663d33be51f25fb10310d5a0549b111e273 on 9 October 2026; Ben's request remains open. That satisfies the documented one-independent-developer source approval, but does not establish native or hardware acceptance. The earlier Copilot review covered f8bb96a, not this head. Current-head CI and QA source/artifact checks are complete; a current-head UI/channel smoke remains open. The diagnostic Android build in draft #7045 uses a placeholder Relay and cannot reach the native scanner through fresh onboarding. Owner phone, Desktop, and hardware acceptance remains retrospective. No transaction was signed or broadcast, and no production deployment was performed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

These narrow changes introduce no identified blocking issues, though mobile end-to-end verification remains pending.

Review effort: Balanced
Findings: None

What changed in this PR

Aligns Desktop development builds with the active Keeper channel already used by release builds.

Changes:

  • Uses the active channel endpoint for all builds.
  • Explicitly installs Rust formatting and linting components in CI.
File Description
src-tauri/​src/​channel.rs Removes the development-only endpoint; release behavior stays unchanged.
.github/​workflows/​ci.yml Adds rustfmt and clippy to toolchain installation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@antuz123 antuz123 changed the title Use active channel in Desktop development builds R3: Use live pairing channel and reject malformed crypto packets Oct 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Native Rust compilation, regression tests, and the new macOS QA workflow still need successful current-head CI verification.

Review effort: Balanced
Findings: None

@antuz123
antuz123 marked this pull request as ready for review October 7, 2026 13:32
@antuz123 antuz123 changed the title R3: Use live pairing channel and reject malformed crypto packets R4: Use live pairing channel and reject malformed crypto packets Oct 8, 2026
@antuz123 antuz123 changed the title R4: Use live pairing channel and reject malformed crypto packets R4: Harden live Desktop pairing and packet validation Oct 9, 2026

Copy link
Copy Markdown
Author

Codex local handoff

State: NEEDS_LOCAL
PR: #100
Base: main
Head branch: codex/r3-desktop-pairing
Head commit: ef05066
Goal and acceptance criteria: Validate this exact Desktop source and its compatible R4 mobile source using disposable/testnet identities; readiness, retry, duplicate/malformed packet handling and signer/address/PSBT round trips must have platform-specific outcomes.
Changes made: Current-room AES-GCM validation, plaintext/old-room rejection, action validation, live channel and a separate QA-only macOS build path.
Cloud checks: 12 October isolated source checkout: npm ci --ignore-scripts; frontend request tests 7/7, ESLint, Prettier and TypeScript/Vite build passed on Node 24.19.0; existing CSS comment warning remains. Exact-head hosted CI run 37928029388 passed Rustfmt, Clippy and 9 Rust protocol tests. Rust/native build and UI/hardware checks were not run in this Cloud continuation.
Required local checks: HARDWARE
Local checks requested:

  • Use an isolated worktree and the QA identity com.keeper.desktop.r3qa, never replace an owner's production app. Confirm source SHA, QA artifact evidence, version 0.2.6-qa.1, endpoint, strict deep code signature, and actual launch. Historical artifact 11615331902 is useful only after its source/provenance and hashes are checked; do not infer current expiry/availability.
  • Pair the final #7045 source on iOS and Android. Record mobile SHA, Desktop SHA, OS, build identity and channel configuration. The diagnostic Android APK with placeholder Relay cannot establish onboarding/scanner acceptance.
  • Test disconnected channel and reconnect, QR readiness/rotation, cancelled scan and retry, duplicate scan/request delivery, old-room packets, plaintext, altered tag, malformed authenticated action and incompatible network. Rejections must not open a device modal or overwrite an error; retries must finish without duplicate actions.
  • With an available signer and disposable testnet vault, add the device, register the vault if supported, verify receive/change addresses on the physical device and mobile/Desktop, and complete a PSBT signing round trip. Compare network, vault policy, input/output/fee intent and returned signatures; do not broadcast or use real wallet data. Record unavailable signer models as NOT_RUN.
  • Recheck browser subscription routing separately if exercised; a valid purchase request must not require device fields. Record exactly which iOS/Android/native/hardware scenarios ran.
    Risks / known gaps: Utkarsh's approval applies to this SHA. Current-head Mac UI/channel and physical hardware acceptance remain open, as do separately authorized production signing/notarization/publication. No release is authorized by LOCAL_PASSED.

antuz123 commented Oct 13, 2026 •

Copy link
Copy Markdown
Author

R4 paired-mobile continuation — 13 October 2026

Desktop source is unchanged at ef050663d33be51f25fb10310d5a0549b111e273, branch codex/r3-desktop-pairing, base main. Current lint-and-format is green. The existing exact-source frontend 7/7, hosted Rust 9/9, approval and QA-artifact evidence remain source-scoped history; this continuation supplies no new Mac UI or device result.

Pair native acceptance with Keeper #7045 exact head d25d5660ac72443952ae1f7899cf456b5991c805 and its new Local handoff. Follow its isolated loopback-service setup rather than expecting the placeholder-Relay diagnostic APK to complete onboarding/scanning. The mobile genuine Realm/Relay matrix passes 260/260, but it does not attest Desktop pairing or native launch.

State: NEEDS_LOCAL. Follow this Desktop exact-head handoff, retain the separate QA identity and preserve existing apps/wallets. Record actual Desktop launch and paired iOS/Android QR readiness, reconnect/cancel/retry/duplicate handling, authenticated malformed/old-room rejection and available signer/address/policy/PSBT round trips. Report unrun physical scenarios explicitly with owner follow-up; do not infer device acceptance from Cloud or an owner deferral. Production signing, notarization, artifact identity and publication remain separately gated. No merge, deployment, release signing, upload, publication or broadcast is authorized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants