Skip to content

test: drop blocktank-dependent tests - #1817

Merged
jvsena42 merged 4 commits into
masterfrom
test/drop-blocktank-tests
Nov 9, 2026
Merged

jvsena42 merged 4 commits into
masterfrom
test/drop-blocktank-tests

Conversation

@ovitrif

@ovitrif ovitrif commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Twin: synonymdev/bitkit-ios#1246
Companion: synonymdev/bitkit-e2e-tests#302

This PR moves the instrumented integration tests off Blocktank's staging regtest API. That API is being sunset, and its deposit and mine calls take tens of seconds each on stag0.

Description

  • Removes the androidTest BlocktankTest, whose one test calls Blocktank's info endpoint and cannot work after the sunset.
  • Switches UtxoSelectionTests, TxBumpingTests and PreparedOnchainRecoveryFixtureTest from Blocktank's regtest deposit and mine endpoints to a local bitcoind, through a new LocalRegtest test helper. These tests only used Blocktank to fund and mine, so their coverage stays.
  • Starts the bitkit-docker regtest stack (bitcoind and electrs), pinned to a bitkit-docker commit, in ui-tests.yml and builds with E2E=true so the wallet syncs from the local electrs. The ComposeUi suite, which ci.yml runs on every PR, skips both.
  • Drops the testAccelerateByCpfp skip for an already-confirmed parent: it guarded against other users mining on the shared staging chain, which the private chain does not have.
  • Updates docs/android-test-lanes.md with the steps to run the integration lane locally on the bitkit-docker stack.
  • Drops the staging nightly's multi_address and transfer shards. Their only tests (@multi_address_2, @transfer_1 and @transfer_max, all Blocktank channel purchases) are removed in test: drop blocktank-dependent tests bitkit-e2e-tests#302.

Out of Scope

  • In-app Blocktank code (CoreService regtest helpers, regtest dev screens): app code, left as is.
  • JVM unit tests that mock BlocktankRepo: they test app code that still ships and never reach Blocktank.
  • journeys/, the lsp wrapper and the blocktank-api agent plugin: some walkthroughs still fund through Blocktank's regtest API.

Design

N/A — no UI changes.

Preview

N/A — no user-visible changes.

QA Notes

Setup

N/A — no device testing required; test and CI changes only.

Journeys

N/A — no user-visible behaviour change.

Manual Tests

N/A

Automated Checks

  • added LocalRegtest.kt — funds and mines on the local bitcoind over JSON-RPC
  • updated UtxoSelectionTests.kt, TxBumpingTests.kt, PreparedOnchainRecoveryFixtureTest.kt — fund and mine on local regtest instead of Blocktank
  • removed BlocktankTest.kt — its only test called Blocktank's info endpoint, which is being sunset
  • ran the instrumented integration suite through ui-tests.yml on this branch: run 42616169750

Evidence

  • Run 42616169750 on 530c07b passed: UtxoSelectionTests (2), TxBumpingTests (2) and PreparedOnchainRecoveryFixtureTest (seedPreparedOriginalForRecoveryUi, verifySharedVssBindingVectors) passed against the local stack. verifyPersistedOriginalWinnerAfterUi skipped, as it does without its fixture argument.
  • compileDevDebugAndroidTestKotlin, detekt and just lint passed locally.

Gaps

  • just test was not run locally: no JVM unit test or main source changed. CI runs it.

Models used

  • Planning/scoping: claude-opus-5-5 (reasoning: medium)
  • Implementation: claude-opus-5-5 (reasoning: medium)
  • Review: claude-sonnet-5-5 (reasoning: Not exposed)

The reviewer's run recorded a numeric effort tag, not a named level.

@ovitrif ovitrif self-assigned this Nov 9, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 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-11-09T12:53:39.270901Z 530c07b 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 530c07b680

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The changes affect test setup and staging automation, not shipped wallet behavior.

The PR appears safe to merge, with a non-blocking update needed to the local test instructions.

Findings

  1. P2 Local test instructions are stale ▶

Summary

Moves instrumented test funding and mining from Blocktank to a local bitcoind.

  • Instrumented wallet tests fund and mine on a local regtest chain.
  • Instrumented tests stop checking Blocktank service details.
  • The staging nightly drops its Blocktank purchase-test shards.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  CI[Integration workflow] --> Stack[Local bitcoind and electrs]
  Tests[Instrumented tests] --> Helper[LocalRegtest]
  Helper -->|Fund and mine| Bitcoin[bitcoind]
  Bitcoin --> Electrs[electrs]
  Wallet[Wallet built with E2E=true] -->|Sync| Electrs
Loading

Reviews (1) · Last reviewed commit: "test: harden local regtest helper and ga..." · Reviewed by Greptile

Comment thread .github/workflows/ui-tests.yml Resolved
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Regtest APK

Built from dba02d0 (run).

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

@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. Moves the instrumented integration tests (UtxoSelectionTests, TxBumpingTests, PreparedOnchainRecoveryFixtureTest) from Blocktank's staging regtest deposit and mine calls to a local bitcoind through LocalRegtest, starts the bitkit-docker regtest stack in ui-tests.yml for non-ComposeUi suites, removes BlocktankTest and drops the two staging nightly shards whose tests leave in synonymdev/bitkit-e2e-tests#302. Reviewed 530c07b, full tier (CI workflow files), reasoned from the code and from CI: on this track the auto review does not build the branch.

What I checked, and 6 candidates I ruled out

Read in full: ui-tests.yml, run-ui-tests.sh, LocalRegtest.kt, the three migrated test files, Env.kt (electrumServerUrl, electrumUrlForNetwork, homegateUrl, BackupTestEndpoints, BlocktankTestEndpoint), the E2E* build config in app/build.gradle.kts.
CI: run 42616169750 (ui-tests, integration suite) on 530c07b is green, 42 tests finished; the skips are OnchainBackupRestoreDeviceTest, UsdtNativeRecoveryIntegrationTest, SendPendingObservationDeviceTest and verifyPersistedOriginalWinnerAfterUi, each behind an assumeTrue on an instrumentation argument the run does not pass, so they skip the same way without this PR. On the PR head, build-and-test, build-local, lint, detekt and Greptile passed; compose-ui and the e2e-tests-local shards were still running.

