ci: handle <sitemapindex> in check-links workflow#5334
Merged
davidkonigsberg merged 1 commit intomainfrom May 4, 2026
Merged
Conversation
Co-Authored-By: David Konigsberg <davidakonigsberg@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
fern-support
approved these changes
May 4, 2026
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
The
Check Linksworkflow (runs) has been failing since 2026-05-04 with:Root cause:
https://buildwithfern.com/learn/sitemap.xmlrecently changed shape from a flat<urlset>to a<sitemapindex>that points to per-language sub-sitemaps:The previous step extracted
<loc>entries directly, sourls.txtended up containing only the two child-sitemap URLs (XML files), not the actual page URLs. lychee then fetched those XML files, found 0 HTML links, and bailed out withfailIfEmpty.Fix: Recursively expand
<sitemapindex>entries into their child sitemaps'<loc>URLs before writingurls.txt. Behaviour is unchanged for the legacy flat-<urlset>shape, so this is forward-compatible whether the platform serves an index or a flat sitemap.Verified locally — the new logic produces 325 URLs from the current sitemapindex (vs. 2 before), and exits with a clear error if the sitemap is genuinely empty instead of silently producing an empty
urls.txt.Review & Testing Checklist for Human
workflow_dispatchon this branch and confirm it gets past theCheck non-GitHub linksstep (i.e. lychee's "Total" is non-zero).failIfEmptyerror.Notes
While diagnosing this, I noticed a separate issue worth flagging:
https://buildwithfern.com/learn/sitemap-en.xmlis currently returning an empty<urlset>, whilesitemap-zh.xmlcorrectly contains 325 URLs. With this PR's fix, the workflow will exercise the Chinese pages (which still cover the same docs structure), but English pages won't be exercised until the platform is fixed. Worth investigating infern-platformseparately — likely related to the same change that introduced the sitemapindex.Link to Devin session: https://app.devin.ai/sessions/f71d9cbb5efc401799576519b960ef05
Requested by: @davidkonigsberg