Repository navigation
Conversation
Abort stalled price requests after a bounded deadline and fall back so the monitor loop continues. Add regression coverage for timeout fallback and timer cleanup.\n\nFixes t1protocol#235.
This was referenced Sep 18, 2026
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.
Description
Motivation and Context
ThresholdMonitor.readEthPriceFromCoingecko()awaitedfetch()without a deadline. A rejected request reached the configured fallback, but a request that remained pending blockedpauseOrUnpauseIfNeeded()forever. Because each chain monitor waits for that call before its next poll, one stalled CoinGecko request permanently stopped pause/unpause evaluations for that chain.The request now uses an
AbortControllerwith a bounded timeout. Aborts are handled by the existing error path, so the monitor usesETH_PRICE_FALLBACKand continues polling.Fixes #235.
This change is independent of #232 and #234. A synthetic combined tree containing all three PR heads merged without conflict and passed all seven focused intent-pauser tests.
How Has This Been Tested?
bun test test/TresholdMonitor.timeout.test.ts— 2 passed, 0 failed.bun test— 2 passed, 0 failed on this branch.bun x tsc --noEmit --target ESNext --module Preserve --moduleResolution Bundler --types bun --skipLibCheck --allowImportingTsExtensions src/TresholdMonitor.ts test/TresholdMonitor.timeout.test.tsbun test— 7 passed, 0 failed across three focused test files.git diff --check— passed.bun x tsc -p tsconfig.json --noEmitremains blocked on the unchanged base by the missing generated../../contracts/artifacts/src/T1ERC7683.sol/T1ERC7683.jsonartifact; the same error reproduces on cleancanary.Types of changes (remove all unchecked types)
Checklist: