Repository navigation
Add the scheduled link-cache-refresh workflow - #2780
Merged
chalin merged 6 commits intoSep 1, 2026
Merged
Conversation
Daily rotation: prune the N (default 75) oldest lychee-verified entries of docsy.dev/link-cache.jsonc, rebuild, re-check, and open (or update) the single refresh PR on the bot/link-cache-refresh branch. Manual seeds are exempt from pruning (link-cache 0.4.1) and retire via their expires dates. Ported from otel.io's refcache-refresh workflow, simplified: no bot app (GITHUB_TOKEN; regular CI doesn't auto-run on the PR -- the link check that matters runs here), no double-check probe, merge-only branch sync. Dead links don't fail the run: the merge-back records them and the PR is the triage surface; preflight failures (exit 2) fail hard. An empty refresh after pruning fails the run (sanity assertion).
- Supply-chain audit compliance: credential-free checkout with per-command token-URL pushes (explicit-lease force for the reset path); inter-step state via step outputs instead of GITHUB_ENV. - PR detection filters isCrossRepository == false: a fork's same-named branch could otherwise hijack the lookup and strand refresh commits. - lychee tarball SHA256-pinned; the single-token decision (write-capable token visible to the checker) is recorded in the header. - Empty-refresh assertion moved to the commit step, so it fires regardless of PR state and PR-create failures report as themselves. - An existing PR's body is refreshed each run (oldest-entry marker, dead-link warning added or cleared); wording aligned with the manual-entry prune exemption.
…ling merges - Pushes go to the origin remote with a command-scoped auth header (base64 token), so tracking refs update: URL-form pushes left origin/BRANCH unresolvable, which broke the push predicate and made gh pr create abort noninteractively -- new rotations could never open their PR. pr create also pins --base/--head. The job-wide token-bearing env is gone (auth lives only in the two pushing steps). - Build is its own fail-hard step: check:links chains build && lychee, so a Hugo failure exited 1 and read as dead links, committing pruned entries without re-verification. - Cache-only merge conflicts self-heal (take main's version; the run's own check refreshes it) instead of wedging every subsequent run; wider conflicts fail for a human. - PR queries add --base main and take one URL; oldest-entry extraction fails hard on empty output; backticks stripped from cache-derived text before it enters the PR body's Markdown.
…default - pipefail in the branch step: a transient gh API failure exiting through head's 0 read as 'no open PR' and took the destructive reset path against a healthy PR branch. - The cache-only self-heal now signals the prune step (self_healed output): taking main's whole cache voids the branch's pending refresh -- restored entries keep timestamps lychee trusts within max_cache_age -- so the cycle re-prunes instead of stalling the PR at an empty diff under a header that claimed otherwise. Comments rewritten to match reality. - refresh_count default DRYed with a YAML anchor (the otel.io pattern) + shell fallback; PR-body wording made rotation-generic so body refreshes don't overwrite a dispatch-set count claim. - maintainer-notes: one-line pointer to the rotation workflow.
…e, honest gates - pipefail added to the PR-create step (the branch step documented the invariant; a transient gh failure there misrouted to a duplicate create). - A --help probe precedes the tolerated-exit link check: a renamed _check:links script exits 1 via npm, indistinguishable from dead links -- the probe fails such drift outside the exit interpretation. - Empty-refresh gate comments now claim exactly what it catches (prune-no-op; 'pruned but unverified' is the checker's exit-2 duty); header notes gone URLs are retired, not re-verified; PR-body oldest-entry marker labels its manual-seed caveat.
chalin
marked this pull request as ready for review
September 1, 2026 03:03
…install cross-pointers - Workflow header rewritten to purpose + PR model (was restating the self-heal, no-op-gate, auth, and checksum mechanics that live as richer step comments; also carried a dangling 'exit 2 above' and two em dashes). Owning tool (link-cache npm package) named. - Literal em dashes removed (comma/colon per the construct). - lychee installs cross-pointed between test.yaml and this workflow, with the checksum divergence justified where it occurs (this job holds a write-capable token); maintainer-notes pointer names both installers; PR body links the workflow file.
chalin
added a commit
to chalin/docsy
that referenced
this pull request
Sep 4, 2026
The four queued 0.18 lines (docsy#2780, docsy#2787, docsy#2788, docsy#2790) stay queued for a CL-touching PR of their own; the release-prep coverage ledger keeps them as todo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bot/link-cache-refreshbranch, open-or-refresh its PR (body carries the oldest-entry marker for prune tuning, and a triage warning when the refresh recorded failing links). Manual seeds are prune-exempt ([email protected]) and retire via theirexpiresdates.refcache-refresh.yml): plainGITHUB_TOKENinstead of a bot app -- regular CI doesn't auto-run on the refresh PR (the link check that matters runs in this workflow, and merges are maintainer-gated); no browser double-check probe; merge-only branch sync.cla/googleacceptsgithub-actions[bot]commits, and prune-count tuning.