Skip to content

feat(breez): Spark SDK 0.13.6 → 0.22.3, pinned exact (ENG-563) - #710

Merged
islandbitcoin merged 4 commits into
mainfrom
feat/spark-sdk-0-22-3
Aug 25, 2026
Merged

feat(breez): Spark SDK 0.13.6 → 0.22.3, pinned exact (ENG-563)#710
islandbitcoin merged 4 commits into
mainfrom
feat/spark-sdk-0-22-3

Conversation

@bobodread876

@bobodread876 bobodread876 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Breez is retiring Spark SDK versions older than 0.17, and every installed Flash build ships 0.13.6 — when retirement lands, BTC wallets break in place for anyone who hasn't updated. This is the upgrade half of ENG-563; the fleet-protection half (gate raise draft + notify runbook) rides in separate PRs and sequences off the retirement date Jabari is getting from Breez.

Target: 0.22.3, exact

  • Not 0.17.x — landing just above the cliff re-runs this exercise within a quarter at Breez's 1–2-week minor cadence.
  • Not 0.23.0 — released one day ago, no soak.
  • Pinned exact, caret dropped. ^0.13.4 silently floating is how a pre-1.0 money dependency sat four months stale without anyone noticing.

Migration surface — typings-verified, not release-notes-trusted

Both versions were installed and their .d.ts diffed. That check caught the biggest break the release notes never mention:

change fix
PrepareSendPaymentRequest.paymentRequest: string → PaymentRequest tagged union all 4 call sites wrap the raw string: new PaymentRequest.Input({ input }) — parsed internally exactly as the bare string was
SdkEvent_Tags.Optimization → AutoOptimization (0.17.0) rename in Transactions.tsx
SendPaymentMethod union gained CrossChainAddress, whose inner shares no fields with fee extraction → structural assignability of the whole union broke SendPaymentMethodLike.inner opaque at type level; each tag branch narrows to its variant's real fields — behavior identical
jest mock AutoOptimization rename + PaymentRequest.Input constructor; the feared enum-numbering drift was checked and refuted (numerics byte-identical)

migration.ts / liquid-SDK call sites untouched — different SDK, same function name.

⚠️ Release gate for v0.6.8

Behavioral deltas (default chain-service change, event dedup, payment terminal-status guard) are invisible to typings. Before this ships: physical-device BTC regression — send (LN / onchain / LNURL), receive (invoice / onchain), swap both directions, deposit claim/refund. Same bar #701 set for the New Arch.

Native side vendors inside the npm package. ios/Podfile.lock is regenerated and committed on this branch (BreezSdkSparkReactNative 0.22.3) — update_pods.yml only triggers on dependabot branches, so it does not cover feature branches like this one; CI's iOS/Android build checks run non-frozen pod install regardless.

87 suites / 861 tests green; tsc clean; CI's changed-lines lint gate clean.

Breez is retiring Spark SDK versions older than 0.17, and every installed
Flash build ships 0.13.6 — when retirement lands, BTC wallets break in
place for anyone who has not updated. This is the upgrade half; the
fleet-protection half (version gate raise + push campaign for <=0.6.6
users, who have no gate UI) rides separately and sequences off the
retirement date.

Target 0.22.3, not 0.17.x (landing just above the cliff re-runs this
whole exercise within a quarter at Breez's 1-2 week minor cadence) and
not 0.23.0 (one day old, no soak). Pinned EXACT — the caret is what let
a pre-1.0 money dependency float silently; range ^0.13.4 resolving to
0.13.6 is how nobody noticed being four months behind.

The migration surface, from a typings-verified read (both versions
installed, .d.ts diffed — release notes alone MISSED the biggest one):

- PrepareSendPaymentRequest.paymentRequest: string -> PaymentRequest
  tagged union. All four call sites wrap the raw string in
   — the Input variant is parsed
  internally exactly as the bare string was, so semantics are unchanged.
- SdkEvent_Tags.Optimization -> AutoOptimization (0.17.0 rename).
- SendPaymentMethodLike: 0.22.x adds variants (CrossChainAddress) whose
  inner shares NO properties with the fee fields, which breaks structural
  assignability of the union as a whole.  is now opaque at the
  type level; each tag branch narrows to the fields that variant
  actually carries. Behavior identical.
- Jest mock: AutoOptimization rename + PaymentRequest.Input constructor.
  The feared enum-numbering drift was checked and REFUTED — numeric
  enums are byte-identical between 0.13.6 and 0.22.3.

Not verifiable from typings, and therefore the RELEASE GATE for v0.6.8:
a physical-device BTC regression — send (LN/onchain/LNURL), receive
(invoice/onchain), swap both directions, deposit claim/refund — same
bar #701 set for the New Arch. Native side vendors inside the npm
package; CI's build checks + update_pods own the Podfile.lock.

87 suites / 861 tests green; tsc and eslint clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
@linear

linear Bot commented Aug 24, 2026

Copy link
Copy Markdown

ENG-563

Dread and others added 3 commits August 24, 2026 16:04
…ent_Tags mock

Review fixes for PR #710:

- fee-extraction: an unrecognized SendPaymentMethod tag (e.g. the
  CrossChainAddress variant 0.22.x added to the union) now throws instead
  of silently rendering a 0-sat fee that skips the amount+fee balance
  check — same failure mode the BitcoinAddress no-quote branch already
  throws on. Callers classify the throw as an "sdk" fee error via
  classifyBreezSdkError. undefined paymentMethod still returns 0.
  Updated the spec that enshrined the silent-zero behavior.

- mock: SdkEvent_Tags was missing four real 0.22.3 members
  (UnclaimedDeposits, ClaimedDeposits, LightningAddressChanged,
  NewDeposits). Added them, plus a parity spec that pins every mock
  member/value to the installed package's generated d.ts so future
  drift fails loudly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
…ity spec

Review fix for PR #710: the parity spec only pinned SdkEvent_Tags, leaving
the numeric enums (PaymentStatus, PaymentType) — the ones that previously
drifted destructively — and the new PaymentRequest_Tags unguarded. The
member regex now captures numeric values as well as string values, and the
spec asserts all four mocked enums against the generated d.ts. Also fail
loudly if an enum block matches zero members.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
Review fix for PR #710: the committed lockfile still pinned 0.13.6 while
package.json ships 0.22.3 — update_pods.yml only triggers on dependabot
branches, so nothing would ever regenerate it. Ran pod install on this
branch so the repo's record matches the shipped native version.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
@islandbitcoin
islandbitcoin merged commit a05b549 into main Aug 25, 2026
9 checks passed
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