fix(crawl): retry transient connection timeouts during registry sweeps#17
Merged
Conversation
Three registry-monitor runs died on httpx ConnectTimeout — the ClawHub client created a fresh AsyncClient per request with no retries, so a single transient connection blip (during enumeration paging or a per-skill fetch) propagated and aborted the whole crawl. - ClawHubClient now uses AsyncHTTPTransport(retries=3), which retries connection-level failures (ConnectError/ConnectTimeout) with backoff. Retry count is configurable. - _enumerate_skills now degrades gracefully on any residual error (after retries) instead of only catching ClawHubError, so a hard failure stops paging rather than crashing the run. Tests: client retry configuration + enumeration surviving a raw timeout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DNoTXU8k3pfSBzR7aJubqL
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
All three
Registry Monitorruns died onhttpx.ConnectTimeout. Root cause: theClawHubClientcreated a freshAsyncClientper request with no retries, so a single transient connection blip — whether during registry enumeration (list paging) or a per-skill fetch — propagated and aborted the entire crawl. The per-skill guard I added earlier didn't help when the timeout hitlist_skillsduring enumeration.Fix at the source:
ClawHubClientnow useshttpx.AsyncHTTPTransport(retries=3), which retries connection-level failures (ConnectError/ConnectTimeout, with backoff) transparently. Retry count is configurable._enumerate_skillsnow degrades gracefully on any residual error after retries (not justClawHubError), so a genuine hard failure stops paging instead of crashing the run.This is the piece that was actually breaking the live sweeps — the incremental/
--fulllogic from #16 is correct; it just never got to run to completion because enumeration kept timing out.Type of Change
Checklist
ruff+mypyclean🤖 Generated with Claude Code
https://claude.ai/code/session_01DNoTXU8k3pfSBzR7aJubqL
Generated by Claude Code