feat: auto-detect .md URL pattern to reduce wasted requests#45
Merged
dacharyc merged 1 commit intoagent-ecosystem:mainfrom Apr 19, 2026
Merged
Conversation
After the first batch of markdown-url-support requests, detect whether the site uses page.md or page/index.md based on which form succeeded. Once a clear pattern emerges (80%+), subsequent batches try the winning form first, saving one 404 per page. At default settings (200ms delay, 3 concurrent), this reduces check runtime by ~60% for sites that consistently use one form.
2fd7894 to
841a7e3
Compare
dacharyc
approved these changes
Apr 19, 2026
Member
dacharyc
left a comment
There was a problem hiding this comment.
Thanks for this! It's a nice improvement; I appreciate the PR. 🎉
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.
markdown-url-supporttries two .md URL candidates per page:page.mdthenpage/index.md. Sites that use theindex.mdconvention pay a wasted 404 on every page because the wrong form is tried first.This PR auto-detects the site's pattern after the first batch. Once 80%+ of successful results use the same form, subsequent batches try that form first.
Impact: At default settings (200ms delay, 3 concurrent), reduces
markdown-url-supportcheck runtime by ~60% for sites that usepage/index.md. Sites usingpage.mdare unaffected — the default order is already optimal for them.How it works:
page.mdfirst)detectPreferredMdForm()tallies which form succeededorderCandidates()puts it first for remaining batches