feat: gate mainnet probes on wallet readiness#167
Open
piotr-iohk wants to merge 3 commits into
Open
Conversation
Collaborator
Author
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d1efef5. Configure here.
Co-authored-by: piotr-iohk <piotr-iohk@users.noreply.github.com>
…t-fix-ef9f Require positive value for PROBE_READINESS_TIMEOUT_MS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Part of synonymdev/bitkit-nightly#17
This PR gates the mainnet Lightning probe spec on real wallet readiness instead of a fixed stabilization delay. After restore, it polls the Android
probeReadinessdevtools command until the node is running, has a connected peer, a usable channel, healthy sync, and a non-thin network graph before probing. This addresses theROUTE NOT FOUND/ "Probe sending failed" failures caused by probing against an incomplete graph.Summary
waitForProbeReadiness()polling helper plusProbeReadinessparsing/validation intest/helpers/probe.ts, surfacing device errors on timeout.test/specs/mainnet/probe.e2e.tsafter the wallet-ready UI checks.probe-report.mdand writesprobe-readiness.jsonfor diagnostics (consumed by the nightly Slack summary).PROBE_READINESS_TIMEOUT_MS,PROBE_READINESS_POLL_MS,PROBE_MIN_GRAPH_CHANNELS(default 10,000).Test plan
@probe_mainnetagainst a mainnet build: readiness poll logs appear and probes start only once the graph is healthy.probe-report.mdandprobe-readiness.json.Depends on the Android
probeReadinessdevtools command (synonymdev/bitkit-android).Made with Cursor
Note
Low Risk
Test-only changes to E2E probe helpers and spec timing; no production app logic.
Overview
Mainnet Lightning probe E2E now waits for real node readiness after wallet restore instead of relying on a fixed stabilization delay. New helpers in
test/helpers/probe.tspoll the Android devtoolsprobeReadinesscontent call (override viaPROBE_READINESS_METHOD) until peers, usable channels, sync health, and graph size meet thresholds—configurable viaPROBE_READINESS_TIMEOUT_MS,PROBE_READINESS_POLL_MS, andPROBE_MIN_GRAPH_CHANNELS(default 10k channels).The mainnet probe spec calls
waitForProbeReadinessafterwaitForMainnetWalletReadyand only then runs LNURL probes. Artifacts now include a readiness line inprobe-report.mdand optionalprobe-readiness.jsonfor nightly diagnostics.Reviewed by Cursor Bugbot for commit d1efef5. Bugbot is set up for automated code reviews on this repo. Configure here.