Skip to content

fix(release): publish parent fails after dispatch on a gate-blocked stale child, and on a slow beta-floor sync - #161632

Merged
steipete merged 2 commits into
mainfrom
release/publish-hardening
Sep 30, 2026
Merged

steipete merged 2 commits into
mainfrom
release/publish-hardening

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: a stable publish parent failed after it had already dispatched its npm and ClawHub children, when an older parent's child was stuck on an environment gate. Separately, post-publish verification failed on a beta floor that was only slow to sync.

User Impact

User impact: none for end users. Release operators no longer lose a publish parent (and have it cancel its own fresh ClawHub child) to stale-child cleanup, and no longer need a resume publish because the beta-floor sync took 19 minutes.

Why This Change Was Made

Stale children (2026.9.7 parent 36666756291). The parent dispatched plugin npm and ClawHub, then swept a stale plugin-clawhub-new.yml child that was waiting on clawhub-plugin-bootstrap. The workflow token can't reject a pending deployment (HTTP 403: only a required reviewer can), and cancelling a gate-waiting run doesn't take effect. So the five-minute deadline failed the step, and failure cleanup cancelled the parent's own new ClawHub child.

  • Every superseded-child sweep now runs before the first dispatch.
  • Plugin npm and both ClawHub workflows serialize publication per target ref (concurrency: ...-${{ inputs.ref }}, cancel-in-progress: false), so a stuck stale child really does hold the slot. In that case the parent now refuses before creating any child, and prints the reviewer's reject/cancel commands.
  • Core npm uses a per-run slot and rechecks its live parent immediately before publishing, so an unconfirmed cancellation there is a warning and the parent continues.
  • A 403 on reject is logged once as a warning that names the reviewer command with the exact environment ID. It also goes into the step summary.

Beta floor (2026.9.7 parent 36662344193). sync_npm_beta_floor gave up after 600 s with only a warning, so verification judged a stale floor ("npm beta must be at or above latest"). The sync (openclaw/releases run 36665313413) went green about 6 minutes later. Measured post-release sync_beta_to_stable runs take 17m57s–18m53s (2026-09-11, -19, -23, -30).

  • The wait budget is now 3000 s (about 2.65x the observed maximum), still overridable with RELEASE_NPM_DIST_TAG_SYNC_TIMEOUT_SECONDS. The publish job timeout goes from 120 to 180 minutes to keep headroom.
  • The wait prints status changes and a five-minute heartbeat.
  • If the parent's own sync is still running at the deadline, the parent fails with that explicit reason (run URL) instead of letting the verifier report a floor defect.
  • The verifier itself is unchanged.

The skill and reference docs describe the new ordering and budgets. Production LOC: +51/−25 (net +26), spent on progress output and the distinct outcomes; removing the lazy per-dispatch sweep offsets part of it. Tests: net +91. Docs: net +12.

Evidence

  • New regressions fail on the old implementation:
    • A gate-blocked stale child with a 403 reject: the sweep runs before dispatch, and no new child gets dispatched or cancelled.
    • A core npm stale child: warns and continues.
    • A sync finishing after 600 s but inside the new budget: waited for.
    • A sync still running at the deadline: fails with the explicit reason.
    • All use fake clocks; there are no real sleeps.
  • node scripts/run-vitest.mjs test/scripts/release-publish-parent.test.ts: 31 passed (60.5 s on a loaded host). release-clawhub-children.test.ts: 15 passed (37.3 s). release-publish-children.test.ts: 12 passed (19.3 s).
  • pnpm check:workflows, pnpm tsgo:test:root, bash -n, shellcheck: no new findings versus the baseline. Scoped oxfmt/oxlint, check:line-cap-ratchet, check-deadcode-exports, git diff --check: pass.
  • Codex autoreview (gpt-6-astra, P2 threshold): scoped-clean.

The live 2026.9.7 publication runs on pinned tooling (release-publish/2b4055f8dd70-1790734526) and isn't affected. This is release tooling for the next run.

@steipete steipete added the release-fast-lane Release tooling PR: narrow ci-gate, ClawSweeper advisory (RELEASING.md) label Sep 30, 2026
@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 30, 2026 05:13
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M labels Sep 30, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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 Sep 30, 2026
@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 30, 2026, 2:37 AM ET / 06:37 UTC (Revision 2).

ClawSweeper review

What this changes

