Skip to content

fix: bound docs live-smoke fetches and job time - #164

Merged
steipete merged 1 commit into
openclaw:mainfrom
SebTardif:fix/live-smoke-abort
Sep 5, 2026
Merged

fix: bound docs live-smoke fetches and job time#164
steipete merged 1 commit into
openclaw:mainfrom
SebTardif:fix/live-smoke-abort

Conversation

@SebTardif

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where Docs Live Smoke could occupy a GitHub runner until the six-hour default when a live docs page stopped responding. The dispatch smoke job and the scheduled sample job had no timeout-minutes. Six of the seven inline fetch calls also had no AbortSignal, so a stalled TCP connection never failed and the retry loop never moved on.

Why This Change Was Made

Both jobs now set timeout-minutes (25 on smoke so the existing 20-minute retry window plus setup can finish, 15 on sample). Every inline live fetch now passes AbortSignal.timeout. Dispatch probes use 30000ms. The scheduled sampler already used 15000ms and keeps that budget. Empty-manifest handling from #161 and signed R2 abort from #163 are unchanged.

User Impact

A hung docs.openclaw.ai probe now fails in 30 seconds (or 15 seconds on the sampler) and the job is killed by 25 minutes at the latest, instead of holding a runner for up to six hours. Operators still get the same page, markdown, search, and header assertions when the site is healthy.

Evidence

