Skip to content

fix(release): gate integrated branch pushes - #178202

Merged
RomneyDa merged 4 commits into
mainfrom
fix/rri-107-release-prepush
Oct 20, 2026
Merged

RomneyDa merged 4 commits into
mainfrom
fix/rri-107-release-prepush

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

  • add an integrated release-branch gate covering changed static/type checks, production Knip analysis, and changed tests
  • validate a captured exact SHA from a fresh detached worktree with frozen dependencies
  • bind successful validation to a non-force push of that exact SHA while rejecting dirty, moved, noncanonical, or stale-base state

Fixes RRI-107.

Testing

  • pnpm exec vitest run test/scripts/release-prepush.test.ts (5 tests)
  • node scripts/run-oxlint.mjs scripts/release-prepush.mts test/scripts/release-prepush.test.ts
  • OPENCLAW_LOCAL_CHECK=0 node scripts/run-tsgo-core-test-shards.mjs --root-stripe 2/4
  • pnpm release:prepush -- --help
  • git diff --check

Review

  • independent semantic review completed with no P0/P1/P2 findings after exact-SHA push binding and immutable-checkout corrections

Validate a captured release SHA from an immutable detached checkout, then push that exact SHA only after static, type, dead-code, and changed-test gates pass.

Co-authored-by: RomneyDa <[email protected]>
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M labels Oct 20, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR validates a captured release commit in a detached checkout before pushing that exact SHA.

Example: Create release/2026.10.6 from a confirmed cut equal to origin/main.

  • Before: The stable orchestrator pushed the cut directly without integrated validation.
  • After: The orchestrator invokes release:push, which runs the applicable gates before pushing the captured cut.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, coherent implementation with both prior findings resolved; validation confidence rests on source inspection and reported focused tests.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; supplied evidence covers focused tests and executable help parsing, without demonstrating the full validation-and-push path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Release operators could push an integrated release branch without first running its combined static, type, dead-code, and changed-test checks.
Reason: The maintainer-authored direction addresses a concrete release workflow gap without duplicating check classification or test selection.

Merge readiness

✅ Ready for maintainer review

This PR resolves both prior findings and adds a useful release push gate; no new blocking defect was found, while exact-head CI remains pending.

Priority: P2
Reviewed head: 2bc2da4ae98e97f926ec11babecbdc7ec491cd58

Before merge

None.

Findings

None.

Tests

  • Low-value test test/scripts/release-prepush.test.ts: The isolated equal-SHA assertAuditBounds test duplicates the same real guard already exercised by the zero-delta orchestration test and can be removed.
  • Missing end-to-end proof: The supplied evidence does not demonstrate a complete real gate-and-push run or red-on-base execution of the regressions.
Agent review details

How this fits together

Release tooling takes a confirmed commit and canonical release branch, invokes existing validation owners in a detached worktree, and sends the validated commit to Git.

flowchart TD
  A[Release operator] --> B[Stable orchestrator]
  B --> C[Release push gate]
  C --> D[Detached checkout]
  D --> E[Existing check and test planners]
  E --> F[Exact SHA Git push]
Loading

Technical review

Best possible solution:

Keep one exact-commit validation-and-push owner and route release branch creation and recovery through it.

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

Current-main source shows the direct stable-cut push bypassing integrated checks; this read-only review executed no target code.

Is this the best way to solve the issue?

The focused wrapper preserves existing validation ownership and binds success to the exact pushed commit; both previously reported failures are corrected.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 692a4d02d3ce.

Provenance checked

  • Stable branch creation and recovery changes intended behavior with a stated reason (878ee97: The resumable orchestrator centralized release sequencing and recovery after a difficult manually driven release.)
  • Regular release guidance and handoff keeps the original intent (74b764e: Maintainer workflow simplification retained release safeguards while removing duplicated procedures; the added gate provides a specific missing safeguard.)
  • Stable orchestrator test fixtures keeps the original intent (a489782: The prior cleanup consolidated fixtures while retaining current release contracts; this PR updates those fixtures for the changed push boundary.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Prior findings resolved: The reviewed head accepts an equal comparison base and head, removes one package-manager separator wherever it occurs, and retains rejection of a second separator; focused regressions cover both prior findings. (scripts/release-prepush.mts:233, 2bc2da4ae98e)
  • Existing validation owners reused: The gate invokes check:changed, production Knip, and the existing changed-test planner, then rechecks source state and pushes the captured SHA without force. (scripts/release-prepush.mts:203, 2bc2da4ae98e)
  • Current main still needs the change: Fetched main still creates missing release branches with a direct Git push; the PR routes that operation and incomplete-cut recovery through release:push. (scripts/lib/release-stable-phases.mts:73, 692a4d02d3ce)
  • Discussion and current workflow state: RomneyDa's re-review comment describes both repairs and reports passing focused tests, script typecheck, and lint; live REST reads confirm the reviewed head, mergeable=true, and a pending CI gate. (2bc2da4ae98e)
  • Feature history: History identifies the resumable orchestrator introduction and subsequent release work by Peter Steinberger and Dallin Romney; follow-history searches reached unavailable old blobs, while the relevant introduction and current-main lines were independently verified. (scripts/lib/release-stable-phases.mts:73, 692a4d02d3ce)

PR surface

Tests +221, Docs +19, Config +2, Other +298. Total +540 across 7 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 224 3 +221
Docs 2 20 1 +19
Config 1 2 0 +2
Generated 0 0 0 0
Other 2 300 2 +298
Total 7 546 6 +540

Root-cause cluster

Relationship: canonical
Canonical: #178202
Summary: This PR owns the main-branch release push gate; the linked release-train PRs carry backports among broader remediation batches.

Members:

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

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The change improves release operator validation with a limited tooling blast radius.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-20T07:11:56.741Z sha a46156f :: needs changes before merge. :: [P2] Route the default stable workflow through the integrated gate
  • reviewed 2026-10-20T07:28:56.597Z sha 051797e :: needs changes before merge. :: [P2] Accept the package-script separator after --push | [P2] Allow a fresh cut whose commit equals origin/main

Reviewed October 20, 2026, 3:59 AM ET / 07:59 UTC (Revision 3).

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Addressed the default stable-release bypass in 051797e003f:

  • release:stable now creates a missing release branch through release:push, supplying the exact confirmed cut SHA and canonical destination branch;
  • release:push validates that exact captured commit in its detached checkout before pushing it;
  • incomplete-cut recovery instructions now use pnpm release:push instead of a raw Git push;
  • added focused coverage for orchestrator-supplied exact cuts and the stable cut/recovery paths.

Validation: 27 focused tests pass, pnpm tsgo:scripts passes, and oxlint reports zero warnings/errors.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Addressed both concrete findings in 2bc2da4ae98:

  • the parser now removes the single package-manager -- separator even when the package script injects --push before it, while still rejecting a second separator;
  • zero-delta fresh cuts (origin/main == head) remain auditable and run the full applicable validation plan before pushing.

Proof includes the exact executable argv shape (--push -- --help), a parser regression for --push -- --head ... --branch ..., and a zero-delta orchestration test proving all four gates run before the exact SHA is pushed. All 31 focused stable/push tests pass; script typecheck and oxlint are clean.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@RomneyDa
RomneyDa enabled auto-merge (squash) October 20, 2026 23:26
@RomneyDa
RomneyDa merged commit 2afc8db into main Oct 20, 2026
218 checks passed
@RomneyDa
RomneyDa deleted the fix/rri-107-release-prepush branch October 20, 2026 23:26
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
* fix(release): gate integrated branch pushes

Validate a captured release SHA from an immutable detached checkout, then push that exact SHA only after static, type, dead-code, and changed-test gates pass.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): gate stable branch pushes

Co-authored-by: RomneyDa <[email protected]>

* fix(release): accept orchestrated stable push shape

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Oct 23, 2026
* fix(release): retain postpublish failure causes (#178147)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit f47d5d7)

* fix(release): make FRV no-op commands succeed (#178149)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 29587f5)

* fix(release): retry unstarted FRV reruns after 5xx (#178160)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit fadee60)

* fix(release): show readable SDK acknowledgement diff (#178158)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit f6c0066)

* fix(release): report FRV plan sealing state (#178172)

* fix(release): report FRV plan sealing state

Co-authored-by: RomneyDa <[email protected]>

* fix(release): declare FRV plan lifecycle APIs

Declare the plan lifecycle helpers consumed by the TypeScript tests so NodeNext resolution checks the new exports.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 4b065f5)

* fix(release): gate integrated branch pushes (#178202)

* fix(release): gate integrated branch pushes

Validate a captured release SHA from an immutable detached checkout, then push that exact SHA only after static, type, dead-code, and changed-test gates pass.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): gate stable branch pushes

Co-authored-by: RomneyDa <[email protected]>

* fix(release): accept orchestrated stable push shape

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 2afc8db)

* fix(release): audit backport companion closure (#178188)

* fix(release): audit backport companion closure

Add a bounded, evidence-only audit for later same-path commits, PR companions, neighbor tests, reference candidates, and candidate file/content differences.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): satisfy companion scanner lint

Co-authored-by: RomneyDa <[email protected]>

* fix(release): accept backport companion separator

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 0f2b5e9)

* ci(release): retain live failure diagnostics (#179097)

* ci(release): retain live failure diagnostics

Co-authored-by: RomneyDa <[email protected]>

* test(release): isolate live cache shell replay

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 89ee777)

* feat(release): add fast backport conflict probe (#179104)

* feat(release): add fast backport conflict probe

Co-authored-by: RomneyDa <[email protected]>

* fix(release): parse backport probe separator

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 3c1d486)

* fix(release): print release note verifier errors (#179077)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 2219999)

* fix(release): verify extended stable notes context (#179083)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 7de3a4b)

* feat(release): fetch compatibility inputs from registry (#179093)

* feat(release): fetch compatibility inputs from registry

Co-authored-by: RomneyDa <[email protected]>

* docs(release): clarify offline inventory checks

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit a819d2b)

* fix(release): close extended-stable FRV retry helper

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

2 participants