fix(signals): bound fetchRepoFocusManifestFile's raw-content fetch with a timeout - #7101
Conversation
…th a timeout fetchRepoFocusManifestFile fetches a repo's manifest from GitHub's raw-content CDN across up to 4 candidate paths with no AbortSignal.timeout, unlike the bounded-fetch convention in src/review/** (alerts.ts, enrichment-wire.ts, visual/capture.ts). It's on the cold-cache path for resolving a repo's gate/review policy on webhook/sweep processing, so a slow github.com/ghraw response could stall manifest resolution. Add a named MANIFEST_FETCH_TIMEOUT_MS (10s) and pass AbortSignal.timeout(...) to each candidate fetch. A TimeoutError is already handled by the existing catch that falls through to the next candidate. Closes JSONbored#7071
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7101 +/- ##
=======================================
Coverage 93.75% 93.75%
=======================================
Files 692 692
Lines 68808 68809 +1
Branches 18781 18781
=======================================
+ Hits 64511 64512 +1
Misses 3302 3302
Partials 995 995
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-17 21:33:44 UTC
Review summary Nits — 3 non-blocking
Flagged checks (non-blocking)
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
What
fetchRepoFocusManifestFile(src/signals/focus-manifest-loader.ts) fetches a repo's.loopover.yml/.loopover.jsonfrom GitHub's raw-content CDN, trying up to 4 candidate paths in sequence — with noAbortSignal.timeouton any of them, unlike the bounded-fetch convention acrosssrc/review/**(alerts.ts10s,enrichment-wire.ts5s,visual/capture.ts8s). It feeds the cold-cache path for resolving a repo's gate/review policy on webhook and sweep processing, so a slow or hanginggithub.laiyagushi.com/ghrawresponse could stall manifest resolution for that repo with no per-request ceiling.How
Add a named module-scoped
MANIFEST_FETCH_TIMEOUT_MS(10s, matching the siblings' order of magnitude) and passAbortSignal.timeout(MANIFEST_FETCH_TIMEOUT_MS)to each candidate-path fetch. ATimeoutErrorrejection is already handled by the existing broadcatchthat falls through to the next candidate, so no new catch branch is needed and thestring | nullreturn contract is unchanged.Validation
Test added to the existing
focus-manifest-loader.test.ts: every candidate fetch is called with anAbortSignal. Confirmed it fails against the unfixed code (no signal) and passes with the fix.typecheckclean; the loader suite passes.Closes #7071