Skip to content

chore(): update failing lychee and coderabbit#7629

Open
aidankmcalister wants to merge 1 commit intomainfrom
chore/update-failing-lychee-and-coderabbit
Open

chore(): update failing lychee and coderabbit#7629
aidankmcalister wants to merge 1 commit intomainfrom
chore/update-failing-lychee-and-coderabbit

Conversation

@aidankmcalister
Copy link
Member

@aidankmcalister aidankmcalister commented Mar 11, 2026

Summary by CodeRabbit

  • Chores
    • Updated CodeRabbit workflow configuration settings
    • Refactored lychee workflow script structure and improved code formatting consistency

@vercel
Copy link

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Mar 11, 2026 9:38pm
docs Ready Ready Preview, Comment Mar 11, 2026 9:38pm
eclipse Ready Ready Preview, Comment Mar 11, 2026 9:38pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

Walkthrough

Two files were updated. The .coderabbit.yaml configuration disabled the request-changes workflow feature. The .github/workflows/lychee.yml refactored a Python heredoc block into an inline Python snippet and standardized string literals to single quotes throughout.

Changes

Cohort / File(s) Summary
Configuration Update
.coderabbit.yaml
Disabled request-changes workflow by setting request_changes_workflow from true to false.
Workflow Refactoring
.github/workflows/lychee.yml
Replaced multi-line Python heredoc with inline python -c command; standardized all string and path literals from double quotes to single quotes for consistency. Behavior remains functionally identical.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: updates to both the lychee workflow and coderabbit configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@argos-ci
Copy link

argos-ci bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 removed Mar 11, 2026, 9:48 PM

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/lychee.yml:
- Around line 162-171: The python -c block fails due to YAML indentation being
included in the inline Python string; replace the inline "python -c" invocation
with a here-document (heredoc) so the Python source (starting with "from pathlib
import Path") is passed verbatim; keep the same logic using
Path('lychee/formatted.md'), p.read_text, p.write_text, max_chars and note, and
ensure the heredoc delimiter is quoted to prevent shell interpolation so the
truncation logic runs without IndentationError.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c2825c40-8f19-47dd-8e73-8563660d95e1

📥 Commits

Reviewing files that changed from the base of the PR and between 7544d52 and c0a2dfb.

📒 Files selected for processing (2)
  • .coderabbit.yaml
  • .github/workflows/lychee.yml

Comment on lines +162 to +171
python -c "
from pathlib import Path
p = Path("lychee/formatted.md")
p = Path('lychee/formatted.md')
if p.exists():
max_chars = 60000
text = p.read_text(encoding="utf-8")
text = p.read_text(encoding='utf-8')
if len(text) > max_chars:
note = "\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n"
p.write_text(text[: max_chars - len(note)] + note, encoding="utf-8")
PY
note = '\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n'
p.write_text(text[:max_chars - len(note)] + note, encoding='utf-8')
"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set +e
python3 -c "
            from pathlib import Path
            p = Path('lychee/formatted.md')
            if p.exists():
              max_chars = 60000
              text = p.read_text(encoding='utf-8')
              if len(text) > max_chars:
                note = '\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n'
                p.write_text(text[:max_chars - len(note)] + note, encoding='utf-8')
"
status=$?
printf 'python3 exit code: %s\n' "$status"

Repository: prisma/web

Length of output: 182


🏁 Script executed:

# Check the actual file content at the specified lines
head -n 171 .github/workflows/lychee.yml | tail -n 15

Repository: prisma/web

Length of output: 761


🏁 Script executed:

# Test the proposed heredoc fix to ensure it works correctly
python3 - <<'PY'
from pathlib import Path

p = Path('lychee/formatted.md')
if p.exists():
    max_chars = 60000
    text = p.read_text(encoding='utf-8')
    if len(text) > max_chars:
        note = '\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n'
        p.write_text(text[:max_chars - len(note)] + note, encoding='utf-8')
PY
echo "Exit code: $?"

Repository: prisma/web

Length of output: 66


Fix the Python indentation error that breaks the comment truncation step.

The python -c script at lines 162–171 has leading whitespace from YAML indentation that becomes part of the Python source code. When Python executes it, the first statement (from pathlib import Path) raises IndentationError: unexpected indent, causing the cleanup step to fail and preventing the automatic truncation safeguard from running.

Switch to a here-document to avoid this issue:

Fix
-            python -c "
-            from pathlib import Path
-            p = Path('lychee/formatted.md')
-            if p.exists():
-              max_chars = 60000
-              text = p.read_text(encoding='utf-8')
-              if len(text) > max_chars:
-                note = '\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n'
-                p.write_text(text[:max_chars - len(note)] + note, encoding='utf-8')
-            "
+            python - <<'PY'
+from pathlib import Path
+
+p = Path('lychee/formatted.md')
+if p.exists():
+    max_chars = 60000
+    text = p.read_text(encoding='utf-8')
+    if len(text) > max_chars:
+        note = '\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n'
+        p.write_text(text[:max_chars - len(note)] + note, encoding='utf-8')
+PY
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
python -c "
from pathlib import Path
p = Path("lychee/formatted.md")
p = Path('lychee/formatted.md')
if p.exists():
max_chars = 60000
text = p.read_text(encoding="utf-8")
text = p.read_text(encoding='utf-8')
if len(text) > max_chars:
note = "\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n"
p.write_text(text[: max_chars - len(note)] + note, encoding="utf-8")
PY
note = '\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n'
p.write_text(text[:max_chars - len(note)] + note, encoding='utf-8')
"
python - <<'PY'
from pathlib import Path
p = Path('lychee/formatted.md')
if p.exists():
max_chars = 60000
text = p.read_text(encoding='utf-8')
if len(text) > max_chars:
note = '\n\n_Comment truncated to avoid GitHub body limit. Download the artifact for full details._\n'
p.write_text(text[:max_chars - len(note)] + note, encoding='utf-8')
PY
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/lychee.yml around lines 162 - 171, The python -c block
fails due to YAML indentation being included in the inline Python string;
replace the inline "python -c" invocation with a here-document (heredoc) so the
Python source (starting with "from pathlib import Path") is passed verbatim;
keep the same logic using Path('lychee/formatted.md'), p.read_text,
p.write_text, max_chars and note, and ensure the heredoc delimiter is quoted to
prevent shell interpolation so the truncation logic runs without
IndentationError.

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.

1 participant