Skip to content

feat(rules): links/broken-links counts refused and rate-limited targets in its coverage details - #1694

Closed
nc9 wants to merge 1 commit into
mainfrom
feat/broken-links-refused-counts-1679
Closed

nc9 wants to merge 1 commit into
mainfrom
feat/broken-links-refused-counts-1679

Conversation

@nc9

@nc9 nc9 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1679.

Every links/broken-links row (fail, pass, skipped) now carries refusedTargets (401, 403, a bot-wall challenge) and rateLimitedTargets (429, an unverified throttle) in its coverage details. Distinct targets, normalized like linkTargets, so /a, /a/ and /a#x are one and a target linked from many pages counts once. Nothing else changes: items, messages, status and skip reasons are as before.

Why: those targets are skipped before they reach unfetchedTargets, so linkTargets - unfetchedTargets over-counts what was observed. A consumer (the cloud's link coverage record, repo#2729) can now subtract both to a true known count.

  • Both keys are in LINK_COVERAGE_DETAIL_KEYS, which the publish capper keeps whole at every tier and the diff strips from its output, so they survive publish and never read as a changed finding.
  • Existing exact-details expectations updated (rules unit test and the 794, 798 e2e tests); the walled and throttled fixtures now assert 1 and 1.
  • Docs: rules/links/broken-links lists the two counts and how to get the observed count. CHANGELOG bullet under Unreleased.

Acceptance criteria

  • Every broken-links check's details carries both counts as whole numbers, 0 when none: broken-links-refused-counts-1679.test.ts
  • A fixture with one 403, one 429 and one 404 reports 1, 1 and the 404 as before: same file
  • Counted once however many pages link it, /a, /a/ and /a#x one target: same file
  • No existing message, item or status changes: rate-limited-links, broken-links-section, broken-links-reliability-836, the 726 e2e and publish-cap pass; only the exact-details expectations gained the two keys
  • The docs page names the two counts

Checks

tsgo (core-contracts, rules, audit-engine, cli), root lint, cli format:check, make validate. Rules and engine tests run singly under a temp HOME. No JSON schema field was added (details are free-form), so no schema version bump.

Agent skill and docs

  • squirrelscan agent skill (squirrelscan/skills): No change. The skill does not list rule details or details keys, and an agent reads a check's details generically; nothing about how it should act differs.
  • Docs: docs/rules/links/broken-links.mdx lists refusedTargets and rateLimitedTargets and how to compute the observed count: present.

…ts in its coverage details #1679

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9

nc9 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Landed on main as 92e071a (later commits there carry the review fixes). Closing this draft as superseded.

nik

@nc9 nc9 closed this Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

links/broken-links: expose refused and rate-limited target counts in the check details

1 participant