Repository navigation
fix: stop the native abort when the node stops with stuck work - #1394
Conversation
Takes ldk-node 0.7.0-rc.81, which keeps the runtime alive until detached work ends. Verified: none (unit suite runs next on m1a)
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. |
[Medium impact] The supplied changes appear safe to merge; no actionable defect was established. SummaryUpdates
Reviews (1) · Last reviewed commit: "fix: stop the native abort when the node..." · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Bumps LDKNode from 0.7.0-rc.80 to 0.7.0-rc.81 (the runtime reaper from synonymdev/ldk-node#136 and #138) and adds the changelog entry. Reviewed 45ff9d4, light tier.
What I checked, and 2 candidates I ruled out
Pin consistency: project.pbxproj (exactVersion 0.7.0-rc.81) and Package.resolved (revision 366d56ef) agree; 366d56ef is the commit the v0.7.0-rc.81 tag points at in synonymdev/ldk-node, and b6335ecd was the rc.80 tag, so no other reference to the old version remains on the branch.
Binary: the release's LDKNodeFFI.xcframework.zip hashes to 591ab89d...b800, the checksum rc.81's Package.swift declares.
Upstream delta rc.80..rc.81: only src/runtime.rs (the deferred shutdown through a reaper thread, plus its tests), version strings and the changelog. No file under bindings/swift changed, so the generated Swift API is the same and no call site in the app needs to move.
Ruled out
- Swift API break from the bump: no change under
bindings/other than the Kotlin and Python version strings. - Mismatched pin between the project and the resolved file: both name rc.81, and the resolved revision is the tag's commit.
Not built here: on the Bitkit track an iOS branch is not built on this box (no iOS toolchain on Linux), so this review is from the code and from CI. At review time Run Tests, Run Integration Tests and build-local were still pending; SwiftFormat and validate were green.
Merge confidence: 4/5, the unit, integration and build jobs had not finished when I reviewed.
coreyphillips
left a comment
There was a problem hiding this comment.
Two independent reviews, nothing blocking a merge.
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: full PR diff against its merge base, at 45ff9d4.
No new actionable code findings.
No actionable code findings. LDKNode is pinned to 0.7.0-rc.81 in project.pbxproj (exactVersion) and Package.resolved (revision 366d56ef3c735406146ed12a34aba291776d29f6). That revision is the v0.7.0-rc.81 tag. The published LDKNodeFFI.xcframework.zip sha256 is 591ab89d4761ebe84f87e2ea9125f7167f896fd1e4954b0f9eba9fda8b80b800, matching the checksum in that tag's Package.swift. From rc.80 (b6335ecd86e9e9dc4e824dcb4b6065273572ca9d) the library change is src/runtime.rs: when a node is dropped while detached work is still blocked, a reaper thread keeps the Tokio runtime until that work ends. Swift bindings and the app stop and start call sites are unchanged.
Compared with bitkit-android#1999 at 3abadca for the stop/release contract only. Android takes the same rc.81 and still exits the process in the background when its monitor sees detached work. iOS leaves a retrying VSS write that can meet a rebuilt node to a later ldk-node release. bitkit-ios#1276 remains open: listenForEvents keeps each stopped node alive for the rest of the session, so this pin leaves those runtimes in place. That overlap is the existing retention behavior.
Device testing: not performed in this review. The stuck stop cannot be forced in the app, and the author marks journeys and manual tests N/A. I did not run the unit suite. The author reports 4153 tests, 0 failures (5 skipped) on this commit. On this commit, SwiftFormat and validate succeeded; Run Tests, Run Integration Tests, and build-local were still in progress.
Reviewer model: grok-4.7
Reasoning effort: xhigh
|
Auto-merge on: approved by @coreyphillips and @piotr-iohk on this head, no open threads; it merges once the required e2e check finishes green. |
coreyphillips
left a comment
There was a problem hiding this comment.
Rechecked after replies, with no new commit since 45ff9d4. Nothing blocking remains.
the reviewers disagree, your call
- E2E coverage the Gaps section relies on has not run on this head (general). Objection: The checked-in E2E workflow already propagates shard failures to e2e-status. GitHub access failed, so I could not independently verify the PR wording or cited job logs and cannot confirm the claimed coverage mismatch. Answer: I re-checked with gh. The PR's Gaps line says "CI's E2E jobs cover the Lightning flows on this head". The only e2e-tests run on head 45ff9d4 is run 45176623678 (attempt 1), and in its job 137714724070, "Run E2E Tests 1", "2" and "3" each failed opening the Simulator UI (
Simulator.app does not exist) and reportedSpec Files: 0 passed, 1 failedafter 16 s. That left e2e-tests-local and e2e-status at FAILURE, so the rc.81 binary has not been exercised end to end. The objection that e2e-status propagates shard failures is consistent with this rather than a rebuttal. It is a runner fault plus inaccurate QA wording, not a code defect, so it is non-blocking: a rerun on a healthy runner, or rewording the Gaps line, resolves it.
@coreyphillips Right, the Gaps line was wrong. I reworded it: E2E has not run on this head because of the runner fault, it reruns once the runner is fixed, and the merge waits for it. |
coreyphillips
left a comment
There was a problem hiding this comment.
Rechecked after replies, with no new commit since 45ff9d4. Nothing blocking remains.
addressed
- E2E coverage the Gaps section relies on has not run on this head. Fixed: The PR body's Gaps section now reads "CI's E2E jobs have not run on this head... They rerun once the runner is fixed, and the merge waits for them". I checked that claim: the master ruleset lists
e2e-statusas a required status check. Auto-merge is enabled and mergeStateStatus is BLOCKED whilee2e-statusis FAILURE on 45ff9d4, so the rc.81 binary cannot merge until an E2E rerun passes. "As on every iOS PR today" also holds: e2e runs 45190840591 and 45185181840 on other PRs fail with the sameSimulator.app does not exist.
|
Reran the failed E2E jobs: the 22:30 UTC run stopped at the merge-checkout check because master moved under it (#1371 merged). No code change. |
{"kind":"bitkit-retarget-execution-v1","repository":"synonymdev/bitkit-ios","pr":1394,"generation":"45353011056-1","sourceSha":"c52c5938ca2b846c9b9d2fec8152eb9c799f2020","sourceRef":"c52c5938ca2b846c9b9d2fec8152eb9c799f2020","owner":"github-actions[bot]"}
|
Merged master in as 0581a55. Its E2E could not run: GitHub's test merge for this PR stayed on the previous master, and the workflow only tests a merge with the current one. The merge is clean, with no code change. |
pwltr
left a comment
There was a problem hiding this comment.
Reviewed 0581a55.
LDKNode moves to 0.7.0-rc.81, pinned to the commit its tag points to. The only code change between rc.80 and rc.81 is ldk-node's runtime: when a stop leaves work running, a reaper thread keeps the runtime alive until that work ends and then shuts it down, instead of shutting it down under the work. No issues found.
Review details
General review
Model: Claude Opus 5.5
Reasoning effort: high
|
Approved at 0581a55 with nothing open; set to merge once the running E2E passes. |
Closes #1393
Twin: synonymdev/bitkit-android#1999
Updates
LDKNodeto 0.7.0-rc.81, which carries synonymdev/ldk-node#136 and synonymdev/ldk-node#138, so both apps run the same ldk-node.Description
A Tokio 1.x context was found, but it is being shutdown.as soon as it resumed (the top Android crash on 3.1.1, crash: native abort when the node restarts after returning from the background bitkit-android#1536). ldk-node 0.7.0-rc.81 keeps the runtime alive until that work ends, then shuts it down.project.pbxprojandPackage.resolved.Out of Scope
Design
N/A — no UI changes.
Preview
N/A
QA Notes
Setup
Regtest build.
Journeys
N/A — no user-visible behaviour change.
Manual Tests
N/A
Automated Checks
try_block_onand directly inblock_in_place, does not hold up shutdown, does not panic on its next timer poll, and the runtime shuts down once it ends.Evidence
LDKNodeFFI.xcframeworkof 0.7.0-rc.81 on 45ff9d4: 4153 tests, 0 failures (5 skipped).Gaps
Models used
Claude Opus 5.5(reasoning:medium),Claude Sonnet 5.5(reasoning:high)gemini-4-neon-high(reasoning:Not exposed)The pre-PR review run records only its model id.