fix: restore green CI (lint gate + two latent test breakages)#85
Open
Reinholdtsen wants to merge 1 commit into
Open
fix: restore green CI (lint gate + two latent test breakages)#85Reinholdtsen wants to merge 1 commit into
Reinholdtsen wants to merge 1 commit into
Conversation
…ure price) CI is red at the lint gate; because build-and-test needs lint, the test suite has not run, hiding two further breakages (confirmed in run Uniswap#80's Test log). - pricing.ts: the lint blocker was an unfixable prettier conflict — the pre-commit hook's prettier (1.19.1) breaks the num.div().times().div() chain onto multiple lines, while CI's eslint prettier/prettier rule (a newer prettier) demands one line, so each tool undid the other. Split the chain into two statements so both agree. Behavior-identical. - constants.ts: set the non-nullable isExternalLiquidity on the shared pool fixture so Pool.save() no longer panics and aborts the whole run. - constants.ts: seed the USDC/WETH fixture with a realistic sqrtPrice (was '1', which yields a nonsensical ~Q192 price) so handleSwap's USD assertions hold. Test-only; no mapping behavior changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
CI has been red on
main. Thelintjob fails, and becausebuild-and-testis gated on it (
needs: lint), the test suite hasn't run — which hid twofurther breakages that surface once lint passes.
Fixes (test/tooling only — no mapping behavior changes)
src/utils/pricing.ts: theprettier/prettiererror was anunwinnable conflict between the pre-commit hook's prettier (1.19.1, breaks
the
num.div().times().div()chain onto multiple lines) and CI'seslint-prettier (newer, wants one line). Split the chain into two
statements so both agree. Behavior-identical.
tests/handlers/constants.ts: set the non-nullableisExternalLiquidityon the shared pool fixture soPool.save()no longerpanics and aborts the whole run (field added in Populate same fields and introduce boolean flag for external liquidity #72, fixture never updated).
tests/handlers/constants.ts: seed the USDC/WETH fixturewith a realistic
sqrtPrice(was'1', a placeholder that yields anonsensical ~Q192 price). Combined with the removal of an intermediate
pool.save()in Remove duplicate saves #45, that placeholder leaked a stale garbage price intothe swap's USD accounting. A real price restores the assertion.
Verification
Lint clean and all 62 tests pass via the same matchstick 0.6.0 Docker image CI
uses (
build-and-testgreen end to end).