fix: classify HTTP 202/5xx as indeterminate in http-status-codes#80
Merged
fix: classify HTTP 202/5xx as indeterminate in http-status-codes#80
Conversation
Vercel/Next.js ISR returns 202 Accepted during cache-miss/build for fresh URLs. The previous classifier treated any non-4xx as evidence of soft-404, so afdocs's intentional fan-out of 155+ unique nonexistent URLs would trip ISR and produce false-positive failures that real agents (low concurrency, warm cache) never see. 5xx responses tell us nothing about how the site handles bad URLs, either; they were silently passing as "correct-error" before. Both now route to a new `indeterminate` classification that's excluded from the soft-404 tally and reported separately. When the entire sample is indeterminate, the check returns `warn` and falls back to the default 0.5 warn coefficient rather than penalizing the site for CDN behavior it can't measure. Verified against plaid.com/docs at concurrency 30: one run returned 281 correct-error / 19 indeterminate, another 16 / 284 — both correctly pass instead of flunking the site for ISR build behavior.
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
Closes #79.
indeterminateclassification for HTTP 202 (Vercel/Next.js ISR cache-miss/build) and 5xx responses, replacing the previous behavior where 202 was misclassified as soft-404 and 5xx silently passed ascorrect-error.warn("Could not determine bad-URL handling") when the entire sample is indeterminate; scoring falls back to the default 0.5 warn coefficient rather than penalizing the site for CDN behavior we can't measure.SCORING.md,scoring-reference.md, anddocs/agent-score-calculation.mdto reflect that http-status-codes now has a (narrow) warn state.Test plan
npm run lintpasses (eslint + tsc --noEmit clean).npm testpasses (1272 tests).