Context
Service test suites (price-feed, contract-audit, mev-scanner) hit real external APIs (CoinGecko, Etherscan, DexScreener). They pass today but are network-flaky, so the services-tests CI job is continue-on-error: true.
Proposed solution
- Stub
globalThis.fetch for external hostnames inside tests (payment/verification layers already run against local anvil)
- Pure parsing logic is already extracted (
analyzer.ts, matching.ts) — extend fixtures for representative API payloads
- Flip
continue-on-error to false once green for a week
Acceptance criteria
- No test opens a socket to a third-party API (verify via injected fetch spy)
services-tests is a required job
Effort: ~half a day.
Context
Service test suites (price-feed, contract-audit, mev-scanner) hit real external APIs (CoinGecko, Etherscan, DexScreener). They pass today but are network-flaky, so the
services-testsCI job iscontinue-on-error: true.Proposed solution
globalThis.fetchfor external hostnames inside tests (payment/verification layers already run against local anvil)analyzer.ts,matching.ts) — extend fixtures for representative API payloadscontinue-on-errorto false once green for a weekAcceptance criteria
services-testsis a required jobEffort: ~half a day.