Skip to content

fix(rewards-claim): newtype fee-window/gate args + injectable clock (#3336) - #617

Draft
MichaelTaylor3d wants to merge 3 commits into
developfrom
fix/3336-claim-driver-newtypes
Draft

MichaelTaylor3d wants to merge 3 commits into
developfrom
fix/3336-claim-driver-newtypes

Conversation

@MichaelTaylor3d

Copy link
Copy Markdown
Contributor

DO NOT MERGE — gate round in progress.

Summary

Fixes #3336: two adjacent bare u64 args in the claim driver whose transposition compiles and goes undetected by the suite. Work in progress.

Refs #3336

MichaelTaylor3d and others added 3 commits September 14, 2026 10:53
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…clock seam

- GateCadenceSeconds / FeeWindowCadenceSeconds newtypes on
  ClaimEngine::with_persisted_fee_window so transposing the two cadence
  values at the driver.rs:475 call site is a compile error, not a silent
  money defect (#3336).
- run_claim_driver_in_with_clock: the production body with the clock
  parameterized instead of hardcoded to unix_now_seconds, so the timing
  behaviour is testable under tokio::time::advance. run_claim_driver_in
  stays a thin wrapper over it passing the real clock.
- Test still to add; build verification in progress.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…_in_with_clock

Adds the_production_body_tracks_the_clamped_gate_and_the_raw_fee_window,
proving the F2 gate-vs-fee-window distinction through the actual
production body (run_claim_driver_in_with_clock) rather than a
hand-assembled drive() call, so a transposition of the two cadence
arguments at with_persisted_fee_window's call site (#3336) is caught
end-to-end.

Refs #3336

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant