Repository navigation
fix(ci): drain docs-agent Git trees before recovery - #133124
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Land-ready verification is complete for head No ClawSweeper comment or review had been published at the latest exact-head read, so there were no Behavior proof:
Exact-head hosted proof:
Native Linux/Windows execution and authenticated Docs Agent publication were intentionally not run locally. The actual workflow bodies and process lifecycle were exercised on macOS; exact-head CI supplies native/action packaging proof without exposing the workflow token. Workflow/routing/docs delta is +127/-70; tests and test support are +497/-26. Product runtime and the canonical Git owner implementation are unchanged. The positive workflow delta is the typed connected recovery policy replacing ambiguous shell statuses; the old shell Git paths are deleted. Issue #132183 remains open for the other consumer families. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 2:58 AM ET / 06:58 UTC. ClawSweeper reviewWhat this changesThe PR replaces Docs Agent’s direct shell Git calls with the pinned Git-owner process lifecycle policy and adds focused workflow, lifecycle, routing, and fixture coverage. Merge readinessKeep this PR open for normal maintainer review. The introduced workflow consistently routes Docs Agent Git work through the existing process-tree owner, and I found no blocking correctness or security defect; it remains an automation-risk change awaiting exact-head CI completion. Priority: P2 Review scores
Verification
How this fits togetherDocs Agent is a scheduled GitHub Actions workflow that lets Codex refresh documentation and commits permitted docs-only changes to main. The gate decides whether a run may proceed, then the docs update is validated and committed through Git. flowchart LR
A[Trusted CI trigger] --> B[Docs Agent gate]
B --> C[Git process owner]
C --> D[Cadence and revision checks]
D --> E[Codex documentation update]
E --> F[Docs-only validation]
F --> G[Commit and push]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +471, Docs +2, Config +54, Other +1. Total +528 across 11 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the shared Git-owner policy as the sole lifecycle owner for Docs Agent, with the existing cadence and docs-only constraints preserved, once exact-head automation coverage completes. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the lifecycle fixture injects failed, hanging, cancelled, and cleanup-failure Git process trees at the changed workflow boundaries, though this read-only review did not rerun it. Is this the best way to solve the issue? Yes: reusing the pinned canonical Git-process owner at each Docs Agent decision boundary is preferable to retaining separate shell timeout and recovery paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 49a8b1cb2138. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Related: #132183
What Problem This Solves
Fixes an issue where Docs Agent could retry a fetch, query workflow history, select a review base, inspect stale-main state, publish workflow outputs, or run commit/push recovery after a Git leader exited while its child or grandchild was still alive. GNU
timeoutbounded the fetch leader but did not prove process-tree extinction before those decisions.Why This Change Was Made
Docs Agent now prepares the reviewed canonical Git owner at
dd4528b6393e7d00063067a080ca7241b48ce475immediately after checkout. Two trusted inline gate policies own the Git work before and after the existing REST/JQ cadence block; a connected commit policy owns diff, config, staging, commit, fetch, push, and stale-main readback. The three docs-only enforcement producers use straight-line unbounded owner calls.Gate and commit retain five fetch attempts and their existing 120-second fetch deadlines. Gate keeps 2/4/6/8-second inter-attempt backoffs; commit fetch and push recovery keep 2/4/6/8/10-second backoffs, including the final failed attempt. Push, local reads, docs-only checks, config, add, and commit remain unbounded. Only typed ordinary Git failure or
FetchTimeoutcan enter retry or fallback after verified cleanup; setup, process inspection, cleanup failure, and cancellation are terminal.The one-hour cadence block is byte-identical to current
main, including REST.idcurrent-run exclusion, cancelled/skipped conclusion exclusions, and review-base ordering. Checkout, trigger trust, permissions, concurrency, action pin and inputs, docs checks, bot identity, refspecs, authentication, stale/no-change outcomes, and output shape are unchanged. No new deadline, retry, workflow input, dependency, or process supervisor was added.User Impact
There is no OpenClaw runtime behavior change. Maintainers get deterministic Docs Agent runs: no retry, fallback, GitHub query, output publication, commit, push reconciliation, or success can overlap an earlier Docs Agent Git process tree.
Evidence
125/143collisions, timeout recovery, cancellation, cleanup uncertainty, superseded CI, review-base fallback, no-change success, fetch/push retry and stale-main decisions, and all three docs-only producers.actionlint, owner projection, targetedoxfmt --check, docs inventory,git diff --check, and fresh autoreview passed.Native Linux/Windows execution and authenticated Docs Agent publication were intentionally not performed locally. The actual workflow bodies and process lifecycle are exercised on macOS; exact-head CI owns native/action packaging proof without using the workflow token locally.
Workflow/routing/docs delta: +127/-70 (net +57). Tests and test support: +497/-26 (net +471). 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 Git paths are deleted.