test: independently verify the fee-bump deadline fix (PR #14) with a simulated clock #1

Open
davidagentmm wants to merge 4 commits from agent/fee-bump-deadline-tests into main

4 commits

Author SHA1 Message Date
643eb2975e docs: attach the red/green test output for the fee-bump deadline suite
Some checks are pending
CI / checks (pull_request) Waiting to run
The same test/feeBumpDeadline.test.ts on ea8e689 (21 of 22 fail) and on the
fix (22 pass), plus npm test, typecheck and build on the branch.
2026-12-03 03:17:18 +07:00
8f582ea12f test: verify the fee-bump deadline fix (PR #14) with a simulated clock
Some checks are pending
CI / checks (pull_request) Waiting to run
Drives submitWithConfirmation through the original submit plus all three fee
bumps for add-liquidity, swap, a small withdrawal (1 bin) and a large
withdrawal (40 bins), against a simulated chain clock with mocked signing
and broadcast. No network, no signing, no funds.

Covers: deadline = sign time + TTL on every signature; nonce, amount,
slippage, post-conditions and fee cap unchanged; the original confirming
while a bump is in flight; status lookup failure; wall/chain clock skew;
fee-cap exhaustion; zero duplicate terminal outcomes; and the large
withdrawal specifically.

Red on ea8e689 (21 of 22 fail), green on 49d5276 and a447820.

The one-page findings (docs/fee-bump-deadline-findings.md) answer the
'does it still recur on a larger withdrawal' question: the deadline stamp is
now correct, but stacks-block-time is a ~600s Bitcoin-block staircase, so a
withdrawal that lands in the next tenure is mined as ERR_DEADLINE_PASSED
however fresh its deadline is.
2026-12-03 03:05:48 +07:00
c84f88b432 test: name the wallet-clock-ahead case for what it asserts
Some checks are pending
CI / checks (pull_request) Waiting to run
2026-12-03 03:04:42 +07:00
8fe3b1c795 test: verify the fee-bump deadline fix (PR #14) with a simulated clock
Some checks are pending
CI / checks (pull_request) Waiting to run
Drives submitWithConfirmation through the original submit plus all three
fee bumps for add-liquidity, swap, small withdrawal and large withdrawal,
with mocked signing/broadcast and no network. Asserts every signature gets
deadline = sign time + configured TTL and that nonce, amount, slippage,
post-conditions and the fee cap never change. Covers the original
confirming while a bump is in flight, status lookup failure, wall/chain
clock skew and fee-cap exhaustion, with zero duplicate terminal outcomes.

Red on ea8e689, green on 49d5276 and on main (a447820).
2026-12-03 02:31:10 +07:00