Live node reading .github/workflows/docs-live-smoke.yml. The reader walks jobs: and every await fetch( call. It was first run against origin/main (579119ccc) with the production workflow left in place, then against the patched file.

Before, both jobs report timeout: null and six of seven fetches report hasAbort: false:

$ node C:\Users\sebta\AppData\Local\Temp\docs-f003-live-read.mjs C:\Users\sebta\AppData\Local\Temp\docs-f003-main-live-smoke.yml
{
  "workflowPath": "C:\\Users\\sebta\\AppData\\Local\\Temp\\docs-f003-main-live-smoke.yml",
  "jobs": [
    { "name": "smoke", "timeout": null },
    { "name": "sample", "timeout": null }
  ],
  "fetches": [
    { "preview": "await fetch(url, { headers: { \"cache-control\": \"no-cache\", pragma: \"no-cache\", }", "hasAbort": false, "abortMs": null },
    { "preview": "await fetch(url, { headers: { accept: \"text/markdown\", \"cache-control\": \"no-cach", "hasAbort": false, "abortMs": null },
    { "preview": "await fetch(url, { headers: { \"cache-control\": \"no-cache\", pragma: \"no-cache\", }", "hasAbort": false, "abortMs": null },
    { "preview": "await fetch(url, { headers: { accept: \"application/json\", \"cache-control\": \"no-c", "hasAbort": false, "abortMs": null },
    { "preview": "await fetch(new URL(\"/mcp\", baseUrl), { method: \"POST\", headers: { accept: \"appl", "hasAbort": false, "abortMs": null },
    { "preview": "await fetch(new URL(path, baseUrl), { method: \"HEAD\", headers: { \"cache-control\"", "hasAbort": false, "abortMs": null },
    { "preview": "await fetch(url, { headers: { \"cache-control\": \"no-cache\", pragma: \"no-cache\", }", "hasAbort": true, "abortMs": 15000 }
  ]
}

The new workflow reader test failed on that same unfixed file (smoke is missing timeout-minutes, then fetch is missing AbortSignal.timeout on the first dispatch assertPage call).

After the patch, the same reader reports timeouts on both jobs and abort budgets on every fetch:

$ node C:\Users\sebta\AppData\Local\Temp\docs-f003-live-read.mjs .github/workflows/docs-live-smoke.yml
{
  "workflowPath": ".github/workflows/docs-live-smoke.yml",
  "jobs": [
    { "name": "smoke", "timeout": 25 },
    { "name": "sample", "timeout": 15 }
  ],
  "fetches": [
    { "hasAbort": true, "abortMs": 30000 },
    { "hasAbort": true, "abortMs": 30000 },
    { "hasAbort": true, "abortMs": 30000 },
    { "hasAbort": true, "abortMs": 30000 },
    { "hasAbort": true, "abortMs": 30000 },
    { "hasAbort": true, "abortMs": 30000 },
    { "hasAbort": true, "abortMs": 15000 }
  ]
}

$ node --test scripts/docs-site/docs-live-smoke-workflow.test.mjs
✔ every docs-live-smoke job has timeout-minutes
✔ every inline live fetch uses AbortSignal.timeout
ℹ tests 2
ℹ pass 2
ℹ fail 0

r2-upload.mjs is not in this diff. Sibling work is #161 and #163.

Real behavior proof

  • Behavior or issue addressed: Docs Live Smoke had no job timeout, and six dispatch fetches had no abort signal, so a hung live page could occupy a runner until the six-hour GitHub default.
  • Real environment tested: Windows 11, Node v24.19.0, repo checkout at C:\Users\sebta.grok\tmp\pr-gate-batch\docs-f003 on branch fix/live-smoke-abort, reading origin/main's docs-live-smoke.yml and then the patched file in the same worktree.
  • Exact steps or command run after this patch: node C:\Users\sebta\AppData\Local\Temp\docs-f003-live-read.mjs C:\Users\sebta\AppData\Local\Temp\docs-f003-main-live-smoke.yml (git show origin/main:.github/workflows/docs-live-smoke.yml). Then the same reader on .github/workflows/docs-live-smoke.yml, then node --test scripts/docs-site/docs-live-smoke-workflow.test.mjs.
  • Evidence after fix: terminal output above. smoke.timeout is 25, sample.timeout is 15, and all seven await fetch calls report hasAbort true (30000ms on the six dispatch probes, 15000ms on the existing sampler).
  • Observed result after fix: A stalled live probe now has a 30-second AbortSignal (15 seconds on the sampler). The runner is also bounded by timeout-minutes instead of the six-hour default.
  • What was not tested: A live workflow_dispatch against https://docs.openclaw.ai. This change only bounds the existing probes; it does not alter which pages are checked.

Docs Live Smoke had no job timeout and six dispatch fetches
had no AbortSignal. A hung live page could occupy a runner
until the 6-hour GitHub default.

Add timeout-minutes on smoke and sample, and AbortSignal.timeout
on every inline live fetch. Lock the contract with a workflow
reader test.

Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Verified head f9cde23ec14708047d3beaa7b3a475609a46ae72.

actionlint .github/workflows/docs-live-smoke.yml passed. Both node --test scripts/docs-site/docs-live-smoke-workflow.test.mjs regressions passed on this PR and failed against the origin/main workflow, detecting its missing job budgets and request AbortSignals.

The dispatch job is bounded at 25 minutes, preserving the existing 20-minute retry window; the scheduled sampler is bounded at 15 minutes. All six dispatch requests receive 30-second signals; the sampler retains its existing 15-second signal. Branch autoreview against origin/main, through P2, returned scoped-clean.

Exact-head Docs Code CI and CodeQL succeeded after approval of the pending fork runs:

This is workflow-lint and regression proof, plus the repository's real build/browser CI; no production live-smoke dispatch was performed. Ready for the orchestrator's squash merge. The shared changelog update will be in #167.

@steipete
steipete merged commit 3f69c0d into openclaw:main Sep 5, 2026
5 checks passed
steipete pushed a commit that referenced this pull request Sep 5, 2026
Apply configurable request deadlines to hostname cutover API calls and reject malformed or overflowing budgets before requests begin.

Document both request-timeout controls and consolidate the prepared dependency and publishing changelog entries. Land after PRs #132, #152, #161, #163, #164, #165, and #166.

Co-authored-by: Sebastien Tardif <SebTardif@ncf.ca>
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.

2 participants