Skip to content

tests(llms-txt): add coverage for network failure and heading edge cases#17040

Merged
connorjclark merged 1 commit into
GoogleChrome:mainfrom
Nithin0620:tests/llms-txt-edge-cases
Jun 2, 2026
Merged

tests(llms-txt): add coverage for network failure and heading edge cases#17040
connorjclark merged 1 commit into
GoogleChrome:mainfrom
Nithin0620:tests/llms-txt-edge-cases

Conversation

@Nithin0620

Copy link
Copy Markdown
Contributor

Summary

Adds missing test coverage for the llms-txt audit.

This PR adds tests for:

  • Network failures where the gatherer returns no status (null / 0)
  • Redirect responses (301 / 302)
  • Markdown content containing only ## H2 headings without a required # H1 heading

These cases were already handled by the current implementation but did not previously have test coverage.

The redirect test also documents the current behavior where a valid 3xx response with null content throws, since the audit currently has no redirect handling branch.

Related Issues/PRs

N/A

@Nithin0620 Nithin0620 requested a review from a team as a code owner June 1, 2026 13:51
@Nithin0620 Nithin0620 requested review from connorjclark and removed request for a team June 1, 2026 13:51
@google-cla

google-cla Bot commented Jun 1, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@connorjclark connorjclark requested a review from TravenReese June 1, 2026 21:28

@TravenReese TravenReese left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing!

@connorjclark connorjclark merged commit d21355d into GoogleChrome:main Jun 2, 2026
30 of 31 checks passed
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.

3 participants