Repository navigation
[fix] Count eligible pages toward the sitemap discovery cap - #10668
Open
lakers-abing wants to merge 1 commit into
Open
lakers-abing wants to merge 1 commit into
lakers-abing wants to merge 1 commit into
Conversation
This branch has not been deployed
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
Fixes #10667.
With
max_pages=2, a sitemap index whose first shard lists the same page twice currently skips the second shard and returns only one page. Off-host entries can similarly consume the entire budget and prevent valid later pages from being read.Count unique, host-allowed canonical page URLs when deciding whether to open another shard. Keep this additional set bounded by
max_pages. The existing final output ordering and incomplete-discovery handling continue to apply.Type of change
Checklist
./scripts/format.shand./scripts/validate.sh)Duplicate and AI-Generated PR Check
Additional Notes
Ten new regression cases exercise sync and async reads with duplicate URLs, canonical aliases, filtered hosts, mixed entries, and duplicates across shards. They also verify page order, complete-discovery metadata, and that later shards remain unread once the actual page cap is reached. All HTTP is mocked at the transport boundary; the real discovery and page-fetching code runs.
4db4180), sitemap suite with added cases: 10 failed, 52 passed../scripts/format.sh,./scripts/validate.sh, andgit diff --check: passed.Validation environment: macOS ARM64, Python 3.12.14, pytest 9.1.1, Ruff 0.15.20, mypy 2.1.0, SQLAlchemy 2.0.54. Full static validation covers Agno, agnoctl, and cookbook checks. The full repository test suite and live integrations were not run locally.
Generated by Codex with the account holder's authorization; Codex performed the reproduction, diff review, and checks. No independent human code review is claimed. No public API or cookbook changes are needed.