Skip to content

Conversation

@aidankmcalister
Copy link
Member

@aidankmcalister aidankmcalister commented Oct 23, 2025

Summary by CodeRabbit

  • Chores
    • Two-stage link validation: first run renamed to indicate "First Run" and excludes specific HTTP status codes from caching (429, 500, 502, 503, 504); a targeted retry run is added with longer timeouts, more retries, extra excludes, and separate output.
    • Reporting and cleanup prefer retry results when present, append contextual notes to formatted reports, and base CI failure on the retry run when applicable; existing exclusion patterns and working directory handling remain.

@aidankmcalister
Copy link
Member Author

@CodeRabbit pause

@github-actions
Copy link
Contributor

Dangerous URL check

No absolute URLs to prisma.io/docs found.
No local URLs found.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

Walkthrough

Adds a conditional second Lychee run that retries when the first run fails, increases timeouts/retries/retry-wait, adds cache exclusions for certain HTTP statuses, prefers the retry report when present, updates report formatting and cleanup, and adjusts final-failure logic to consider the retry outcome.

Changes

Cohort / File(s) Change Summary
GitHub Actions workflow
./.github/workflows/lychee.yml
Renamed initial Lychee step to indicate "First Run"; added a conditional "Second Run" retry step with longer timeout, increased max-retries and retry-wait, added cache-excludes for HTTP statuses (429, 500, 502, 503, 504), expanded excludes and retained existing excludes (http://localhost.*, https://localhost.*, https://cockroachlabs.com, ^/.*), write retry output to out-retry.md, updated cleanup to prefer retry report and derive a note from it when present, formatted reports to include the derived note and appended original content, and changed final failure logic to base failure on the retry run if it exists (falling back to the first run otherwise).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

Possibly related PRs

Pre-merge checks

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The pull request title "lychee updated" is vague and generic, using a non-descriptive term that fails to convey meaningful information about the specific changes made. While the title is technically related to the changeset (which does update the Lychee workflow), it doesn't communicate the substantive changes such as adding retry logic, modifying timeout handling, or restructuring the failure conditions. A developer scanning the git history would not understand what aspect of Lychee was changed from this title alone. Consider using a more descriptive title that captures the main change, such as "Add retry logic to Lychee link checker workflow" or "Implement Lychee link checker retry mechanism with improved timeout handling." This would clearly communicate the primary purpose of the changes to reviewers and future maintainers.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f272c58 and 6a2d63a.

📒 Files selected for processing (1)
  • .github/workflows/lychee.yml (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: runner / linkspector
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (4)
.github/workflows/lychee.yml (4)

18-26: Well-motivated improvements for clarity and retry strategy.

The step rename clarifies the multi-run approach, and the cache exclusion for transient HTTP statuses (429, 5xx) ensures the retry step has fresh opportunities to succeed without stale cache entries.


43-67: Retry strategy is well-structured.

The retry step correctly uses always() and checks for first-run failure, with appropriately conservative parameters (30s timeout vs 20s, 10 retries vs 8). The separate output file allows the cleanup logic to prefer the retry report. Parameters are suitable for distinguishing transient failures from real broken links.


72-96: Report prioritization and formatting logic is sound.

The cleanup correctly prefers the retry report when available and provides contextually appropriate notes explaining the caching and retry behavior. The sed filtering to remove summary headers before appending to formatted output ensures clean report formatting.


106-115: Previous review concern is properly addressed.

The condition now correctly captures the two failure scenarios: retry succeeded but reported non-zero exit, or retry itself errored. The fallback logic sensibly prefers the retry exit code when available (more recent findings) and falls back to the first run's exit code otherwise. Operator precedence is correct: (A && B) || C evaluates as intended.

One edge case to confirm: if the first run fails but the retry step never begins (e.g., workflow cancelled between steps), the retry.conclusion would be 'skipped', the condition would be false, and the job would succeed despite first-run failures. However, this is unlikely given the always() && steps.lychee.outputs.exit_code != 0 condition ensures the retry starts whenever the first run fails. Is this acceptable risk for your use case, or should we add an explicit fallback for the first run's exit code?


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes to avoid unnecessary requests, and speed up consecutive runs.

📊 Results Overview

Status Count
🔍 Total 2416
✅ Successful 2389
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 26
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1
Full Github Actions output

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 23, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6a2d63a
Status: ✅  Deploy successful!
Preview URL: https://4b5e3048.docs-51g.pages.dev
Branch Preview URL: https://dc-5756-lychee-rerun.docs-51g.pages.dev

View logs

@aidankmcalister
Copy link
Member Author

@CodeRabbit pause

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 23, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

✅ Actions performed

Reviews paused.

1 similar comment
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

✅ Actions performed

Reviews paused.

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes to avoid unnecessary requests, and speed up consecutive runs.

📊 Results Overview

Status Count
🔍 Total 2417
✅ Successful 2387
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 26
❓ Unknown 0
🚫 Errors 3
⛔ Unsupported 1

Errors per input

Errors in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases/100-connect-your-database-typescript-cockroachdb.mdx

Errors in 800-guides/160-tanstack-start.mdx

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes. Failed links (timeouts, rate limits) are retried in a second run with longer timeout.

📊 Results Overview

Status Count
🔍 Total 2417
✅ Successful 2389
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 26
❓ Unknown 0
🚫 Errors 1
⛔ Unsupported 1

Errors per input

Errors in 800-guides/160-tanstack-start.mdx

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes to avoid unnecessary requests, and speed up consecutive runs.

📊 Results Overview

Status Count
🔍 Total 2416
✅ Successful 2389
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 26
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1
Full Github Actions output

@aidankmcalister
Copy link
Member Author

@CodeRabbit resume

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

✅ Actions performed

Reviews resumed.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c0018a and f272c58.

📒 Files selected for processing (1)
  • .github/workflows/lychee.yml (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: runner / linkspector
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
.github/workflows/lychee.yml (3)

18-41: Configuration changes look good.

The cache exclusions for rate-limit and server errors (line 26), added host/path exclusions, and step rename are all appropriate. Note: The AI summary claims the first run's timeout was updated to 30s, but the code shows it remains at 20s (line 31); the 30s timeout is applied only to the retry step (line 57), which is correct.


43-67: Retry logic is well‑structured.

The conditional retry step appropriately escalates timeouts and retries only when the first run detected issues. The use of always() ensures the condition is evaluated even if the first run errors. Configuration improvements (30s timeout, 10 retries, 10s wait) are proportionate to the goal of handling transient failures.


69-97: Report selection and formatting look solid.

The cleanup logic correctly prefers the retry report when present and gracefully falls back. The formatted report includes context‑specific notes. One minor note: if neither report file exists (very unlikely given the first run always executes), the formatted report won't be created and the comment step may fail silently. Consider adding a fallback or explicit error if needed.

Does the comment step on line 104 fail gracefully if body-path: lychee/formatted.md doesn't exist, or should we add a guard in the cleanup step to ensure the file is always created?

mhessdev
mhessdev previously approved these changes Oct 23, 2025
@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes to avoid unnecessary requests, and speed up consecutive runs.

📊 Results Overview

Status Count
🔍 Total 2416
✅ Successful 2389
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 26
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1
Full Github Actions output

@aidankmcalister aidankmcalister merged commit e661e62 into main Oct 23, 2025
7 checks passed
@aidankmcalister aidankmcalister deleted the DC-5756-lychee-rerun branch October 23, 2025 18:05
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