CI: add muffet --rate-limit to reduce transient external 504 failures - #103
Merged
Conversation
The preview-verification job intermittently fails when an external host (notably github.com) returns a burst of 504s mid-scan — muffet issues requests as fast as connection limits allow, which can overwhelm a host or trip its throttling. A recent run timed out every github.com URL at once (including rock-solid repos) and took ~9 minutes. Cap muffet at 20 requests/second globally to smooth out request bursts. This is a safe, host-agnostic throttle: unlike sending an auth token via --header (which muffet would leak to every external host, since it has no per-host header scoping), --rate-limit needs no secret and cannot leak anything. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🚀 Preview Deployment Ready!
This preview will be automatically updated when you push new commits to this PR. Browse all previews: https://preview.wafer.space ⚡ Deployed to custom domain • Preview will be removed when PR is closed |
❌ Preview Site Verification FAILEDPreview Site Verification ReportPR: #103 1. Basic Connectivity ✅
2. Content Verification
3. Multi-Page Asset VerificationDiscovering all pages in the site...
4. Link and Asset Verification (muffet)Running comprehensive muffet validation...
Summary: 0 5. Performance Check
6. Mobile Responsiveness
Summary❌ Some verification checks failed 🔍 Automated verification • Run ID: 27127176409 • 2026-06-08T09:10:09.604Z |
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.
Summary
Adds
--rate-limit=20to the muffet invocation inpreview-verification.ymlto reduce intermittentverify-previewfailures caused by external hosts (notably github.com) returning bursts of504 Gateway Timeoutmid-scan.--max-connections=10 \ --max-connections-per-host=5 \ + --rate-limit=20 \ --buffer-size=16384 \Why
A recent run timed out every
github.comURL at once — including rock-solid repos likegoogle/skywater-pdk— and took ~9 minutes (vs. the usual ~3-4). That all-one-host-at-once pattern is throttling/availability, not link rot. muffet fires requests as fast as its connection limits allow; a global rate cap smooths the bursts.Why not send a GitHub token instead
muffet's
--headerhas no per-host scoping (confirmed in the muffet usage docs:--header= "Custom headers", with no per-host/auth option). AnAuthorization: Bearer <token>header would therefore be sent to every host muffet crawls — including arbitrary external sites — leaking apull-requests: write-scoped token. A token also wouldn't reliably help: muffet fetchesgithub.comHTML pages, not the rate-limitedapi.github.comAPI surface.--rate-limitneeds no secret and cannot leak anything.Notes
20/sis a conservative starting point; can be tuned if scans get too slow or failures persist.🤖 Generated with Claude Code