Conversation
…ChunkResult.error WERR_NETWORK_CHAIN was defined and deserialized but never thrown, and no processSyncChunk producer or consumer set or read result.error. Remove the dead surface instead of inventing new chain-mismatch or chunk-error semantics. Historical JSON with that error name still deserializes as a generic WalletError. Closes #541 Closes #542 Co-authored-by: deggen <d.kellenschwiler@bsvassociation.org>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ty-everett
left a comment
There was a problem hiding this comment.
Maintainer review: retain this as draft and redesign it compatibly. WERR_NETWORK_CHAIN is exported through the public sdk namespace and SDK subpath; removing it breaks consumer imports, instanceof checks and typed JSON round trips. ProcessSyncChunkResult.error is also a public declaration. Internal non-use and the artifact checker’s selected export list do not establish absence of external consumers. Keep/deprecate these surfaces, retain round-trip coverage, and address #541 with an explicit live-sync chain preflight and #542 with documented, tested custom-provider failure handling. Do not close those issues through an API deletion in this maintenance release. A deliberate removal would need an approved major-version migration. Current main has also advanced substantially, so final acceptance must be rerun after the compatible revision.



Fixes #541 and #542.
Program and scope
@bsv/wallet-toolboxadvertised two unused failure surfaces.WERR_NETWORK_CHAINwas defined and deserialized but never thrown, so readers could infer a live cross-chain sync guard that does not exist.ProcessSyncChunkResult.errorwas declared but never set or read, so a third-party writer could populate it and both sync loops would ignore it.fbb0b5f8fb1088907decf7fde4abadd65feb424aImpact
Affected packages/services and intended patch versions (publication occurs only
through the release workflow after approval):
@bsv/wallet-toolbox2.13.0 (unpublished candidate; no version bump)@bsv/wallet-toolbox-client2.13.1 and@bsv/wallet-toolbox-mobile2.13.1 share the same source and inherit the type cleanupVerification
pnpm --filter @bsv/wallet-toolbox typecheckpassedpnpm --filter @bsv/wallet-toolbox lintpassedpnpm --filter @bsv/wallet-toolbox-client typecheckpassedpnpm --filter @bsv/wallet-toolbox-mobile typecheckpassedpnpm lintpassedpnpm format:checkpassedpnpm health:checkpassed (208 script tests, docs/packages check, contributor policy, repository health)fbb0b5f8fb1088907decf7fde4abadd65feb424a— 35 successful, 0 failed, 6 expected scope-based skips (SDK/DID/VeriFast coverage, non-coverage packages, mutation matrix, infra). Requiredmerge-gate, CodeQL, Sonar quality gate, Socket, codecov/patch, and conformance all passed. Run: https://github.com/bsv-blockchain/ts-stack/actions/runs/35616993704CI / Conformance Vectorsand requiredConformance / ts-runnerpassed. BRC-40 completion still usesProcessSyncChunkResult.done; no vector assertederrorcodecov/patchpassedCI / Build, lint, and policypassedCI / Platform / wallet browserandCI / Platform / wallet mobilepassed.pack:checkentry-exports never listedWERR_NETWORK_CHAINcompatibility, public API, artifacts, dependencies, docs, and operations
scope-based skip is expected and validated by the merge gate
Security and dependencies
audit results were reviewed
(including accepted or false-positive issue states) and zero unreviewed hotspots;
Sonar's aggregate
Quality Gate passedverdict alone is not merge evidenceand removal condition
Release and operations
controlling program
Decision
No existing live-sync call site throws a chain-mismatch
WalletError. Portable BRC-38 import and ChainTracks ingest already throw genericErrors for different paths; rewiring those would invent new error identities. Go'sProcessSyncChunkResulthas noErrorfield, and no TypeScript producer or consumer usederror. Removal is the smallest correct fix.Historical JSON with name
WERR_NETWORK_CHAINstill deserializes as a genericWalletError.Do not merge. Keep as draft pending maintainer review.