Skip to content

R4: harden wallet sync, Testnet faucet, links, and Ask Keeper - #7042

Draft
antuz123 wants to merge 23 commits into
codex/r3-release-baseline-to-sprintfrom
codex/r4-sync-ask-keeper
Draft

antuz123 wants to merge 23 commits into
codex/r3-release-baseline-to-sprintfrom
codex/r4-sync-ask-keeper

Conversation

@antuz123

@antuz123 antuz123 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

Implements the coordinated mobile R4 slice for Backlog rows 193, 240, 232, and 241, stacked on #7031.

  • Keeps Home, Vault, wallet detail, and history refresh feedback active through the actual sync lifecycle. Coalesces duplicate wallet/network refreshes, serializes overlapping batches, and rejects stale profile, network, Realm, or Electrum work before persisting.
  • Includes retained Archived Vaults, including zero-balance Vaults, in login, pull, and foreground monitoring. Refresh remains scoped to the selected account and network; it does not add archived notifications or unarchive flows.
  • Makes public Testnet node reconnect/failover and manual node selection recover cleanly. A selected private node remains private. Applies a real HTTP timeout and closes Node Settings loading state on failure.
  • Shows separate faucet request, quota, broadcast, propagation, and sync outcomes. A submitted txid is polled until the receiving wallet balance is visible; stale wallet/profile requests cannot update a later session.
  • Adds strict native link parsing, the www.bitcoinkeeper.app host association, Android development association support, and listener cleanup. The association files and public preview route are in the companion website draft PR: Publish production-safe native link associations and fallbacks bitcoin-keeper-website#19.
  • Preserves Ask Keeper reading position when older messages are being read. Retry reuses the failed message, and discard clears it and updates the thread preview.
  • Reduces repeated wallet/Vault conversion on unrelated renders while keeping Realm updates reactive and wallet ID lookup stable.

Verification

  • Focused mobile Jest: 10 suites / 30 tests passed (network, faucet, Ask Keeper, and wallet/Vault hooks).
  • Native sync/link tests: 5 passed. Backup freshness and Realm handover harness: 26 passed.
  • Disposable in-memory 1/10/50-wallet conversion fixture recorded before/after timings; this is not a device frame-time measurement.
  • Independent agent code review found and resolved follow-up issues in the Realm handover, failed Ask Keeper message handling, public-node selection, faucet stale state, and wallet ID lookup. Final independent reread reported no remaining actionable finding.
  • git diff --check passes. Full repository typecheck still reports broad existing component/dependency errors; ESLint cannot initialize because the repository's jest/globals environment key is unknown. Neither is claimed as a passing gate.

Review and release gates

Acceptance follow-up at d280c3b7c

  • Fixed a reproduced faucet false success: a persisted matching UTXO with a zero Home-visible balance previously produced receipt=true. The app now waits for a positive persisted displayed balance. Focused Jest: 3/3; production-worker disposable saga harness: 2/2 (one relay request, two polls to visible 1,000 sats; persistent zero balance stays pending through eight polls).
  • Archived Vault and Ask Keeper disposable production-code harness: 5/5. An initially empty hidden Archived Vault retained monitoring through two later deposits, with the other network excluded; Ask kept earlier reading position and retried the same failed bubble. Related backup/refresh harness: 29/29.
  • Reconnect/failover focused Jest: 12/12. Both configured public Testnet peers responded over valid TLS and reported the Testnet4 genesis; this is reachability evidence, not an installed-app flow.
  • Passphrase/decay public test vector: 3/3 Jest. This uses production policy, Vault descriptor, and address derivation, but constructed signer values; it does not prove hardware signing or recovery.
  • Live site checks before deployment: both www association files and a valid dummy remote-link URL returned HTTP 404; apex returned 308. Website PR Add accounts functional #19 has a successful but SSO-protected preview. Direct production 200 and signed installed-app link tests remain gates.
  • No branch-specific native app run: the checkout lacks CocoaPods/configuration/built app, no Android device is attached, and the host had less than 0.5 GiB free. No owner phone, real wallet, credentials, production data, or backend was used.
  • A second agent reviewed the updated faucet and descriptor tests and found no remaining actionable code issue. Human developer approval remains pending; R4: bring the shipped 2.6.3 baseline into sprint #7031's earlier approval is dismissed and a fresh approval is required.

Own-head CI source follow-up — 13 October 2026

Current source head: 163cccb831f824b3daacc05199421683abdaf1ad, retaining the original runtime at d280c3b7ce879503998a9625a18d9be0ccd6d7da. The PR remains draft with the same base codex/r3-release-baseline-to-sprint.

  • Trigger commit 74df55446d8645ebfac05405fce81fa43446acd9 adds this actual stacked base to the existing CI and CodeQL pull-request branch filters: exactly two inserted workflow lines. Workflow jobs, permissions, push filters and existing check behavior are unchanged.

  • Test commit 28c7ab0c6 makes the Electrum client protocol fixture deterministic while retaining actual predefined public-peer identities and real facade failover/reconnect behavior. Wallet/Vault suites use the existing deterministic test-only network fixture; production wallet/key derivation, descriptors, address scanning, transaction parsing, coin selection and signing stay under test. Their existing assertions are retained.

  • Four manual-coin refresh VM cases now load the actual source WALLET_SYNC_SCOPE_CHANGED declaration and bind the missing fixture store and checked connection-generation/network inputs. They require a successful refresh and exactly one sync/persistence, in addition to the existing manual-choice assertions.

  • The full diff from d280 contains only two workflow files and six test files. Git object identities for src, Android/iOS projects, package.json and yarn.lock are unchanged. No runtime, release version, dependencies, UI or cryptography implementation was changed; no test was removed and no skip or failure suppression was introduced.

  • Test commit 163cccb83 corrects the inherited wrong-key AES assertion using the existing ci: cover the 2.6.4 release branch #7039 approach: actual malformed-UTF8 rejection is accepted only for that specific error, while a wrong key recovering the plaintext still fails. Actual production AES encryption/decryption remains unchanged and unmocked.

Historical failures exposed by enabling own-head CI

At 74df55446, CI 38347397038 failed Jest: 34/35 suites passed; 333/340 tests passed, 7 failed in tests/services/client.test.ts with Electrum-client-unavailable / node-not-reachable errors. Recovery, version and release/artifact steps were skipped afterward. The separate CodeQL security check 115132119008 and Analyze workflow succeeded at that previous head; they do not establish checks at a newer SHA.

The first local full recovery run also exposed four missing VM scope bindings (206/210 passed); the first local full Jest run after fixing the client fixture exposed public Electrum/mempool dependency timeouts in Wallet/Vault setup (33/35 suites and 310/341 tests passed). These failures are retained as evidence; the test-only fixture changes above address their setup causes without bypassing assertions or changing production behavior.

At 28c7ab0c6, CI 38348686580 then passed 340/341 Jest tests and 34/35 suites, but failed the single Decryption::Incorrect key case when actual CryptoJS threw Malformed UTF-8 data; later recovery/version/release steps were again skipped. The specific test-only correction above addresses that error without changing encryption behavior.

The actual ESLint command at both previous heads exited 1 with 5,443 problems (4,529 errors / 914 warnings). Their Lint jobs were marked success only because the workflow already had continue-on-error: true; this continuation preserved the existing job and did not introduce or expand that setting. Lint is not claimed as passing.

Current verification

  • Local Node 22: full Jest 35/35 suites, 341/341 tests passed; full recovery 210/210 passed, zero skips; release checks 12 JavaScript + 7 Python passed; version consistency passed for this standalone source's 2.6.3 / Android 626 / iOS 619. git diff --check passed.
  • Local runs reused the existing installed dependencies through a temporary symlink, which was removed afterward. They do not claim a fresh standalone dependency installation or native/provider acceptance. The isolated checkout is clean.
  • Hosted CI 38349193803, associated with exact head 163cccb831f824b3daacc05199421683abdaf1ad, is completed/success. Its fresh-install Tests job passed 35 suites / 341 Jest tests, 210 recovery tests (zero skips), 12 JavaScript + 7 Python release/artifact tests, and source version consistency 2.6.3 / Android 626 / iOS 619. As normal for a pull-request run, Actions checked out the generated merge context 30ead64c0d54dce9cb2235e80b864280cb9e5222; the local checks above used the standalone source checkout.
  • Hosted CodeQL workflow 38349193772 / Analyze check 115137465945 succeeded. The separate named CodeQL security check 115137813605 also succeeded: “No new alerts in code changed by this pull request”, zero annotations. These are this source PR's results, not the combined candidate's security result.
  • ESLint remains failed at this final head: actual command exit 1, 5,443 problems (4,529 errors / 914 warnings), unchanged from both preceding runs. Its Lint job is marked success under the existing continue-on-error setting. Neither workflow success nor the test-only fix is claimed as lint/type cleanliness.
  • Independent agent read-only review found no blocking fixture issue and confirmed retained assertions/real facade/production crypto plus unchanged runtime/native/dependency inputs. Human developer approval remains pending.

These deterministic unit fixtures do not validate public providers, a fresh Testnet faucet transaction, native app launch, hardware signing or customer recovery. Later combined #7045 runtime corrections remain on the combined candidate and were not ported onto this standalone source. Website #19's source-only development-package correction is at cfe7b15631cd71c827cd1c78096fe30295e75acd; live www associations and valid dummy links still return HTTP 404. Source reconciliation, independent developer approval, production/Play certificates, approved hosting and installed-app acceptance remain open.

Codex local handoff

State: NEEDS_LOCAL
PR: #7042
Base: codex/r3-release-baseline-to-sprint
Head branch: codex/r4-sync-ask-keeper
Head commit: 163cccb
Goal and acceptance criteria: Own-head CI/CodeQL execute reliably on the existing stacked base, while retained R4 sync/faucet/archive/Ask Keeper/remote-link behavior meets native acceptance.
Changes made: Two workflow trigger entries and six test-only fixture/assertion files; runtime/native/dependencies remain identical to d280c3b.
Cloud checks: Local and hosted Jest 341/341, recovery 210/210, release 12 JS + 7 Python and source version 2.6.3/626/619 passed; diff check passed. CI workflow and both CodeQL checks completed successfully. Actual ESLint command still failed (4,529 errors / 914 warnings), despite inherited green Lint job. Initial failed runs and hosted merge-context identity are recorded above.
Required local checks: IOS, ANDROID
Local checks requested: Use a separate exact-source checkout and disposable accounts. Read the latest combined #7045 handoff and source-correction boundaries before choosing a native source; this standalone source lacks later candidate corrections. Record actual tested source/artifact identities. Exercise fresh Testnet tutorial -> one faucet request -> persisted visible balance without restart; account/network switches during requests; hidden/zero-balance archive monitoring; public/private node reconnect/failover; Ask Keeper scroll/retry/discard; and 1/10/50-wallet profiling. Pair website #19 only after a separately approved hosting deployment, confirming actual package/entitlements/certificates and cold/warm/malformed link opening plus generic browser fallback without exposing keys.
Risks / known gaps: ESLint retains existing failures; source reconciliation, human approval, native/provider acceptance, live website 404s and final certificate/hosting gates remain open. Deterministic unit results and successful CI are not authorization to merge, retarget, deploy, sign, distribute or publish.

Copy link
Copy Markdown
Collaborator Author

R4 combined-source correction and acceptance boundary

Source head remains d280c3b7ce879503998a9625a18d9be0ccd6d7da; it is integrated in #7045 final a3b87774573fd8d54a05528290c84f12494493bb. The combined candidate now corrects fresh onboarding publication/persisted-wallet/key readiness, queued faucet originating-account ownership, stale refresh/error/loading completion after account/network switches, and actual collaborative modal-hide/full-reset readiness. These are candidate corrections, not new commits or native acceptance on this standalone source head.

Exact combined local/hosted verification passes 380 Jest and 308 recovery tests, including fresh setup -> one faucet -> persisted visible balance, failed persistence/retry preservation, same-ID Wallet/Vault/hidden archive account races, and real component hide/reset/cancellation scenarios. Source #7042 still lacks its own CI due its stacked-base workflow filters. Do not infer own-head CI or approve a standalone rollout from the combined result; reconcile/port the required corrections deliberately during authorized baseline/source integration and recheck the final source.

Fresh-install tutorial -> Testnet -> Receive Test Sats -> visible balance without restart, 1/10/50-wallet native profiling, native modal timing, nodes/Tor/deep links/Ask Keeper, and retained archive behavior remain NEEDS_LOCAL under the newest #7045 exact-head IOS/ANDROID/HARDWARE handoff. Website #19 live association paths remain 404. No merge, deployment or release occurred.

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.

2 participants