Skip to content

feat(rules): report search crawler delays - #996

Merged
nc9 merged 5 commits into
squirrelscan:mainfrom
WilliamK112:codex/robots-crawl-delay-931
Oct 24, 2026
Merged

nc9 merged 5 commits into
squirrelscan:mainfrom
WilliamK112:codex/robots-crawl-delay-931

Conversation

@WilliamK112

@WilliamK112 WilliamK112 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • preserve Crawl-delay-only robots.txt groups so the directive reaches rule evaluation
  • report applicable wildcard and major search-crawler delays, warning for 10+ second wildcard/Bing delays with an estimated daily crawl cap
  • explain Google/Bing/Yandex behavior, keep delays limited to other bots silent, and document the new check

Closes #931

Verification

  • focused robots.txt tests: 16 passed
  • rules + utils suites: 7,667 passed, 25 todo
  • crawler suite: 691 passed
  • golden tests: 211 passed, 1 skipped
  • bun run typecheck
  • bun run lint
  • bun run format:check
  • bun run docs:check
  • bun run docs:build
  • bun run build

Checklist

  • I added or updated tests for behavioral changes.
  • I did not include secrets, customer data, or incompatible third-party material.
  • Every commit includes a DCO Signed-off-by line (git commit -s).

@nc9

nc9 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Works for the cases in #931. One gap: stacked User-agent: lines only keep the last agent, so User-agent: bingbot / User-agent: AhrefsBot / Crawl-delay: 10 reports nothing for Bing. Please give every stacked agent the group's rules and delay, and add a test. Please also ignore Crawl-delay: 0, and add a CHANGELOG line.

@WilliamK112
WilliamK112 force-pushed the codex/robots-crawl-delay-931 branch from e997771 to d0630b7 Compare October 22, 2026 18:20
@WilliamK112

Copy link
Copy Markdown
Contributor Author

Addressed in d0630b7 and rebased onto current main. Stacked User-agent lines now each receive the group rules and crawl delay, Crawl-delay: 0 is ignored by the rule, and the Unreleased changelog has an Added entry. Added parser and rule coverage for stacked agents plus zero delay. Validation: 19 focused tests pass; all 7,670 utils/rules tests pass (25 existing todos); utils and rules typechecks pass; format check passes.

@WilliamK112
WilliamK112 force-pushed the codex/robots-crawl-delay-931 branch 4 times, most recently from 492c037 to 293e25e Compare October 24, 2026 06:06
@WilliamK112

WilliamK112 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Final validation update: rebased onto current main at 7cc3e28; final head is 16f5d70. All four commits remain patch-equivalent to the reviewed implementation, git diff --check passes, and every commit retains its Signed-off-by trailer.

The complete GitHub Actions suite is green on this head, including the focused rules and parser coverage, CLI tests, crawler and audit-engine tests, golden tests, Compile CLI, format/lint/typecheck, dependency audit, docs build, release tooling, secret scan, CodeQL, and DCO verification. GitHub now reports the PR mergeable and clean.

@WilliamK112
WilliamK112 force-pushed the codex/robots-crawl-delay-931 branch 2 times, most recently from ca217c3 to 16f5d70 Compare October 24, 2026 09:54
@nc9
nc9 force-pushed the codex/robots-crawl-delay-931 branch from 16f5d70 to 55b07aa Compare October 24, 2026 10:44
@nc9
nc9 merged commit 2ef3825 into squirrelscan:main Oct 24, 2026
15 checks passed
@nc9

nc9 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Merged. Thank you @WilliamK112, the stacked User-agent handling and the explicit Bing daily-cap math made the warning concrete rather than generic. (Nik)

nc9 added a commit that referenced this pull request Oct 26, 2026
A Crawl-delay-only group is kept since #996, so `Crawl-delay: -1` (or `1e999`, Infinity, which a published report serializes as null) reached the report as a delay. Only a finite, non-negative delay is stored now; any other is ignored like an unparseable one.

Signed-off-by: Nik Cubrilovic <[email protected]>
nc9 added a commit that referenced this pull request Oct 26, 2026
A Crawl-delay-only group is kept since #996, so `Crawl-delay: -1` (or `1e999`, Infinity, which a published report serializes as null) reached the report as a delay. Only a finite, non-negative delay is stored now; any other is ignored like an unparseable one.

Signed-off-by: Nik Cubrilovic <[email protected]>
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.

crawl/robots-txt: report Crawl-delay (Google ignores it, Bing obeys it)

2 participants