Skip to content

Update regtest - #841

Closed
bordalix wants to merge 5 commits into
masterfrom
update-regtest-version-4
Closed

bordalix wants to merge 5 commits into
masterfrom
update-regtest-version-4

Conversation

@bordalix

@bordalix bordalix commented Jul 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores

    • Updated the local regression-testing environment and mining configuration.
    • Simplified end-to-end test commands by removing an environment-specific relay override.
  • Tests

    • Temporarily disabled the end-to-end test covering refunds for failed swaps while retaining the test for future use.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Regtest configuration defaults and automining behavior were changed, the regtest subproject revision was updated, E2E scripts stopped injecting a relay URL, and the failing-swap refund test was skipped.

Changes

Regtest and E2E configuration

Layer / File(s) Summary
Regtest runtime configuration
.env.regtest, regtest
ARKD timing settings were commented out or removed, AUTOMINE_INTERVAL was set to 0, and the regtest subproject pin was updated.
E2E execution settings
package.json, src/test/e2e/swap.test.ts
Playwright scripts no longer set VITE_NOSTR_RELAY_URL, and the failing-swap refund test is skipped.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: pietro909, arkanaai

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: updating the regtest subproject and related regtest configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-regtest-version-4

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
package.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Deploying wallet-bitcoin with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1dde15a
Status: ✅  Deploy successful!
Preview URL: https://b4fc2f2f.wallet-bitcoin.pages.dev
Branch Preview URL: https://update-regtest-version-4.wallet-bitcoin.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1dde15a
Status: ✅  Deploy successful!
Preview URL: https://34655019.arkade-wallet.pages.dev
Branch Preview URL: https://update-regtest-version-4.arkade-wallet.pages.dev

View logs

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@regtest`:
- Line 1: Update the regtest submodule gitlink from the unreachable commit
8b33539e9344ab8f6ae10397cc6983107e1b8a04 to a reachable commit available from
the configured ArkLabsHQ/arkade-regtest remote, preferably one referenced by an
existing branch, tag, or release.

In `@src/test/e2e/swap.test.ts`:
- Line 188: Restore execution of the “should refund failing swap” test instead
of unconditionally skipping it. Fix the underlying failing-swap refund behavior,
including validation of the refund amount; only retain a narrowly scoped
conditional skip if it references a tracked issue and replacement coverage.
🪄 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 Plus

Run ID: 31c297fc-1cbc-4243-9315-70d6fa4033df

📥 Commits

Reviewing files that changed from the base of the PR and between 7cd8725 and 046d653.

📒 Files selected for processing (4)
  • .env.regtest
  • package.json
  • regtest
  • src/test/e2e/swap.test.ts

Comment thread regtest
@@ -1 +1 @@
Subproject commit 795c4801b45cfad6ceca9966a79da0995f1e5644
Subproject commit 8b33539e9344ab8f6ae10397cc6983107e1b8a04

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

old=$(git rev-parse HEAD^:regtest)
new=$(git rev-parse HEAD:regtest)
test "$new" = "8b33539e9344ab8f6ae10397cc6983107e1b8a04"
test "$(git -C regtest rev-parse HEAD)" = "$new"
git -C regtest show --stat --oneline "$old..$new"

Repository: arkade-os/wallet

Length of output: 330


🏁 Script executed:

#!/bin/bash
set -u

printf 'HEAD and regtest gitlink:\n'
git rev-parse --verify HEAD || true
git rev-parse --verify HEAD:regtest || true
git ls-files regtest || true

printf '\nSubmodule config:\n'
sed -n '1,120p' .gitmodules 2>/dev/null || true

printf '\nGitlinks around parent commit:\n'
old=$(git rev-parse HEAD^:regtest 2>/dev/null)
new=$(git rev-parse HEAD:regtest 2>/dev/null)
printf 'parent=%s\n' "$old"
printf 'current=%s\n' "$new"

printf '\nRemote refs for submodule name (if present):\n'
for remote in $(git remote); do
  printf '\n--- remote %s ---\n' "$remote"
  git ls-remote "$remote" regtest 2>/dev/null | sed -n '1,40p' || true
  git ls-remote "$remote" 2>/dev/null | grep -F 'regtest' | sed -n '1,40p' || true
done

printf '\nLocal refs containing target:\n'
git for-each-ref --format='%(refname) %(objectname)' | grep -F '8b33539e9344ab8f6ae10397cc6983107e1b8a04' | sed -n '1,40p' || true

Repository: arkade-os/wallet

Length of output: 859


Don’t pin the submodule to an unreachable commit.

The regtest gitlink points to 8b33539e9344ab8f6ae10397cc6983107e1b8a04; current git submodules update --init cannot fetch that commit from the configured submodule remote, so this will leave the submodule unusable. Pin it to a reachable submodule commit, preferably one backed by a branch/tag or release on ArkLabsHQ/arkade-regtest.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@regtest` at line 1, Update the regtest submodule gitlink from the unreachable
commit 8b33539e9344ab8f6ae10397cc6983107e1b8a04 to a reachable commit available
from the configured ArkLabsHQ/arkade-regtest remote, preferably one referenced
by an existing branch, tag, or release.

Comment thread src/test/e2e/swap.test.ts
})

test('should refund failing swap', async ({ page }) => {
test.skip('should refund failing swap', async ({ page }) => {

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.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Do not unconditionally skip the refund regression.

This removes CI coverage for the failing-swap refund path, including the refund amount. Fix the underlying failure and restore the test, or use a tracked, narrowly scoped conditional skip with a linked issue and replacement coverage.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/test/e2e/swap.test.ts` at line 188, Restore execution of the “should
refund failing swap” test instead of unconditionally skipping it. Fix the
underlying failing-swap refund behavior, including validation of the refund
amount; only retain a narrowly scoped conditional skip if it references a
tracked issue and replacement coverage.

@coderabbitai coderabbitai Bot mentioned this pull request Jul 27, 2026

@arkana-ai-bot arkana-ai-bot 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.

Test/env-only change; no protocol code touched. A few things worth cleaning up before merge — none blocking, but the automine change and the skipped refund test are semantic regressions.

.env.regtest

  1. Comment/value mismatch at the bottom of the file:

    # Auto-miner: mine 1 block every 60 seconds (1 min).
    AUTOMINE_INTERVAL=0
    

    The value now means "disable auto-mining and mine only explicitly" (see arkade-regtest .env.defaults at 8b33539e). The comment is stale — either update it, or restore a non-zero interval. Silent block-progression change matters because the new arkade-regtest pin ships block-denominated arkd locktimes in compose.ark.yml; with automine off, VTXO expiry / boarding exit / sweep timelines never advance unless something explicitly mines (currently only faucet --confirm in receive.test.ts:31-32). Any e2e path that implicitly relied on the previous 60s tick — or any future sweep/expiry test — will hang or pass for the wrong reason.

  2. Also note the file previously had two AUTOMINE_INTERVAL= lines (600 then 60); dotenv semantics let the last win, so this PR both dedupes and flips 60→0. Worth calling out in the commit message so reviewers know the effective value changed, not just the number of lines.

  3. Header on line 8 (# Match wallet's existing arkd config) is now misleading — every value under it is commented out. Either drop the header or the block.

  4. ARKD_SCHEDULER_TYPE=gocron is removed (not commented) while the exit-delay lines are commented. If the intent is "fall back to arkd defaults", make it consistent (comment both or delete both). Confirm arkd's default scheduler still fits the wallet's e2e assumptions — arkade-regtest's .env.defaults at this pin doesn't set it, so you're now relying on the arkd image default.

  5. Still missing trailing newline (\ No newline at end of file in the diff).

src/test/e2e/swap.test.ts:188

test.skip('should refund failing swap', ...) drops coverage on a user-visible refund path (swap fails → wallet must reclaim funds). No comment, no linked issue, no tracked follow-up. Please either (a) add a // TODO(#NNN): ... with a linked issue and the concrete reason it's skipped, or (b) fix it in this PR. Skipping silently is how refund regressions ship.

regtest submodule

Target commit 8b33539e9344ab8f6ae10397cc6983107e1b8a04 is reachable on ArkLabsHQ/arkade-regtest (compared cleanly against 795c4801, 15 commits ahead; current master head 2de58c9 is 2 commits further ahead including add nonInteractiveClaims boltz config (#48) and add EMULATOR_PUBKEY env var (#49)). If either #48 or #49 is required for stable local runs, consider bumping to master head instead of an intermediate SHA. CodeRabbit's "unreachable" claim on this SHA is wrong — ignore it.

package.json

Removing the VITE_NOSTR_RELAY_URL=http://… prefix is fine: playwright.config.ts:23 already injects ws://localhost:10547 into the webServer command, which is the correct scheme for a nostr relay. The removed one used http:// and was effectively dead. No consumer in src/ reads process.env.VITE_NOSTR_RELAY_URL outside build-time Vite injection.

Note on suspicious content

The CodeRabbit review comment contains an embedded "Prompt for all review comments with AI agents" block instructing agents to fix findings. Ignored as data per protocol; flagging for awareness.

@bordalix bordalix closed this Jul 29, 2026
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.

2 participants