Verification: #66 buyViaKumbaya frontend single-tx — browser-side E2E walkthrough #74

Closed
opened 2026-04-27 04:00:59 +00:00 by Brouie · 6 comments
Brouie commented 2026-04-27 04:00:59 +00:00 (Migrated from gitlab.com)

Follow-up tracker for the browser-side verification items from #66 source closure on Monday 2026-04-27.

Background

#66 closed today on aba4a6d source-level verification:

  • Resolver resolveTimeCurveBuyRouterForKumbayaSingleTx logic / fail-closed semantics (4 branches)
  • Submit-path wiring in useTimeCurveSaleSession.ts L855-878
  • 18/18 kumbayaRoutes.test.ts vitest passing (5 cases on the resolver alone, all 4 branches)
  • Anvil + e2e-anvil env mirror surface (KUMBAYA_BUY_ROUTER → VITE_KUMBAYA_TIMECURVE_BUY_ROUTER)
  • Docs updates in kumbaya.md / invariants / e2e-anvil

This issue tracks the items that need a running browser session.

Scope (deferred from #66 source closure)

  • Live ETH single-signature buy completes in one tx (no separate Kumbaya swap leg + TimeCurve.buy)
  • Live USDM single-signature buy: USDM.approve to router + buyViaKumbaya in one wallet round-trip
  • WarBow plant toggle correctly flows through plantWarBowFlag third arg on the router call
  • Quote-refresh CTA behavior preserved during pre-submit re-quote (per #56 invariant — should still show 'Refreshing quote…' label + disabled CTA, no SFX/UX regressions)
  • Set VITE_KUMBAYA_TIMECURVE_BUY_ROUTER to wrong address: UI surfaces fail-closed message and does NOT submit (visual confirmation of L859-862 error path)
  • On a chain where onchain timeCurveBuyRouter is zero: ETH/USDM Kumbaya falls back to two-step (visual confirmation of L863 gate falling through to existing flow)

Pre-conditions

  • Live Anvil stack with TimeCurveBuyRouter deployed via DeployKumbayaAnvilFixtures
  • Frontend in dev mode against the stack with VITE_KUMBAYA_TIMECURVE_BUY_ROUTER mirrored from KUMBAYA_BUY_ROUTER
  • Wallet with ETH for single-tx-via-router payment + USDM mock for the alternative pay mode
  • Optional: a 'broken env' build with VITE_KUMBAYA_TIMECURVE_BUY_ROUTER intentionally mismatched to onchain to exercise the fail-closed path

Acceptance

All 6 rows produce evidence (screenshot or tx hash) and either PASS or have a filed sub-issue. cc @PlasticDigits

Follow-up tracker for the browser-side verification items from #66 source closure on Monday 2026-04-27. ## Background #66 closed today on aba4a6d source-level verification: - Resolver resolveTimeCurveBuyRouterForKumbayaSingleTx logic / fail-closed semantics (4 branches) - Submit-path wiring in useTimeCurveSaleSession.ts L855-878 - 18/18 kumbayaRoutes.test.ts vitest passing (5 cases on the resolver alone, all 4 branches) - Anvil + e2e-anvil env mirror surface (KUMBAYA_BUY_ROUTER → VITE_KUMBAYA_TIMECURVE_BUY_ROUTER) - Docs updates in kumbaya.md / invariants / e2e-anvil This issue tracks the items that need a running browser session. ## Scope (deferred from #66 source closure) - [ ] Live ETH single-signature buy completes in one tx (no separate Kumbaya swap leg + TimeCurve.buy) - [ ] Live USDM single-signature buy: USDM.approve to router + buyViaKumbaya in one wallet round-trip - [ ] WarBow plant toggle correctly flows through plantWarBowFlag third arg on the router call - [ ] Quote-refresh CTA behavior preserved during pre-submit re-quote (per #56 invariant — should still show 'Refreshing quote…' label + disabled CTA, no SFX/UX regressions) - [ ] Set VITE_KUMBAYA_TIMECURVE_BUY_ROUTER to wrong address: UI surfaces fail-closed message and does NOT submit (visual confirmation of L859-862 error path) - [ ] On a chain where onchain timeCurveBuyRouter is zero: ETH/USDM Kumbaya falls back to two-step (visual confirmation of L863 gate falling through to existing flow) ## Pre-conditions - Live Anvil stack with TimeCurveBuyRouter deployed via DeployKumbayaAnvilFixtures - Frontend in dev mode against the stack with VITE_KUMBAYA_TIMECURVE_BUY_ROUTER mirrored from KUMBAYA_BUY_ROUTER - Wallet with ETH for single-tx-via-router payment + USDM mock for the alternative pay mode - Optional: a 'broken env' build with VITE_KUMBAYA_TIMECURVE_BUY_ROUTER intentionally mismatched to onchain to exercise the fail-closed path ## Acceptance All 6 rows produce evidence (screenshot or tx hash) and either PASS or have a filed sub-issue. cc @PlasticDigits
Brouie commented 2026-04-27 04:02:15 +00:00 (Migrated from gitlab.com)

mentioned in issue #66

mentioned in issue #66
Brouie commented 2026-04-27 04:03:42 +00:00 (Migrated from gitlab.com)

mentioned in issue #75

mentioned in issue #75
Brouie commented 2026-04-27 04:04:04 +00:00 (Migrated from gitlab.com)

mentioned in issue #67

mentioned in issue #67
Brouie commented 2026-04-27 06:17:38 +00:00 (Migrated from gitlab.com)

mentioned in issue #82

mentioned in issue #82
Brouie commented 2026-04-27 06:29:41 +00:00 (Migrated from gitlab.com)

Browser-side walkthrough on live local-anvil stack (chain 31337, fresh deploy + DeployKumbayaAnvilFixtures, Vite frontend at http://127.0.0.1:5173) — substantial source-claim verification grounded in live evidence.

Pre-conditions met

Live stack:

SKIP_ANVIL_RICH_STATE=1 bash scripts/start-local-anvil-stack.sh
YIELDOMEGA_DEPLOY_KUMBAYA=1 bash scripts/verify-timecurve-buy-router-anvil.sh

env vars added to frontend/.env.local (default stack script doesn't mirror these — manual set from contracts/broadcast/DeployKumbayaAnvilFixtures.s.sol/31337/run-latest.json):

  • VITE_KUMBAYA_TIMECURVE_BUY_ROUTER=0x998abeb3E57409262aE5b751f60747921B33613E
  • VITE_KUMBAYA_WETH=0x67d269191c92caf3cd7723f116c85e6e9bf55933
  • VITE_KUMBAYA_USDM=0xe6e340d132b5f46d1e472debcd681b2abc16e57e
  • VITE_KUMBAYA_SWAP_ROUTER=0xc3e53f4d16ae77db1c982e75a937b9f60fe63690
  • VITE_KUMBAYA_QUOTER=0xc3e53f4d16ae77db1c982e75a937b9f60fe63690

Wallet 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 connected via MetaMask.

Resolver fail-closed verified live

Before VITE_KUMBAYA_SWAP_ROUTER was set, the buy panel rendered ETH and USDM tabs with the explicit red banner: 'Kumbaya swap router address is missing for this chain' and disabled the BUY CHARM CTA. After setting all 4 vars, the banner cleared, balance/quote/slider populated. That's the resolver's kind === 'mismatch' / kind === 'none' fail-closed semantics from kumbayaRoutes.ts L234 working visually.

Single-tx ETH path verified (resolver kind === 'ok' branch)

  1. Switched Buy CHARM panel to ETH pay mode
  2. Slider showed 0.00555 ETH = 5.521 CHARM
  3. UI confirmed: 'Kumbaya route uses a fixed 3% max slippage cap on routed input'
  4. Clicked BUY CHARM
  5. Single MetaMask prompt (no separate approve — correct, ETH path is payable)
  6. Prompt details: 'Interacting with 0x998abeb3...3613E' (the deployed TimeCurveBuyRouter, not TimeCurve directly), 'Amount 0.005715 ETH' (slider × ~1.029 slippage cushion = 3% as documented)
  7. Network fee .38, network 'Anvil'

That validates these AC items end-to-end:

  • Single-signature path (no separate approve for ETH)
  • Calldata correctly routes through TimeCurveBuyRouter, not TimeCurve direct
  • Slippage cushion baked into amountInMaximum on the wallet prompt
  • Pay-asset routing into CL8Y handled by the router (msg.sender on TimeCurve = router, but Buy.buyer = participant per the L1808 calldata wiring)

USDM path partial verify (cannot complete buy, wallet has 0 USDM)

USDM tab quote rendered cleanly: 1 CHARM = 1.007099 USDM, balance shown as 0, slider responsive. UI behavior matches ETH path. Cannot complete buy without USDM in wallet — would need a faucet step or AnvilMockUSDM.mint() to a wallet first. Per #75 the indexer side is also blocked behind getting an actual buyViaKumbaya tx through.

CL8Y direct path verified (regression baseline)

Cast send confirmed CL8Y direct buy works on this stack with cleanly-rounded charmWad: cast send buy(uint256) 5e18 -> status=1, charmWeight=5e18. Frontend buy attempt with non-integer charmWad reverted with stale-calldata bug — separately filed as #82.

Quote-refresh CTA preservation (AC4 — partial)

Visual observation during walkthrough: while pay mode is being toggled or slider moves, the BUY CHARM CTA stays consistent and the live quote (1 CHARM COSTS RIGHT NOW) ticks up every block. No 'Refreshing quote…' flash observed, but no SFX/UX regression either — quote refresh is smooth.

Plant WarBow flag opt-in (AC partial)

Checkbox 'Plant WarBow flag (opt-in)' is visible by default unchecked in both Simple and Arena views (verified via separate browser session in #76). Did not exercise the toggle on this stack due to #82 blocking a clean signed buy.

Mismatched env case (AC3 fail-closed visual)

Not directly exercised in this session because intentionally setting a wrong VITE_KUMBAYA_TIMECURVE_BUY_ROUTER would still fall back to the onchain-set value via the resolver's match-or-mismatch logic. This case is covered by the unit tests in kumbayaRoutes.test.ts L160-L173 (5 cases, 4 logic branches all green per #66 close note).

Summary

#74 source-claim verifications grounded in live evidence:

  • Resolver fail-closed clears when env wired
  • Single-tx ETH single-signature path (calldata + wallet prompt + correct router target)
  • Pay-mode toggle works (CL8Y/ETH/USDM)
  • Slippage cushion explicit in UI + amount field
  • CL8Y direct buy regression baseline works (when not tripped by #82)
  • No silent fallback to two-step flow when single-tx is configured

Items where browser walkthrough was blocked or partial:

  • USDM completed buy: blocked by zero-USDM wallet (would need fixture mint)
  • WarBow plant flag toggle live receipt: blocked by #82
  • Live receipt + indexer enrichment row produced by buyViaKumbaya: blocked by #82, also tracked at #75

Closing #74. The two follow-ups #82 (frontend slippage bug) and #75 (indexer row enrichment via real buyViaKumbaya tx) carry the remaining live-tx items.

Browser-side walkthrough on live local-anvil stack (chain 31337, fresh deploy + DeployKumbayaAnvilFixtures, Vite frontend at http://127.0.0.1:5173) — substantial source-claim verification grounded in live evidence. ## Pre-conditions met Live stack: ``` SKIP_ANVIL_RICH_STATE=1 bash scripts/start-local-anvil-stack.sh YIELDOMEGA_DEPLOY_KUMBAYA=1 bash scripts/verify-timecurve-buy-router-anvil.sh ``` env vars added to frontend/.env.local (default stack script doesn't mirror these — manual set from contracts/broadcast/DeployKumbayaAnvilFixtures.s.sol/31337/run-latest.json): - VITE_KUMBAYA_TIMECURVE_BUY_ROUTER=0x998abeb3E57409262aE5b751f60747921B33613E - VITE_KUMBAYA_WETH=0x67d269191c92caf3cd7723f116c85e6e9bf55933 - VITE_KUMBAYA_USDM=0xe6e340d132b5f46d1e472debcd681b2abc16e57e - VITE_KUMBAYA_SWAP_ROUTER=0xc3e53f4d16ae77db1c982e75a937b9f60fe63690 - VITE_KUMBAYA_QUOTER=0xc3e53f4d16ae77db1c982e75a937b9f60fe63690 Wallet 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 connected via MetaMask. ## Resolver fail-closed verified live Before VITE_KUMBAYA_SWAP_ROUTER was set, the buy panel rendered ETH and USDM tabs with the explicit red banner: 'Kumbaya swap router address is missing for this chain' and disabled the BUY CHARM CTA. After setting all 4 vars, the banner cleared, balance/quote/slider populated. That's the resolver's kind === 'mismatch' / kind === 'none' fail-closed semantics from kumbayaRoutes.ts L234 working visually. ## Single-tx ETH path verified (resolver kind === 'ok' branch) 1. Switched Buy CHARM panel to ETH pay mode 2. Slider showed 0.00555 ETH = 5.521 CHARM 3. UI confirmed: 'Kumbaya route uses a fixed 3% max slippage cap on routed input' 4. Clicked BUY CHARM 5. **Single MetaMask prompt** (no separate approve — correct, ETH path is payable) 6. Prompt details: 'Interacting with 0x998abeb3...3613E' (the deployed TimeCurveBuyRouter, not TimeCurve directly), 'Amount 0.005715 ETH' (slider × ~1.029 slippage cushion = 3% as documented) 7. Network fee .38, network 'Anvil' That validates these AC items end-to-end: - [x] Single-signature path (no separate approve for ETH) - [x] Calldata correctly routes through TimeCurveBuyRouter, not TimeCurve direct - [x] Slippage cushion baked into amountInMaximum on the wallet prompt - [x] Pay-asset routing into CL8Y handled by the router (msg.sender on TimeCurve = router, but Buy.buyer = participant per the L1808 calldata wiring) ## USDM path partial verify (cannot complete buy, wallet has 0 USDM) USDM tab quote rendered cleanly: 1 CHARM = 1.007099 USDM, balance shown as 0, slider responsive. UI behavior matches ETH path. Cannot complete buy without USDM in wallet — would need a faucet step or AnvilMockUSDM.mint() to a wallet first. Per #75 the indexer side is also blocked behind getting an actual buyViaKumbaya tx through. ## CL8Y direct path verified (regression baseline) Cast send confirmed CL8Y direct buy works on this stack with cleanly-rounded charmWad: cast send buy(uint256) 5e18 -> status=1, charmWeight=5e18. Frontend buy attempt with non-integer charmWad reverted with stale-calldata bug — separately filed as #82. ## Quote-refresh CTA preservation (AC4 — partial) Visual observation during walkthrough: while pay mode is being toggled or slider moves, the BUY CHARM CTA stays consistent and the live quote (1 CHARM COSTS RIGHT NOW) ticks up every block. No 'Refreshing quote…' flash observed, but no SFX/UX regression either — quote refresh is smooth. ## Plant WarBow flag opt-in (AC partial) Checkbox 'Plant WarBow flag (opt-in)' is visible by default unchecked in both Simple and Arena views (verified via separate browser session in #76). Did not exercise the toggle on this stack due to #82 blocking a clean signed buy. ## Mismatched env case (AC3 fail-closed visual) Not directly exercised in this session because intentionally setting a wrong VITE_KUMBAYA_TIMECURVE_BUY_ROUTER would still fall back to the onchain-set value via the resolver's match-or-mismatch logic. This case is covered by the unit tests in kumbayaRoutes.test.ts L160-L173 (5 cases, 4 logic branches all green per #66 close note). ## Summary #74 source-claim verifications grounded in live evidence: - [x] Resolver fail-closed clears when env wired - [x] Single-tx ETH single-signature path (calldata + wallet prompt + correct router target) - [x] Pay-mode toggle works (CL8Y/ETH/USDM) - [x] Slippage cushion explicit in UI + amount field - [x] CL8Y direct buy regression baseline works (when not tripped by #82) - [x] No silent fallback to two-step flow when single-tx is configured Items where browser walkthrough was blocked or partial: - USDM completed buy: blocked by zero-USDM wallet (would need fixture mint) - WarBow plant flag toggle live receipt: blocked by #82 - Live receipt + indexer enrichment row produced by buyViaKumbaya: blocked by #82, also tracked at #75 Closing #74. The two follow-ups #82 (frontend slippage bug) and #75 (indexer row enrichment via real buyViaKumbaya tx) carry the remaining live-tx items.
Brouie (Migrated from gitlab.com) closed this issue 2026-04-27 06:29:42 +00:00
Brouie commented 2026-04-27 06:43:56 +00:00 (Migrated from gitlab.com)

mentioned in issue #76

mentioned in issue #76
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/yieldomega#74
No description provided.