Skip to content

fix(ci): stop docs publish Git descendants before retries - #133093

Merged
steipete merged 1 commit into
mainfrom
steipete/git-owner-docs-publish
Aug 30, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/git-owner-docs-publish

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #132183

What Problem This Solves

Fixes an issue where the docs mirror could delete/reuse the publish checkout, retry, abort a rebase, launch another fetch, commit, or consume ClawHub metadata after a Git leader had exited while its child or grandchild was still alive. GNU timeout bounded elapsed time but did not prove process-tree extinction at those boundaries.

Why This Change Was Made

Docs Sync Publish Repo now prepares the reviewed canonical owner at dd4528b6393e7d00063067a080ca7241b48ce475. A trusted inline clone policy owns the exact publish-path deletion and five clone attempts. A second typed policy owns the connected diff, advisory fetch/stale check, config/add/commit, and five fetch/rebase/push/abort attempts. ClawHub HEAD is read through a straight-line unbounded owner call before the sync script consumes it.

Clone and both fetch sites retain 120-second operation deadlines. Clone and publication keep five attempts and 2/4/6/8/10-second backoffs, including the final failed attempt. Rebase, push, local reads, config/add/commit, and abort remain unbounded. Only typed ordinary Git failure or FetchTimeout can reach existing retry/advisory behavior after verified cleanup; owner/setup/census failure or cancellation is terminal before deletion, abort, retry, or consumption.

The authenticated URL, refspecs, stale-source/no-change behavior, rebase strategy, push target, bot identity, queue concurrency, source/ClawHub checkouts, sync arguments, MDX checks, and token skip are unchanged. No new retry, deadline, input/config surface, dependency, or second supervisor was added.

User Impact

There is no OpenClaw runtime behavior change. Maintainers get deterministic docs publication: retries and reconciliation cannot overlap an earlier Git process tree, while the existing mirror policy and timing remain intact.

Evidence

  • Pre-fix actual workflow bodies: 23 intended lifecycle failures and one unchanged no-change pass. Old clone retries reached deletion/clone 2 with tree 1 alive; advisory failure reached config/add/commit; failed rebase/push reached abort and the next fetch with descendants alive; cleanup uncertainty continued; ClawHub metadata reached consumption/exit before extinction.
  • Focused final lifecycle/guard proof — 31 passed, 250 unrelated/platform cases skipped. It includes cancellation, ordinary Git 125/143 collisions, strict JSON compatibility, clone/fetch/rebase/push retry families, stale/no-change outcomes, and ClawHub consumption.
  • Full docs/workflow/routing suite — 617 passed, 2 platform skips.
  • Full shared owner/Mantis/QA/platform sibling suite — 126 passed, 89 platform-specific skips.
  • Full changed-surface gate passed all 24 selected checks, including three typecheck lanes, both lint lanes, dead-export scans, formatting, ratchets, and dependency/ownership guards.
  • Post-rebase docs lifecycle/guard/routing selection — 57 passed, 663 unrelated skipped.
  • actionlint, owner projection, targeted oxfmt --check, docs inventory, git diff --check, and fresh autoreview passed.

Native Linux/Windows execution and authenticated GitHub docs publication were intentionally not performed. The actual workflow bodies and process lifecycle are exercised locally on macOS; exact-head CI owns native/action packaging proof without using the publication token locally.

Workflow/tooling/docs delta: +113/-62 (net +51). Tests and test support: +515/-23 (net +492). Product runtime and canonical owner implementation: +0/-0. The positive workflow delta is the typed connected recovery policy replacing ambiguous shell statuses; the old shell paths were deleted.

@clawsweeper

clawsweeper Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: L maintainer Maintainer-authored PR labels Aug 30, 2026
@steipete
steipete marked this pull request as ready for review August 30, 2026 05:21
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 30, 2026
@clawsweeper

clawsweeper Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 1:29 AM ET / 05:29 UTC.

ClawSweeper review

What this changes

The PR replaces raw timeout-based Git clone, fetch, rebase, and push handling in docs publication with the pinned process-tree-owning Git helper, plus lifecycle tests and CI routing updates.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: the introduced workflow change applies the existing canonical Git lifecycle owner to a still-unsafe current-main docs publication path, with focused boundary coverage. The maintainer label and incomplete exact-head CI require explicit maintainer handling before merge.

Priority: P2
Reviewed head: b1a1768961afcef2aafa307dc4020ca82303335b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The patch is narrowly aligned with the canonical owner and has unusually thorough source-linked lifecycle coverage.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository state identifies this as a MEMBER-authored PR, so the external-contributor proof gate does not apply; the supplied fixture-based workflow tests still directly exercise the changed lifecycle boundary.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository state identifies this as a MEMBER-authored PR, so the external-contributor proof gate does not apply; the supplied fixture-based workflow tests still directly exercise the changed lifecycle boundary.
Evidence reviewed 6 items Introduced workflow boundary: The PR adds the pinned owner before Node setup and runs clone and publication policies through it; retries catch only ordinary Git failure or deadline outcomes.
Canonical owner contract: The pinned owner starts Git in an owned session, drains the process group in its finalization path, and returns ordinary command failures only after successful cleanup.
Boundary-level regression coverage: The lifecycle suite executes parsed workflow bodies through a child/grandchild fixture and covers clone deletion/retry, cleanup failure, publication retry, cancellation, stale/no-change paths, and ClawHub SHA consumption.
Findings None None.
Security None None.

How this fits together

The docs publishing workflow copies OpenClaw and ClawHub documentation into a separate publish repository. It must safely clone, synchronize, validate, commit, and push that repository without a previous Git process tree surviving into a retry or subsequent step.

flowchart LR
  A[Source and ClawHub checkouts] --> B[Docs publish workflow]
  B --> C[Pinned Git process owner]
  C --> D[Clone, fetch, rebase, or push]
  D --> E{Process tree extinct?}
  E -->|yes| F[Retry or continue synchronization]
  E -->|no| G[Fail safely]
  F --> H[Published docs repository]
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled docs-publication reliability repair merge once exact-head CI and any outstanding ClawSweeper rank-up moves are clear? Merge after exact-head verification: Merge when the current head’s required workflow and Git-owner checks finish green and no outstanding review move remains.

Why: The patch has strong source and fixture coverage, but this protected workflow change needs an explicit maintainer merge decision after its exact-head automation completes.

Before merge

  • Resolve merge risk (P1) - This changes release automation; wait for exact-head workflow and platform-owner CI, and confirm the latest ClawSweeper comment has no unresolved rank-up move before landing.
Agent review details

Security

None.

PR surface

Tests +492, Docs +2, Config +48, Other +1. Total +543 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 7 515 23 +492
Docs 1 3 1 +2
Config 1 107 59 +48
Generated 0 0 0 0
Other 2 3 2 +1
Total 11 628 85 +543

Review metrics

Metric Value Why it matters
Workflow/tooling versus test delta workflow/tooling +113/-62; tests/support +515/-23 The net workflow growth is the explicit caller-specific policy needed to preserve existing publication semantics while the reusable process owner stays unchanged.

Merge-risk options

Maintainer options:

  1. Complete exact-head automation checks (recommended)
    Merge only after the current head passes the docs workflow, routing, and cross-platform Git-owner checks.

Technical review

Best possible solution:

Keep the single canonical Git owner and workflow-specific typed policies, then merge after exact-head CI confirms the docs publication and cross-platform ownership lanes.

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

Yes, source-reproducible: the parsed workflow bodies are exercised by a process-tree fixture that records child and grandchild liveness at each retry, deletion, consumption, and exit boundary.

Is this the best way to solve the issue?

Yes. Reusing the pinned canonical owner while keeping caller-specific publication policy inline removes the unsafe raw timeout boundary without adding a parallel supervisor or changing publication semantics.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded docs-publication reliability repair with no demonstrated OpenClaw runtime outage.
  • add merge-risk: 🚨 automation: The PR changes the CI workflow that synchronizes and pushes published documentation, so an execution mismatch could interrupt documentation publication.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Repository state identifies this as a MEMBER-authored PR, so the external-contributor proof gate does not apply; the supplied fixture-based workflow tests still directly exercise the changed lifecycle boundary.

Label justifications:

  • P2: This is a bounded docs-publication reliability repair with no demonstrated OpenClaw runtime outage.
  • merge-risk: 🚨 automation: The PR changes the CI workflow that synchronizes and pushes published documentation, so an execution mismatch could interrupt documentation publication.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Repository state identifies this as a MEMBER-authored PR, so the external-contributor proof gate does not apply; the supplied fixture-based workflow tests still directly exercise the changed lifecycle boundary.

Evidence

What I checked:

  • Introduced workflow boundary: The PR adds the pinned owner before Node setup and runs clone and publication policies through it; retries catch only ordinary Git failure or deadline outcomes. (.github/workflows/docs-sync-publish.yml:57, b1a1768961af)
  • Canonical owner contract: The pinned owner starts Git in an owned session, drains the process group in its finalization path, and returns ordinary command failures only after successful cleanup. (.github/actions/git-owner/owner.py:202, dd4528b6393e)
  • Boundary-level regression coverage: The lifecycle suite executes parsed workflow bodies through a child/grandchild fixture and covers clone deletion/retry, cleanup failure, publication retry, cancellation, stale/no-change paths, and ClawHub SHA consumption. (test/scripts/ci-linux-git.test.ts:1035, b1a1768961af)
  • Workflow policy guard: The guard independently asserts the action pin, transport deadlines, retained stale-source and concurrency behavior, and absence of direct raw Git lifecycle calls in the changed steps. (test/scripts/ci-workflow-guards.test.ts:6017, b1a1768961af)
  • Current-main behavior: The fetched current-main workflow still contains GNU timeout-wrapped clone and fetch calls plus raw retry/abort handling, so this repair is not obsolete. (.github/workflows/docs-sync-publish.yml:63, ed37774f856d)
  • Relevant feature history: A prior merged commit created the docs publication workflow; its raw commit record identifies Peter Steinberger as author. The unavailable raw parent object prevents stronger line-introduction attribution. (.github/workflows/docs-sync-publish.yml:1, 10ee252b56d7)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready verification is complete for head b1a1768961afcef2aafa307dc4020ca82303335b.

ClawSweeper rated the patch 5/6 with no actionable finding and asked only for exact-head workflow/platform verification; that item is complete: #133093 (comment)

Behavior proof:

  • Before the repair, parsed workflow bodies produced 23 intended lifecycle failures: clone retry reached deletion/clone 2 with tree 1 alive; advisory failure reached config/add/commit; failed rebase/push reached abort and the next fetch with descendants alive; cleanup uncertainty continued; ClawHub metadata reached consumption/exit before extinction. The unchanged no-change path passed.
  • Focused final lifecycle/guard proof: 31 passed, 250 unrelated/platform cases skipped. Coverage includes cancellation, ordinary Git 125/143 collisions, strict JSON compatibility, clone/fetch/rebase/push retry families, stale/no-change outcomes, and ClawHub consumption.
  • Full docs/workflow/routing suite: 617 passed, 2 platform skips.
  • Full owner/Mantis/QA/platform sibling suite: 126 passed, 89 platform-specific skips.
  • Full changed-surface gate: all 24 selected checks passed.
  • Post-rebase docs lifecycle/guard/routing selection: 57 passed, 663 unrelated skipped.
  • actionlint, owner projection, targeted oxfmt --check, docs inventory, git diff --check, and fresh autoreview passed.

Exact-head hosted proof:

Native review artifacts validated with READY FOR /prepare-pr. OPENCLAW_TESTBOX=1 scripts/pr prepare-run 133093 passed in hosted_exact_or_recent_parent mode, reused exact-head hosted evidence, and verified that the remote PR head matches the prepared head; no additional Testbox lease was needed.

Authenticated GitHub docs publication and local native Linux/Windows execution were intentionally not run. The actual workflow bodies are exercised locally on macOS; exact-head CI owns action/native verification without exposing the publish token.

Workflow/tooling/docs delta is +113/-62; tests and test support are +515/-23. Product runtime and canonical owner implementation are unchanged. The positive caller-policy delta is required to preserve typed advisory/retry behavior; the replaced shell paths were deleted. Issue #132183 remains open for the other consumer families.

@steipete
steipete merged commit 5553615 into main Aug 30, 2026
251 checks passed
@steipete
steipete deleted the steipete/git-owner-docs-publish branch August 30, 2026 05:36
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: L 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.

1 participant