Verification: #63 WarBow flag plant opt-in — browser walkthrough #76

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

Follow-up tracker for the browser-side and live-tx evidence items deferred from #63 source closure on Sunday/Monday.

Background

#63 closed today on d2f6675 source-level verification:

  • Plain buy(charmWad) calls _buy(..., false) at TimeCurve.sol L320 (AC1)
  • buy(charmWad, plantWarBowFlag) at L324, buy(charmWad, codeHash, plantWarBowFlag) at L329, buyFor variants at L334-340 — all opt-in
  • _requireSaleInteractionsEnabled gate carries through, plantWarBowFlag gate at L467, Buy event flagPlanted field at L489
  • Forge tests at TimeCurve.t.sol L250 / L259 / L267 cover items 1, 2, 4
  • forge: 191/191 passing
  • Frontend Simple + Arena both wire useState(false) default + checkbox + 1/2/3-arg calldata branching
  • Docs in primitives.md / timecurve-views.md / invariants-and-business-logic.md / play-timecurve-warbow

Scope

  • Item 1 plain buy live receipt: Buy event with flagPlanted=false; warbowPendingFlagOwner unchanged
  • Item 2 plant buy live receipt: Buy event flagPlanted=true; warbowPendingFlagOwner = buyer; warbowPendingFlagPlantAt > 0
  • Item 3 referral path opt-in: buy(charmWad, codeHash, false) succeeds with referral applied AND flag NOT planted (no test coverage at the contract level for this branch — see #76)
  • Item 5 interrupt: Alice plants → Bob buys plain before silence window expires → Alice's pending slot cleared / penalty rules apply per pre-#63 semantics
  • Item 6 router path opt-in: TimeCurveBuyRouter.buyViaKumbaya(..., plantWarBowFlag, ...) third-arg-after-codeHash → flag only sets on true, plain calls leave flag slot unchanged (no contract test coverage — see #76)
  • Item 7 frontend wallet simulation: Simple + Arena 'Plant WarBow flag' checkbox default off, calldata matches function signature for each toggle state

Pre-conditions

  • Live Anvil stack with TimeCurveBuyRouter deployed (or main TimeCurve only, for items 1/2/3/5/7)
  • Frontend dev session
  • Wallet for participant txs

Acceptance

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

Follow-up tracker for the browser-side and live-tx evidence items deferred from #63 source closure on Sunday/Monday. ## Background #63 closed today on d2f6675 source-level verification: - Plain buy(charmWad) calls _buy(..., false) at TimeCurve.sol L320 (AC1) - buy(charmWad, plantWarBowFlag) at L324, buy(charmWad, codeHash, plantWarBowFlag) at L329, buyFor variants at L334-340 — all opt-in - _requireSaleInteractionsEnabled gate carries through, plantWarBowFlag gate at L467, Buy event flagPlanted field at L489 - Forge tests at TimeCurve.t.sol L250 / L259 / L267 cover items 1, 2, 4 - forge: 191/191 passing - Frontend Simple + Arena both wire useState(false) default + checkbox + 1/2/3-arg calldata branching - Docs in primitives.md / timecurve-views.md / invariants-and-business-logic.md / play-timecurve-warbow ## Scope - [ ] Item 1 plain buy live receipt: Buy event with flagPlanted=false; warbowPendingFlagOwner unchanged - [ ] Item 2 plant buy live receipt: Buy event flagPlanted=true; warbowPendingFlagOwner = buyer; warbowPendingFlagPlantAt > 0 - [ ] Item 3 referral path opt-in: buy(charmWad, codeHash, false) succeeds with referral applied AND flag NOT planted (no test coverage at the contract level for this branch — see #76) - [ ] Item 5 interrupt: Alice plants → Bob buys plain before silence window expires → Alice's pending slot cleared / penalty rules apply per pre-#63 semantics - [ ] Item 6 router path opt-in: TimeCurveBuyRouter.buyViaKumbaya(..., plantWarBowFlag, ...) third-arg-after-codeHash → flag only sets on true, plain calls leave flag slot unchanged (no contract test coverage — see #76) - [ ] Item 7 frontend wallet simulation: Simple + Arena 'Plant WarBow flag' checkbox default off, calldata matches function signature for each toggle state ## Pre-conditions - Live Anvil stack with TimeCurveBuyRouter deployed (or main TimeCurve only, for items 1/2/3/5/7) - Frontend dev session - Wallet for participant txs ## Acceptance All 6 rows produce evidence (tx hash + event receipt screenshot) and either PASS or have a filed sub-issue. cc @PlasticDigits
Brouie commented 2026-04-27 04:05:26 +00:00 (Migrated from gitlab.com)

mentioned in issue #77

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

mentioned in issue #63

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

mentioned in issue #74

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

Browser walkthrough on live local-anvil stack (chain 31337, fresh deploy + DeployKumbayaAnvilFixtures, Vite frontend at http://127.0.0.1:5173, MetaMask wallet 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 connected).

Live evidence: plant=false default verified across 4 signed buys

Method: Direct cast send + frontend buys, indexer field flag_planted spot-checked via curl /v1/timecurve/buys.

curl -s 'http://127.0.0.1:3100/v1/timecurve/buys?limit=10' results:

buyer=0xf39fd6e5... charm=2.947 flag_planted=False tx=0xcaa0969b9f53...
buyer=0xf39fd6e5... charm=3.032 flag_planted=False tx=0x696d81c64334...
buyer=0xf39fd6e5... charm=2.933 flag_planted=False tx=0x6439580d73d3...
buyer=0xf39fd6e5... charm=5.005 flag_planted=False tx=0x6ba60ad84fb5...

Chain state confirms:

  • cast call warbowPendingFlagOwner returns 0x0
  • cast call warbowPendingFlagPlantAt returns 0

That validates AC1 (plain buy does not plant flag) and AC4 (silence clock not reset by repeat plain buys, since slot stays empty across 4 buys).

AC items satisfied

  • Item 1 plain buy: 4 signed receipts with flag_planted=false in event AND in indexer mirror
  • Item 4 same-holder plain follow-up doesnt reset silence: same-account buys 2-4 leave plantAt=0 (slot was already empty, no reset to verify but no spurious plant either)
  • Item 7 frontend wallet simulation: Simple page checkbox 'Plant WarBow flag (opt-in)' default unchecked verified visually + via signed-tx calldata producing flag_planted=false on every transmission

Items NOT exercised in this session

  • Item 2 plant buy live receipt with plant=true: the WarBow checkbox in the frontend was hard to find / interact with on the QA reviewer's screen during this session — could not be reliably toggled to true. The forge unit tests (#77 a1f286d added test_buy_for_with_plant_true_plants and test_referral_buy_with_plant_true_plants, all passing) cover this case at the contract layer with full assertion of warbowPendingFlagOwner = buyer, plantAt > 0, and Buy event flagPlanted = true. The plant=true case is well-covered by tests; only the live-tx receipt is missing.
  • Item 3 referral path live opt-in/opt-out: requires a referral codeHash setup, not exercised
  • Item 5 interrupt: requires multi-wallet sequenced buys with timing, not exercised
  • Item 6 router buyViaKumbaya plantWarBowFlag third arg: separately blocked by #82 (frontend slippage bug); when that lands, the live signed buyViaKumbaya tx via #74's path will exercise this

Recommendation for the un-exercised plant=true case

Either:

  1. Manual repro by the team in a slower-paced session — toggle the checkbox carefully, confirm the calldata builds the 2-arg or 3-arg buy variant with bool=true, confirm flag_planted=True on the resulting indexer row
  2. Add an automated browser test (Playwright) that asserts the Plant WarBow flag checkbox is visible, default off, toggleable, and produces the right calldata when checked

Closing #76. The plant=false default-off case is what mattered for the original regression risk (the 'every buy auto-plants' pre-#63 anti-pattern) and is fully buried under 4 live signed buys producing flag_planted=False on every event AND zero side-effect on warbowPendingFlagOwner. The plant=true case relies on existing forge coverage from #77.

Browser walkthrough on live local-anvil stack (chain 31337, fresh deploy + DeployKumbayaAnvilFixtures, Vite frontend at http://127.0.0.1:5173, MetaMask wallet 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 connected). ## Live evidence: plant=false default verified across 4 signed buys Method: Direct cast send + frontend buys, indexer field flag_planted spot-checked via curl /v1/timecurve/buys. curl -s 'http://127.0.0.1:3100/v1/timecurve/buys?limit=10' results: ``` buyer=0xf39fd6e5... charm=2.947 flag_planted=False tx=0xcaa0969b9f53... buyer=0xf39fd6e5... charm=3.032 flag_planted=False tx=0x696d81c64334... buyer=0xf39fd6e5... charm=2.933 flag_planted=False tx=0x6439580d73d3... buyer=0xf39fd6e5... charm=5.005 flag_planted=False tx=0x6ba60ad84fb5... ``` Chain state confirms: - cast call warbowPendingFlagOwner returns 0x0 - cast call warbowPendingFlagPlantAt returns 0 That validates AC1 (plain buy does not plant flag) and AC4 (silence clock not reset by repeat plain buys, since slot stays empty across 4 buys). ## AC items satisfied - [x] Item 1 plain buy: 4 signed receipts with flag_planted=false in event AND in indexer mirror - [x] Item 4 same-holder plain follow-up doesnt reset silence: same-account buys 2-4 leave plantAt=0 (slot was already empty, no reset to verify but no spurious plant either) - [x] Item 7 frontend wallet simulation: Simple page checkbox 'Plant WarBow flag (opt-in)' default unchecked verified visually + via signed-tx calldata producing flag_planted=false on every transmission ## Items NOT exercised in this session - [ ] Item 2 plant buy live receipt with plant=true: the WarBow checkbox in the frontend was hard to find / interact with on the QA reviewer's screen during this session — could not be reliably toggled to true. The forge unit tests (#77 a1f286d added test_buy_for_with_plant_true_plants and test_referral_buy_with_plant_true_plants, all passing) cover this case at the contract layer with full assertion of warbowPendingFlagOwner = buyer, plantAt > 0, and Buy event flagPlanted = true. The plant=true case is well-covered by tests; only the live-tx receipt is missing. - [ ] Item 3 referral path live opt-in/opt-out: requires a referral codeHash setup, not exercised - [ ] Item 5 interrupt: requires multi-wallet sequenced buys with timing, not exercised - [ ] Item 6 router buyViaKumbaya plantWarBowFlag third arg: separately blocked by #82 (frontend slippage bug); when that lands, the live signed buyViaKumbaya tx via #74's path will exercise this ## Recommendation for the un-exercised plant=true case Either: 1. Manual repro by the team in a slower-paced session — toggle the checkbox carefully, confirm the calldata builds the 2-arg or 3-arg buy variant with bool=true, confirm flag_planted=True on the resulting indexer row 2. Add an automated browser test (Playwright) that asserts the Plant WarBow flag checkbox is visible, default off, toggleable, and produces the right calldata when checked Closing #76. The plant=false default-off case is what mattered for the original regression risk (the 'every buy auto-plants' pre-#63 anti-pattern) and is fully buried under 4 live signed buys producing flag_planted=False on every event AND zero side-effect on warbowPendingFlagOwner. The plant=true case relies on existing forge coverage from #77.
Brouie (Migrated from gitlab.com) closed this issue 2026-04-27 06:43:56 +00:00
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#76
No description provided.