You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
links/broken-links: expose refused and rate-limited target counts in the check details #1679
The links/broken-links check details carry linkTargets, unfetchedTargets and probedTargets, but a target the probe or the crawl got a 401/403 (or a WAF challenge) or a 429 for is skipped before it is added to unfetchedTargets (see the continue paths in packages/rules/src/links/broken-links.ts, around the target loop). linkTargets - unfetchedTargets therefore counts those targets as if their status were known, although nothing was observed of the page.
A consumer that wants to know how many internal links an audit actually observed (the cloud's link coverage record, repo#2729) cannot tell covered from refused or rate-limited. It has to call the number "probed" (an answer attempt), not "known".
What
Add two counts to the coverage details of every broken-links check: refusedTargets (401/403 or a bot-wall challenge) and rateLimitedTargets (429 or an unverified throttle). Distinct targets, the same normalization as linkTargets. Nothing else about the check changes: items, messages, status and skip reasons stay as they are.
Acceptance Criteria
Every broken-links check's details carries refusedTargets and rateLimitedTargets as whole numbers (0 when none)
A fixture with one 403 target, one 429 target and one 404 target reports refusedTargets: 1, rateLimitedTargets: 1 and the 404 as before
A target is counted once however many pages link it, and /a, /a/ and /a#x are one target
No existing check message, item or status changes (rule golden and snapshot tests pass unchanged)
The rule's docs page names the two counts if it lists the coverage details
Activity
feat(rules): links/broken-links counts refused and rate-limited targe…