Skip to content

fix(ci): drain release admission Git before handoff - #133308

Merged
steipete merged 1 commit into
mainfrom
steipete/git-owner-release-admission
Aug 30, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/git-owner-release-admission

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #132183

What Problem This Solves

Fixes an issue where release operators validating a Linux companion release, a macOS handoff, or an npm placeholder publication could continue after GNU timeout observed only the Git leader while child or grandchild writers were still alive. A later tag lookup, ancestry decision, workflow output, metadata checker, or publication-plan consumer could therefore overlap an earlier Git process tree.

Those paths also interpreted every shell nonzero as an ordinary Git outcome. Process-inspection or cleanup uncertainty could be flattened into the existing “not reachable” or exact-SHA rejection instead of stopping the release handoff at the lifecycle owner.

Why This Change Was Made

The three admission jobs now prepare the reviewed canonical Git owner at dd4528b6393e7d00063067a080ca7241b48ce475 before selected-source checkout.

Linux App Release and NPM Placeholder Bootstrap use trusted inline typed policies because they translate ordinary Git failure into existing trust decisions. macOS Release remains a straight-line owner sequence because every Git nonzero is terminal before release:openclaw:npm:check. The migration preserves the exact commands, refspecs, checkout authentication, one-attempt behavior, and operation budgets: the three transport fetches remain 120 seconds; local tag/SHA/ancestry reads remain unbounded; no retry or backoff was added.

Ordinary Linux ancestry nonzero still emits the existing main-reachability rejection. NPM Placeholder retains workflow identity, exact checked-out SHA, workflow ancestry, target ancestry, and output ordering. Owner setup, process census, cleanup failure, and cancellation now stop before another Git command, output, metadata checker, or consumer.

User Impact

There is no OpenClaw runtime or package-release behavior change. Release operators get deterministic admission evidence: tag/SHA trust outputs and the macOS metadata handoff are produced only after every preceding Git process tree is verified extinct.

No release, package publication, tag, version bump, changelog change, credentialed transport, or live release workflow was executed by this PR.

Evidence

  • Pre-fix RED: all three actual legacy workflow bodies failed the new success cases because real fake-Git parent/child/grandchild writers crossed a continuation, output, consumer, or exit boundary.
  • Complete simple-release lifecycle matrix: 68 passed. It covers exact argv and working directories; bounded fetches and unbounded local reads; ordinary 124/125/143; setup failure; timeout; cleanup uncertainty; cancellation; Linux ancestry rejection; npm-placeholder identity and both ancestry messages; output gating; macOS metadata-consumer gating; and unrelated sentinel survival.
  • Full release semantic, workflow-guard, and routing suites: 894 passed, with 2 existing skips.
  • Shared native Git-owner matrix: 400 passed, with 89 existing platform-specific skips. This includes the prior Performance lifecycle suite and the Linux/macOS/Windows owner paths.
  • Post-rebase proof: 68 lifecycle cases and 40 focused semantic/routing cases passed on 4135aa650ae.
  • Full changed-surface gate passed conflict, size/assertion ratchets, dependency and ownership guards, formatting, core/script/test typechecks, dead-export checks, and core/script lint.
  • actionlint, parsed non-migrated workflow equivalence, docs inventory, git diff --check, targeted formatting, and fresh mandatory autoreview passed with no accepted finding.
  • The repository Python workflow checker is locally blocked because this machine's configured package index does not provide the current pre-commit==4.6.2 pin. No dependency or pin was changed; exact-head Workflow Sanity will provide the authoritative hosted check.

Release-workflow delta: +97/-28 (net +69), required for three trusted owner placements and two typed trust-decision policies. CI routing/tooling: +13/-3 (net +10). Tests/support: +483/-11. Documentation: +3/-1. Product runtime code is unchanged.

@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 13:41
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. 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, 9:48 AM ET / 13:48 UTC.

ClawSweeper review

What this changes

The PR replaces direct Git commands in Linux, macOS, and npm-placeholder release admission with the pinned shared lifecycle owner, and adds lifecycle, workflow-guard, and CI-routing coverage.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open: current main still uses the unowned GNU-timeout Git commands in all three admission jobs, while this branch routes those commands through the existing lifecycle owner and covers the intended failure boundaries. No introduced correctness defect was found.

Priority: P2
Reviewed head: 4135aa650ae4def5099641b7c5b10616cbef9b98

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with substantial lifecycle coverage and no source-identified correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored CI reliability PR is exempt from the external-contributor proof gate; its supplied evidence nevertheless maps the changed workflow bodies to a process-tree lifecycle harness with observed output and consumer gating.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored CI reliability PR is exempt from the external-contributor proof gate; its supplied evidence nevertheless maps the changed workflow bodies to a process-tree lifecycle harness with observed output and consumer gating.
Evidence reviewed 5 items Current main still has the reported boundary: Current main directly wraps the Linux fetch with GNU timeout and immediately proceeds to tag and ancestry reads, so it does not contain this PR's lifecycle-owner repair.
PR uses the canonical owner for the complete Linux decision: The changed policy executes fetch, tag peeling, ancestry verification, and output publication through the same owner process; lifecycle failures escape rather than being translated to a reachability result.
Pinned owner contract inspected: The exact pinned action content matches the reviewed head; its owner fences later commands while draining and only resets that fence after verified cleanup.
Findings None None.
Security None None.

How this fits together

Release-admission workflows validate a selected release tag or source before handing trusted Git metadata to package checks or publication planning. The shared Git owner drains each Git process tree before subsequent ancestry decisions, outputs, or consumers run.

flowchart LR
  Request[Release request] --> Checkout[Selected source checkout]
  Checkout --> Validation[Git admission validation]
  Validation --> Owner[Git lifecycle owner]
  Owner --> Trust[Tag or ancestry decision]
  Trust --> Handoff[Package or publication handoff]
Loading

Before merge

  • Resolve merge risk (P1) - Exact-head CI remains in progress; merge should wait for the workflow and native-owner lanes selected by the updated routing rules.
  • Complete next step (P2) - This PR already owns the linked release-admission subset and needs normal exact-head CI completion rather than a separate repair dispatch.
Agent review details

Security

None.

PR surface

Tests +472, Docs +2, Config +69, Other +10. Total +553 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 7 483 11 +472
Docs 1 3 1 +2
Config 3 97 28 +69
Generated 0 0 0 0
Other 2 13 3 +10
Total 13 596 43 +553

Review metrics

Metric Value Why it matters
Automation versus test LOC workflow/tooling +110/-31; tests/support +483/-11; docs +3/-1 The net automation growth is the workflow-specific adaptation to the existing owner; most of the change is focused process-lifecycle regression coverage.

Root-cause cluster

Relationship: partial_overlap
Canonical: #132183
Summary: This PR addresses the three release-admission workflow instances of the broader Git-process lifecycle defect tracked by the linked issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the existing owner-boundary repair after exact-head CI confirms the lifecycle, workflow-guard, and native-owner lanes.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the existing owner-boundary repair after exact-head CI confirms the lifecycle, workflow-guard, and native-owner lanes.

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

Yes, source-reproducible: the added lifecycle harness executes each changed workflow body with real fake-Git process trees and models output and consumer boundaries; the supplied PR evidence reports pre-fix failures and post-fix passes.

Is this the best way to solve the issue?

Yes. The patch reuses the existing lifecycle owner at the producer boundary instead of adding downstream guards, while preserving each workflow's distinct trust-decision messages and deadlines.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This repairs bounded release-admission automation that can affect release operators but does not change normal OpenClaw runtime behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored CI reliability PR is exempt from the external-contributor proof gate; its supplied evidence nevertheless maps the changed workflow bodies to a process-tree lifecycle harness with observed output and consumer gating.

Label justifications:

  • P2: This repairs bounded release-admission automation that can affect release operators but does not change normal OpenClaw runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored CI reliability PR is exempt from the external-contributor proof gate; its supplied evidence nevertheless maps the changed workflow bodies to a process-tree lifecycle harness with observed output and consumer gating.

Evidence

What I checked:

  • Current main still has the reported boundary: Current main directly wraps the Linux fetch with GNU timeout and immediately proceeds to tag and ancestry reads, so it does not contain this PR's lifecycle-owner repair. (.github/workflows/linux-app-release.yml:61, ab989f0d3c79)
  • PR uses the canonical owner for the complete Linux decision: The changed policy executes fetch, tag peeling, ancestry verification, and output publication through the same owner process; lifecycle failures escape rather than being translated to a reachability result. (.github/workflows/linux-app-release.yml:64, 4135aa650ae4)
  • Pinned owner contract inspected: The exact pinned action content matches the reviewed head; its owner fences later commands while draining and only resets that fence after verified cleanup. (.github/actions/git-owner/owner.py:202, dd4528b6393e)
  • Boundary-level regression coverage: The added lifecycle suite runs the actual workflow step bodies against parent/child/grandchild fake-Git process trees and asserts no output or consumer proceeds after failure, cancellation, or cleanup uncertainty. (test/scripts/release-workflow-git-lifecycle.test.ts:69, 4135aa650ae4)
  • Feature-history routing: The pinned lifecycle-owner revision is a prior merged commit attributed to Peter Steinberger, providing a current-main history connection for the affected owner surface. (.github/actions/git-owner/owner.py:202, dd4528b6393e)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • wanyongstar: 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 proof for exact head 4135aa650ae4def5099641b7c5b10616cbef9b98.

ClawSweeper found no correctness issue. Its two before-merge items were exact-head CI completion and normal maintainer landing; the first is green and this native flow satisfies the second.

Hosted proof:

The pre-fix actual workflow bodies failed the new success cases because real fake-Git parent/child/grandchild writers crossed continuation, output, consumer, or exit boundaries.

Focused local proof included these exact commands:

OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs test/scripts/release-workflow-git-lifecycle.test.ts --no-file-parallelism --reporter=dot

Result: 68/68 lifecycle cases passed.

OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts test/scripts/test-projects.test.ts src/scripts/ci-changed-scope.test.ts test/scripts/npm-placeholder-publication.test.ts test/scripts/package-acceptance-workflow.test.ts --no-file-parallelism --reporter=dot

Result: 894 passed, with 2 existing skips.

OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs test/scripts/ci-git-owner.test.ts test/scripts/ci-linux-git.test.ts test/scripts/ci-platform-checkout.test.ts test/scripts/openclaw-performance-git-lifecycle.test.ts test/scripts/release-workflow-git-lifecycle.test.ts --no-file-parallelism --reporter=dot

Result: 400 passed, with 89 existing platform-specific skips.

The full changed-surface gate passed conflict, ratchet, dependency, formatting, typecheck, dead-export, and lint checks. actionlint, parsed non-migrated workflow equivalence, docs inventory, git diff --check, targeted formatting, and both mandatory autoreviews passed; the final branch review is scoped-clean with no accepted finding and 0.98 confidence.

Native review artifacts validate as READY FOR /prepare-pr with zero findings. Automation/workflow/tooling delta is +110/-31, required for three owner placements and two typed trust-decision policies; tests/support are +483/-11; docs are +3/-1; product runtime is unchanged.

Known gaps: no release, package publication, credentialed transport, tag, version bump, or live release workflow was executed. The local Python workflow checker could not install the current pre-commit==4.6.2 pin from this machine's configured package index; hosted exact-head Workflow Sanity passed the authoritative check.

@steipete
steipete merged commit 0a6c013 into main Aug 30, 2026
248 checks passed
@steipete
steipete deleted the steipete/git-owner-release-admission branch August 30, 2026 14:01
@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 P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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