Repository navigation
Wallet interoperability: bounded sync and portable recovery (#544) - #569
ty-everett wants to merge 386 commits into
Conversation
|
[administrative coordination note] The intention is NOT to merge this PR until after the five wallet releases (BSV Browser, BSV Desktop, Metanet Explorer Mobile, Metanet Client Desktop, and Peacock Wallet) are fully rolled out and in production, validated with users. This is a subsequent, later, follow-on change, designed for after the dust settles around the SDK 2.8.x series. Until then for this PR we have one mandate on the branch: keep CI green, keep it synced with main, address all review items, hold it open, continue adversarial review, and keep it healthy until AFTER all the wallet / 2.8.x work is done. Ensure its completeness. Likely merge timeline: perhaps Friday the 25th, with explicit human maintainer approval only. Agents: keep the branch green and free of conflicts meanwhile, so it will not be stale, and also address all review findings, while inviting further review. |
|
Late exact480 CI update: Platform / wallet mobile failed in job115022645377. Actual Metro bytes raw2761516/gzip728458/brotli557534 exceed the unchanged2620000/675000/510000 ceilings. Full CI is not green; remaining jobs continue. The prior pending snapshot, complete failure log and current fully paged check snapshot are preserved in operational evidence. No budget/test/production guard was waived. All11 full acceptance gates remain OPEN; keep569 held/open/draft/unmerged/auto-merge OFF. |
|
Implementation checkpoint: pushed source481 |
|
Implementation checkpoint: pushed source483 |
|
Implementation checkpoint: pushed |
|
Implementation checkpoint pushed |
|
Implementation phase checkpoint: all 24 planned source feature families are accounted for with integration and documentation at Original full customer workflow failed in setup with SQLite API misuse. Diagnostic repeat reached all 14 first-import rows but was deliberately interrupted to wrap this phase; restart/repeat-import and original unobserved qualification remain unproved. No cause or fix is inferred from the expected dialect-probe query marker. Full post-interruption source/runtime admission and actual process/container drain pass; owned VM stopped. Current CI |
…rent-read contracts
|
Implementation-phase wrap-up: all 24 planned source feature families are accounted for with integration and documentation. Public The local, unpushed fixture/doc batch preserves original data/assertions and production defaults. Root health/lint/format/typecheck and all 40 affected builds pass. Nine complete test files with coverage yield 99PASS/1FAIL/100. The native UNIQUE rebuild fails with SQLite API misuse at110.623s, inside its unchanged360s owner. A corrected diagnostic-only complete two-case repeat passes151.793s/250.059s, without reproducing or explaining that failure. The failed original sample is retained. The batch remains unpushed until an uninstrumented complete repeat and any warranted cause correction. All five attempts' source/runtime controls and actual process/container drain verified; owned VM stopped. Public-head CI |
|
Pushed the checked implementation-fixture/documentation batch in two commits, ending at Root health/lint/format/typecheck and all40 affected builds pass. Complete three private-mode/lease files pass18/18 with original coverage and stronger actual filesystem identity/mode assertions. Original uninstrumented recovery two-case repeat passes143.321s/275.774s within unchanged owners. Prior99PASS/1FAIL100-run and its SQLite misuse remain preserved/unexplained; no native root-cause fix claimed. All producer/earlier fixture bytes unchanged from487 to488. Four current full source/runtime admissions and actual process/container drains pass; owned VM stopped. Exact-head CI: |
|
Pushed the checked two-commit fixture/documentation batch ending at Exact490 local root health/lint/format/typecheck and all40 affected builds PASS. Complete streamed/schema/owned-read files pass12/12 with original coverage, including actual smaller-quota SQLITE_FULL negative. Original documentation check/contract tests and packed wallet artifact/consumer contracts PASS. Genuine scalar metadata, closed-installer unchanged-image checks, finite measured SQL observation bounds and specific5MiB local-schema positive allowance address actual failed-fixture causes. Original data, owners, row/operation/native production limits and all independent byte/rollback assertions retained. Existing ACKed wallet2.15 summary and only its originally generated paragraph updated. Original6461PASS5FAIL6 and separate647..649 diagnostics retained under original identities; native13 cause and observed physical lower-bound evidence are recorded, diagnostics are not qualification. Eight current full before/after source/runtime admissions and actual process/container drains pass; owned VM stopped139. Prior customer/native/browser/platform failures remain validation work. Fresh exact490 CI: |
|
Integrated feature-build checkpoint (turn156): all 24 planned #544/#542/#543 source, integration and documentation families are accounted for on Qualification remains open: mobile Metro exceeds caps by 5.4–9.3%; Sonar has 3,359 new findings; wallet shard 1 has three native deadline failures (2,286 passing tests). Complete original UNIQUE/current-commit cases separately yield one pass / one failure. The exploratory supported-read diagnostic was deliberately stopped for prompt phase closeout, remains incomplete and is not qualification evidence. A separate full integrity admission passed afterward; all owned local processes/containers are gone and the VM is stopped. All eleven whole-system acceptance rows remain open. The measured Metro-only budget proposal is unapplied pending the operator response. No source changes or new CI run were pushed this phase. PR stays open, draft and unmerged, auto-merge off; goal active. This checkpoint does not claim demonstrated feature completeness, green CI or production readiness. |
|
Implementation checkpoint: pushed Current-head local root checks, all 40 affected builds, all 103 complete wallet-manager/streamed/staging-store tests with coverage and no skips, generated documentation/stack facts, documentation contracts and packed consumer checks pass. Full before/after source/runtime controls pass; all 359 owned groups/12 controllers/containers are gone and the VM is stopped. Earlier failed samples retain their original identity; no combined whole-system passing total is asserted. Whole-system qualification remains the next phase: all eleven acceptance rows are open; exact-head CI/analyzers, complete native/composed/customer/platform/performance and other original gates remain required. Shared three-wallet-row release metadata alignment awaits extended peer ACK (request18893232); the prepared proposal is private and existing metadata agreements are preserved. The Metro-only proposal remains unapplied; browser30% is distinct, Hermes and production budgets unchanged. PR stays open/draft/unmerged/auto-merge off. Goal active; no publication, deployment or funding. |
|
Implementation-first checkpoint pushed: Current-head required root checks, all40 builds, all278 tests in the complete19 wallet-permissions suites with coverage/no failures or pending tests, generated documentation/stack facts, docs contracts and packed-consumer checks PASS. Full source/runtime controls PASS; all covered local actors are absent and the VM is stopped. The earlier native run was intentionally cancelled after five observed passes to finish integration first; it remains partial/unqualified, and all earlier failed evidence remains recorded. The source assembly phase is complete; full runtime feature correctness and production readiness are not yet demonstrated. All11 acceptance rows remain open for the later complete system/platform/performance/property/conformance/mutation and exact-head CI/analyzer/review phase. Earlier mobile-size and Sonar failures still require resolution; no threshold/status/exclusion waiver introduced. PR remains OPEN/DRAFT/UNMERGED/autooff. Remaining qualification deferred; no publication/deployment/funding. |
|




Program and scope
#544, including the necessary #542 returned-error and #543 basket-mapping corrections. Coarse wallet synchronization can block foreground work and portable workflows can amplify memory or lose coherent source history. This candidate adds bounded page ownership, foreground fairness, durable acknowledgements and recovery, coherent snapshots, negotiated remote/binary transfer, streamed BRC-38/39, authenticated preview/private restore/repeat merge, semantic ID remapping, publication/selection/retirement and explicit per-profile device-backup lifecycle integration. Older providers retain their serialized fallback; root-key recovery remains separate from data recovery.
The finite source map accounts for all 24 planned behavior families, public consumer entries and delivery/migration/rollback documentation. Current main
86072f1f5b264ff7423257291f413678fdf2e663is included; zero behind at publication. Current implementation head:541b2804785bc86bd2bb89a1248795581f251e0c. Main #884 is integrated under the exact shared-file ACK: structured JSON accepts a pre-construction double-spend review only when complete competing transactions spend an explicit input of the original createAction request. Wallet parsing preserves the bounded empty attempted-TXID sentinel; parsing alone does not authorize retry. Candidate versions and every distinct prior release clause remain. Binary framing remains unchanged. This is source assembly evidence; it does not establish runtime feature completeness or merge readiness.Current main #892 is integrated: interrupted WAB faucet registration retains the same encrypted unpublished UMP token before funding, supports an optional durable checkpoint saver for process replacement, refuses resumed registration without its original token, and verifies already internalized faucet transaction evidence. Existing published-token and backup identity/network contracts remain; the combined six complete authentication/WAB files pass. Wallet README, CHANGELOG, existing2.15 summary and original-generated ledger agree.
The implementation includes main’s pre-writer confirmed-IDB proof/header fix and a genuine regression for recipient ownership when storage already has the proof omitted from incoming AtomicBEEF. It retains the branch’s earlier interoperability, proof/reliability and payment corrections. Exact shared-file divisions are recorded on BotBoard; no peer source, result or resources were adopted.
Impact
@bsv/wallet-toolbox, client and mobile 2.15.0; unpublished. SDK and other affected package contracts follow their recorded release entries.Verification
Integrated implementation checkpoint
Head
fbcdbdfe3aca88c007f12489d844a1525e88a84eincludes current mainb73c72d6b9e5998b8d620aae13c8f3419c919fe0/ #818, including #675. Local, origin, actual remote, GitHub ref and PR heads agree. The branch is clean, open, draft and unmerged; auto-merge is off.All 24 planned #544/#542/#543 source, integration and documentation families are accounted for; no additional missing planned component or wiring is currently known. Source assembly does not establish complete runtime feature correctness or production readiness. All eleven whole-program acceptance rows remain open.
Final integration preserves main's single-layer internalizeAction customInstructions fix and every original regression, reconciles the three wallet release rows and deterministic generated documentation, and retains all held 2.15.0 candidate versions, existing feature clauses and unrelated metadata. The prior #675 field division was acknowledged; the peer released its scope before #818 metadata application. No new #818-specific ACK is claimed. The independent release operator explicitly excludes held #569.
On this exact head: required root health/lint/format/typecheck, all 40 affected builds, all 278 tests across the complete 19 wallet-permissions suites with coverage and zero failures/pending tests, generated stack/package documentation, documentation contracts and packed wallet/consumer contracts PASS. Complete source/runtime controls pass before and after; every owned controller, process group, sleep inhibitor and container is absent, and the owned VM is stopped.
Earlier results retain their actual identities. The 103 wallet-manager/native-streamed/staging-store passes belong to source495; exact-input reuse applies only to metadata-only source496. The original current495 five-file native campaign was intentionally cancelled at the human implementation-first checkpoint after five observed passes; it is partial, unqualified evidence, never an all16 pass. Earlier ordinary failures and push-observer failures remain recorded.
Later qualification must execute the full integrated provider/customer/recovery, interoperability, dataset/performance/resource, native/browser/mobile/macOS/Windows, property/conformance/mutation and exact-head CI/analyzer/review gates. Earlier source495 CI had mobile-size and Sonar failures; those are not assumed resolved at this head. Browser30% remains distinct from the unapplied Metro proposal; Hermes and production limits remain unchanged. No analyzer suppression/exclusion/status/baseline or quality-gate change. Physical/funded proof and publication/deployment retain their separate authorization/economic gates.
Security and dependencies
No gate is skipped or suppressed. Real ts-jest/esbuild configuration regressions remain in the complete control suite; the hosted health job now installs their existing declared locked root/wallet dependencies and rebuilds the audited esbuild binary. Generated native/SQL bytes and runtime admission remain unchanged by the clean-build correction. Exact-head zero-new CodeQL/Sonar findings and reviewed hotspots remain required.
Dependency evidence
Release and operations
Implementation, delivery, compatibility and forward rollback guidance are in
packages/wallet/wallet-toolbox/README.md,packages/wallet/wallet-toolbox/docs/implementation-544.md,packages/wallet/wallet-toolbox/docs/delivery-544.md, wallet CHANGELOG and the generated package reference. Publication, deployment, provider promotion, physical qualification and funded restore/spend require their separate release/operational actions.