Skip to content

minor fixes from #183#208

Open
nialexsan wants to merge 8 commits intomainfrom
nialexsan/minor-tests-fixes
Open

minor fixes from #183#208
nialexsan wants to merge 8 commits intomainfrom
nialexsan/minor-tests-fixes

Conversation

@nialexsan
Copy link
Collaborator

Closes: #???

Description

Minor independent fixes from #183


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@nialexsan nialexsan requested a review from a team as a code owner March 11, 2026 15:12
@nialexsan
Copy link
Collaborator Author

@claude

@claude
Copy link

claude bot commented Mar 16, 2026

Claude finished @nialexsan's task in 1m 39s —— View job


PR Review

  • Read CLAUDE.md for repo guidelines
  • Analyze changed files
  • Provide review feedback

Summary

This PR makes several targeted, independent fixes. Overall the changes look clean and correct. Here's a breakdown:


cadence/contracts/mocks/MockStrategies.cdc

The storage path identifier is fixed from FlowYieldVaultsStrategyComposerIssuer_ to MockStrategiesComposerIssuer_. This is the right fix — the mock contract should use its own namespace to avoid collisions with the production contract's storage path. The corresponding update to local/setup_emulator.sh is consistent.


Removal of initial rebalanceYieldVault() calls (9 test files) ✅

The first rebalanceYieldVault call in each test scenario (the one before the main loop/assertion phase) has been removed. Remaining rebalanceYieldVault calls further in each test are preserved. This looks intentional — the initial forced yield vault rebalance appears redundant if rebalancePosition already handles the full rebalance. The comment update in tracer_strategy_test.cdc clarifies the reasoning well:

"Position health increased because FLOW collateral is worth more; drawDown brings it back to target."

Minor note: In rebalance_scenario3a/3b/3c/3d_test.cdc, rebalanceYieldVault is still called later in the test (line ~199–205). Worth confirming those later calls are intentionally kept vs. also being candidates for removal.


cadence/tests/PMStrategiesV1_syWFLOWv_test.cdc

  • Removed import "test_helpers.cdc" and inlined _executeScript and equalAmounts locally. Both helpers are actively used (lines 230, 260, 305 for equalAmounts) — no dead code.
  • The equalAmounts tolerance comparison is correctly implemented with unsigned arithmetic handling.

flow.json

Adds testnet-fork aliases across all contracts, mirroring the testnet addresses. This is a mechanical but large change (277 lines). The pattern is consistent across all entries. Assuming the testnet-fork environment uses the same deployed contract addresses as testnet, this is correct.


.github/workflows/claude-pr-review.yml

There's a pending review suggestion at this file for types: [submitted]. The file already has types: [submitted] on the pull_request_review event (line 11), so the suggestion appears to already be incorporated. Note: I'm unable to modify workflow files due to GitHub App permission restrictions.


Overall Assessment

The changes are clean and focused. No logic bugs found. The flow.json testnet-fork additions are large but consistent. Ready to merge pending confirmation on the rebalanceYieldVault removals in scenario3 tests.

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