Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Adds a spark-regtest Claude Code plugin (marketplace entry, plugin.json, README, SKILL.md) and lists it in README. Reviewed 4a7d080, light tier (docs only), static: nothing to build.
What I checked, and 1 candidate I ruled out
Claims checked against code on the PR head
ESPLORA_URLis read throughlocalProp(env, Gradle property,local.properties, keychain), the same sources asBREEZ_API_KEY, andEnv.regtestEsploraUrlapplies it only on regtest, i.e. the dev flavor.Env.sparkSharesNodeChainisnetwork != REGTEST || (localSpark == null && regtestEsploraUrl != null): hosted regtest withoutESPLORA_URLshows Transfer Unavailable, and the local stack turns Transfer to Spending off, as the skill says.Env.localSparkSettingsneedsisDebug && isLocalE2eBackend && network == REGTEST;E2Edefaults to false andE2E_BACKENDtolocalinbuild.gradle.kts, soE2E=trueis the one switch.ElectrumServers.REGTEST.LOCAListcp://${e2eLocalHost}:60001, default host10.0.2.2.scripts/spark-regtest-esplora.py:--port,--bind,--max-secondswith default 10800 (3 h).scripts/spark-regtest-fund.py:SPARK_REGTEST_MNEMONICanduv runusage match.- The
adb reverseport list matchesbitkit-docker/docs/spark-regtest.md;SPARK_PUBLIC_HOSTexists there. .claude/install-plugins.shinstalls every dir with a.claude-plugin/plugin.json, so the new plugin is picked up.- The iOS line ("allows both when its URLs match the fixture") matches
Env.sharesLocalSparkChainin bitkit-ios.
Ruled out
- Red
buildcheck: theRequire build, unit tests, and Compose UI testsgate of run 45396445003, which was cancelled and superseded by run 45396542193 on the same head (build-and-test, lint and detekt green there, Compose UI tests still running).
Merge confidence: 5/5, a docs change no test applies to, its references checked against the code.
Reviewer model: claude-opus-5-5
Reasoning effort: Unknown (the reviewing session's run metadata does not report an effort setting)
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: full PR diff against its merge base, at 4a7d080.
No new actionable code findings.
All technical claims, Gradle/build-config flags, ports, UI navigation paths, and plugin registration entries in the new spark-regtest plugin and README.md match the pinned Android source (app/build.gradle.kts, Env.kt, LightningService.kt, SparkService.kt, SparkRepo.kt, SparkExitRepo.kt, ContentView.kt, scripts/spark-regtest-esplora.py, scripts/spark-regtest-fund.py, and .claude/install-plugins.sh), synonymdev/bitkit-docker main at ad995c1, and synonymdev/bitkit-e2e-tests main at 991bbfb.
Compared against twin synonymdev/bitkit-ios#1403 at 9321951: both skills stay aligned on shared Spark regtest behaviour while accurately reflecting platform differences (Android's ESPLORA_URL proxy support, Android disabling Transfer to Spending and Savings-paid exit fees on the local stack via Env.sparkSharesNodeChain versus iOS enabling both via Env.sharesLocalSparkChain, and each repository's skill/plugin layout).
Validation and limitations: verified git diff --check (clean) and JSON syntax of .claude/plugins/.claude-plugin/marketplace.json and .claude/plugins/spark-regtest/.claude-plugin/plugin.json locally; claude CLI is unavailable in this environment, so claude plugin validate .claude/plugins was not independently re-run (the author reports it passed). On CI for 4a7d080, compose-ui / ui-tests in run 45396542193 was still in progress at inspection time. No open or unresolved prior review threads exist on the PR.
Device testing: not performed in this review (no runtime app code changed; documentation and Claude Code plugin files only).
Reviewer model: gemini-4-neon
Reasoning effort: high
There was a problem hiding this comment.
Verdict: ✅ Approve
Findings:
- LOW
.claude/plugins/spark-regtest/skills/spark-regtest/SKILL.md:60— A savedESPLORA_URLkeeps Savings on the hosted proxy when switching Spark to the local fixture. Clear the override in the local build command. Chain source selection - LOW
.claude/plugins/spark-regtest/skills/spark-regtest/SKILL.md:62—./spark paytakes a BOLT11 invoice. Spell out which funding command takes the deposit address. Fixture commands - LOW
.claude/plugins/spark-regtest/skills/spark-regtest/SKILL.md:19— The hosted recipe stops at funding. Add the Spending invoice step for the two-device payment in Part B. Docs scope, prior device evidence
QA for 4a7d080:
Install the Spark regtest plugin from the repository ✅ The installer enabled the plugin and copied the skill into Claude Code's plugin cache.
Ran ./.claude/install-plugins.sh in a fresh Claude Code profile, verified the enabled plugin with claude plugin list --json, and compared the installed skill with the PR file.
git diff --check passed. claude plugin validate .claude/plugins passed with metadata and README advice. CI for 4a7d080 also passed.
Device testing was skipped because the diff only changes the plugin and documentation. The full review from 2c70a74 to 4a7d080 covered registration, build flags, fixture ports, funding commands, and both Spark backends. The hosted and local wallet flows were checked against the source and the existing Android QA review.
Twin synonymdev/bitkit-ios#1403 matches the backend guidance and shares the missing hosted payment step. Its local build enables Transfer to Spending and Savings-paid exit fees when its Spark and Electrum endpoints match the fixture.
Reviewed by gpt-6.2-sol-high
Pull request was converted to draft
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: changes since 4a7d080, including affected code paths and prior findings, at 4dce3c3. Baseline: QA review.
1 actionable finding — resolve or provide an evidence-backed rebuttal.
The new local-stack note tells an existing dev install to tap Reset To Default. That control fills the Electrum form. Connect To Host is what saves the server, so Savings stays on the previously saved server until that second tap. Uninstall still clears it.
The three threads on the earlier review are resolved, and the fixes hold at this head. An empty ESPLORA_URL overrides a saved Gradle property and local.properties under Gradle 9.9.0, including on a warm daemon. ./spark send <address> <sats> and ./spark pay <invoice> [sats] match bitkit-docker spark at ad995c1. Hosted step 5 matches Receive › Spending and a regtest Spark Lightning payment.
Compared the changed guidance with bitkit-ios#1403 at e2d7e1d, only for this skill. That is not a review of the iOS pull request. On iOS, Reset To Default connects and saves. On Android, Reset To Default fills the form and Connect To Host saves.
Device testing: not performed in this review. This delta is the skill text.
Suggested additional test cases:
- Android, an existing dev install that already opened a non-E2E dev build, then the local
./sparkbuild from the skill. Open Settings › Advanced › Electrum Server and tap Reset To Default. The connected server stays the previous one. Tap Connect To Host and it becomesE2E_LOCAL_HOST:60001.
Findings
- [LOW] Tell the local-stack steps to tap Connect To Host — inline at
.claude/plugins/spark-regtest/skills/spark-regtest/SKILL.md:66.
Reviewer model: grok-4.7
Reasoning effort: xhigh
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: changes since 4dce3c33, including affected code paths, at 51b4a95. Baseline: previous QA review.
No new actionable code findings.
The new sentence matches the app: Reset To Default fills host, port, and protocol from Env.electrumServerUrl (tcp://<E2E_LOCAL_HOST>:60001 on a local E2E regtest build) and leaves the saved server in place. Connect To Host is enabled when that form differs from the saved server, and a successful restart persists the URL. On bitkit-ios#1403 at e2d7e1d0, Reset To Default connects immediately, and that skill still stops at Reset. Only this Electrum step was compared, not a full review of the twin.
Inherited from the baseline: plugin registration, the hosted-regtest steps, the unchanged local-stack guidance, and the unchanged remainder of the previous skill follow-up (sibling checkout, two-device payment, the local build line, uninstall, and ./spark arguments). Device testing: not performed in this review. The follow-up is documentation only; git diff --check on the delta reported no whitespace errors. No app runtime check is needed for this wording, which is fixed by the current Electrum screen and restart path.
Earlier findings reconciled at this revision: 1 verified fixed.
Reviewer model: grok-4.7
Reasoning effort: xhigh
There was a problem hiding this comment.
Verdict: ✅ Approve
Findings:
- LOW
.claude/plugins/spark-regtest/skills/spark-regtest/SKILL.md:58— From a nested worktree, the documented command can invoke Gradle with an empty Spark config and produce a build that cannot connect to the local Spark fixture. Resolve the bitkit-docker path and check config generation before invoking Gradle. Local Spark configuration check
QA for 51b4a95:
Install the Spark regtest plugin from the repository ✅ The installer enabled the plugin and copied the updated skill byte for byte.
Ran the repository installer in an isolated Claude Code profile, checked the enabled plugin entry, and compared the installed skill with the PR file. Marketplace validation passed with metadata warnings.
git diff --check passed. The delta from 4a7d080 to 51b4a95 and four prior fixes were reviewed. Device runs were skipped because the app is unchanged and the PR lists no device cases. Electrum persistence was checked against source. The hosted payment guidance also matches the earlier two-device result in synonymdev/bitkit-android#1697. Electrum QA review
Twin synonymdev/bitkit-ios#1403 matches the hosted payment and fixture funding guidance. Its Reset To Default action connects and saves in one step.
Reviewed by gpt-6.2-sol-high
Pull request was converted to draft
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: changes since 51b4a95, including affected code paths and prior findings, at 9f9197b. Baseline: previous QA review.
No new actionable code findings.
No new actionable code findings in the follow-up.
The local-stack build line now saves spark config --base64 into CFG and runs Gradle only if that succeeds. A bash 5.1 probe confirmed the old behavior: the inline form ran the command with an empty value and exit status 0. The new form stops with the substitution's exit status. zsh was not available here, so it was not probed; the author reports the same result in zsh. At bitkit-docker ad995c1, ./spark config exits 1 when its config file is missing, so the guard triggers there. A wrong script path also stops the build. The new note's explanation also matches the app: an empty config plus a chain URL makes LocalSparkSettings.isComplete false, so configureLocalSpark throws (SparkService.kt L103-L110). One small point: the config file stays in place after ./spark down until ./spark reset, so "stack not up" is approximate, but the guard still stops the build in the cases that matter.
The twin bitkit-ios#1403 at 39466ad has the same CFG=… && guard. Only this build line was compared, not a full review of the twin.
Prior concerns at this revision: the ovi-reviewer thread asking to stop the build when config generation fails is fixed and verified at this head. Its main-checkout-sibling advice was already in the skill. The earlier QA finding about tapping Connect To Host after Reset To Default stays fixed; that text did not change in the delta.
Inherited from the baseline: the Electrum Reset/Connect wording, plugin registration, the hosted-regtest steps, the unchanged local-stack guidance, and the unchanged remainder of the earlier skill follow-up, except the build line, which was reassessed here. git diff --check on the delta reported no errors. Device testing: not performed in this review. This is a docs-only change, and the app is unchanged, so no runtime check is needed.
Reviewer model: claude-opus-5-5
Reasoning effort: high
There was a problem hiding this comment.
Verdict: ✅ Approve
Findings:
- LOW
.claude/plugins/spark-regtest/skills/spark-regtest/SKILL.md:58— The guard skips Gradle when config generation fails, but the full block still runsadb reverse. If the last mapping succeeds, the block returns 0 without building an APK. An agent can then proceed with a stale build. Run the port-forwarding loop only after Gradle succeeds.
QA for 9f9197b:
Stop the local Spark build when config generation fails ✅ Gradle was skipped when the fixture path or generated config was missing.
Ran the build lines in Bash and zsh with the fixture's spark config command and a Gradle stub. With the config present, Gradle received the expected local settings. In a separate probe of the complete block, successful adb reverse stubs masked the failure exit status described above. Earlier QA review of the build guard
Install the Spark regtest plugin from the repository ✅ The installer enabled the plugin and installed the updated skill byte for byte.
Ran the repository installer in an isolated Claude Code profile and compared the installed skill with the PR file. Marketplace validation passed with metadata warnings.
git diff --check passed. Device testing was skipped because the PR changes only the plugin and documentation and lists no device cases. The delta from 51b4a95 to 9f9197b covers the local build recipe and fixes the earlier incomplete-config build. Prior finding
Twin synonymdev/bitkit-ios#1403 uses the same config guard and also gates simulator installation on a successful build.
Reviewed by gpt-6.2-sol-high
piotr-iohk
left a comment
There was a problem hiding this comment.
Reviewed the updated Spark regtest guide at 9f9197b1. All required checks passed. I verified with stub commands that a missing config skips Gradle. The open recipe thread covers the remaining edge case: the port-forwarding loop still runs and can return success without building an APK.
Nonblocking wording suggestion: replace “ask the user” with “Ask the developer to set SPARK_REGTEST_MNEMONIC locally, or use the web faucet. Keep the mnemonic out of chat.”
Pull request was converted to draft
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@piotr-iohk Applied your wording suggestion in 0a740d9 (and bitkit-ios#1403 in 34011269a): "The mnemonic is a GitHub secret. Ask the developer to set it locally, or use the web faucet. Keep it out of chat." |
[Low impact] The documentation and plugin registration appear safe to merge. SummaryAdds the
Reviews (1) · Last reviewed commit: "docs: stop the local spark build when sp..." · Reviewed by Greptile |
There was a problem hiding this comment.
Verdict: ✅ Approve
Findings:
- LOW
.claude/plugins/spark-regtest/skills/spark-regtest/SKILL.md:58— The added unqualifiedspark upresets a previously configured LAN host to loopback. Following the LAN-phone instructions and then this build recipe regenerates operator and SSP URLs pointing at the phone itself. KeepSPARK_PUBLIC_HOSTset for the chained startup. Verified by running the fixture's real initialization script twice against the same isolated config directory. Compose host default, config generation
QA for 6e84867:
Stop before stale config after fixture startup fails ✅ Both Bash and zsh skipped config generation, Gradle, and port forwarding.
Replayed the recipe at 6e84867 with the real spark helper and a failing Docker stub, leaving an old config file present. Both shells preserved exit 23.
Stop before Gradle when config generation fails ✅ Both shells preserved failure and skipped Gradle and port forwarding.
With startup stubbed successful, the guarded config command returned early: the real config command returned 1 for a missing config file. A missing fixture path returned 127. Neither path invoked Gradle or adb.
Skip port forwarding when Gradle fails ✅ Both shells returned the build failure without calling adb.
A Gradle stub returned 31; the complete recipe returned 31 and made no port-forwarding calls. This confirms the prior finding is fixed.
Pass local settings and forward ports after a successful build ✅ Both shells passed the documented settings and then forwarded all six ports.
Replaying the build and port mappings, a successful Gradle stub received assembleDevDebug, the generated synthetic config, blank ESPLORA_URL, E2E=true, E2E_BACKEND=local, and the chain URL. The adb stub then received the six documented mappings in order. These are command-level probes; no APK was built or installed.
git diff --check passed. Marketplace validation passed with existing metadata warnings. The unchanged plugin installation mechanism is covered by the previous review.
Reviewed the delta 9f9197b..6e84867 and the prior port-forwarding finding. The mnemonic guidance matches the funding script's environment input. Device testing and an app build were skipped: this is documentation-only, the app is unchanged, and the PR lists no device cases. The shell probes do not verify live fixture readiness or wallet flows.
Twin synonymdev/bitkit-ios#1403 at 3401126 matches the startup/build failure guards and revised mnemonic guidance; only those skill sections were compared.
Reviewed by gpt-6.1-sol-high
| it, the build silently stays on the hosted regtest. | ||
|
|
||
| ```bash | ||
| ../bitkit-docker/spark up && \ |
There was a problem hiding this comment.
LOW: Preserve the public host on the chained Spark startup.
The LAN-phone instructions below start the fixture with SPARK_PUBLIC_HOST=<LAN IP> ./spark up, then apply LAN overrides to the build. That inline variable is gone when this newly added, unqualified spark up runs. Compose defaults PUBLIC_HOST to 127.0.0.1, and its init script rewrites the existing operator and SSP URLs, so the resulting phone build points Spark at the phone's own loopback. I reproduced that rewrite with the fixture's real init script. Export SPARK_PUBLIC_HOST for the whole recipe, or tell the LAN instructions to set it on this chained startup. Compose default, config generation.
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: changes since 9f9197b, including affected code paths and prior findings, at 6e84867. Baseline: QA review.
1 actionable finding — resolve or provide an evidence-backed rebuttal.
The local build block now starts with an unqualified spark up. After the LAN steps set SPARK_PUBLIC_HOST, that second startup rewrites operator and SSP URLs to 127.0.0.1 before Gradle bakes the config in.
The port-forwarding thread (discussion) is fixed at this head. In bash 5.2.21, dash, and zsh 5.9, a failed spark up, spark config, or Gradle skips adb reverse and keeps the failing status. The hosted mnemonic line now says to set the secret locally or use the web faucet and to keep it out of chat. scripts/spark-regtest-fund.py reads SPARK_REGTEST_MNEMONIC from the environment and does not print it. On bitkit-ios#1403 at 3401126, only the startup guard and mnemonic wording were compared, not a full review. That skill uses the same guard and has no LAN public-host step.
git diff --check on the delta was clean. Device testing was not performed. The app is unchanged. Docker was not run; the rewrite follows init.sh and Compose's up contract, and a probe of the same URL builder showed a LAN host replaced by 127.0.0.1. No open issue matched this mechanism.
Suggested additional test cases:
- Android, local
./sparkstack already started withSPARK_PUBLIC_HOST=<LAN IP> ./spark up. Run the skill block's unqualified../bitkit-docker/spark up, then../bitkit-docker/spark config. Operator and SSP URLs should still use the LAN IP.
Findings
- [MEDIUM] Pass the LAN host into the chained spark up — inline at
.claude/plugins/spark-regtest/skills/spark-regtest/SKILL.md:58.
Reviewer model: grok-4.7
Reasoning effort: xhigh
| it, the build silently stays on the hosted regtest. | ||
|
|
||
| ```bash | ||
| ../bitkit-docker/spark up && \ |
There was a problem hiding this comment.
[MEDIUM] Pass the LAN host into the chained spark up
After the LAN phone steps start the fixture with SPARK_PUBLIC_HOST=<LAN IP> ./spark up, running the local build block rewrites that host to loopback and bakes it into the app.
The LAN note (SKILL.md:78-80) sets SPARK_PUBLIC_HOST only on that one ./spark up, then says to build with the LAN IP in E2E_LOCAL_HOST and SPARK_LOCAL_CHAIN_URL. The build block now begins with an unqualified ../bitkit-docker/spark up (SKILL.md:58). The prefix does not carry into that later command. spark runs docker compose --profile spark up -d with no --no-recreate (spark:9 and spark:75 at bitkit-docker ad995c1a07567cd06139cbacbbad73e458527fdd). Root docker-compose.yml includes spark-regtest/compose.yml, where spark-init sets PUBLIC_HOST from ${SPARK_PUBLIC_HOST:-127.0.0.1} (compose.yml:105). Compose recreates a service when that configuration changes. init.sh:102-106 and init.sh:137-139 write spark-config.json on every run, with operator URLs http://$PUBLIC_HOST:23535 (and 23536, 23537) and the SSP at http://$PUBLIC_HOST:23049. The next line of the block reads that file into SPARK_LOCAL_CONFIG_B64, and SparkService.configureLocalSpark passes it to the SDK as sparkConfig (SparkService.kt:107).
A phone on the LAN then dials the operators and the SSP at its own loopback, so Spark does not connect. Starting again with SPARK_PUBLIC_HOST set and rebuilding restores the URLs.
The chained spark up should receive the same SPARK_PUBLIC_HOST, or the LAN steps should say to set it on that command.
Evidence basis: source analysis of the skill, spark, the Compose include, and init.sh at ad995c1a07567cd06139cbacbbad73e458527fdd. A bash/jq probe of the same URL construction wrote http://192.168.1.50:23535, :23536, :23537, and SSP http://192.168.1.50:23049, then http://127.0.0.1 for those ports when the host was 127.0.0.1. Docker's compose up documentation says existing containers are recreated when the service configuration changes. This review did not run the Docker daemon. The same mechanism is in discussion. No matching GitHub issue was found.
Twin: synonymdev/bitkit-ios#1403
Related: #1814, synonymdev/bitkit-docker#42
Description
spark-regtestplugin and skill (docs: update docs and agent skills for the Blocktank sunset and Spark #1814, Part B). It covers only what a reader can't get from the docs and script headers: which Spark regtest to pick, that neither shares a chain with Blocktank's staging regtest, the build settings and ports, theE2E=truegate on the local stack, funding, and mining with./spark. Details are left tobitkit-docker/docs/spark-regtest.mdand the headers ofscripts/spark-regtest-esplora.pyandscripts/spark-regtest-fund.py.marketplace.jsonand both README plugin lists.Out of Scope
docs/spark.md, the emergency exit doc and theAGENTS.md,docs/transfer.mdanddocs/receive-liquidity.mdrewrites (docs: update docs and agent skills for the Blocktank sunset and Spark #1814, Part B).Env.sparkSharesNodeChainis false whenever local Spark settings are set). iOS allows both when its URLs match the fixture (Env.sharesLocalSparkChain). The skill documents Android's behaviour. Whether Android should match iOS is a code question for a separate PR.docs/spark-regtest.mdleaves outE2E=truefrom the Android build line, and on iOS it suggestsSIMCTL_CHILD_launch variables, which don't work. The skill is correct on both, but the doc itself is unchanged here.Design
N/A — no UI changes.
Preview
N/A
QA Notes
Setup
N/A — documentation only.
Journeys
N/A — no user-visible behaviour change.
Manual Tests
N/A
Automated Checks
N/A
Evidence
claude plugin validate .claude/pluginspasses. Its only warning is the missing/plugin installline, whichblocktank-apialso lacks.An independent review checked each claim against the sources. These findings are fixed in 4a7d080:
E2E=true;ESPLORA_URLsources;I checked each claim against
origin/masterat 2c70a74 and its siblings:ESPLORA_URL,SPARK_LOCAL_CONFIG_B64,SPARK_LOCAL_CHAIN_URLandBREEZ_API_KEYinapp/build.gradle.kts;Env.localSparkSettings;maindocs/spark-regtest.md;mainREADME.mdandscripts/run-spark-e2e.sh.Round 2 (4dce3c3), from ovi-reviewer's comments and an independent review:
ESPLORA_URLand setsE2E_BACKEND=local;./sparkfunding command takes;./sparkruns.Proof for the
ESPLORA_URLfix: with-PESPLORA_URL=http://saved:3999,generateDevDebugBuildConfigwritesESPLORA_URL = "http://saved:3999". WithESPLORA_URL=added, it writes"".Round 3 (51b4a95), from piotr-iohk's QA review: on Android, Reset To Default only fills the Electrum form. The skill now says to tap Connect To Host after it. iOS connects on reset, so the twin is unchanged.
Gaps
Models used
Claude Opus 5.5(reasoning:Not exposed)Claude Opus 5.5(reasoning:Not exposed)Claude Opus 5.5(reasoning:Not exposed)🤖 Generated with Claude Code