Skip to content

feat: add mainnet probe tests#155

Open
piotr-iohk wants to merge 10 commits into
mainfrom
feat/mainnet-lightning-probe
Open

feat: add mainnet probe tests#155
piotr-iohk wants to merge 10 commits into
mainfrom
feat/mainnet-lightning-probe

Conversation

@piotr-iohk
Copy link
Copy Markdown
Collaborator

@piotr-iohk piotr-iohk commented May 12, 2026

Addresses https://github.com/synonymdev/bitkit-nightly/issues/9 from https://github.com/synonymdev/bitkit-nightly/issues/6.

This PR:

  1. Adds a @probe_mainnet E2E spec for Android mainnet Lightning probe runs.
  2. Restores a seeded probe wallet and waits for wallet, Electrum, node, and channel readiness before probing.
  3. Resolves configured LNURL/Lightning Address targets into invoices from PROBE_TARGETS_JSON.
  4. Invokes the Android devtools probe command through ADB, without using the Bitkit probing UI.
  5. Writes structured probe artifacts and fails the run when any required target/amount fails.

Note

Medium Risk
Adds a new Android mainnet probe flow that fetches live LNURL invoices and executes ADB content call commands, which can be flaky due to network/app readiness and CI timing. Also changes build/output artifacts and timeouts that may affect existing CI runs and local workflows.

Overview
Introduces a new Android mainnet Lightning probe smoke test (@probe_mainnet) that restores a seeded wallet, waits for wallet/electrum/LN readiness, resolves targets from PROBE_TARGETS_JSON (Lightning Address or LNURL callback), fetches BOLT11 invoices, and probes them via adb shell content call against the app’s devtools provider.

Adds reusable helpers: waitForMainnetWalletReady (and refactors mainnet LN payment spec to use it) plus a probe module that validates target config, runs the probe command with configurable timeouts/retries/delays, and writes artifacts (probe-results.json + a markdown report, also appended to GITHUB_STEP_SUMMARY).

Updates tooling/stability: build-android-apk.sh now supports BACKEND=mainnet and writes a distinct mainnet APK filename, increases wallet restore “Get Started” timeout, sets Android Appium newCommandTimeout to 300s, and adds a small testing-guidance note in AGENTS.md.

Reviewed by Cursor Bugbot for commit d615b24. Bugbot is set up for automated code reviews on this repo. Configure here.

@piotr-iohk piotr-iohk self-assigned this May 12, 2026
@piotr-iohk piotr-iohk marked this pull request as ready for review May 13, 2026 11:46
@piotr-iohk
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d615b24. Configure here.

Comment thread test/specs/mainnet/probe.e2e.ts
Use resolveNonNegativeIntEnv so bad values fail fast like other probe env vars.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant