feat: use arkade-regtest for regtest environment#492
Conversation
Replace custom test infrastructure with shared arkade-regtest submodule. start-env.sh handles the full stack: nigiri, custom arkd v0.9.1, boltz, LND, fulmine, wallet creation, and funding. - Add regtest/ submodule with arkade-regtest - Add .env.regtest for wallet-specific overrides (v0.9.1, session=10) - Add docker-compose.nak.yml for nostr relay (wallet-specific) - Simplify setup.mjs to verification-only (infra handled by start-env.sh) - Update playwright.yml to use submodule + setup-go for nigiri build - Remove old test.docker-compose.yml, Dockerfiles, cors config
Deploying wallet-mutinynet with
|
| Latest commit: |
1d502cf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b861268c.arkade-wallet.pages.dev |
| Branch Preview URL: | https://feat-use-arkade-regtest.arkade-wallet.pages.dev |
🔍 Arkana PR Review —
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughMoves regtest orchestration into an external submodule and shell scripts, adds Changes
Sequence Diagram(s)sequenceDiagram
participant GHA as "GitHub Actions"
participant Repo as "Repository + Submodule"
participant Scripts as "regtest/*.sh"
participant Compose as "Docker Compose (docker-compose.nak.yml)"
participant Services as "Regtest Services (arkd, boltz, nostr, nak)"
participant Verify as "pnpm regtest:setup (healthchecks)"
participant Tests as "Playwright Tests"
GHA->>Repo: checkout with submodules
GHA->>GHA: install Go 1.23 & cache builds
GHA->>Scripts: chmod +x regtest/*.sh
GHA->>Scripts: ./regtest/start-env.sh
Scripts->>Services: initialize regtest environment (submodule-managed)
GHA->>Compose: docker compose -f docker-compose.nak.yml up -d --build (nak)
GHA->>Verify: pnpm regtest:setup (curl health endpoints)
Verify->>Services: curl /v1/info, boltz endpoints, nostr
Services-->>Verify: readiness responses
GHA->>Tests: run Playwright tests
Tests-->>GHA: results
alt Failure
GHA->>Services: docker compose logs capture (selected services)
end
GHA->>Scripts: ./regtest/clean-env.sh
GHA->>Compose: docker compose -f docker-compose.nak.yml down -v
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (3)
src/test/setup.mjs (2)
7-18:execCommandfunction appears to be unused.This function is defined but the code uses
execSyncdirectly at line 46. Consider removing this dead code, or refactoring line 46 to useexecCommandfor consistency.#!/bin/bash # Verify execCommand usage in this file echo "=== Searching for execCommand usage ===" rg -n 'execCommand' src/test/setup.mjs🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/test/setup.mjs` around lines 7 - 18, The execCommand function is defined but unused; either remove execCommand() entirely or replace the direct execSync(...) call that appears elsewhere with execCommand(...) to centralize error handling; locate the unused function named execCommand and the direct call to execSync and either delete execCommand (if you prefer direct calls) or refactor the execSync invocation to call execCommand(command, silent) so the special-case "wallet already initialized" handling is applied consistently.
46-47: Consider usingexecCommandor add error handling for the JSON parse.Line 46 uses
execSyncdirectly instead ofexecCommand. If the curl fails or returns invalid JSON, this will throw an unhandled exception. Either useexecCommandwithsilent=trueor wrap in try-catch.Proposed improvement
- const serverInfo = JSON.parse(execSync('curl -s http://localhost:7070/v1/info').toString()) + const serverInfo = JSON.parse(execCommand('curl -s http://localhost:7070/v1/info', true)) console.log(`\narkd Public Key: ${serverInfo.signerPubkey}`)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/test/setup.mjs` around lines 46 - 47, Replace the direct use of execSync + JSON.parse with a safe approach: either call execCommand('curl -s http://localhost:7070/v1/info', { silent: true }) and handle its stdout, or wrap the execSync + JSON.parse block in a try-catch around JSON.parse and the exec call to handle non-JSON or failed curl responses; ensure you check for empty stdout before JSON.parse, log or throw a descriptive error referencing serverInfo/console.log usage, and keep references to execSync/execCommand and serverInfo so the change is easy to locate..gitmodules (1)
1-4: Submodule points to a feature branch; update to a stable branch once the feature is complete.The
feat/shared-regtest-env-discoverybranch exists and currently works, but relying on a feature branch for a submodule reference can break if the branch is deleted after the feature is merged. Consider updating tomasteronce the feature stabilizes.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.gitmodules around lines 1 - 4, The .gitmodules entry for submodule "regtest" currently pins branch = feat/shared-regtest-env-discovery which is a feature branch; update the submodule configuration to point to a stable branch (e.g., change branch = feat/shared-regtest-env-discovery to branch = master or main) once the feature is merged and stable, and ensure the submodule commit is updated (git submodule sync && git submodule update --remote regtest or update the submodule to the correct commit) so the "regtest" submodule no longer tracks the feature branch.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/playwright.yml:
- Around line 19-22: Update the Playwright workflow cache key so it includes the
regtest submodule revision to invalidate caches when the submodule changes:
modify the actions/cache key (the existing nigiri-${{
hashFiles('regtest/.env.defaults', '.env.regtest') }} value) to append a
submodule identifier — e.g., add the .gitmodules file hash or the current commit
SHA — so the cache key becomes the original env hash plus either
hashFiles('.gitmodules') or github.sha to ensure regtest updates bust the cache.
In `@package.json`:
- Line 52: The package.json "regtest:clean" script currently chains
"./regtest/clean-env.sh && docker compose -f docker-compose.nak.yml down -v" so
the Docker teardown is skipped if clean-env.sh fails; change the order to run
the Docker compose teardown first (docker compose -f docker-compose.nak.yml down
-v) with best-effort error handling (so it won't stop on non-zero exit), then
run "./regtest/clean-env.sh" afterward; update the "regtest:clean" npm script
accordingly so the teardown always attempts to run even when clean-env.sh fails.
- Line 51: The regtest:stop npm script references a non-existent script
regtest/stop-env.sh; update the package.json "regtest:stop" entry to call the
existing teardown script (the regtest:clean target which runs
regtest/clean-env.sh and brings down Docker) or add a new regtest/stop-env.sh
that performs the same teardown; specifically, modify the "regtest:stop" script
string to invoke the working regtest:clean command (or create the missing
regtest/stop-env.sh in the submodule) so pnpm regtest:stop no longer fails due
to a missing file.
In `@src/test/setup.mjs`:
- Around line 11-13: The catch block checks error.stderr.includes but stderr may
be a Buffer or undefined; update the condition to coerce/convert stderr to a
string and guard for undefined (e.g., use error.stderr?.toString() or
String(error.stderr)) before calling includes so the check in the catch (the
wallet already initialized branch) won't throw or silently fail; locate the
catch handling the variable error and change the stderr check accordingly.
---
Nitpick comments:
In @.gitmodules:
- Around line 1-4: The .gitmodules entry for submodule "regtest" currently pins
branch = feat/shared-regtest-env-discovery which is a feature branch; update the
submodule configuration to point to a stable branch (e.g., change branch =
feat/shared-regtest-env-discovery to branch = master or main) once the feature
is merged and stable, and ensure the submodule commit is updated (git submodule
sync && git submodule update --remote regtest or update the submodule to the
correct commit) so the "regtest" submodule no longer tracks the feature branch.
In `@src/test/setup.mjs`:
- Around line 7-18: The execCommand function is defined but unused; either
remove execCommand() entirely or replace the direct execSync(...) call that
appears elsewhere with execCommand(...) to centralize error handling; locate the
unused function named execCommand and the direct call to execSync and either
delete execCommand (if you prefer direct calls) or refactor the execSync
invocation to call execCommand(command, silent) so the special-case "wallet
already initialized" handling is applied consistently.
- Around line 46-47: Replace the direct use of execSync + JSON.parse with a safe
approach: either call execCommand('curl -s http://localhost:7070/v1/info', {
silent: true }) and handle its stdout, or wrap the execSync + JSON.parse block
in a try-catch around JSON.parse and the exec call to handle non-JSON or failed
curl responses; ensure you check for empty stdout before JSON.parse, log or
throw a descriptive error referencing serverInfo/console.log usage, and keep
references to execSync/execCommand and serverInfo so the change is easy to
locate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c31b5dcd-65d4-4392-9abd-85db6162d697
📒 Files selected for processing (12)
.env.regtest.github/workflows/playwright.yml.gitmodulesarkd.Dockerfilearkdwallet.Dockerfilecors.Dockerfilecors.nginx.confdocker-compose.nak.ymlpackage.jsonregtestsrc/test/setup.mjstest.docker-compose.yml
💤 Files with no reviewable changes (5)
- arkd.Dockerfile
- test.docker-compose.yml
- arkdwallet.Dockerfile
- cors.nginx.conf
- cors.Dockerfile
| - uses: actions/cache@v4 | ||
| with: | ||
| path: regtest/_build | ||
| key: nigiri-${{ hashFiles('regtest/.env.defaults', '.env.regtest') }} |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
echo "regtest submodule ref:"
git ls-tree HEAD regtest
echo
echo "Workflow cache stanza:"
sed -n '19,22p' .github/workflows/playwright.ymlRepository: arkade-os/wallet
Length of output: 317
🏁 Script executed:
find . -name "start-env.sh" -o -name "clean-env.sh" | head -20Repository: arkade-os/wallet
Length of output: 42
🏁 Script executed:
cat -n .github/workflows/playwright.ymlRepository: arkade-os/wallet
Length of output: 2258
🏁 Script executed:
# Check if regtest/_build is mentioned anywhere in the codebase
rg "regtest/_build" --type yaml --type shRepository: arkade-os/wallet
Length of output: 42
🏁 Script executed:
# Check if regtest directory exists and what's in it
ls -la regtest/ 2>/dev/null | head -20Repository: arkade-os/wallet
Length of output: 170
🏁 Script executed:
# Look for start-env.sh specifically in regtest
find regtest -name "*.sh" -type f 2>/dev/null | head -20Repository: arkade-os/wallet
Length of output: 42
🏁 Script executed:
# Check if regtest is a submodule or a regular directory
git config --file=.gitmodules --get-regexp "^submodule\.regtest"Repository: arkade-os/wallet
Length of output: 219
🏁 Script executed:
# Check what git ls-tree shows for regtest subdirectories
git ls-tree -r HEAD regtest | head -30Repository: arkade-os/wallet
Length of output: 122
🏁 Script executed:
# Check .gitmodules to see submodule configuration
cat .gitmodulesRepository: arkade-os/wallet
Length of output: 196
🏁 Script executed:
# Look for any documentation or comments in the workflow about submodule handling
head -n 40 .github/workflows/playwright.ymlRepository: arkade-os/wallet
Length of output: 1259
🏁 Script executed:
# Check if there are other workflows that handle submodule caching differently
find .github/workflows -name "*.yml" -o -name "*.yaml" | xargs grep -l "cache" 2>/dev/nullRepository: arkade-os/wallet
Length of output: 117
🏁 Script executed:
# Check the ci.yml workflow for cache patterns
cat .github/workflows/ci.ymlRepository: arkade-os/wallet
Length of output: 1021
🏁 Script executed:
# Since regtest is a submodule and it's checked out, let's verify the concern:
# The cache key does NOT include the submodule commit hash.
# Let's check if there's any documentation about this in the repo
find . -name "README*" -o -name "CONTRIBUTING*" | xargs grep -l "cache\|submodule" 2>/dev/null || echo "No matches in docs"Repository: arkade-os/wallet
Length of output: 1565
🏁 Script executed:
# Check if there are any recent commits that mention cache invalidation or submodule
git log --oneline --all -n 20 2>/dev/null | head -20Repository: arkade-os/wallet
Length of output: 1370
Include the submodule commit hash in the cache key to ensure invalidation when regtest is updated.
The cache key at lines 19-22 hashes only .env files but ignores the regtest submodule revision. When the submodule is bumped, the cache key remains unchanged, causing old build artifacts to be reused with new source code. This can lead to CI testing against stale artifacts, invalidating test results.
Add the submodule commit to the cache key:
key: nigiri-${{ hashFiles('regtest/.env.defaults', '.env.regtest') }}-${{ hashFiles('.gitmodules') }}or use git commit tracking:
key: nigiri-${{ hashFiles('regtest/.env.defaults', '.env.regtest') }}-${{ github.sha }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/playwright.yml around lines 19 - 22, Update the Playwright
workflow cache key so it includes the regtest submodule revision to invalidate
caches when the submodule changes: modify the actions/cache key (the existing
nigiri-${{ hashFiles('regtest/.env.defaults', '.env.regtest') }} value) to
append a submodule identifier — e.g., add the .gitmodules file hash or the
current commit SHA — so the cache key becomes the original env hash plus either
hashFiles('.gitmodules') or github.sha to ensure regtest updates bust the cache.
| "regtest:up": "docker compose -f test.docker-compose.yml up arkd arkd-wallet nbxplorer pgnbxplorer -d", | ||
| "regtest:down": "docker compose -f test.docker-compose.yml down -v", | ||
| "regtest:start": "./regtest/start-env.sh && docker compose -f docker-compose.nak.yml up -d", | ||
| "regtest:stop": "./regtest/stop-env.sh && docker compose -f docker-compose.nak.yml down", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
for f in regtest/start-env.sh regtest/stop-env.sh regtest/clean-env.sh; do
if [ -e "$f" ]; then
echo "FOUND $f"
else
echo "MISSING $f"
fi
doneRepository: arkade-os/wallet
Length of output: 145
🏁 Script executed:
# Check if regtest is a git submodule and its configuration
cat .gitmodules 2>/dev/null || echo "No .gitmodules file"
echo "---"
git ls-files --stage | grep regtest || echo "No regtest in git index"
echo "---"
# Check what's actually in the regtest directory
ls -la regtest/ 2>/dev/null || echo "regtest directory not found"Repository: arkade-os/wallet
Length of output: 508
🏁 Script executed:
# Check the CI workflow to see what it actually does
find .github/workflows -name "*.yml" -o -name "*.yaml" | head -5Repository: arkade-os/wallet
Length of output: 117
🏁 Script executed:
# Check the package.json scripts around lines 50-52
sed -n '48,55p' package.jsonRepository: arkade-os/wallet
Length of output: 516
🏁 Script executed:
# Check the CI workflow for submodule handling
cat .github/workflows/playwright.yml | head -50Repository: arkade-os/wallet
Length of output: 1559
🏁 Script executed:
# Check the main CI workflow
cat .github/workflows/ci.yml | head -50Repository: arkade-os/wallet
Length of output: 1021
🏁 Script executed:
# Get information about what's in the regtest submodule without cloning
git config --file .gitmodules --get submodule.regtest.urlRepository: arkade-os/wallet
Length of output: 107
🌐 Web query:
arkade-regtest repository github ArkLabsHQ scripts start-env.sh stop-env.sh clean-env.sh
💡 Result:
No public GitHub repository named "arkade-regtest" under ArkLabsHQ or arkade-os was found containing scripts start-env.sh, stop-env.sh, or clean-env.sh. ArkLabsHQ maintains Ark protocol repositories like introspector, fulmine, arkadian (which lists arkade-os repos including arkd, go-sdk), but no regtest-specific repo matches. arkade-os has repos like arkd (protocol server), go-sdk. Older ARK Core (unrelated) has e2e testing with docker scripts, but archived. These env.sh scripts are typical for local dev environments (e.g., Bitcoin regtest), likely private/internal for Ark protocol testing.
Citations:
- 1: https://github.com/ArkLabsHQ
- 2: https://github.com/ArkLabsHQ/arkadian
- 3: https://github.com/arkade-os/go-sdk
- 4: https://github.com/arkade-os
- 5: https://github.com/orgs/arkade-os/packages?repo_name=arkd
🏁 Script executed:
# Check if there are any other cleanup steps in the playwright workflow
cat .github/workflows/playwright.yml | tail -20Repository: arkade-os/wallet
Length of output: 753
🏁 Script executed:
# Check if stop-env.sh is referenced anywhere else in the codebase
rg "stop-env" --type sh --type js --type jsonRepository: arkade-os/wallet
Length of output: 166
🏁 Script executed:
# Check if there are any other scripts in the regtest directory pattern
rg "regtest.*\\.sh" package.jsonRepository: arkade-os/wallet
Length of output: 349
regtest:stop references a missing script.
The submodule contains start-env.sh and clean-env.sh (both verified in CI), but regtest/stop-env.sh does not exist. This makes pnpm regtest:stop fail immediately. Either add the missing script to the submodule or replace this command with the existing regtest:clean target, which properly tears down both the regtest environment and Docker containers.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@package.json` at line 51, The regtest:stop npm script references a
non-existent script regtest/stop-env.sh; update the package.json "regtest:stop"
entry to call the existing teardown script (the regtest:clean target which runs
regtest/clean-env.sh and brings down Docker) or add a new regtest/stop-env.sh
that performs the same teardown; specifically, modify the "regtest:stop" script
string to invoke the working regtest:clean command (or create the missing
regtest/stop-env.sh in the submodule) so pnpm regtest:stop no longer fails due
to a missing file.
| "regtest:down": "docker compose -f test.docker-compose.yml down -v", | ||
| "regtest:start": "./regtest/start-env.sh && docker compose -f docker-compose.nak.yml up -d", | ||
| "regtest:stop": "./regtest/stop-env.sh && docker compose -f docker-compose.nak.yml down", | ||
| "regtest:clean": "./regtest/clean-env.sh && docker compose -f docker-compose.nak.yml down -v", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check package.json around line 52
head -60 package.json | tail -15Repository: arkade-os/wallet
Length of output: 679
🏁 Script executed:
# Check the workflow file referenced in the comment
if [ -f .github/workflows/playwright.yml ]; then
sed -n '50,65p' .github/workflows/playwright.yml
fiRepository: arkade-os/wallet
Length of output: 402
🏁 Script executed:
# Also check if clean-env.sh exists and what it does
if [ -f ./regtest/clean-env.sh ]; then
cat ./regtest/clean-env.sh
fiRepository: arkade-os/wallet
Length of output: 42
Reorder regtest:clean to ensure Docker teardown runs regardless of clean-env.sh success.
The current script uses && chaining, which skips the Docker teardown entirely if clean-env.sh exits non-zero. This leaves the wallet-specific nak overlay running after a partial failure. The safer pattern—already used in .github/workflows/playwright.yml lines 56-59—is to run the Docker teardown first with best-effort error handling, then run the cleanup script:
- "regtest:clean": "./regtest/clean-env.sh && docker compose -f docker-compose.nak.yml down -v",
+ "regtest:clean": "docker compose -f docker-compose.nak.yml down -v 2>/dev/null || true; ./regtest/clean-env.sh",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "regtest:clean": "./regtest/clean-env.sh && docker compose -f docker-compose.nak.yml down -v", | |
| "regtest:clean": "docker compose -f docker-compose.nak.yml down -v 2>/dev/null || true; ./regtest/clean-env.sh", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@package.json` at line 52, The package.json "regtest:clean" script currently
chains "./regtest/clean-env.sh && docker compose -f docker-compose.nak.yml down
-v" so the Docker teardown is skipped if clean-env.sh fails; change the order to
run the Docker compose teardown first (docker compose -f docker-compose.nak.yml
down -v) with best-effort error handling (so it won't stop on non-zero exit),
then run "./regtest/clean-env.sh" afterward; update the "regtest:clean" npm
script accordingly so the teardown always attempts to run even when clean-env.sh
fails.
| } catch (error) { | ||
| if (error.stderr && error.stderr.toString().includes('wallet already initialized')) { | ||
| console.log('Wallet already initialized, continuing...') |
There was a problem hiding this comment.
Potential type issue: error.stderr may be a Buffer.
error.stderr from execSync errors is typically a Buffer, not a string. Call .toString() before .includes() to avoid silent failures.
Proposed fix
} catch (error) {
- if (error.stderr && error.stderr.toString().includes('wallet already initialized')) {
+ const stderr = error.stderr?.toString() ?? ''
+ if (stderr.includes('wallet already initialized')) {
console.log('Wallet already initialized, continuing...')
return ''
}
throw error
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| } catch (error) { | |
| if (error.stderr && error.stderr.toString().includes('wallet already initialized')) { | |
| console.log('Wallet already initialized, continuing...') | |
| } catch (error) { | |
| const stderr = error.stderr?.toString() ?? '' | |
| if (stderr.includes('wallet already initialized')) { | |
| console.log('Wallet already initialized, continuing...') | |
| return '' | |
| } | |
| throw error | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/test/setup.mjs` around lines 11 - 13, The catch block checks
error.stderr.includes but stderr may be a Buffer or undefined; update the
condition to coerce/convert stderr to a string and guard for undefined (e.g.,
use error.stderr?.toString() or String(error.stderr)) before calling includes so
the check in the catch (the wallet already initialized branch) won't throw or
silently fail; locate the catch handling the variable error and change the
stderr check accordingly.
Deploying wallet-bitcoin with
|
| Latest commit: |
1d502cf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://feeec952.wallet-bitcoin.pages.dev |
| Branch Preview URL: | https://feat-use-arkade-regtest.wallet-bitcoin.pages.dev |
|
Review (iterative — new commit since last review) New commit: Same fix as ts-sdk#386 and boltz-swap#106 — picks up the sequencing fix from arkade-regtest#1 that moves bitcoin Core restart after arkd wallet initialization, preventing nbxplorer ZMQ disconnects. The wallet-specific The nostr relay overlay ( No issues with the new commit. |
🔍 Arkana PR ReviewPR: feat: use arkade-regtest for regtest environment OverviewReplaces wallet's custom test infrastructure (arkd.Dockerfile, arkdwallet.Dockerfile, cors.Dockerfile, test.docker-compose.yml) with the shared ✅ What looks good
📋 Observations
🔒 Security
Cross-repo impactThis is part of a 3-repo coordinated change (wallet#492, boltz-swap#106, ts-sdk#386) all adopting the No blocking issues found. LGTM pending submodule branch stabilization. |
arkd v0.9.1 requires scheduler=gocron when vtxo tree expiry is in seconds. Setting ALLOW_CSV_BLOCK_TYPE=true uses block-based expiry which is compatible with the default block scheduler.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.env.regtest (1)
6-9: Configuration aligns with PR objectives.The environment variables correctly configure arkd v0.9.1 for the regtest environment:
ARKD_ALLOW_CSV_BLOCK_TYPE=trueenables block-based expiry as documented in the commit message.ARKD_SESSION_DURATION=10matches the test plan requirement.ARKD_LOG_LEVEL=6provides detailed logging suitable for testing.Optional: Consider alphabetical ordering.
The linter suggests ordering
ARKD_LOG_LEVELbeforeARKD_SESSION_DURATIONfor consistency, though this is a minor stylistic preference.📝 Optional reordering for consistency
# Match wallet's existing arkd config ARKD_ALLOW_CSV_BLOCK_TYPE=true ARKD_BOARDING_EXIT_DELAY=1024 -ARKD_SESSION_DURATION=10 ARKD_LOG_LEVEL=6 +ARKD_SESSION_DURATION=10🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.env.regtest around lines 6 - 9, Reorder the environment variables for consistency by placing ARKD_LOG_LEVEL before ARKD_SESSION_DURATION in the .env.regtest file; specifically, adjust the sequence of the lines containing ARKD_LOG_LEVEL and ARKD_SESSION_DURATION so the variables appear in alphabetical order (ARKD_ALLOW_CSV_BLOCK_TYPE, ARKD_BOARDING_EXIT_DELAY, ARKD_LOG_LEVEL, ARKD_SESSION_DURATION).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.env.regtest:
- Around line 2-3: The ARKD_IMAGE and ARKD_WALLET_IMAGE entries reference
non-existent tags v0.9.1; update the .env.regtest values for ARKD_IMAGE and
ARKD_WALLET_IMAGE to point to an available tag (e.g., v0.8.7) or ensure the
v0.9.1 images are built and pushed to GHCR before referencing them; change the
values for the ARKD_IMAGE and ARKD_WALLET_IMAGE keys accordingly so the regtest
environment can pull valid images.
---
Nitpick comments:
In @.env.regtest:
- Around line 6-9: Reorder the environment variables for consistency by placing
ARKD_LOG_LEVEL before ARKD_SESSION_DURATION in the .env.regtest file;
specifically, adjust the sequence of the lines containing ARKD_LOG_LEVEL and
ARKD_SESSION_DURATION so the variables appear in alphabetical order
(ARKD_ALLOW_CSV_BLOCK_TYPE, ARKD_BOARDING_EXIT_DELAY, ARKD_LOG_LEVEL,
ARKD_SESSION_DURATION).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 840a203c-907a-4108-a498-98070881de60
📒 Files selected for processing (2)
.env.regtestregtest
✅ Files skipped from review due to trivial changes (1)
- regtest
| ARKD_IMAGE=ghcr.io/arkade-os/arkd:v0.9.1 | ||
| ARKD_WALLET_IMAGE=ghcr.io/arkade-os/arkd-wallet:v0.9.1 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify v0.9.1 Docker images exist in GitHub Container Registry
echo "Checking arkd:v0.9.1 image..."
docker manifest inspect ghcr.io/arkade-os/arkd:v0.9.1 > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "✓ ghcr.io/arkade-os/arkd:v0.9.1 exists"
else
echo "✗ ghcr.io/arkade-os/arkd:v0.9.1 NOT FOUND"
fi
echo "Checking arkd-wallet:v0.9.1 image..."
docker manifest inspect ghcr.io/arkade-os/arkd-wallet:v0.9.1 > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "✓ ghcr.io/arkade-os/arkd-wallet:v0.9.1 exists"
else
echo "✗ ghcr.io/arkade-os/arkd-wallet:v0.9.1 NOT FOUND"
fiRepository: arkade-os/wallet
Length of output: 217
The referenced Docker images v0.9.1 do not exist in GitHub Container Registry.
Both ghcr.io/arkade-os/arkd:v0.9.1 and ghcr.io/arkade-os/arkd-wallet:v0.9.1 are unavailable. The regtest environment will fail to start with these image references. Either ensure these v0.9.1 images are built and pushed to the registry, or use the available v0.8.7 versions if v0.9.1 is not yet released.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.env.regtest around lines 2 - 3, The ARKD_IMAGE and ARKD_WALLET_IMAGE
entries reference non-existent tags v0.9.1; update the .env.regtest values for
ARKD_IMAGE and ARKD_WALLET_IMAGE to point to an available tag (e.g., v0.8.7) or
ensure the v0.9.1 images are built and pushed to GHCR before referencing them;
change the values for the ARKD_IMAGE and ARKD_WALLET_IMAGE keys accordingly so
the regtest environment can pull valid images.
🔍 Arkana Review —
|
🔍 Arkana Review —
|
🔍 Arkana PR ReviewSummary: Migrates the wallet repo from local Dockerfiles/docker-compose to the shared ✅ Positives
|
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.env.regtest (1)
2-3:⚠️ Potential issue | 🟠 MajorVerify
v0.9.1image tags are published before merge.These pinned tags can break regtest startup if not present in GHCR. Please confirm availability (or switch to known published tags).
#!/bin/bash # Read-only verification of GHCR tags used in .env.regtest set -euo pipefail docker manifest inspect ghcr.io/arkade-os/arkd:v0.9.1 >/dev/null \ && echo "OK: ghcr.io/arkade-os/arkd:v0.9.1 exists" \ || echo "MISSING: ghcr.io/arkade-os/arkd:v0.9.1" docker manifest inspect ghcr.io/arkade-os/arkd-wallet:v0.9.1 >/dev/null \ && echo "OK: ghcr.io/arkade-os/arkd-wallet:v0.9.1 exists" \ || echo "MISSING: ghcr.io/arkade-os/arkd-wallet:v0.9.1"Based on learnings:
ghcr.io/arkade-os/arkd:v0.8.7andghcr.io/arkade-os/arkd-wallet:v0.8.7are confirmed available.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.env.regtest around lines 2 - 3, The pinned image tags in .env.regtest (ARKD_IMAGE and ARKD_WALLET_IMAGE set to ghcr.io/arkade-os/arkd:v0.9.1 and ghcr.io/arkade-os/arkd-wallet:v0.9.1) must be verified before merging; either confirm those GHCR tags exist (using a manifest inspect or CI check) or update ARKD_IMAGE and ARKD_WALLET_IMAGE to known-published tags (e.g., v0.8.7) so regtest startup isn’t broken by missing images.
🧹 Nitpick comments (1)
.env.regtest (1)
6-9: Reorder ARKD keys to satisfy dotenv-linter warnings.No runtime impact, but this removes lint noise and keeps env files consistent.
Suggested reorder
-ARKD_SCHEDULER_TYPE=gocron ARKD_BOARDING_EXIT_DELAY=1024 ARKD_SESSION_DURATION=10 ARKD_LOG_LEVEL=6 +ARKD_SCHEDULER_TYPE=gocron🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.env.regtest around lines 6 - 9, Reorder the environment variables in .env.regtest to satisfy dotenv-linter by sorting or grouping the ARKD_* keys consistently (e.g., alphabetically or by related purpose); specifically reorder the lines ARKD_BOARDING_EXIT_DELAY, ARKD_LOG_LEVEL, ARKD_SCHEDULER_TYPE, and ARKD_SESSION_DURATION into the linter-expected order used across other .env files so the file matches project convention and removes dotenv-linter warnings.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.env.regtest:
- Around line 2-3: The pinned image tags in .env.regtest (ARKD_IMAGE and
ARKD_WALLET_IMAGE set to ghcr.io/arkade-os/arkd:v0.9.1 and
ghcr.io/arkade-os/arkd-wallet:v0.9.1) must be verified before merging; either
confirm those GHCR tags exist (using a manifest inspect or CI check) or update
ARKD_IMAGE and ARKD_WALLET_IMAGE to known-published tags (e.g., v0.8.7) so
regtest startup isn’t broken by missing images.
---
Nitpick comments:
In @.env.regtest:
- Around line 6-9: Reorder the environment variables in .env.regtest to satisfy
dotenv-linter by sorting or grouping the ARKD_* keys consistently (e.g.,
alphabetically or by related purpose); specifically reorder the lines
ARKD_BOARDING_EXIT_DELAY, ARKD_LOG_LEVEL, ARKD_SCHEDULER_TYPE, and
ARKD_SESSION_DURATION into the linter-expected order used across other .env
files so the file matches project convention and removes dotenv-linter warnings.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a3a9d5f5-7ed9-48fe-9429-b510b502a3a8
📒 Files selected for processing (2)
.env.regtestregtest
✅ Files skipped from review due to trivial changes (1)
- regtest
🔍 Iterative Review — New commit
|
Fixes gRPC "not ready" by creating and unlocking wallet through admin REST API before attempting ark CLI init.
|
Review — iterative update (commit Submodule bump What changed in the submodule:
Observations:
Clean iterative fix for a real CI flake. LGTM. |
🔍 Arkana PR Review —
|
|
Iterative review — new commit Mechanical submodule update, no wallet code changes. LGTM on this increment. |
|
Iterative review — new commit Picks up the arkade-regtest fix that funds the server wallet via admin API instead of the client boarding address. This ensures arkd has on-chain liquidity for processing rounds. No wallet-specific changes in this commit. LGTM. |
🔍 Arkana PR Review — wallet#492Scope: Replace custom test infrastructure with Changes — Largest Cleanup ✅Removes 716 lines: Key Observations1. Wallet-specific overlay: 2. Pins arkd v0.9.1 — newest across the three SDKs 3. 4. CI captures logs from 6 containers on failure 5. 6. 7. Nigiri build cache key key: nigiri-${{ hashFiles('regtest/.env.defaults', '.env.regtest') }}Caches the nigiri build based on env file hashes. Smart — avoids rebuilding nigiri on every CI run. Minor NoteThe VerdictClean migration with appropriate wallet-specific customization (nak overlay, gocron scheduler, v0.9.1 pin). 👍 |
|
Follow-up review (new commits: Two submodule bumps — both tracking the latest arkade-regtest fixes:
No wallet-specific code changes — just submodule pointer updates. LGTM. |
Picks up ARK fee env var passthrough in docker-compose.
🔍 Arkana PR Review —
|
Regtest environment setup (nigiri build + arkd + LND + Fulmine) takes ~5 minutes, leaving insufficient time for Playwright tests within the old 30-minute limit.
|
Iterative review — new commit: LGTM. The bump from 30→45 minutes is reasonable given arkade-regtest setup overhead (nigiri build, arkd, LND, Fulmine, wallet creation). The commit message explains the rationale clearly. Worth noting: if setup time grows further, consider caching the built nigiri binary more aggressively or splitting the e2e suite into shards. The existing |
Picks up missing env var exports for docker-compose interpolation.
|
🔍 Iterative review — changes since New commit LGTM — this is a necessary fix for the env var passthrough. The submodule now matches across all three repos (wallet, boltz-swap, ts-sdk) which is good for consistency. Cross-repo note: This PR, boltz-swap#106, and ts-sdk#386 all point to the same submodule commit ( |
arkade-regtest names the arkd container 'ark', not 'arkd'. The docker exec commands in tests were failing silently with "No such container".
🔍 Arkana PR Review — wallet#492Summary: Replaces custom test infrastructure (Dockerfiles, docker-compose, CORS proxy) with shared ✅ Looks Good
|
INTENT_INSUFFICIENT_FEE errors in all asset/swap tests because faucetOffchain uses wallet.settle() without fee budget, but arkd defaults charge 1% input fee (10,000 sats on 1M settle). Also add diagnostic step to dump arkd env, fees, and container state.
🔍 Arkana PR Review —
|
|
Iterative review (commit Single submodule bump: picks up conditional nbxplorer restart from arkade-regtest ( No concerns — purely inheriting an upstream fix via submodule pointer update. |
The nbxplorer guard in start-env.sh handles missing containers gracefully. Re-enable low fees for chain swap and send MAX tests.
|
Follow-up review (new commits since last review) Latest commits: regtest submodule pointed to master, Config (
Wallet-specific additions
CI — Playwright timeout bumped to 45min (appropriate given ~5min regtest setup). Diagnostic step dumps arkd env/fees/container state on every run. Nostr relay lifecycle managed separately from regtest stack. Cross-repo — Same submodule commit as ts-sdk#386, boltz-swap#106, dotnet-sdk#56. No security concerns. Clean migration. |
Bump per-test action/navigation timeout from 30s to 60s and job timeout from 45m to 60m. The shared regtest environment has more containers and slightly higher latency than the old dedicated test.docker-compose.yml setup, causing borderline tests to miss the 30s deadline.
|
Followup review (commit Timeout bump only — CI job 45→60min, Playwright action/nav timeouts 30s→60s. Reasonable given the heavier arkade-regtest setup. 👍 No protocol or security concerns. |
🔍 Arkana PR Review —
|
- Bump regtest to 6c5a540 which aligns Boltz reverse swap fee to 0.4% (was 0.5%) matching wallet's expected amounts (1,992 sats) - Add test.setTimeout(60000) to delegate and nostr save-config tests that were hitting the default 30s test timeout
🔍 Incremental Review —
|
Summary
.env.regtest(SESSION_DURATION=10, LOG_LEVEL=6)Test plan
Summary by CodeRabbit
Chores
CI
Tests