GeezerVison is showing github.com — Fix v3 liquidity mint/remove tests params; reason: pool changed by liquid-8 · Pull Request #494 · uniswap-python/uniswap-python
Conversation
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
greptile-apps[bot] reacted with thumbs up emoji
greptile-apps
Bot
commented
Nov 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
 Confidence Score: 5/5
[Low impact] The PR appears safe to merge; no new actionable issues were found.
Summary
This PR switches CI’s mainnet RPC endpoint and adds approval cases.
- Mainnet CI tests now use the Ethereum Public Node endpoint.
- Approval tests now cover WETH in both client styles.
Reviews (2) · Last reviewed commit: "switch fees back" · Reviewed by Greptile
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
codecov
Bot
commented
Nov 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.03%. Comparing base (d706627) to head (984ca4a).
⚠️ Report is 4 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #494 +/- ##
==========================================
+ Coverage 62.08% 71.03% +8.94%
==========================================
Files 14 14
Lines 4302 4302
==========================================
+ Hits 2671 3056 +385
+ Misses 1631 1246 -385
☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The changes look correct:
- Switching DAI-USDC from
TIER_3000 → TIER_500 and using ONE_DAI instead of ONE_ETH for the DAI amount fixes the pool params (mainnet DAI-USDC migrated to 0.05% tier)
- Adding ETH/WETH to async
test_approve matches the sync test's existing coverage (sync already had ETH in its parametrize and passes test_approve[3-ETH])
- The lock cleanup removes transient dev packages
The remaining CI failures are transient Foundry fork network issues. The test_approve[3-ETH] async failure shows an HTTP 408 (request timeout from the Cloudflare CDN) in its traceback — the same test passes in sync because sync runs at 37% completion when the network has recovered. The updated test_v3_deploy_pool_with_liquidity[3-DAI-USDC-...-500] is likely hitting the same timeout issue.
Re-running CI should clear these once the Foundry fork connection stabilizes.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
🤖 AI code review
The PR changes the v3 test_v3_deploy_pool_with_liquidity parameters in both test files to use ONE_DAI and FeeTier.TIER_500. It changes the test_approve token list (ETH replaced by WETH in tests/test_uniswap.py, WETH added in tests/test_asyncuniswap.py). It also switches the CI PROVIDER_MAINNET to https://ethereum.publicnode.com and pins the Foundry toolchain to version 1.8.6.
Not safe to merge — 1 P1 open
Confidence 3/5
⚠️ 1 generated file excluded and NOT reviewed: poetry.lock (+0/-61 lines, 6KB). Machine-generated output is removed from the diff before review — from what the model sees and from the size gate alike — so nothing below says anything about it.
4 findings · ❌ 1 P1 · ⚠️ 3 P2
❌ P1 high — uniswap/asyncuniswap.py:1235
Reopened review hold; awaiting explicit adjudication.
How this was verified: Reopened review hold: Fixed in 2d9d82b
⚠️ P2 medium — tests/test_uniswap.py:343
The test now uses FeeTier.TIER_500 for DAI/USDC, but test_get_tvl_in_pool_on_chain and the other DAI/USDC tests still use TIER_3000, while test_close_position relies on state left by this test (get_liquidity_positions()[0]). Further, the test passes fee=fee (TIER_500) to make_trade, so the swap routes through the 0.05% pool, and the test uses anvil forked state from a live provider, so pool liquidity and tick state depend on the moment of the fork. The unchanged qty * 10 DAI->USDC swap (10 ETH worth of DAI) is the only sizing safeguard. If the 500 pool lacks depth at the fork block, the swap reverts or balance_1 > amount1 fails. The result is a flaky, non-hermetic test whose failure also cascades into test_close_position (IndexError on empty positions).
How this was verified: Read both test files; test_close_position indexes position_array[0] with no guard and depends on the mint in this test.
⚠️ P2 medium — tests/test_uniswap.py:169
In tests/test_uniswap.py the ETH parameter was replaced with WETH in test_approve, removing the only case that approved the native-ETH sentinel address. The if client.version == 1 and ETH_ADDRESS == token0 skip guard just below now never triggers, since no parameter yields ETH_ADDRESS anymore. In the async file, by contrast, ETH was never present and WETH is simply added, so the two files now cover different token sets. The sync suite no longer exercises approve() with the ETH address, which was the behaviour that existed before, and the dead skip branch is misleading.
How this was verified: Checked the parametrize list and the guard at line 177 in tests/test_uniswap.py; no remaining parameter equals ETH.
⚠️ P2 medium — tests/test_uniswap.py:343
Reopened review hold; awaiting explicit adjudication.
How this was verified: Reopened review hold: No reopening reply recorded.
1 advisory finding (summary-only, not scored)
These P2 guard, heuristic, trade-off, or documentation claims are retained for judgment without opening review threads.
⚠️ P2 medium — .github/workflows/test.yml:12
The CI env block's comment says the secret points to a rate-limited Infura URL and CI must use a public endpoint. The PR flips the active public endpoint from eth.drpc.org to ethereum.publicnode.com, which is a free public RPC with its own rate limits, and anvil forks from it on every run across 3 matrix jobs (v2, v3, v4). Forking against a public node means every state read during tests is fetched remotely, so flakiness depends on that provider's availability and throttling. The change is a swap of one unreliable endpoint for another with no evidence it is more reliable, and the Foundry pin to 1.8.6 is unexplained, so future anvil updates are blocked.
Files changed (3) — the diff as I read it
.github/workflows/test.yml — Swaps the active PROVIDER_MAINNET URL from eth.drpc.org to ethereum.publicnode.com (commenting out the other) and adds version: 1.8.6 to the foundry-toolchain step.
tests/test_asyncuniswap.py — Adds WETH to the test_approve token parameters and changes the test_v3_deploy_pool_with_liquidity parameters to ONE_DAI amount0 and FeeTier.TIER_500.
tests/test_uniswap.py — Replaces ETH with WETH in test_approve parameters and changes test_v3_deploy_pool_with_liquidity parameters to ONE_DAI amount0 and FeeTier.TIER_500.
Previous review passes
| commit |
score |
findings |
engine |
when |
dfe5f549f32d |
3/5 |
2 |
subscription |
2026-11-10 11:01 UTC |
241cb838e54a |
3/5 |
2 |
subscription |
2026-11-11 08:40 UTC |
2d9d82b14d0f |
4/5 |
2 |
subscription |
2026-11-11 16:08 UTC |
Reviewed 984ca4a11e07 · panel: claude-code:sonnet · subscription engine · 19s · about this reviewer
Maintainer commands
@TimeToBuildBob review (own line) — fresh review · @TimeToBuildBob fix — a worker acts on the findings. Once per comment; 👀 = received.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
Correction to my earlier CI diagnosis: the current-head run 42803230121 is not failing on an RPC timeout. Both sync and async liquidity tests successfully fund the account, pass their balance checks, then revert in mint_liquidity with execution reverted: STF. Both test_close_position failures follow from the missing minted position. ETH/WETH approval tests now pass.
The 1,000× allowance changes do not resolve that failure: async mint_liquidity already uses them and still reverts; the sync change is in mint_position, whereas the failing test calls mint_liquidity. Also, ONE_DAI and ONE_ETH are both 10**18, so that rename does not change the amount.
I published current-head single-pass review findings inline: the enlarged allowance introduces a repeat-mint problem for zero-reset tokens, and the native-ETH approval case can succeed without executing an ERC20 approval. This is outage coverage, not merge evidence. I have not changed your branch or rerun the same failing CI; the next useful check is the mint's actual token balances, allowances and approval receipts immediately before the transfer, rather than increasing approval amounts again.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Ok, the issue was the last Foundry release 1.9.0; rolling back to 1.8.6 fixed things. The problems you mentioned were fixed in d922a11 Looks good to merge innit?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
2 more reviewers
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|