No push event exists for Ponder indexing completion; grandfathered with
justification comment per the no-fixed-delays rule exception policy.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After `buyKrk()` completes (swap widget returns to idle), the Anvil RPC may briefly return stale balance state. Adds 2s delay to ensure `getKrkBalance` reads post-swap state.
Without this fix, the holdout scenario reports identical KRK balance before and after swap despite the transaction succeeding (success toast visible).
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/434
- Modified sellAllKrk helper to return WETH delta received
- Added assertion: WETH received >= 90% of ETH spent (0.09 ETH minimum)
- Added log showing actual slippage percentage
- This proves 'always leave' with reasonable slippage, not just exit ability
Remove redundant onMounted call that fired loadLiquidityStats() a second
time. The watch() with { immediate: true } already handles the initial
load and all subsequent dependency changes, making onMounted redundant.
Also remove now-unused onMounted import.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The webapp-ci Docker image predates packages/utils. The e2e.yml webapp
service already overlays packages/web3 manually; add the same pattern
for packages/utils so Vite can resolve @harb/utils imports at runtime.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
isRecord, coerceString, getErrorMessage, ensureAddress were removed
from useSwapKrk.ts but CheatsView.vue still imported them from there.
Update CheatsView to import from @harb/utils directly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
getByTestId('swap-buy-button').waitFor({ state: 'visible' }) resolved
immediately because the button is always rendered; only its text changes.
Replace with expect(...).toHaveText('Buy KRK', { timeout: 60_000 }) to
correctly gate on the button returning to its idle state.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update 02-max-stake-all-tax-rates.spec.ts to buy KRK via /app/get-krk
instead of the removed cheats-page swap card
- Add VITE_ENABLE_LOCAL_SWAP=true to the webapp CI service so
LocalSwapWidget renders in the e2e pipeline
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract rpcCall into helpers/rpc.ts to eliminate the duplicate copy
in wallet.ts and assertions.ts (warning: code duplication)
- Fix waitForReceipt() in swap.ts to assert receipt.status === '0x1':
reverted transactions (status 0x0) now throw immediately with a clear
message instead of letting sellAllKrk silently succeed and fail later
at the balance assertion (bug)
- Add screen.width debug log to connectWallet() before the isVisible
check, restoring the regression signal from always-leave.spec.ts (warning)
- Fix expectPoolHasLiquidity() to only assert sqrtPriceX96 > 0 (pool
is initialised); drop the active-tick liquidity() check which gives
false negatives when price moves outside all LiquidityManager ranges
after a sovereign exit (warning)
- Add WETH balance snapshot before/after the swap in sellAllKrk() and
log a warning when WETH output is 0, making pool health degradation
visible despite amountOutMinimum: 0n (warning)
- Add before/after screenshots in buyKrk() (holdout-before-buy.png,
holdout-after-buy.png) to restore CI debugging artefacts (nit)
- Move waitForTimeout(2_000) settle buffer in buyKrk() to the catch
path only; when the Submitting→idle transition is observed the extra
wait is redundant (nit)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract reusable helpers from sovereign-exit/always-leave.spec.ts into
three focused modules under scripts/harb-evaluator/helpers/:
- helpers/wallet.ts: connectWallet, disconnectWallet, getEthBalance,
getKrkBalance — UI connect/disconnect flow and on-chain balance reads.
- helpers/swap.ts: buyKrk (navigates to the real /app/get-krk page and
drives the LocalSwapWidget, now that #393 fill() fix is in), sellAllKrk
(approve + exactInputSingle via window.ethereum, no UI dependency).
- helpers/assertions.ts: expectBalanceIncrease (snapshot/action/assert
pattern for any token or ETH), expectPoolHasLiquidity (slot0 + liquidity
sanity check on a Uniswap V3 pool).
always-leave.spec.ts is refactored to use these helpers and to navigate
to /app/get-krk instead of the /app/cheats workaround introduced before
the #393 fix landed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace screen.width with window.innerWidth in useMobile composable.
screen.width reports the physical screen size (0 in headless Chromium),
while window.innerWidth reflects the actual viewport — the correct metric
for responsive layout. The previous Object.defineProperty workaround in
wallet-provider.ts could not override the native Screen.prototype getter,
so screen.width remained 0, isMobile stayed true, and ConnectButton was
never rendered. Fix wallet-provider.ts to pass viewport/screen options
directly to browser.newContext() and remove the broken init-script shim.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>