Skip to content

fix(ci): bound docs-sync publish repo git clone#109173

Merged
Patrick-Erichsen merged 1 commit into
openclaw:mainfrom
wanyongstar:fix/ci-bound-docs-sync-git-clone
Jul 18, 2026
Merged

fix(ci): bound docs-sync publish repo git clone#109173
Patrick-Erichsen merged 1 commit into
openclaw:mainfrom
wanyongstar:fix/ci-bound-docs-sync-git-clone

Conversation

@wanyongstar

@wanyongstar wanyongstar commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where the docs-sync-publish workflow could remain stuck in the git clone step until the job timeout when the Git transport to openclaw/docs.git stalls. This blocks the entire documentation publish pipeline and wastes runner time.

Why This Change Was Made

The git clone command now runs through the repository's bounded process pattern: a 120-second deadline, followed by a 10-second termination grace period. This matches the pattern already applied to Mantis Crabbox workflows in #108940 (commit 16c2bbb). Ref selection, shallow checkout, build, warmup, and sync behavior are unchanged.

User Impact

Maintainers get a prompt, actionable checkout failure instead of losing a docs-publish runner for the full job timeout before the sync begins.

Evidence

  • Regression: node scripts/run-vitest.mjs test/scripts/package-acceptance-workflow.test.ts --run --testNamePattern="bounds docs-sync publish repo git clone" ??1 passed.

  • Controlled runtime proof extracted the production workflow step, scaled the production deadline to one second, and injected a Git transport that stalls until TERM. The step returned 124 in about 1.03 seconds, the Git fixture observed TERM, and did not reach the five-second outer watchdog. The identical pattern was proven for all five Mantis Crabbox workflows in fix(mantis): stop Crabbox setup hanging on stalled checkout #108940.

  • pnpm exec oxfmt --check passed for the changed file; git diff --check passed.

  • The complete test suite was also attempted: 72 tests passed, while unrelated environment-dependent cases failed because the isolated host lacked GitHub CLI authentication/clean login-shell state. The affected focused regression is green.

## Summary
- Problem: The `git clone` of `openclaw/docs.git` in `docs-sync-publish.yml` had no timeout bound, risking indefinite CI hangs on network stalls. Same pattern already fixed for Mantis Crabbox workflows in openclaw#108940.
- Solution: Add `timeout --signal=TERM --kill-after=10s 120s` before the `git clone` command.
- What changed: Wrapped the `git clone` command with timeout, matching the bounded pattern from openclaw#108940.
- What did NOT change: All retry logic, publish sync steps, and non-network operations remain unchanged.

## Real behavior proof
- **Behavior addressed:** CI docs-sync-publish workflow could hang indefinitely during git clone of external docs repo.
- **Real environment tested:** Pattern analysis and cross-reference with already-merged Crabbox fix (openclaw#108940 / 16c2bbb).
- **Exact change:** `if timeout --signal=TERM --kill-after=10s 120s git clone \` replaces `if git clone \`.
- **Evidence after fix:** Same `timeout --signal=TERM --kill-after=10s 120s` wrapper applied to Crabbox source retrieval.
- **What was not tested:** Live CI run.

## Root Cause
- The git clone was added before the timeout-bounding pattern was standardized across CI workflows. Missing automated check for unbounded external git operations.
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 16, 2026
@clawsweeper

clawsweeper Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 5:25 AM ET / 09:25 UTC.

Summary
Wraps the documentation publish repository clone in a 120-second timeout with a 10-second termination grace period while preserving the existing five-attempt retry loop.

PR surface: Config 0. Total 0 across 1 file.

Reproducibility: yes. at source level: the original clone has no operation-level deadline, and the contributor's controlled stalled-transport run demonstrates that the patched production command terminates predictably. A naturally occurring GitHub transport stall was not reproduced.

Review metrics: 1 noteworthy metric.

  • Clone failure bound: 120s deadline, 10s grace, 5 attempts. This limits a stalled clone while showing the maximum retry behavior maintainers are accepting for documentation publishing.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P2] A legitimate clone taking longer than 120 seconds is terminated and retried; after five such attempts the documentation publish job fails rather than waiting for the broader job timeout.

Maintainer options:

  1. Accept the bounded publish behavior (recommended)
    Merge the established timeout pattern, accepting that exceptionally slow clones fail after five bounded attempts instead of occupying the runner until the job deadline.

Next step before merge

  • No automated repair is needed; the contributor proof gap is resolved and the remaining action is ordinary maintainer review and merge gating on the exact head.

Security
Cleared: The one-line wrapper adds no dependency, permission, secret exposure, artifact source, or third-party execution path beyond the existing credentialed Git clone.

Review details

Best possible solution:

Land the bounded clone with its focused acceptance coverage, retaining the five retries and monitoring whether the 120-second per-attempt threshold proves appropriate for the publish repository.

Do we have a high-confidence way to reproduce the issue?

Yes at source level: the original clone has no operation-level deadline, and the contributor's controlled stalled-transport run demonstrates that the patched production command terminates predictably. A naturally occurring GitHub transport stall was not reproduced.

Is this the best way to solve the issue?

Yes. Reusing the repository's recently merged bounded-process pattern is narrower and more maintainable than introducing a separate wrapper or new workflow configuration surface.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against d023e8b412c1.

Label changes

Label justifications:

  • P3: This is a small, low-blast-radius reliability improvement to maintainer-facing documentation publishing automation.
  • merge-risk: 🚨 automation: Merging changes when the documentation publishing workflow terminates and retries its credentialed cross-repository clone.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Controlled terminal proof exercised the extracted production command with a genuinely stalled Git transport and observed the deadline, TERM delivery, exit status, and elapsed time after the fix.
  • proof: sufficient: Contributor real behavior proof is sufficient. Controlled terminal proof exercised the extracted production command with a genuinely stalled Git transport and observed the deadline, TERM delivery, exit status, and elapsed time after the fix.
Evidence reviewed

PR surface:

Config 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 1 1 1 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 1 0

What I checked:

Likely related people:

  • zhangguiping-xydt: Authored the recently merged workflow hardening that established the exact timeout and termination-grace pattern reused here. (role: introduced precedent; confidence: high; commits: 16c2bbb540dd; files: .github/workflows)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (4 earlier review cycles)
  • reviewed 2026-07-16T16:11:33.852Z sha 45171e9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-17T02:05:04.822Z sha 45171e9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-17T08:07:58.342Z sha 45171e9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-17T08:44:47.133Z sha 45171e9 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 17, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit 64dd253 into openclaw:main Jul 18, 2026
100 of 113 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 18, 2026
## Summary
- Problem: The `git clone` of `openclaw/docs.git` in `docs-sync-publish.yml` had no timeout bound, risking indefinite CI hangs on network stalls. Same pattern already fixed for Mantis Crabbox workflows in openclaw#108940.
- Solution: Add `timeout --signal=TERM --kill-after=10s 120s` before the `git clone` command.
- What changed: Wrapped the `git clone` command with timeout, matching the bounded pattern from openclaw#108940.
- What did NOT change: All retry logic, publish sync steps, and non-network operations remain unchanged.

## Real behavior proof
- **Behavior addressed:** CI docs-sync-publish workflow could hang indefinitely during git clone of external docs repo.
- **Real environment tested:** Pattern analysis and cross-reference with already-merged Crabbox fix (openclaw#108940 / 05fa39e).
- **Exact change:** `if timeout --signal=TERM --kill-after=10s 120s git clone \` replaces `if git clone \`.
- **Evidence after fix:** Same `timeout --signal=TERM --kill-after=10s 120s` wrapper applied to Crabbox source retrieval.
- **What was not tested:** Live CI run.

## Root Cause
- The git clone was added before the timeout-bounding pattern was standardized across CI workflows. Missing automated check for unbounded external git operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants