Repository navigation
chore: remove boltz swap leftovers - #2229
Conversation
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
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Low impact] The PR appears safe to merge. SummaryRemoves the unused Boltz payment helper and updates its remaining tests.
Reviews (1) · Last reviewed commit: "chore: remove boltz swap leftovers" · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
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, soinvoiceAmountSatscannot decode one,shouldPayWithSparkreturns false andpayInvoiceCheckedfalls through topayInvoiceWithLdkwith the same arguments the removed entry passed (same hash derivation, no deadline, no fee cap,onBeforeSendreturning true). ThesparkRepo.canSend(1_000uL)stubs in those tests only matter to thesut.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,timesandBolt11Invoiceare 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)
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
piotr-iohk
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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)
|
Merged: approved by @coreyphillips, checks green after a rerun of the flaky |
|
Device QA parity check on
This records the behavior on the tested merged revision. |
Twin: synonymdev/bitkit-ios#1570
Source: self, #2214
This PR removes what the Boltz savings swap removal left behind.
Description
LightningRepo.payInvoiceWithNode, added for the Boltz savings swap and called only by tests since chore: remove the Boltz savings swap #2214.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.Out of Scope
boltz.dbon disk: kept, since with the seed it is what a manual refund of a locked swap needs.0.8.0-rc15until the rc16 bump (chore: prepare 0.8.0-rc16 bitkit-core#230).TransferViewModelTest:CLAIM_ADDRESSandPAY_ERRORkeep 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
ordinary-during-paykit-outage.xml— startup recovery watchers start without PaykitManual Tests
N/A
Automated Checks
LightningRepoTest.kt— node send hold cases enter throughpayInvoice; removed the node-only entry case, as that entry is goneEvidence
just compile,just testandjust lintpass.Gaps
payInvoiceOverLdk's no-Spark-fallback case has no test: test: cover node-only channel moves never falling back to spark #2230.Models used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium)Claude Sonnet 5.5(reasoning:high),Gemini 4 Neon(reasoning:high)