You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sdk package's e2e integration matrix (Integration (sdk / *) CI jobs, driven by scripts/regtest.sh against the live regtest arkd) intermittently fails with server-side rejection errors that look like a race between back-to-back tests sharing one regtest stack, not a client-side bug. Two independent occurrences observed within the same PR (#827), on two different commits, in two different test files, both in the same error family.
Observed failures
1. test/e2e/arkadeCash.test.ts > ArkadeCash > should claim each arkadeCash independently
ArkadeCashCreateError: Failed to create ArkadeCash: send failed after the note may have been submitted.
Caused by: VTXO_ALREADY_SPENT: VTXO_ALREADY_SPENT (6): 333cabae45f44974455a568b2eb374d2b6b27d5d0327c9828286066cda5cd08b:0 already spent
Re-ran (via GitHub UI, not by this session — no permission) at ~15:12–15:18 UTC on the same commit and passed clean: Integration (sdk / arkade-assets) re-run — nothing in the tree changed between attempts.
2. test/e2e/unilateralExitDeepChain.test.ts > unilateral exit — deep chain ordering > prepare() emits a deep offchain send chain in physical-input topological order
Immediately preceding this failure in the same job's log, the prior test in file order (test/e2e/digestMismatch.test.ts, which passed) logged its own settle-cleanup failure:
Failed to delete intent after settle failure for inputs [573e326454acf43c705427011297ec786981fa87875d3f9e19785eb9c1c2da6b:0];
intent may linger on server and cause 'duplicated input' on next settle
INVALID_INTENT_PROOF: INVALID_INTENT_PROOF (23): no matching intents found for intent proof
This reads as a lingering/leaked intent or in-flight settle state from one test bleeding into the timing of the next, inside the same suite run against one shared arkd.
As of this writing this job is still red on 9982e05, unretried (no permission to trigger rerun_failed_jobs from this session — GitHub API returned 403).
Why this looks like flake, not a real regression
Both failures are server-side rejections (VTXO_ALREADY_SPENT, INVALID_ARK_PSBT: duplicated offchain tx, INVALID_INTENT_PROOF) from a live regtest arkd, not assertion failures or client-side exceptions.
Two different tests, two different error codes, two different commits — same PR, same shared regtest stack per job.
PR Rename ts-sdk package to sdk #827 (the PR these were observed on) is a pure directory rename (packages/ts-sdk → packages/sdk) plus path/script/doc string updates; zero runtime logic changed. Full local typecheck, build, lint, and unit suite all pass clean on both commits.
Occurrence 1 passed on an unmodified re-run of the identical commit, which rules out anything content-dependent.
Suspected root cause (untriaged beyond this)
Something in the e2e suite's settle/submit lifecycle — likely around cleanup after a failed or slow settle (deleteIntent, forfeit/commitment timing, or VTXO tree renewal racing a subsequent test's own settle round) — leaves state on the shared arkd that the next test's submit collides with under CI's tighter timing (2-core runner, see the REGTEST_PROFILES comment in packages/sdk/.env.regtest). The Failed to delete intent after settle failure ... may cause 'duplicated input' on next settle log line is the SDK's own code anticipating exactly this failure mode, which suggests it's a known-possible interaction, not a new one.
Suggested next steps
Grep for the Failed to delete intent after settle failure log site (src/wallet/wallet.ts, _settleImpl) and check whether the cleanup-failure path leaves the wallet retrying/settling again before the server has fully released the prior intent/VTXO.
Consider whether e2e tests that settle need a stronger post-settle barrier (wait for confirmed VTXO state, not just the settle response) before the suite moves on to the next test that spends from the same wallet/keys.
If genuinely just CI timing under contention, consider whether REGTEST_PROFILES/runner sizing needs another look, or whether flaky-prone tests should get a bounded retry at the suite level.
Summary
The
sdkpackage's e2e integration matrix (Integration (sdk / *)CI jobs, driven byscripts/regtest.shagainst the live regtestarkd) intermittently fails with server-side rejection errors that look like a race between back-to-back tests sharing one regtest stack, not a client-side bug. Two independent occurrences observed within the same PR (#827), on two different commits, in two different test files, both in the same error family.Observed failures
1.
test/e2e/arkadeCash.test.ts > ArkadeCash > should claim each arkadeCash independentlyIntegration (sdk / arkade-assets), commit4c48240e9466732b7b479f0722bbd6bdb68f09f8, 2026-09-03 ~14:50 UTCWallet.createCash→Wallet._submitOffchainSpend→RestArkProvider.submitTx→handleError→maybeArkErrorIntegration (sdk / arkade-assets)re-run — nothing in the tree changed between attempts.2.
test/e2e/unilateralExitDeepChain.test.ts > unilateral exit — deep chain ordering > prepare() emits a deep offchain send chain in physical-input topological orderIntegration (sdk / exit-providers-rotation), commit9982e05ecb557344c8e7806376ca52291475bbe0, 2026-09-03 ~15:54 UTCWallet._submitOffchainSpend→submitOffchainTx→RestArkProvider.submitTx→handleError→maybeArkErrortest/e2e/digestMismatch.test.ts, which passed) logged its own settle-cleanup failure:arkd.9982e05, unretried (no permission to triggerrerun_failed_jobsfrom this session — GitHub API returned 403).Why this looks like flake, not a real regression
VTXO_ALREADY_SPENT,INVALID_ARK_PSBT: duplicated offchain tx,INVALID_INTENT_PROOF) from a live regtestarkd, not assertion failures or client-side exceptions.packages/ts-sdk→packages/sdk) plus path/script/doc string updates; zero runtime logic changed. Full local typecheck, build, lint, and unit suite all pass clean on both commits.Suspected root cause (untriaged beyond this)
Something in the e2e suite's settle/submit lifecycle — likely around cleanup after a failed or slow settle (
deleteIntent, forfeit/commitment timing, or VTXO tree renewal racing a subsequent test's own settle round) — leaves state on the sharedarkdthat the next test's submit collides with under CI's tighter timing (2-core runner, see theREGTEST_PROFILEScomment inpackages/sdk/.env.regtest). TheFailed to delete intent after settle failure ... may cause 'duplicated input' on next settlelog line is the SDK's own code anticipating exactly this failure mode, which suggests it's a known-possible interaction, not a new one.Suggested next steps
Failed to delete intent after settle failurelog site (src/wallet/wallet.ts,_settleImpl) and check whether the cleanup-failure path leaves the wallet retrying/settling again before the server has fully released the prior intent/VTXO.REGTEST_PROFILES/runner sizing needs another look, or whether flaky-prone tests should get a bounded retry at the suite level.Environment
ubuntu-latest, 2-core runner.github/workflows/ci.yml,Integration (sdk / *)matrixarkade-regtestsubmodule, driven byscripts/regtest.sh sdk cycleclaude/rename-ts-sdk-to-sdk-luwki0/ PR Rename ts-sdk package to sdk #827, basemaster@c6190783