Ruled out

  • ComposeUi suite on every PR picks up E2E=true or the regtest stack: ci.yml calls the workflow with suites: ComposeUi, so NEEDS_REGTEST and E2E evaluate to 'false', and envFlag maps that to false.
  • E2E=true silently moves other integration tests to local backends they cannot reach: the build flag changes electrum (to tcp://10.0.2.2:60001, which the stack serves), homegate and the release URL; backup and Blocktank fixture endpoints stay off unless their E2E_* URLs are set, and none is. The green run covers the rest of the integration set under that build.
  • sendtoaddress fails on regtest without fee estimation, or with no wallet loaded: the run funds and confirms every deposit the three classes make.
  • Five sendtoaddress calls before mining chain unconfirmed change in the bitcoind wallet: a chain of five is well under bitcoind's 25-descendant limit, the order is the same as it was against Blocktank, and the run passes it.
  • Removing the injected CoreService leaves a dangling use: compileDevDebugAndroidTestKotlin ran in that job; no other reference remains in those files.
  • New workflow steps expose a secret: the added steps use no secret; bitkit-docker is checked out with the job's read-only token and only docker compose and bitcoin-cli run from it.

Merge confidence: 4/5, no findings, but compose-ui and the e2e-tests-local shards on this head were still running at review time.

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code scan at 857f3a197: no findings.

Checked and clean:

  • The dropped BlocktankTest held only testGetInfo, which calls Blocktank. That matches iOS #1246.
  • UtxoSelectionTests, TxBumpingTests and PreparedOnchainRecoveryFixtureTest move one-for-one from regtestDeposit/regtestMine to LocalRegtest, with assertions unchanged. No Blocktank callers are left in androidTest.
  • ui-tests.yml: the per-PR ComposeUi lane is unchanged, because NEEDS_REGTEST/E2E are false for exactly that filter. E2E_BACKEND=local reaches both the assemble and the connected-test Gradle calls. assert-android-tests-ran.py still catches a zero-test filter.
  • e2e-staging: the multi_address and transfer shards dropped are the same on both platforms. Their staging tags mark only Blocktank purchases. The multi_address_local shard is unaffected.

Device gate: N/A, test and CI changes only, no journeys touched.

Reviewer model: Claude Opus 5.5 (claude-opus-5-5)
Reasoning effort: not exposed

@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

  • Instrumented lane checks out bitkit-docker at unpinned main (.github/workflows/ui-tests.yml:50-56)
  • CPFP skip guard still describes a shared regtest chain (app/src/androidTest/java/to/bitkit/services/TxBumpingTests.kt:280-283). TxBumpingTests.kt:280-283 says 'The shared regtest chain can mine the parent before the child is built' and assumeFalses on 'Transaction already confirmed'. That guarded against other users mining on stag0. On the private bitkit-docker chain nothing mines between the deposit and the CPFP call, so this path would now hide a real regression as a skip instead of failing. The PR already rewrote the comment at line 232 in the same test. Updating this comment, or dropping the guard, belongs with that change.

nits

  • LocalRegtest redefines the existing SATS_IN_BTC constant (app/src/androidTest/java/to/bitkit/test/LocalRegtest.kt:18)

Comment thread .github/workflows/ui-tests.yml Resolved
@jvsena42
jvsena42 enabled auto-merge November 9, 2026 13:23
@ovitrif

ovitrif commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

CPFP skip guard still describes a shared regtest chain (app/src/androidTest/java/to/bitkit/services/TxBumpingTests.kt:280-283)

@coreyphillips dropped the guard in dba02d0: on the private chain nothing mines the parent first, so testAccelerateByCpfp now fails instead of skipping if the parent is already confirmed.

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Delta review 857f3a197..dba02d028: no findings.

  • Pinning bitkit-docker to f5eae182d makes the lane reproducible.
  • Dropping the CPFP assumeFalse is right now that the chain is local to the run: nothing else mines the parent.
  • LocalRegtest reuses SATS_IN_BTC and adds a 30 s RPC timeout.

Device gate: N/A.

Reviewer model: Claude Opus 5.5 (claude-opus-5-5)
Reasoning effort: low

@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.

Rechecked after 1 new commit (dba02d0). Nothing blocking remains.

addressed

  • Instrumented lane checks out bitkit-docker at unpinned main (.github/workflows/ui-tests.yml:50-56). Fixed: ui-tests.yml:55 now uses ref: f5eae182db9ddecd61a0f1b5e9f48aee283bb3dc, and docs/android-test-lanes.md:44 points readers at that pin. I confirmed the SHA exists in bitkit-docker (merge of PR #34, 2026-11-02). Its docker-compose.yml still defines what this branch relies on: container bitcoin, rpcport 43782, electrs on 60001, the polaruser rpcauth, fallbackfee=0.00002, and the bitcoind/bitcoinsetup/electrs services. Run 42625191534 on dba02d0 has passed the checkout and stack-startup steps.
  • CPFP skip guard still describes a shared regtest chain (app/src/androidTest/java/to/bitkit/services/TxBumpingTests.kt:280-283). Fixed: TxBumpingTests.kt:271-275 now calls accelerateByCpfp directly, and the assumeFalse and runSuspendCatching imports are gone. I checked that nothing can mine the parent first. At the pinned commit, bitcoinsetup mines one block and exits (restart: 'no'). run-ui-tests.sh runs connectedDevDebugAndroidTest without sharding. So nothing mines between the deposit at line 232 and the CPFP call.
  • LocalRegtest redefines the existing SATS_IN_BTC constant (app/src/androidTest/java/to/bitkit/test/LocalRegtest.kt:18). Fixed: LocalRegtest.kt:9,57-58 imports and uses to.bitkit.models.SATS_IN_BTC, a public const val in models/Currency.kt:15. Long divided by Int stays Long, so %d.%08d still formats correctly. The connect and read timeouts now come from rpcTimeout = 30.seconds (line 20), used at lines 30-31.

@jvsena42
jvsena42 merged commit 3f2009e into master Nov 9, 2026
24 of 25 checks passed
@jvsena42
jvsena42 deleted the test/drop-blocktank-tests branch November 9, 2026 13:54
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