Skip to content

Wallet interoperability: bounded sync and portable recovery (#544) - #569

Draft
ty-everett wants to merge 386 commits into
mainfrom
codex/wallet-sync-interop-reliability
Draft

ty-everett wants to merge 386 commits into
mainfrom
codex/wallet-sync-interop-reliability

Conversation

@ty-everett

@ty-everett ty-everett commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Hold open: do not merge or enable auto-merge. Implementation is integrated and documented; full #544 acceptance and production qualification remain open.

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 86072f1f5b264ff7423257291f413678fdf2e663 is 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

  • Public package source/manifests, API/types/browser/mobile integration, persistence/trust boundaries and documentation changed.
  • Candidate packages: @bsv/wallet-toolbox, client and mobile 2.15.0; unpublished. SDK and other affected package contracts follow their recorded release entries.
  • Stable archive formats, identity/network boundaries and legacy negotiated fallback remain. Packed-IDB v7 uses an explicit separate namespace; retain v6 for rollback.

Verification

Integrated implementation checkpoint

Head fbcdbdfe3aca88c007f12489d844a1525e88a84e includes current main b73c72d6b9e5998b8d620aae13c8f3419c919fe0 / #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.

  • Planned feature source integrated and documented; final implementation checkpoint pushed.
  • Public-main source/tests and release metadata reconciled; relevant component/batch checks passed.
  • Complete system/platform/performance qualification and exact-head green CI/analyzers.
  • Qualified maintainer review; keep PR held open and unmerged.

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 notes and necessity: governed entries and the original-generated package reference describe the additive wallet candidate and preserved compatible fixes.
  • Runtime, build, and peer compatibility: root/compiler checks and affected builds pass; complete compatibility/consumer campaigns remain open.
  • Lockfiles: root pnpm lock and all manifests/first-party versions/overrides are unchanged. Original Linux npm generation changes exactly one entry in each standalone Message Box/WAB lock: Handlebars4.7.9→4.7.10 within ts-jest’s existing compatible range, addressing GHSA-p8wg-vrv2-v86f. Both private service READMEs document installation, unchanged API/authentication/resource/database contracts and separate protected image promotion; no public-package release ledger entry applies.
  • Audit and CodeQL: complete current hosted analyzer/audit qualification remains open.
  • Package and consumer tests: scoped evidence above; full affected consumer qualification remains open.
  • Bundle and performance impact: operator-authorized 30% browser artifact headroom, to be reviewed after goal achievement with measured judicious budgets; no production-sizing claim.
  • Affected public package versions: wallet/core/client/mobile 2.15.0 candidates and recorded affected release entries; no publication.

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.

  • No npm/image publication, deployment or funded action performed by this checkpoint.
  • PR remains open, draft and unmerged, auto-merge off.
  • Full program goal achieved / production ready.

Comment thread scripts/check-template-consumers.mjs Fixed
@ty-everett
ty-everett marked this pull request as ready for review September 23, 2026 14:38
@ty-everett
ty-everett marked this pull request as draft September 23, 2026 14:39
@ty-everett
ty-everett marked this pull request as ready for review September 23, 2026 15:47
@sirdeggen sirdeggen self-assigned this Sep 23, 2026
Comment thread packages/sdk/src/auth/clients/AuthFetch.ts
@ty-everett
ty-everett marked this pull request as draft September 24, 2026 00:56
@ty-everett

Copy link
Copy Markdown
Collaborator Author

[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.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

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.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Implementation checkpoint: pushed source481 759d982d5daf50d0260d5b7dad25a71fd1010cfa, fixing streamed TEXT delimiter completion and reader-only absent-DATA destination refusals while preserving existing negotiation errors/synchronous source-page detachment. Correct valid sync-status fixture and add independent invalid/ownership/detachment controls; coherent ten-path documentation/generated wallet row. Root4/all40 PASS602; all12 complete files252/252, original300-case properties and actual authenticated HTTP Node/mobile-client controls PASS604 without observer. Original602/60364MiB disk-full samples retained; independent603 measurements justify only local qualification scratch128MiB, production/native/Metro/Hermes/cases/assertions/deadlines unchanged. Full current605 admission and actual201-group/9-controller drain PASS; ownVM stopped132. All24 source families accounted, all11 full acceptance gates OPEN. Current481 CI pending/unqualified; remaining native/platform/whole-system/analysis/review proof is explicit in the PR description. Keep569 OPEN/DRAFT/UNMERGED/auto-merge OFF; no publication/deployment/funding.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Implementation checkpoint: pushed source483 b90013fb412384fd76dea146fa49e0a205f190ec, with all40 builds and root4 PASS612, complete original FOUR native read/field/packed-hash/all17TEXT cases plus both retained lifecycle/property suites3/39 PASS435.313s. Fatal length probes use fresh actual metadata/views under the original residual deadline; read/closed/close errors agree and physical cleanup drains. Positive windows, all original large data/negative guards/cases/assertions/300seed3242026/owner/deadline/resource/default/production behavior remain. Exact five-path helper/docs/original-generated wallet-only metadata division is preserved. Earlier6073pass1failure and610lint refusal, formatter/static/prelaunch samples remain distinct. Finalcurrent613 admission and actual201groups/8controllers/awake/container drain PASS; ownVM stopped133. All24 source families accounted, all11 full acceptance gates OPEN. New483 CI pending/unqualified; source481 Sonar/zero-new/mobile failures are retained, broader native/platform/customer/performance/compatibility and analysis/review proof remains. Keep569 OPEN/DRAFT/UNMERGED/auto-merge OFF; no publication/deployment/funding.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Implementation checkpoint: pushed c571f0d6817d299b9c92b4786e504147c919ccdc, current with main and held OPEN/DRAFT/UNMERGED/auto-merge OFF. Existing wallet compiler now emits both original ownership/crash-resume children; tests launch their compiled paths. Real kernel locks, fixed leases, all15 SIGKILL prefixes and original child bounds remain. Allocation negative outer test guard matches the existing180s fixture lifetime; original64KiB failure/128KiB positive matrix and production defaults remain. Exact485 root4/all40 and full original50-case resume suite PASS; preceding484 four unchanged complete suites81PASS, original full-five130/131 stale privacy expectation failure retained separately. Docs/release facts are coherent under the wallet-only agreement. Final624 admission and actual259groups/11controllers/awake/container drain PASS; ownVM stopped134. All24 source families accounted; all11 full acceptance gates OPEN. Current485 CI pending/unqualified; exact4833359 Sonar findings and Metro overages remain, along with full native/authenticated-import/backend/platform/customer/performance/compatibility proof. No production readiness, whole-system completion, merge, publication, deployment or funding claim.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Implementation checkpoint pushed 541b2804785bc86bd2bb89a1248795581f251e0c, current with main, held OPEN/DRAFT/UNMERGED/auto-merge OFF. All24 planned source families have implementations, integration/consumer entry points and documentation accounted for; no missing production component/wiring is currently known. Source assembly is complete; runtime feature completeness and all11 whole-system acceptance rows remain unproved/open. Corrected authenticated catalog/sealing tests preserve the real oversized extent/no-payload-loading refusal and add immutable sealed-row/unchanged-read proof. Native checkpoint outer test guard alone aligns30s to existing180s fixture lifetime; original internal deadlines/fields/maps/bytes/allocations and production limits remain. Exact486 root4/all40 and all60 tests in three complete files PASS630, including all15 real process-kill prefixes; native checkpoint33.274s. Docs/release facts coherent under wallet-only agreement. Original626/627 failures retained. Full controls/actual150groups6controllers/awake/container drain PASS, ownVM stopped135. Current486 CI pending/unqualified; exact4853359 Sonar findings and Metro overages remain. Next phase: full integrated system/platform/provider/customer/resource/performance/compatibility/property/mutation/artifact qualification and exact-head green/analyzers/review. No production-ready/completion/merge/publication/deployment/funding claim.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Implementation phase checkpoint: all 24 planned source feature families are accounted for with integration and documentation at 541b2804785bc86bd2bb89a1248795581f251e0c, current with main. PR #569 remains open/draft/unmerged. Existing root checks, all 40 builds and 60 complete-file integration/recovery tests pass. All 11 whole-system acceptance rows remain open.

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 {"failure": 4, "in_progress": 3, "queued": 51, "skipped": 2, "success": 42}; 3,359 open Sonar findings and measured Metro overages remain. Browser +30% allowance stays provisional; mobile limits unchanged. Next phase qualifies the complete integrated system and fixes warranted defects. No feature-completeness/production-readiness/merge/publication/deployment claim.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Implementation-phase wrap-up: all 24 planned source feature families are accounted for with integration and documentation. Public 541b2804785bc86bd2bb89a1248795581f251e0c and clean local candidate fba9889a6e0c76448891bdb54fc12cdb619878c9 include current main. PR #569 remains open/draft/unmerged; all 11 whole-system acceptance rows stay open.

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 {"cancelled": 1, "failure": 5, "in_progress": 3, "queued": 45, "skipped": 2, "success": 46} remains unqualified. Complete system/platform/performance/compatibility/analyzer/CI proof and qualified review remain. Browser-only +30% is provisional; mobile/native/production limits unchanged. No feature-completeness/production-readiness/merge/publication/deployment claim.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Pushed the checked implementation-fixture/documentation batch in two commits, ending at 88474cc8f83b9346189f800651bd17d35d4be899; current main included. All24 planned feature families are accounted for in source/integration/docs. PR569 stays open/draft/unmerged. All11 full-system acceptance rows remain open; this checkpoint does not claim runtime feature completeness or production readiness.

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: {"in_progress": 6, "neutral": 1, "success": 6}. Remaining whole-system/browser/native/mobile/performance/compatibility/property/conformance/mutation/analyzer/review qualification stays mandatory. Browser static preflight and exact CI worker artifact presence are useful diagnosis, not browser runtime proof. Browser-only +30% provisional allowance retained; other limits unchanged. Goal remains active; no merge/publication/deployment/funding.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Pushed the checked two-commit fixture/documentation batch ending at 05478cd153cb3f845b4175aa5874313fc762a7d0, including current main. All24 planned feature source/integration/documentation families are accounted for; no known missing planned component or wiring. PR569 stays open/draft/unmerged. All11 original whole-system acceptance rows remain open; this is an implementation checkpoint, not runtime feature-completeness or production-readiness proof.

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: {"in_progress": 10, "queued": 1, "success": 2}. Original488 gate3359new Sonar findings and mobile failure are prior-head evidence;490 needs full fresh analysis. Whole-system/provider/platform/performance/compatibility/property/conformance/97mutation/review proof remains mandatory. Browser-only +30% provisional allowance retained, other limits unchanged. Goal remains active; no merge/publication/deployment/funding.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Integrated feature-build checkpoint (turn156): all 24 planned #544/#542/#543 source, integration and documentation families are accounted for on 05478cd153cb3f845b4175aa5874313fc762a7d0; main 86072f1 is included and local/remote agree. Required root checks, all 40 affected builds, original 12 streamed/schema/read native cases, documentation checks and packed consumer contracts passed on this unchanged head.

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.

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Implementation checkpoint: pushed 5cb140455, including current main be2a2e7 / #675. All 24 planned #544/#542/#543 source/integration/documentation families are accounted for; no additional planned component or wiring is currently known missing. Fixed original native structured-source completion through the existing authenticated read mode, added real encrypted reservation replay with independent byte and refusal controls, retained the original allocation refusal boundary, and selected measured finite test-fixture lifetimes without changing production limits. Main profile-update/concurrency fixes and all original tests remain integrated with held registration continuity.

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.

@ty-everett

ty-everett commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

Implementation-first checkpoint pushed: fbcdbdfe3, including current main b73c72d6 / #818 and #675. All 24 planned #544/#542/#543 source, integration and documentation families are accounted for, with no additional missing planned component/wiring identified. Preserved the public-main customInstructions single-layer fix and original regressions; reconciled three wallet release rows/generated docs while retaining 2.15.0 candidates, all prior clauses and unrelated fields.

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.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
5.4% Duplication on New Code (required ≤ 3%)
C Security Rating on New Code (required ≥ A)
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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