Skip to content

fix(ci): repair lychee — broken since May, plus the 12 dead links it found - #124

Open
WomB0ComB0 wants to merge 5 commits into
mainfrom
ralph/fix-ci-31911555547
Open

fix(ci): repair lychee — broken since May, plus the 12 dead links it found#124
WomB0ComB0 wants to merge 5 commits into
mainfrom
ralph/fix-ci-31911555547

Conversation

@WomB0ComB0

@WomB0ComB0 WomB0ComB0 commented Aug 16, 2026

Copy link
Copy Markdown
Member

Automated CI fix from ralph triage --fix-ci using a local model. Failing run: https://github.com/resq-software/docs/actions/runs/31911555547

⚠️ Agent-generated — please review before merging.

Summary by CodeRabbit

  • Documentation

    • Corrected API references and links across the .NET, Rust, and TypeScript SDK documentation.
    • Updated repository, licensing, profiling, and git-hook references to current locations.
    • Improved formatting for documented default configuration values.
  • Chores

    • Strengthened link-checking workflow security by pinning actions to immutable revisions.
    • Updated link-checking configuration to support workspace-rooted scans and HTTP/HTTPS URLs.

WomB0ComB0 and others added 3 commits August 15, 2026 17:43
The weekly lychee job has failed 14 consecutive scheduled runs (every
run since 2026-05-11). The cause is not external link flake, which the
workflow comment anticipates — lychee never checked a single link:

    error: unexpected argument '--exclude-mail' found
    Usage: lychee ... --include-mail[=<false|true>] [inputs]...

Upstream removed `--exclude-mail` and inverted it to `--include-mail`.
lychee-action is pinned by SHA but tracks the latest lychee binary
(0.24.2 today), so the flag vanished under a pinned action and the job
has aborted during argument parsing ever since.

Mail is now excluded by default (`--include-mail` = "Also check email
addresses", default false), so deleting the flag preserves the original
intent exactly rather than changing what gets checked.

Also pins actions/checkout and actions/cache to commit SHAs, and sets
`persist-credentials: false` on checkout. The pin is required by the
same blanket `unpinned-uses` policy that broke #117; the credentials
flag is needed because pinning edits the checkout line, which would
otherwise surface the pre-existing `artipacked` finding as a new alert
on a changed line. This job only reads files, so it never needs the
token persisted.

Verified: lychee 0.24.2 --help confirms --exclude-mail is gone and
--include-mail defaults to false. zizmor v1.29.0 on this file goes from
3 findings (2 high unpinned-uses, 1 artipacked) to 0. actionlint passes.

Note: #121 attempted to fix this by committing six .lycheecache entries.
That could not have worked — all six are 200s (caching successes cannot
suppress an argument-parsing abort) and --max-cache-age 1d expires them
within a day. Left in place as harmless; it is dead weight, not a fix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
With the argument-parsing abort fixed, lychee ran for the first time
since May and failed with 11,529 errors out of 34,557 links. None were
external-link problems:

  ~11,380  file:// local links (mostly generated SDK API doc anchors)
      148  root-relative links (/sdks/typescript) that cannot resolve

Both classes are internal links, which this workflow explicitly does not
own — see its own header: "Internal MDX link integrity is enforced by
`mint broken-links` in required.yml." lychee was walking every internal
link in the docs tree, including the generated Python/TS API reference,
and that was being misread as "external link flake" for months.

Two flags are needed, and both are required — neither works alone:

  --scheme http/https  confines checking to external URLs. Measured with
                       --dump over identical inputs: 16,257 links ->
                       2,984, zero file:// surviving the filter.

  --root-dir           root-relative links fail during *resolution*,
                       which happens before scheme filtering, so
                       --scheme alone cannot suppress them (confirmed:
                       --exclude '^/' has no effect either). --root-dir
                       lets them resolve to file:// URLs, which the
                       scheme filter then excludes. Verified repo-wide:
                       148 resolution errors -> 0.

--root-dir does not turn this into a second internal link checker: the
resolved file:// links are excluded, never fetched. Rejected --base-url,
which would instead point all 148 at the live site — locally that timed
out on all inputs and took 80s for one file.

Last verified CI run on this branch (31910818811) had all 2,972 external
links passing, with 148 resolution errors as the only remaining failure;
this commit removes those.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the area:content MDX/MD documentation content label Aug 16, 2026
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5776022f-633a-45f0-b62d-c960083a15a3

📥 Commits

Reviewing files that changed from the base of the PR and between 6ebd5ef and c972ddb.

📒 Files selected for processing (13)
  • .github/workflows/lychee.yml
  • sdks/dotnet/api/ResQ.Clients/ResQ.Clients.BaseServiceClient.BuildResiliencePipeline(bool).md
  • sdks/dotnet/api/ResQ.Simulation/ResQ.Simulation.ScenarioRunner.ValidateLocation(ResQ.Core.Location,string).md
  • sdks/dotnet/api/ResQ.Simulation/ResQ.Simulation.ScenarioRunner.ctor.md
  • sdks/dotnet/api/ResQ.Simulation/ResQ.Simulation.VirtualDrone.VirtualDrone(string,ResQ.Core.Location,ResQ.Clients.CoordinationHceClient,ResQ.Clients.InfrastructureApiClient).md
  • sdks/dotnet/api/ResQ.Storage/ResQ.Storage.PinataClient.BuildResiliencePipeline().md
  • sdks/dotnet/api/ResQ.Storage/ResQ.Storage.PinataOptions.ApiUrl.md
  • sdks/dotnet/api/ResQ.Storage/ResQ.Storage.PinataOptions.GatewayUrl.md
  • sdks/rust/api/resq-cli/commands.md
  • sdks/rust/api/resq-dsa/index.md
  • sdks/rust/api/resq-perf.md
  • sdks/rust/api/resq-tui/index.md
  • sdks/typescript/api/helpers/browser/html-entities/functions/obfuscateLink.md

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The pull request pins Lychee workflow actions and updates link-checking arguments. Generated .NET, Rust, and TypeScript documentation now uses current API, repository, license, profiling, and package links.

Changes

Documentation and link maintenance

Layer / File(s) Summary
Lychee workflow hardening
.github/workflows/lychee.yml
Actions use immutable commit SHAs. Checkout disables persisted credentials. Lychee uses the workspace root and checks HTTP and HTTPS links.
.NET API documentation links
sdks/dotnet/api/ResQ.Clients/..., sdks/dotnet/api/ResQ.Simulation/..., sdks/dotnet/api/ResQ.Storage/...
API references now use local ResQ or Polly documentation links. URL defaults use inline code formatting.
Rust and TypeScript documentation links
sdks/rust/api/..., sdks/typescript/api/...
Repository, license, profiling, git-hook, and package links now use current targets.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c972d

This PR repairs the link-checking workflow and updates documentation links; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the Lychee CI repair and the related dead-link fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ralph/fix-ci-31911555547

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.

@WomB0ComB0 WomB0ComB0 added the ralph-ready Ralph autofix: CI green, ready to merge label Aug 16, 2026
@WomB0ComB0

Copy link
Copy Markdown
Member Author

Ralph verified: CI is green and the PR is mergeable — ready for your review/merge.

The automated fix in #124 retargeted ResQ.Clients.CoordinationHceClient
but missed the other two ResQ types mapped to learn.microsoft.com, and
skipped ScenarioRunner.ValidateLocation entirely. Lychee on that branch
went 12 -> 4 errors, with all four being the same generator bug:

  learn.microsoft.com/en-us/dotnet/api/resq.clients.infrastructureapiclient  x2
  learn.microsoft.com/en-us/dotnet/api/resq.core.location                    x2

Both are our own types; Microsoft does not document them, so both 404.
Retargeted to the sibling generated pages, matching the relative-link
form #124 already established. Both targets verified present in-tree.

This is a stopgap, not the fix. These files are regenerated output --
api-docs.dotnet.yml clears sdks/dotnet/api/ before copying fresh output
over it -- so this is discarded on the next api-docs run from
resq-software/dotnet-sdk. The generator bug is filed as
resq-software/dotnet-sdk#93.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@WomB0ComB0 WomB0ComB0 changed the title fix: resolve failing CI (run 31911555547) fix(ci): repair lychee — broken since May, plus the 12 dead links it found Aug 16, 2026
@WomB0ComB0
WomB0ComB0 changed the base branch from fix/lychee-exclude-mail to main August 16, 2026 07:21
@WomB0ComB0

Copy link
Copy Markdown
Member Author

Retargeted this PR from fix/lychee-exclude-mail to main — that branch is now folded in, so this single PR carries the whole fix (4 commits) and is the exact tree verified green.

What this actually fixes

The weekly lychee job had failed 14 consecutive scheduled runs since 2026-05-11. Not external link flake, which the workflow header anticipates — it checked zero links:

error: unexpected argument '--exclude-mail' found
Usage: lychee ... --include-mail[=<false|true>] [inputs]...

Upstream removed --exclude-mail. lychee-action is SHA-pinned but tracks the latest lychee binary (0.24.2), so the flag vanished under a pinned action and the job aborted at argument parsing every week.

The three-layer repair

Change Why
drop --exclude-mail Removed upstream; mail is excluded by default now (--include-mail defaults false), so intent is preserved exactly
--scheme http/https Confines lychee to its documented job. The header says internal links are mint broken-links's responsibility, but lychee was walking all 34k of them
--root-dir Root-relative links fail during resolution, before scheme filtering, so --scheme alone cannot suppress them. --exclude '^/' has no effect either (verified)

Also pins actions/checkout/actions/cache to SHAs and sets persist-credentials: false — required because pinning edits the checkout line, which would otherwise surface the pre-existing artipacked finding as a new alert.

Progression, each step measured

Run Errors
before aborted, 0 links checked
31910241394 11,529
31910818811 160
31911555547 12
31932921811 4
31933320772 0 ✅

Final: 34,555 total, 2,976 external checked, 31,579 internal excluded, 0 errors.

On the agent-generated commit

8963cfe fixed 8 of the 12 links correctly — I verified all 6 replacement URLs return 200 rather than trusting the diff. But it was incomplete: it retargeted ResQ.Clients.CoordinationHceClient while missing InfrastructureApiClient and ResQ.Core.Location, and skipped ScenarioRunner.ValidateLocation entirely. That left 4 errors. 038b4d5 completes it.

Warning

The link fixes are a stopgap and will regress. Everything under sdks/*/api/ is generated output. All three sync templates (dotnet, rust, typescript) recursively clear the target directory before copying fresh output, so these edits are discarded on the next api-docs run from any source repo.

Durable fixes filed upstream:

If those are not picked up, lychee goes red again on the next SDK regeneration — which is precisely how it sat broken for 14 weeks.

@github-actions github-actions Bot added the area:ci GitHub Actions, workflows, CI label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci GitHub Actions, workflows, CI area:content MDX/MD documentation content ralph-ready Ralph autofix: CI green, ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants