Skip to content

ci: use pre-commit for documentation Lychee checks - #3142

Merged
rwgk merged 9 commits into
mainfrom
rwgk/lychee-pre-commit-ci
Oct 19, 2026
Merged

rwgk merged 9 commits into
mainfrom
rwgk/lychee-pre-commit-ci

Conversation

@rwgk

@rwgk rwgk commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Highlights

Bring documentation Lychee checks into the same pre-commit workflow used during development, and catch authored-link failures during ordinary PR updates.

  • One hook configuration and native version pin: development, PR CI, and nightly use the configured Python hooks and their shared lychee-bin==0.24.2 dependency. Replace lycheeverse/lychee-action, its separate binary pin, and the obsolete upstream-hook Dependabot exception.
  • Earlier feedback: Linux and Windows pre-commit jobs check authored Markdown and reST on every PR push, without waiting for full CI. Fresh cached successes from the shared nightly baseline avoid repeating requests for established external links.
  • Clearer failure diagnosis: the existing offline shell smoke checks run first. Structured native reports and bounded retries help distinguish hook setup problems from link and network failures.
  • Retain generated-documentation coverage: the documentation build checks links and anchors in the HTML it just produced. Nightly still builds documentation and checks both authored and rendered content through those same hooks.

Ralf Juengling's simplification is incorporated: one shared composite action handles URL-cache restoration, hook execution, report uploads, and nightly cache publication for all three workflows. This removes repeated workflow steps, redundant Python helpers, and unreachable retry paths.

Tradeoffs

Authored links are checked more frequently because pre-commit runs on pushes that may not trigger full CI. Cache reuse should keep the usual overhead modest, but new URLs, expired or missing caches, and slow or failing sites still cost requests and time. Each pre-commit job can make up to three Lychee warm-up passes, followed by one strict full pre-commit run; successful external checks are reused between passes. PRs consume the shared baseline without publishing their own snapshots, so newly introduced URLs can be checked again on later pushes. URLs newly added to main also remain uncached in the shared baseline until the next nightly refresh.

Successful external checks expire after three days rather than one, providing breathing room when nightly refreshes fail or are missed. Nightly still checks links afresh every day, but there is no automatic backup cache producer if it fails. PR checks run cold once those cached successes expire. When fresh results are unavailable, the tradeoff is that a cached success can conceal a newly broken external link for up to 72 hours.

The new hashFiles-based cache keys do not match existing baselines. After merging, PR checks initially run cold until the first nightly refresh publishes the new baselines.

Authored and rendered URL caches remain separate even when their URLs overlap. Authored checks leave fragments unchecked; rendered checks validate them. Lychee's cache does not record which validation occurred, so sharing an authored success can falsely accept a missing anchor. This was reproduced with pinned Lychee 0.24.2 against a local server. Keeping the caches separate prevents that false pass, at the cost of some duplicate requests.

How it works

Where What runs Final result
Linux/Windows pre-commit Offline hook smoke, restore authored URL cache, warm only Lychee, then run the full pre-commit suite once Ordinary strict pre-commit result, including unresolved HTTP 429s
Full-CI documentation build Restore rendered URL cache; check generated HTML and fragments after building docs Fail unresolved links, retaining the existing allowance for at most ten distinct URLs when all remaining failures are HTTP 429
Nightly cache refresh Check authored links afresh; build docs and check rendered links afresh; publish successful results separately Unresolved links produce warnings; build, setup, execution, and report failures remain errors

In the documentation-build job, rendered link checks now use Python 3.14 supplied by actions/setup-python, replacing the conda interpreter for that step. The documentation itself is still built in conda.

Repository URLs retain their existing targets in this PR. Maintainer control of HTTP 429 failures is a separate follow-up in #3155, followed by checkout-aware repository links in #3143 and the source-root rename in #3147. Standalone CI-tool unit tests remain in nightly CI.

Implementation details and suggested review order

Retries and diagnostics

The CI driver invokes the actual configured hook and collects every native invocation's JSON report. Pre-commit may split long input lists, so each invocation writes its own report and exit status before the driver validates and combines them.

Additional hook attempts run only when every remaining failure is recognized as transient HTTP trouble: timeouts, 408, 429, or 5xx. CI allows three total attempts, with 60/120-second cooldowns. Permanent failures stop additional attempts. The full pre-commit suite runs only once, so formatter changes remain failures.

Missing, malformed, or inconsistent reports fail explicitly, as does a combined scan that checks no links. Per-attempt reports and a final summary are retained as CI artifacts for seven days.

Shared caches

Nightly refreshes are the only producers of the shared authored and rendered baselines. PR and ordinary default-branch runs restore them without publishing replacements. Only successful external checks are persisted, with their original timestamps and a three-day expiration. Reusing a result does not extend its lifetime. Local filesystem targets are checked afresh. A missing baseline starts a normal cold check.

URL results can be reused across operating systems. Installed pre-commit environments retain their separate OS/Python-specific caches. A local composite action restores the URL cache, invokes the configured hook through the CI driver, uploads reports, and publishes a new baseline when requested by nightly. It derives compatible cache names with GitHub Actions hashFiles, covering the hook configuration, native wheel pin, checker configuration, and implementation files. Hashing whole files is conservative: even a comment or display-name change in a listed file can invalidate the cache.

Suggested review order

  1. Hook definitions: authored and manually invoked rendered hooks share one native-wheel dependency.
  2. Native wrapper, CI driver, and retry policy: rendered inputs, reports, and the configured-hook retry path.
  3. Shared link-check action, then the pre-commit, nightly link, and documentation-build workflows.

The CI link-checking guide collects the maintenance and failure policies in one place. Focused tests cover report aggregation, retry decisions, and rendered invocation.

Validation

After incorporating the shared composite action and rebasing on current main, this revision passes all 203 CI-tool tests and 36 subtests, plus pre-commit run --all-files locally.

Full CI requested for this revision; the earlier hosted results below predate the composite-action refactoring.

Earlier validation of this implementation

Before this rebase and the final review refinements:

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the CI/CD CI/CD infrastructure label Oct 17, 2026
@rwgk rwgk added this to the cuda.bindings next milestone Oct 17, 2026 — with ChatGPT Codex Connector
@rwgk rwgk added enhancement Any code-related improvements CI/CD CI/CD infrastructure labels Oct 17, 2026 — with ChatGPT Codex Connector
@rwgk rwgk assigned rwgk and unassigned rwgk Oct 17, 2026
@rwgk
rwgk added this pull request to stack #3144 October 17, 2026 00:03
@rwgk

rwgk commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test bdb3299

@rwgk

rwgk commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test f87a871

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor
Doc Preview CI
Preview removed because the pull request was closed or merged.

@rwgk
rwgk force-pushed the rwgk/lychee-pre-commit-ci branch from f87a871 to 9a24782 Compare October 18, 2026 04:41
@rwgk

rwgk commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 9a24782

@rwgk

rwgk commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@rwgk rwgk changed the title ci: use pre-commit for documentation link checks ci: use pre-commit for documentation Lychee checks Oct 18, 2026
@rwgk
rwgk marked this pull request as ready for review October 18, 2026 23:33
@rwgk rwgk added the PR review get-together Mark PRs you'd like the team to review at the weekly PR review get-together. label Oct 18, 2026
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 6a1fc36b-a64e-4b14-99cd-335fe043303a
📥 Commits

Reviewing files that changed from the base of the PR and between 7625aad and 411b3a7.

📒 Files selected for processing: 12
  • .github/actions/lychee-links/action.yml
  • .github/workflows/build-docs.yml
  • .github/workflows/lychee.yml
  • .github/workflows/pre-commit.yml
  • ci/README.md
  • ci/tools/prepare_lychee_inputs.py
  • ci/tools/retry_lychee.py
  • ci/tools/run_lychee.py
  • ci/tools/tests/test_prepare_lychee_inputs.py
  • ci/tools/tests/test_retry_lychee.py
  • ci/tools/tests/test_run_lychee.py
  • ci/tools/tests/test_run_lychee_precommit.py
💤 Files with no reviewable changes: 2
  • ci/tools/tests/test_prepare_lychee_inputs.py
  • ci/tools/prepare_lychee_inputs.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Summary

Summary by CodeRabbit

  • New Features

    • Documentation link checks now cover authored content and rendered HTML, with cached results and retry handling.
    • Link-check reports are available as workflow artifacts when checks run.
    • Dependency updates can now include the Lychee hook.
  • Bug Fixes

    • Link checks now validate anchors in rendered pages and exclude static assets.
  • Documentation

    • Added guidance on link-check workflows, cache behavior, and report handling.

The pull request replaces the former documentation-link action with shared authored and rendered Lychee hooks, report aggregation and retry tools, a new composite action, and updated workflow cache handling. It also removes the prior input-preparation utility and updates CI documentation.

Changes: Documentation Link Checks

Layer / File(s) Summary
Hook definitions and rendered inputs
.pre-commit-config.yaml, lychee.toml, ci/tools/run_lychee.py, ci/tools/tests/test_run_lychee.py, ci/tools/prepare_lychee_inputs.py, ci/tools/tests/test_prepare_lychee_inputs.py, .gitignore
The pre-commit configuration defines authored and rendered hooks. The Lychee runner selects rendered HTML inputs, excludes _static paths, and writes per-invocation reports. Tests cover input selection and report output. The former input-preparation utility and its tests are removed.
Report aggregation and retry execution
ci/tools/run_lychee_precommit.py, ci/tools/retry_lychee.py, ci/tools/tests/test_run_lychee_precommit.py, ci/tools/tests/test_retry_lychee.py
The pre-commit runner aggregates native reports and passes hook attempts to the retry helper. The helper now requires an injected callback and accepts only exit codes 0 and 2. retry_lychee.py removes the argparse import although main still references it; main also calls retry_lychee without the newly required callback.
Action, workflow, and cache integration
.github/actions/lychee-links/action.yml, .github/actions/check-doc-links/action.yml, .github/workflows/*, .github/dependabot.yml, ci/README.md
The new composite action manages cache restoration or saving, hook execution, and report uploads. Workflows use it for authored or rendered checks and configure pre-commit environment caching. The previous composite action is removed, and the CI documentation describes the checks and cache behavior.

Suggested reviewers: juenglin, mdboom

Priority: ⬇️ Low

Change: Feature

Merge Risk: ⚪ Minimal · up to 411b3

No actionable issue remains from these findings; the PR is mergeable after normal checks.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 1993dd35-a388-4bbb-8736-2bd9cca57c52
📥 Commits

Reviewing files that changed from the base of the PR and between 576ef68 and d7d7bd8.

📒 Files selected for processing: 17
  • .github/actions/check-doc-links/action.yml
  • .github/dependabot.yml
  • .github/workflows/build-docs.yml
  • .github/workflows/lychee.yml
  • .github/workflows/pre-commit.yml
  • .gitignore
  • .pre-commit-config.yaml
  • ci/README.md
  • ci/tools/lychee_cache.py
  • ci/tools/retry_lychee.py
  • ci/tools/run_lychee.py
  • ci/tools/run_lychee_precommit.py
  • ci/tools/tests/test_lychee_cache.py
  • ci/tools/tests/test_retry_lychee.py
  • ci/tools/tests/test_run_lychee.py
  • ci/tools/tests/test_run_lychee_precommit.py
  • lychee.toml
💤 Files with no reviewable changes: 2
  • .github/dependabot.yml
  • .github/actions/check-doc-links/action.yml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Comment thread ci/tools/tests/test_run_lychee.py Outdated
Comment on lines +54 to +55
cache = tmp_path / "rendered cache"
monkeypatch.setenv("LYCHEE_CACHE_DIR", str(cache))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

suggestion: The expected cache path in this test is not resolved, so the test can fail on macOS and some Windows hosts.

run_lychee.main resolves LYCHEE_CACHE_DIR with Path(...).resolve() (run_lychee.py Line 41). This resolved path is used as cwd and as the parent of inputs.txt. The test compares both values against the unresolved tmp_path / "rendered cache". On macOS, tmp_path sits under the /var → /private/var symlink, so resolve() returns a different path. In that case the run.assert_called_once_with(...) check fails, and --files-from gets a different string than the test expects. Linux CI does not show the problem, but local runs on macOS fail. The fix is to resolve the expected path in the test.

--- "a/ci/tools/tests/test_run_lychee.py"
+++ "b/ci/tools/tests/test_run_lychee.py"
@@ -51,8 +51,8 @@
     (docs / "guide.html").write_text('<h1 id="section">Guide</h1>')
     (docs / "_static").mkdir()
     (docs / "_static/theme.html").write_text("ignored theme")
-    cache = tmp_path / "rendered cache"
+    cache = (tmp_path / "rendered cache").resolve()
     monkeypatch.setenv("LYCHEE_CACHE_DIR", str(cache))
     monkeypatch.setattr(run_lychee, "ROOT", tmp_path)
     monkeypatch.delenv("LYCHEE_REPORT_DIR", raising=False)
     with (
📝 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
cache = tmp_path / "rendered cache"
monkeypatch.setenv("LYCHEE_CACHE_DIR", str(cache))
cache = (tmp_path / "rendered cache").resolve()
monkeypatch.setenv("LYCHEE_CACHE_DIR", str(cache))

@rwgk
rwgk requested a review from juenglin October 19, 2026 17:10
@juenglin

Copy link
Copy Markdown
Contributor

Nice work consolidating link checking onto the pre-commit hooks. One behavior change I'd like to flag before this lands, plus an optional follow-up.

Request: give the authored gate the same 429 tolerance as the rendered path

Moving authored link checks into CI: pre-commit makes them merge-blocking on every PR push (they used to be skipped via SKIP: lychee, so the job was offline). The strict gate is pre-commit run --all-files, which takes Lychee's raw exit code, so a single unavoidable HTTP 429 on an authored link now hard-blocks merge with no remedy short of editing lychee.toml (which also invalidates the shared cache).

That's asymmetric with the rendered docs build, which already tolerates up to 10 distinct 429s through finish_link_failures (--policy check). Could we route the authored gate through the same policy? Sketch:

  • Add lychee to the job-level SKIP so the strict pre-commit run --all-files keeps every formatter strict but doesn't re-run the link hook.
  • Make a dedicated step the authored link gate:
      - name: Check authored documentation links
        env:
          GITHUB_TOKEN: ${{ github.token }}
        run: >-
          python ci/tools/run_lychee_precommit.py authored
          --policy check --max-attempts 3
          --report "${RUNNER_TEMP}/lychee-reports/lychee-authored.json"

Net behavior would match the rendered path: permanent failures (404, DNS) still fail; up to 10 distinct 429s warn and pass; more than that still fails. The ci/README.md line stating the strict result is final "including for unresolved HTTP 429s" would need a matching update.

Optional follow-up: a maintainer bypass for the rare non-429 case

For the narrow residual (e.g. >10 429s, or a site returning 503/403 at merge time), a maintainer escape hatch would help. A [skip-link-check] PR-title token or label would match existing precedent ([no-ci]/[doc-only] in ci.yml, to-be-backported in backport.yml) and is simpler than a comment-based trigger, which adds issue_comment authorization and token-context surface. Since lychee.toml exclusions already cover persistently hostile hosts, this only needs to handle temporary bypasses -- so it's fine as a separate PR if you'd rather keep this one focused.

@rwgk
rwgk force-pushed the rwgk/lychee-pre-commit-ci branch from d7d7bd8 to 7625aad Compare October 19, 2026 19:20

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟠 Major · important: Apply the authored Lychee policy in the PR gate · pre-commit.yml:165-168

.github/workflows/pre-commit.yml:165-168
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

important: Apply the authored Lychee policy in the PR gate

pre-commit run --all-files runs the authored lychee hook with its raw exit code. The preceding cache warm-up does not make this step tolerant of an unresolved HTTP 429. Therefore, ten or fewer distinct 429 responses can still fail Linux and Windows PR jobs.

Skip only lychee in this strict step, then run the authored check through the existing check policy. Permanent link failures and more than ten distinct 429 responses will still fail.

Suggested fix
       - name: Run pre-commit
         env:
           GITHUB_TOKEN: ${{ github.token }}
+          SKIP: check-precommit-installed,lychee
         run: pre-commit run --all-files --show-diff-on-failure
+
+      - name: Check authored links
+        env:
+          GITHUB_TOKEN: ${{ github.token }}
+        run: python ci/tools/run_lychee_precommit.py authored --policy check --max-attempts 3

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 9fa469c8-f3e9-47df-9a9b-dc271999308f
📥 Commits

Reviewing files that changed from the base of the PR and between d7d7bd8 and 7625aad.

📒 Files selected for processing: 1
  • ci/tools/tests/test_run_lychee.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@rwgk

rwgk commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@juenglin

Optional follow-up: a maintainer bypass for the rare non-429 case

I created PR #3155 for this. I decided it's sufficiently complex, it's best done in a separate PR, where we can have focused discussions about details.

@rwgk
rwgk marked this pull request as draft October 19, 2026 20:40
@rwgk

rwgk commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

I adopted @juenglin 's commit 1d7b804, based on this codex review:

I favor Ralf’s reduction. I found no blocking correctness issue, and it preserves the main design of #3142.

His branch is one commit directly on the current #3142 head, so this is a focused simplification.

What improves

  • Shared workflow orchestration. The new composite action centralizes cache restore, hook execution, cache publication, and report uploads. It runs the configured pre-commit hook; the native version pin remains in pre-commit.
  • Less custom machinery. GitHub’s hashFiles replaces the cache-description Python helper. The unused authored-file selector and standalone CLI disappear; pre-commit already selects authored files. Rendered-file selection moves beside its only caller.
  • Simpler error handling. The removed retry branches handled execution failures that the report collector already rejects before they reach the retry loop. Those failures still block.

The important safeguards remain: collecting every pre-commit chunk, checking report/exit-code consistency, rejecting malformed or empty reports, retrying only transient failures, and keeping authored/rendered caches separate. The report collector itself is unchanged.

Changes worth accepting explicitly

Nightly becomes the sole URL-cache producer. Default-branch pre-commit runs stop publishing authored snapshots. This simplifies ownership, while removing a backup producer during nightly outages. Given the three-day lifetime and working cold-cache fallback, I think that is a reasonable tradeoff. Proposed cache policy.

Two smaller changes also seem reasonable:

  • Rendered results always use .lychee-rendered/; LYCHEE_CACHE_DIR configurability disappears.
  • The docs job explicitly sets up Python 3.14 for link checking.

The new cache namespace will require an initial cold generation.

Testing and dependent PRs

The 96 retained focused tests pass. Most deleted tests cover removed helpers or duplicate policy cases; I found no coverage blocker. However, the new composite action still needs hosted Linux/Windows execution and a nightly producer/consumer rehearsal.

Adopting it requires deliberate adjustments downstream:

My recommendation: adopt the reduction in #3142 before merging, accepting nightly-only cache publication explicitly, then validate and update the dependent PRs.

Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
rwgk and others added 8 commits October 19, 2026 13:56
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Reduce the code behind the pre-commit-based link checks without changing
which checks run, how they fail, or how results are cached and retried.

- Replace ci/tools/lychee_cache.py and its tests with a small composite
  action, .github/actions/lychee-links. It hashes the policy files with
  hashFiles(), restores and publishes the URL cache, runs the driver, and
  uploads reports, so the pre-commit, nightly, and docs-build workflows each
  make one call instead of repeating five to eight steps.
- Drop LYCHEE_CACHE_DIR. The rendered hook always uses the gitignored
  .lychee-rendered directory.
- Make nightly the only producer of the shared baselines. Linux pre-commit
  runs on the default branch no longer publish the authored cache.
- Remove retry branches for native exit codes other than 0 and 2. The driver
  raises on those before retrying, so they could not run.
- Fold the two helpers still in use from prepare_lychee_inputs.py into
  run_lychee.py and delete the module, whose authored-file selection has
  been done by the hook configuration since the Lychee action was removed.
- Trim tests that duplicated each other or exercised removed paths, and
  shorten the README section.

Signed-off-by: Ralf Juengling <rjuengling@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
@rwgk
rwgk force-pushed the rwgk/lychee-pre-commit-ci branch from 1d7b804 to 411b3a7 Compare October 19, 2026 21:01
@rwgk
rwgk removed this pull request from stack #3144 October 19, 2026 21:01
@rwgk
rwgk added this pull request to stack #3158 October 19, 2026 21:01
@rwgk

rwgk commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 411b3a7

@rwgk rwgk removed the PR review get-together Mark PRs you'd like the team to review at the weekly PR review get-together. label Oct 19, 2026
@rwgk
rwgk marked this pull request as ready for review October 19, 2026 21:13
@juenglin

juenglin commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

@rwgk Thanks for adopting the trim. I re-checked the description against 411b3a7. It is accurate apart from a few wording and coverage points, and none of them need a code change or a CI rerun.

Suggested description edits (no CI impact)

  1. The "Earlier feedback" bullet says PRs reuse "fresh cached successes from the shared default-branch baseline (main)". Since nightly became the only producer, the baseline comes from the nightly workflow, not from default-branch pre-commit runs. Suggest: "from the shared nightly baseline".

  2. Please mention that the docs build now runs the rendered link check under actions/setup-python (3.14) instead of the conda Python. This is a workflow change that reviewers of build-docs.yml will want to see.

  3. Please add two costs of nightly-only publishing to Tradeoffs:

    • URLs that are new on main stay uncached until the next nightly run.
    • There is no backup producer if nightly fails, and PRs go cold after three days.

    Related: the new hashFiles keys orphan existing baselines, so PRs run cold until the first nightly after merge.

Cleanup: LYCHEE_ARGS

ci/tools/tests/test_run_lychee_precommit.py still has monkeypatch.delenv("LYCHEE_ARGS", raising=False). The variable belonged to the old re-run path and nothing reads it now. It is harmless, so let's not rerun full CI for it here. Instead, remove it in #3155, which already edits that test file. It is the earliest PR in the stack that touches the file, and #3143 will pick it up when it rebases. Please keep it as its own small commit, or note it in the commit message, so the 429-override diff stays focused.

@rwgk
rwgk merged commit b1c2d2f into main Oct 19, 2026
216 of 224 checks passed
@rwgk
rwgk deleted the rwgk/lychee-pre-commit-ci branch October 19, 2026 22:20
github-actions Bot pushed a commit that referenced this pull request Oct 20, 2026
Removed preview folders for the following PRs:
- PR #3104
- PR #3121
- PR #3142
- PR #3146
- PR #3150
- PR #3152
- PR #3154
- PR #3155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure enhancement Any code-related improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants