mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
5f8fd586e7
Both halves of the docs publish starvation bug (openclaw/docs b4b130bd8, #131155) were discovered by noticing stale published docs, not by any alert: nothing watched whether the openclaw/docs mirror actually tracked docs-touching commits on main. A broken sync (dead token, MDX failure, disabled workflow, GitHub incident) would again go unnoticed. Add a scheduled Docs Mirror Freshness check (every 30m) that parses the watched paths from docs-sync-publish.yml itself - so the staleness definition can never drift from the sync trigger - finds the newest docs-touching main commit via the commits API, and compares it against the mirror's .openclaw-sync/source.json SHA. When the mirror trails by more than 60 minutes it dispatches one docs-sync-publish recovery run (skipped when a sync is already queued or in progress) and fails the run so the workflow actor is notified. The check lives in openclaw/openclaw rather than openclaw/docs because the path filters it must judge against live here, and same-repo workflow_dispatch heals with the default GITHUB_TOKEN instead of a cross-repo PAT. Live-proven: fresh path against the real repos; stale path (detection, active-run suppression, failing exit) via a simulated stale mirror SHA; recovery dispatch endpoint via a real manual sync run (33113089552).