Skip to content

chore: remove boltz swap leftovers - #2229

Merged
ovitrif merged 1 commit into
masterfrom
chore/remove-boltz-leftovers
Dec 1, 2026
Merged

ovitrif merged 1 commit into
masterfrom
chore/remove-boltz-leftovers

Conversation

@ovitrif

@ovitrif ovitrif commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Twin: synonymdev/bitkit-ios#1570
Source: self, #2214

This PR removes what the Boltz savings swap removal left behind.

Description

  • Removes LightningRepo.payInvoiceWithNode, added for the Boltz savings swap and called only by tests since chore: remove the Boltz savings swap #2214.
  • Moves the node send hold tests onto payInvoice, which takes the same node path for an invoice without an amount, so their coverage of the live send logic stays; the test of the node-only entry itself goes with it.
  • Drops "swap recovery" from the Paykit outage journey's startup step, since no swap watcher starts on launch any more.

Out of Scope

  • boltz.db on disk: kept, since with the seed it is what a manual refund of a locked swap needs.
  • The bitkit-core pin: stays on 0.8.0-rc15 until the rc16 bump (chore: prepare 0.8.0-rc16 bitkit-core#230).
  • TransferViewModelTest: CLAIM_ADDRESS and PAY_ERROR keep their names; Spark withdrawal tests still use them.

Design

N/A — no UI changes.

Preview

N/A

QA Notes

Setup

A dev debug build of this branch with a channel open.

Journeys

  • J1: updated ordinary-during-paykit-outage.xml — startup recovery watchers start without Paykit

Manual Tests

N/A

Automated Checks

  • updated LightningRepoTest.kt — node send hold cases enter through payInvoice; removed the node-only entry case, as that entry is gone

Evidence

  • 97ca365: just compile, just test and just lint pass.

Gaps

Models used

  • Planning/scoping: Claude Opus 5.5 (reasoning: medium)
  • Implementation: Claude Opus 5.5 (reasoning: medium)
  • Review: Claude Sonnet 5.5 (reasoning: high), Gemini 4 Neon (reasoning: high)

Removes LightningRepo.payInvoiceWithNode, added for the Boltz savings swap and called only by tests since its removal. The node send hold tests now enter through payInvoice, which takes the same node path for an invoice without an amount; the test of the node-only entry itself goes with it. Drops the swap recovery step from the Paykit outage journey.

Verified: testDevDebugUnitTest --tests LightningRepoTest, compileDevDebugUnitTestKotlin, detekt
@ovitrif ovitrif added this to the 3.3.0 milestone Dec 1, 2026
@ovitrif ovitrif self-assigned this Dec 1, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T16:49:26.891993Z 97ca365 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ovitrif
ovitrif requested review from a team, coreyphillips and piotr-iohk and removed request for a team December 1, 2026 16:48
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Removes the unused Boltz payment helper and updates its remaining tests.

  • Callers no longer have a separate node-only invoice payment entry.
  • The outage journey now checks order recovery without swap recovery.

Reviews (1) · Last reviewed commit: "chore: remove boltz swap leftovers" · Reviewed by Greptile

@talosmachina talosmachina left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings. Removes LightningRepo.payInvoiceWithNode, left over from the Boltz savings swap, and moves its tests onto payInvoice. Reviewed 97ca365, light tier, static: the branch was not built here.

What I checked, and 3 candidates I ruled out

Read: payInvoice overloads through payInvoiceChecked, shouldPayWithSpark, invoiceAmountSats, awaitNodeListing, payInvoiceWithLdk at the head; the nine rewritten tests in LightningRepoTest.kt
Callers: no reference to payInvoiceWithNode is left anywhere at the head
CI: Greptile, detect-changes, build-local green; build-and-test, lint and the e2e shards still running when this was written

Ruled out

  • The moved tests now take another path: every rewritten call passes "h" with no amount, so invoiceAmountSats cannot decode one, shouldPayWithSpark returns false and payInvoiceChecked falls through to payInvoiceWithLdk with the same arguments the removed entry passed (same hash derivation, no deadline, no fee cap, onBeforeSend returning true). The sparkRepo.canSend(1_000uL) stubs in those tests only matter to the sut.payInvoice(..., 1_000uL) calls that set them up.
  • Re-entrant calls inside Spark answers (the spark-admitted and settlement cases): they reach the same node path, since the rail pick happens before any Spark state is read for an amountless invoice.
  • Unused imports after the deleted test: eq, times and Bolt11Invoice are still used in both files.

Merge confidence: 4/5, build-and-test and lint had not finished and I did not build the branch.

Reviewer model: claude-opus-5-5
Reasoning effort: Not exposed (the run's metadata does not record it)

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Regtest APK

Built from 97ca365 (run).

Download bitkit-dev-debug universal APK (expires in 30 days).

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA review

Scope: full PR diff against its merge base, at 97ca365.

No new actionable code findings.

No actionable code findings. At the merge base, payInvoiceWithNode was referenced only by LightningRepoTest. Removing it leaves live invoice sends on payInvoice, and channel moves still pay from the node only through payInvoiceOverLdk. Each rewritten hold test calls payInvoice("h") with no amount. invoiceAmountSats cannot decode that string, shouldPayWithSpark returns false, and payInvoiceChecked calls payInvoiceWithLdk with the same arguments the removed entry used. The Spark-fallback cases that pass an amount stay on the existing payInvoice tests.

The startup step in ordinary-during-paykit-outage.xml now sets up a pending order. The Boltz swap-updates watcher that step used to name was already absent at the merge base; Blocktank order refresh still starts from BlocktankRepo and on foreground. Compared with bitkit-ios#1570 at 8b6bda7: the journey sentence matches. That comparison checked only this shared journey contract.

On this commit, CI build-and-test (assembleDevDebug and testDevDebugUnitTest) and lint (detekt and lintDevDebug) succeeded. This review did not run those commands. The author reports just compile, just test, and just lint passed at this commit.

Device testing: not performed in this review. J1 remains unchecked. The journey states that its Paykit fault controls are not wired into the full app journey, so that walkthrough cannot be executed end to end on a device with the current app.

Reviewer model: grok-4.7
Reasoning effort: xhigh

@coreyphillips coreyphillips left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two independent reviews, nothing blocking a merge.

worth doing, does not block

  • J1 setup omits the pending order and Paykit fault controls (journeys/wallet/ordinary-during-paykit-outage.xml:15)

nits

  • No test left checks that a node-only send never falls back to Spark (app/src/test/java/to/bitkit/repositories/LightningRepoTest.kt:1560)

@ovitrif

ovitrif commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

Merged: approved by @coreyphillips, checks green after a rerun of the flaky multi_address_local e2e shard, both review threads answered; the test nit follows in #2230.

@ovitrif
ovitrif merged commit 649d3f9 into master Dec 1, 2026
33 of 35 checks passed
@ovitrif
ovitrif deleted the chore/remove-boltz-leftovers branch December 1, 2026 17:45
@piotr-iohk

Copy link
Copy Markdown
Collaborator

Device QA parity check on 97ca365869b8 in the Android 13 Pixel 6 emulator with an isolated regtest Lightning channel. I mirrored the live-balance scenario from iOS #1570.

  • Passed before opening. A 1,000-sat Lightning payment settled before opening Transfer to Savings. The combined transfer amount showed 34,241 sats, including that payment.
  • Failed while open. A second 1,500-sat payment settled and the wallet balance updated, but the open transfer screen stayed at 34,241 sats across several sync cycles. Leaving and reopening the flow showed 35,741 sats.

This records the behavior on the tested merged revision.

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.

4 participants