Skip to content

R5: safe key deletion and startup fixes on submitted 2.6.4 source (draft) - #7058

Draft
antuz123 wants to merge 235 commits into
sprintfrom
codex/r5-key-deletion-startup
Draft

antuz123 wants to merge 235 commits into
sprintfrom
codex/r5-key-deletion-startup

Conversation

@antuz123

@antuz123 antuz123 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

R4 evidence reconciliation, 22 October: 1d8a86a7462d935cbd0e28b857934b5718c152fc is the submitted source baseline for iOS620/Android627. Public release remains held under the current instruction; the latest posted console receipt is 21 October, and a fresh authenticated store readback is unavailable here. The owner-reported installed iPhone2.6.4 is retained in #7066; it does not by itself establish global store state or R4 closure. Existing R5 implementation, branches, checks and deferred cases continue unchanged.

R5 makes unused-key deletion discoverable while preserving wallet-reference protection, and removes confirmed startup/retry failures. This draft reconciles with the submitted R4 / 2.6.4 source. Source ancestry is complete; fresh store state and owner R4 closure remain separate.

Scope and released baseline

  • Branch: codex/r5-key-deletion-startup; head: 77b72da29ac5f2cdf3f51c9a0e9f3fd1c2af7238.
  • Submitted R4 source: 1d8a86a7462d935cbd0e28b857934b5718c152fc, integrated into R5 through a8947c867562b6148f328289069785b18053b944. R4/sprint/other workstream refs are unchanged. No force push or PR merge.
  • Review the R5-only diff. The required PR base remains sprint, whose ordinary diff still includes inherited released history.
  • Original estimate: 13k–18k changed code/test tokens, two substantial features. Current rough changed-characters/4 estimate: 18.1k, at the upper edge; scope held here. Deletion risk remains high; startup/authentication risk medium.
  • Receive QR/R7, broad shared components and terminology/R8, app-wide scaling and Ask reply delivery/Soon, owner-parked Later: investigate second Android backup POST after a lost reply #7056/Later: iOS wallet navigation in the restored-account fixture #7057, and separate native/release infrastructure are excluded.

Changes

  • Deleting keys is unintuitive and requires hiding keys first #7006: Keys → Manage Keys is discoverable; eligible visible keys offer Delete without Hide. Full live Vault references are checked again after passcode verification. Active references block deletion; archived references retain the key. Confirmation is one-use, closes on cancellation/blur/unmount, and preserves concealed/canary privacy. Released R4 transaction guards remain unchanged.
  • Reconciliation confirmed 11 stale-origin cases. Selection and confirmation now retain their original app/session, verify current Redux/Realm ownership, and carry explicit original authority into the unchanged R4 delete/archive workers, including A → B → A switches.
  • R05: Android startup and first-use UX quality — remove fixed wait and duplicate setup error #7046: credential reads no longer wait for the decorative splash animation. Startup propagates credential-read errors into a generic Retry instead of treating unreadable storage as a new install. One setup-error dialog, repeatable Retry, duplicate-tap protection, callback/timer cleanup, and account-session guards prevent stale setup, notification and navigation work. Shared PIN code is unchanged; the disposable login flow checks shipped Proceed/inline-error behavior.
  • Emergency reset uses an Emergency-specific helper; Inheritance keeps its own text. R5 follow-up: Android More → Wallets exits to launcher after backup deletion #7055 navigation and Transaction times not displayed in local time on Android app #6991 timezone investigation found no confirmed narrow production fix. Real transaction-row tests cover local-time/DST vectors; native reproduction remains open.
  • Released package/lock/Pod/native/version/backend/store inputs remain identical. CI retains frozen installation and explicit patches, installs the Realm N-API prerequisite, and sets up existing Ruby before Ruby-dependent guards. No dependency/protocol change or gate waiver.

Executed Cloud validation

Node 22.23.3 / Yarn 1.22.22, reconciled source:

Check Actual result
Frozen install; six dependency patches; released input immutability PASS
Full Jest: jest --runInBand --coverage=false 47 suites / 538 PASS, zero skips/failures
Five R5-focused Jest suites 106 PASS, including 53 deletion and 20 first-use cases
Reconciled transaction-row timezone reruns 72 PASS: 18 each in UTC, Asia/Kolkata, America/New_York and Europe/London; native timezone behavior NOT RUN
New regression controls before fixes Deletion: 11 assertion failures (42 deliberately deselected); startup: 6 failures / 14 passes
npm run test:recovery 480 PASS, zero skips, including 10 real Linux encrypted-Realm cases after installing its missing N-API prerequisite
Local-validation gate contracts; Android static/reproducibility tools 11 / 31 PASS
Release-tool Node / Python tests 28 / 7 PASS
Ruby-dependent local checks NOT RUN / prerequisite unavailable; combined release command stops at Ruby; related guard run: 30 passes / 11 missing-Ruby failures
Focused six-module ESLint FAIL: 82 errors / 25 warnings, released baseline 85/25; normalized zero added, three removed
Whole TypeScript FAIL: 943 diagnostics, released baseline 944 with same dependencies; normalized zero added, one removed
Version consistency, JSON/YAML/order, OpenSpec strict, test formatting, diff PASS
iOS/Android app build/UI, Maestro, native performance and physical devices NOT RUN

Hosted exact-head results (still updating):

  • CodeQL analysis execution completed successfully, but its separate security result FAILS with one high-severity Incomplete multi-character sanitization alert at src/services/wallets/operations/index.ts:110–111. This entire module is byte-identical to released R4; the reported expression counts Miniscript witness elements for fee estimation. No dismissal, waiver, exploitability conclusion or unrelated fix is made here; security review remains required. Detailed alert API access returned HTTP403; the check annotation was readable.
  • Public-backend checks PASS on this head (both jobs). In CI, Tests PASS, including all recovery and Ruby-dependent release/guard steps. The separate genuine Relay job FAILS at Run genuine automatic backup source matrix; no pass is claimed or fixture/protocol workaround introduced. The Lint job completed successfully under its inherited continue-on-error policy, which does not make the documented lint failures clean. Prior-head results are not transferred. The inherited genuine lane uses the released public-v2 fixture against newer protocol code; any failure remains visible without a fixture/protocol workaround in R5.
  • keeper/local-validation remains FAIL / NEEDS_LOCAL, as expected without exact-head native evidence.
  • Automatic Android diagnostic run CANCELLED on this exact R5 head. Its APK/AAB build/sign step was skipped and artifact count is zero. This production-format diagnostic lane is not development-app acceptance or release authority; other workstream runs were untouched.

Evidence and limits: reconciliation, startup/investigations, workstream, OpenSpec tasks. JavaScript and Linux Realm results do not establish native authentication, persistent first-wallet idempotency or measured startup performance.

Cloud execution route — owner clarification

The owner explicitly requests no dependency on the personal Mac. Continue R5 in the Bitcoin Keeper Cloud environment, with Android development builds/emulator acceptance on a capable Linux cloud runner and iOS simulator acceptance on hosted macOS/Xcode. This is not a request for owner-Mac execution or a waiver of native/physical tests.

The existing Codex local handoff, NEEDS_LOCAL and Required local checks fields below are the current AGENTS.md/gate protocol. Their legacy names record missing platform evidence; they do not determine where tests must execute. Do not invent a local pass for a hosted run or change the gate to hide missing evidence.

Current worker preflight: Linux x86_64, 24 GiB available disk, Java available; Android SDK/adb/emulator/Maestro and /dev/kvm unavailable; no Xcode runtime. Its managed network is connected/enforced with no configured additional capabilities or credential bindings. Selecting a named environment alone is not proof that these toolchains/devices are present; verify their readiness there.

Existing cloud-native candidates #7060/#7063 (bootstrap) and #7062 (reusable acceptance) remain separate and unmerged. Historical iOS/Android smoke evidence belongs to their tested source, not this R5 head. Their reviewed adoption/execution must preserve privacy, exact-source evidence, unchanged R4/other workstreams, and the no release-signing/distribution boundary. Do not import that infrastructure into R5 as a third feature or merge it as part of this clarification.

Next Cloud action: attach/use the Bitcoin Keeper environment with Android SDK/JDK, disposable emulator access with KVM or an available remote device, and a hosted macOS/Xcode route; then run the exact-head R5 feature matrix below. Physical biometrics/NFC/USB/signers still require real-device access (potentially remote); emulator success does not supply physical credit. No personal-Mac task is requested.

Codex local handoff

State: NEEDS_LOCAL
PR: #7058
Base: sprint
Head branch: codex/r5-key-deletion-startup
Head commit: 77b72da
Goal and acceptance criteria: discoverable safe deletion; reliable startup/retry/authentication; measured first-wallet performance; bounded Android navigation/timezone reproduction; correct Emergency/Assisted Backup copy.
Changes made: released-R4 reconciliation, original-session deletion authority, startup credential/error/token/timer guards, login flow and narrow helper copy as described above.
Cloud checks: PASS 538 Jest, 106 focused, 480 recovery, 11 gate, 31 static, 28 Node/7 Python release tests; frozen/patch/input/OpenSpec/version/diff PASS. Lint FAIL82/25 and TypeScript FAIL943, zero added normalized baseline findings. Ruby unavailable locally; hosted Tests (including Ruby) and public-backend jobs PASS; the separate legacy genuine matrix FAILS; Lint job completed with inherited continue-on-error. CodeQL analysis completed, but its security-result check FAILS on one high-severity alert in unchanged released wallet code; review required. Native NOT RUN.
Required local checks: IOS, ANDROID, HARDWARE
Local checks requested: Execute native checks on Cloud: Android development/emulator on a capable Linux runner and iOS on hosted macOS/Xcode. No owner-Mac work requested. From this exact head, run cold/warm/resume with theme/network/Tor/deep links and credential failure/Retry; disposable unused/hidden deletion, cancellation, active/hidden/canary/multi-wallet blocks, archived retention, references added during confirmation, account/session switches including A → B → A; offline/repeated setup Retry/Next, success/relaunch and persistent wallet counts; at least five raw first-wallet/startup samples with exact build/device/OS/network; #7055 More→Wallets and #6991 timezone/DST/history/details; PIN/biometrics and Emergency/Inheritance/Assisted Server Backup copy. Preserve raw evidence and distinguish each unrun physical scenario.
Risks / known gaps: Native acceptance, performance and scoped Android reproduction remain unrun. Existing genuine fixture mismatch, lint/TypeScript debt, the inherited high-severity CodeQL alert and unavailable local Ruby are explicit. R4 native passes or physical deferrals do not transfer to R5. No new R5 app version assigned. For Cloud native work, verify available disk against the actual build requirement, run one platform build at a time and reuse safe compatible caches/artifacts. The owner requests no personal-Mac dependency; retain its earlier safeguards only as protection if a later explicit fallback is authorized. Never delete other worktrees, simulators, AVD users, wallet data, caches or evidence without approval. Optional Linux setup is not a prerequisite. No merge, signing, publication, deployment or release approval.

antuz123 and others added 30 commits September 25, 2026 21:28
Enable the release branch test trigger and repair the inert recovery provenance fixture exposed by that run. No production app code changes.
@antuz123 antuz123 changed the title R5: guarded key deletion and Android first-use reliability (initial draft) R5: guarded key deletion and setup retry safety (draft) Oct 18, 2026
@antuz123 antuz123 changed the title R5: guarded key deletion and setup retry safety (draft) R5: guarded key deletion and startup readiness (draft) Oct 21, 2026

This branch has not been deployed

No deployments
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