The branch moves stale release-child checks before publisher dispatch, extends the npm beta-floor sync wait, improves operator diagnostics, and updates release guidance and tests.

Merge readiness

✅ Ready for maintainer review

The fix remains useful: current main and the latest release retain the dispatch-time sweep and shorter beta-sync wait. The previous review raised no findings, and the later commit changes only tests. I found no definite defect introduced by this head.

Priority: P2
Reviewed head: 4b61ad668f43b941fccce0730d72102c655e0e24

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused workflow changes and meaningful regression fixtures support a normal good rating; the next real publication remains unobserved.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: Repository State classifies the author as MEMBER, so the external-contributor proof gate does not apply. The PR describes earlier live release failures and after-fix shell workflow fixtures with simulated GitHub responses, but no after-fix live publication; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository State classifies the author as MEMBER, so the external-contributor proof gate does not apply. The PR describes earlier live release failures and after-fix shell workflow fixtures with simulated GitHub responses, but no after-fix live publication; no stored-data contract changes.
Evidence reviewed 7 items Introduced publish preflight: The publish parent checks selected stale-child workflows before its first publisher dispatch.
Child cancellation handling: An unconfirmed cancellation blocks a serialized plugin publisher; core npm may proceed on its per-run slot.
Beta-sync outcome: The default wait becomes 3000 seconds; a still-running sync at the deadline returns an explicit failure before verification.
Findings None None.
Security None None.

How this fits together

OpenClaw’s release publish parent starts npm and ClawHub child workflows after release approval. It waits for publication results and the beta-floor sync before recording postpublish verification.

flowchart LR
  A[Approved release] --> B[Publish parent]
  B --> C[Check stale children]
  C --> D{Publisher slot available?}
  D -->|Yes| E[Npm and ClawHub children]
  D -->|No| F[Operator guidance]
  E --> G[Beta floor sync]
  G --> H[Postpublish verification]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +93, Docs +12, Config +13, Other +13. Total +131 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 203 110 +93
Docs 3 19 7 +12
Config 1 15 2 +13
Generated 0 0 0 0
Other 1 36 23 +13
Total 9 273 142 +131

Review metrics

Metric Value Why it matters
Sync wait budget 600s → 3000s; publish job 120 → 180 minutes The longer bound accommodates the reported ledger timing while increasing the maximum publish-job duration.
Production and test growth production +26 lines; tests +93 lines The PR body explains the production growth as progress reporting and distinct failure outcomes.

Technical review

Best possible solution:

Keep stale-child admission in the publish parent, preserve each child’s own publication authority checks, and report a still-running beta sync before postpublish verification.

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

No high-confidence current-main end-to-end reproduction was run in this read-only review. Current main shows the reported ordering and 600-second wait, while the PR body identifies historical release runs.

Is this the best way to solve the issue?

Yes. The patch changes the existing publish parent and child helper, with focused tests for pre-dispatch refusal and late sync completion.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded release-operator reliability fix without direct end-user impact.
  • merge-risk: 🚨 automation: The changed publish workflow controls child dispatch, cancellation, and verification timing.
  • 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. Not applicable: Repository State classifies the author as MEMBER, so the external-contributor proof gate does not apply. The PR describes earlier live release failures and after-fix shell workflow fixtures with simulated GitHub responses, but no after-fix live publication; no stored-data contract changes.

Evidence

What I checked:

Likely related people:

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

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-30T05:21:43.207Z sha 0e84d50 :: needs maintainer review before merge. :: none

@steipete steipete self-assigned this Sep 30, 2026
@steipete
steipete merged commit 68ef53a into main Sep 30, 2026
142 checks passed
@steipete
steipete deleted the release/publish-hardening branch September 30, 2026 07:04
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 30, 2026
…tale child, and on a slow beta-floor sync (#161632)

* fix(release): sweep stale publish children before dispatch and wait for the beta-floor sync

* test(release): drive stale-child guards before dispatch in workflow fixtures

(cherry picked from commit 68ef53a)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
…tale child, and on a slow beta-floor sync (openclaw#161632)

* fix(release): sweep stale publish children before dispatch and wait for the beta-floor sync

* test(release): drive stale-child guards before dispatch in workflow fixtures
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. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. release-fast-lane Release tooling PR: narrow ci-gate, ClawSweeper advisory (RELEASING.md) scripts Repository scripts size: M 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