Skip to content

Exclude 404.html from lychee link checks#1265

Merged
sbryngelson merged 3 commits intoMFlowCode:masterfrom
sbryngelson:fix/lychee-404-exclusion
Feb 25, 2026
Merged

Exclude 404.html from lychee link checks#1265
sbryngelson merged 3 commits intoMFlowCode:masterfrom
sbryngelson:fix/lychee-404-exclusion

Conversation

@sbryngelson
Copy link
Member

@sbryngelson sbryngelson commented Feb 25, 2026

The 404 page contains root-relative links (/, /documentation/) that cannot be resolved when lychee scans local files. Lychee v0.21 reported these as warnings (pass), but v0.23 promotes them to errors (fail), breaking the docs CI on PRs.

Description

Summarize your changes and the motivation behind them.

Fixes #(issue)

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other: describe

Testing

How did you test your changes?

Checklist

  • I added or updated tests for new behavior
  • I updated documentation if user-facing behavior changed

See the developer guide for full coding standards.

GPU changes (expand if you modified src/simulation/)
  • GPU results match CPU results
  • Tested on NVIDIA GPU or AMD GPU

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflow configuration for enhanced build setup
    • Improved link validation configuration with expanded exclusion patterns

The 404 page contains root-relative links (/, /documentation/) that
cannot be resolved when lychee scans local files.  Lychee v0.21
reported these as warnings (pass), but v0.23 promotes them to errors
(fail), breaking the docs CI on PRs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7658b43 and f2464c9.

📒 Files selected for processing (2)
  • .github/workflows/claude-code-review.yml
  • .lychee.toml

📝 Walkthrough

Walkthrough

This PR updates the Claude code review GitHub workflow to install unzip, add the --dangerouslyDisableSandbox flag, and simplify the allowed tools list to "Bash". It also expands the .lychee.toml exclude_path configuration to exclude both "sitemap.xml" and "404.html" files.

Changes

Cohort / File(s) Summary
Claude Code Review Workflow
.github/workflows/claude-code-review.yml
Added unzip installation step for bun setup requirements. Introduced --dangerouslyDisableSandbox flag to Claude args. Simplified allowed tools list from explicit entries to single "Bash" entry. Removed explanatory comment from environment section.
Lychee Configuration
.lychee.toml
Expanded exclude_path from single entry to multi-entry list with "404.html" and inline comment. Retains existing "sitemap.xml" exclusion in reformatted block structure.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Refactor Claude Code Review workflow #1257: Both PRs modify .github/workflows/claude-code-review.yml in the same way—adding --dangerouslyDisableSandbox to claude_args and consolidating allowed tools to Bash.
  • Fix claude 01 #1250: Both PRs modify the Claude code-review configuration's allowed-tools list, transitioning between detailed and simplified tool specifications.
  • fix #1074: Both PRs modify .lychee.toml's exclude_path configuration, adding different exclusion patterns to the link checker.

Suggested labels

Review effort 1/5, size:XS

Poem

🐰 Unzip hops in, sandbox is free,
Bash now rules with simplicity,
Four-oh-four we now exclude,
Workflow streamlined, tools renewed!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sbryngelson sbryngelson marked this pull request as ready for review February 25, 2026 19:36
Copilot AI review requested due to automatic review settings February 25, 2026 19:36
@sbryngelson sbryngelson merged commit 0ce8382 into MFlowCode:master Feb 25, 2026
25 of 28 checks passed
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 aims to fix a CI failure in the documentation workflow caused by lychee link checker v0.23 treating root-relative links in 404.html as errors (previously warnings in v0.21). However, the PR also includes unrelated changes to the Claude Code Review workflow.

Changes:

  • Add 404.html to lychee's exclude list to prevent false-positive link check failures
  • Modify Claude Code Review workflow with several unrelated configuration changes (unzip installation, sandbox disabling, broadened tool permissions)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.lychee.toml Adds 404.html to exclude list with proper regex escaping and clear comment explaining why
.github/workflows/claude-code-review.yml Multiple changes: adds unzip installation, removes comment, adds --dangerouslyDisableSandbox flag, simplifies allowedTools from specific patterns to broad "Bash" permission

Comment on lines 18 to +45
@@ -24,7 +29,6 @@ jobs:
- name: Run Claude Code Review
uses: anthropics/claude-code-action@v1
env:
# Ensure the action can execute the Claude CLI it installs.
PATH: /home/runner/.local/bin:${{ env.PATH }}
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
@@ -35,27 +39,10 @@ jobs:

claude_args: >
--dangerously-skip-permissions
--dangerouslyDisableSandbox
--max-turns 80
--allowedTools
"Bash(gh pr view:*)"
"Bash(gh pr diff:*)"
"Bash(gh pr comment:*)"
"Bash(gh api:*)"
"Bash(cat:*)"
"Bash(ls:*)"
"Bash(find:*)"
"Bash(grep:*)"
"Bash(sed:*)"
"Bash(awk:*)"
"Bash(head:*)"
"Bash(tail:*)"
"Bash(wc:*)"
"Bash(sort:*)"
"Bash(uniq:*)"
"Bash(cut:*)"
"Bash(xargs:*)"
"Bash(jq:*)"
"Bash(python3:*)"
"Bash"
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

This PR description states it's about excluding 404.html from lychee link checks to fix a CI issue. However, the changes to .github/workflows/claude-code-review.yml are unrelated to the stated purpose:

  1. Adding unzip installation step
  2. Removing a PATH comment
  3. Adding --dangerouslyDisableSandbox flag
  4. Simplifying allowedTools from specific command patterns to just "Bash"

These changes to the Claude Code Review workflow appear unrelated to fixing lychee link checks. The PR should either:

  • Split these changes into a separate PR with its own description, or
  • Update the PR description to explain why these workflow changes are included

This is important for maintaining clear change history and proper code review.

Copilot uses AI. Check for mistakes.

claude_args: >
--dangerously-skip-permissions
--dangerouslyDisableSandbox
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

Adding the --dangerouslyDisableSandbox flag is a security concern. This flag disables the sandbox security mechanism that isolates code execution.

Before enabling this flag, you should:

  1. Document why it's necessary (what functionality is broken without it?)
  2. Assess the security implications in the context of pull_request_target which already has security considerations
  3. Consider alternative solutions that don't compromise the sandbox

This is particularly important since the workflow runs on pull_request_target, which has access to repository secrets and write permissions.

Suggested change
--dangerouslyDisableSandbox

Copilot uses AI. Check for mistakes.
"Bash(xargs:*)"
"Bash(jq:*)"
"Bash(python3:*)"
"Bash"
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

Simplifying allowedTools from specific command patterns (like "Bash(gh pr view:*)", "Bash(cat:*)", etc.) to just "Bash" significantly broadens the permissions granted to the Claude Code action.

This change allows the action to run ANY bash command, not just the previously whitelisted set. This is a security risk because:

  1. It removes the principle of least privilege
  2. Combined with --dangerouslyDisableSandbox, this creates a wider attack surface
  3. It's running in pull_request_target context with access to secrets

Consider:

  • Keeping the explicit whitelist of allowed commands
  • Documenting which specific additional commands are needed if the old whitelist was insufficient
  • Evaluating whether this change is truly necessary
Suggested change
"Bash"
"Bash(ls:*)" "Bash(cat:*)" "Bash(find:*)" "Bash(head:*)" "Bash(xargs:*)" "Bash(gh pr view:*)" "Bash(gh pr diff:*)"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants