Skip to content

fix: adjust cross-rate price feed tests to ensure fresh price round data#124

Open
O1ahmad wants to merge 1 commit intomainfrom
ahmad/fix_crossrate_price_feed_tests
Open

fix: adjust cross-rate price feed tests to ensure fresh price round data#124
O1ahmad wants to merge 1 commit intomainfrom
ahmad/fix_crossrate_price_feed_tests

Conversation

@O1ahmad
Copy link
Member

@O1ahmad O1ahmad commented Jan 29, 2026

Motivation

Resolve cross-rate price feed test failures due to stale network price data (example)

Solution

  • revise the warp time calculation based on price-feed numerator/denominator heartbeats
  • also remove the force-bump-patch-version property from the semantic release workflow to avoid creating empty commit releases (see for details)

Reviewer Checklist

  • tests have been added to validate the change
  • code has been commented, particularly in hard-to-understand areas
  • corresponding documentation updates have been made

@otim-squirrel otim-squirrel bot added the fix Bug or issue fix label Jan 29, 2026
@otim-squirrel
Copy link

otim-squirrel bot commented Jan 29, 2026

Linked to Slack thread successfully

@github-actions
Copy link

Forge code coverage:

File % Lines % Statements % Branches % Funcs
src/OtimDelegate.sol 100.00% (43/43) 100.00% (58/58) 100.00% (12/12) 100.00% (5/5)
src/actions/CallOnceAction.sol 95.65% (22/23) 100.00% (27/27) 100.00% (6/6) 75.00% (3/4)
src/actions/DeactivateInstructionAction.sol 94.12% (16/17) 100.00% (18/18) 100.00% (2/2) 75.00% (3/4)
src/actions/DepositERC4626Action.sol 93.33% (28/30) 97.50% (39/40) 100.00% (7/7) 66.67% (2/3)
src/actions/RefuelAction.sol 91.30% (21/23) 96.30% (26/27) 83.33% (5/6) 66.67% (2/3)
src/actions/RefuelERC20Action.sol 95.45% (21/22) 100.00% (28/28) 100.00% (4/4) 66.67% (2/3)
src/actions/SweepAction.sol 90.48% (19/21) 96.30% (26/27) 80.00% (4/5) 66.67% (2/3)
src/actions/SweepCCTPAction.sol 96.55% (28/29) 100.00% (35/35) 100.00% (5/5) 75.00% (3/4)
src/actions/SweepDepositERC4626Action.sol 96.55% (28/29) 100.00% (42/42) 100.00% (6/6) 66.67% (2/3)
src/actions/SweepERC20Action.sol 94.74% (18/19) 100.00% (25/25) 100.00% (3/3) 66.67% (2/3)
src/actions/SweepUniswapV3Action.sol 98.36% (60/61) 100.00% (68/68) 100.00% (11/11) 85.71% (6/7)
src/actions/SweepWithdrawERC4626Action.sol 96.15% (25/26) 100.00% (34/34) 100.00% (5/5) 66.67% (2/3)
src/actions/TransferAction.sol 90.48% (19/21) 95.83% (23/24) 83.33% (5/6) 66.67% (2/3)
src/actions/TransferCCTPAction.sol 93.55% (29/31) 97.06% (33/34) 100.00% (6/6) 75.00% (3/4)
src/actions/TransferERC20Action.sol 88.89% (16/18) 95.83% (23/24) 100.00% (4/4) 66.67% (2/3)
src/actions/TransferERC20OnceAction.sol 94.12% (16/17) 100.00% (23/23) 100.00% (2/2) 66.67% (2/3)
src/actions/TransferOnceAction.sol 88.89% (16/18) 95.65% (22/23) 75.00% (3/4) 66.67% (2/3)
src/actions/UniswapV3ExactInputAction.sol 96.43% (54/56) 98.44% (63/64) 100.00% (10/10) 85.71% (6/7)
src/actions/WithdrawERC4626Action.sol 90.91% (20/22) 96.55% (28/29) 100.00% (5/5) 66.67% (2/3)
src/actions/fee-models/OtimFee.sol 90.91% (20/22) 100.00% (29/29) 100.00% (7/7) 33.33% (1/3)
src/actions/libraries/AssemblyUtils.sol 100.00% (9/9) 100.00% (8/8) 100.00% (1/1) 100.00% (2/2)
src/actions/libraries/UniswapV3OracleParameters.sol 100.00% (17/17) 95.45% (21/22) 0.00% (0/1) 100.00% (2/2)
src/actions/schedules/Interval.sol 75.00% (9/12) 100.00% (17/17) 100.00% (6/6) 0.00% (0/3)
src/context/Receiver.sol 100.00% (9/9) 100.00% (9/9) 100.00% (0/0) 100.00% (4/4)
src/core/ActionManager.sol 100.00% (23/23) 100.00% (20/20) 100.00% (4/4) 100.00% (7/7)
src/core/Gateway.sol 100.00% (16/16) 100.00% (12/12) 100.00% (3/3) 100.00% (5/5)
src/core/InstructionStorage.sol 100.00% (48/48) 100.00% (40/40) 100.00% (1/1) 100.00% (8/8)
src/core/references/InstructionStorageReference.sol 75.00% (15/20) 78.57% (11/14) 0.00% (0/1) 75.00% (6/8)
src/infrastructure/CrossRatePriceFeed.sol 100.00% (31/31) 100.00% (43/43) 100.00% (4/4) 100.00% (3/3)
src/infrastructure/FeeTokenRegistry.sol 100.00% (30/30) 100.00% (44/44) 100.00% (9/9) 100.00% (3/3)
src/infrastructure/InvertedPriceFeed.sol 69.23% (9/13) 70.00% (7/10) 100.00% (0/0) 66.67% (2/3)
src/infrastructure/Treasury.sol 93.33% (14/15) 92.86% (13/14) 80.00% (4/5) 100.00% (3/3)
src/libraries/Instruction.sol 100.00% (6/6) 100.00% (6/6) 100.00% (0/0) 100.00% (3/3)
Total 90.70% (887/978) 96.00% (1031/1074) 94.87% (148/156) 72.96% (143/196)

@O1ahmad O1ahmad force-pushed the ahmad/fix_crossrate_price_feed_tests branch from ad146ef to 3392e26 Compare January 29, 2026 14:16
@O1ahmad O1ahmad requested a review from dv3-000 January 29, 2026 14:20
@O1ahmad O1ahmad force-pushed the ahmad/fix_crossrate_price_feed_tests branch from 3392e26 to 6c13435 Compare February 4, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug or issue fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant