Skip to content

Comments

Add 504 to accepted status codes in .lychee.toml#1254

Merged
sbryngelson merged 1 commit intoMFlowCode:masterfrom
sbryngelson:linkchecker-fix
Feb 23, 2026
Merged

Add 504 to accepted status codes in .lychee.toml#1254
sbryngelson merged 1 commit intoMFlowCode:masterfrom
sbryngelson:linkchecker-fix

Conversation

@sbryngelson
Copy link
Member

@sbryngelson sbryngelson commented Feb 23, 2026

CodeAnt-AI Description

Treat 504 Gateway Timeout as acceptable link status

What Changed

  • Link checker configuration now accepts HTTP 504 responses as valid, so links returning 504 will not be treated as broken
  • This reduces transient false positives when upstream servers time out during scans

Impact

✅ Fewer false broken-link reports
✅ Fewer CI linkcheck failures due to upstream timeouts
✅ More stable link scan results

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Copilot AI review requested due to automatic review settings February 23, 2026 15:51
@sbryngelson sbryngelson merged commit 38f0457 into MFlowCode:master Feb 23, 2026
20 checks passed
@MFlowCode MFlowCode deleted a comment from codeant-ai bot Feb 23, 2026
@codeant-ai codeant-ai bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Feb 23, 2026
@MFlowCode MFlowCode deleted a comment from coderabbitai bot Feb 23, 2026
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Feb 23, 2026

CodeAnt AI finished reviewing your PR.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Lychee link checker configuration to accept HTTP 504 (Gateway Timeout) status codes as valid responses, in addition to the already accepted 200, 429, and 502 codes.

Changes:

  • Added HTTP status code 504 to the list of accepted status codes in the Lychee configuration

@github-actions
Copy link

Claude Code Review

Head SHA: 4cd6badd96623983005fdfee95d24c4fb5e9f7bd


1 file changed:

  • .lychee.toml

Summary of Changes

  • Adds HTTP 504 (Gateway Timeout) to the list of accepted status codes in the lychee link-checker configuration
  • Prevents transient CI failures caused by upstream servers timing out during link scans
  • Reduces false-positive broken-link reports without masking genuinely broken URLs
  • The change is a one-line addition to an existing array of accepted codes (200, 429, 502200, 429, 502, 504)

Findings

No bugs or CLAUDE.md violations found.

Improvement opportunities:

  1. .lychee.toml — document the rationale for each accepted code
    The commented-out example line includes codes like 206 and 403 that are absent from the active list, and the active list includes 502/504 with no explanation. Inline comments (e.g., # 429 = rate-limited, 502/504 = transient gateway errors) would help future maintainers understand why each code is intentionally allowed.

  2. .lychee.toml — consider whether 502 and 504 should share a comment block
    502 Bad Gateway and 504 Gateway Timeout are now both accepted. If the intent is to tolerate all transient gateway errors, it may be worth noting that 503 Service Unavailable is another related code that is not accepted — either by adding it or leaving a comment explaining the deliberate omission.

  3. .lychee.toml — revisit retry_wait_time alongside the new accepted code
    504 errors are transient by nature. Accepting them unconditionally (rather than retrying and only accepting on repeated failure) means a link that is actually broken but sitting behind a timing-out proxy will never be caught. Confirming that the existing retry_wait_time = 4 and retry count are sufficient before falling back to accepting 504 as valid would make this policy more robust.


Reviewed with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Development

Successfully merging this pull request may close these issues.

1 participant