Skip to content

fix: verify ClawHub after release finalization retries - #165877

Merged
shakkernerd merged 1 commit into
mainfrom
fix/clawhub-rerun-receipt
Oct 6, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
fix/clawhub-rerun-receipt

Conversation

@shakkernerd

Copy link
Copy Markdown
Contributor

What Problem This Solves

ClawHub postpublish verification fails when a release succeeds after retrying finalization while retaining its earlier successful dispatch job. The verifier looks for a dispatch record from the terminal attempt, although the original job produced the valid record during an earlier attempt.

Fixes #165848.

User Impact

Maintainers can verify a successfully retried release using the evidence produced by its actual dispatch job. This changes read-only verification; it does not publish packages, change release approvals, or alter package versions.

Why This Change Was Made

The normal exact-attempt path stays intact. When a terminal retry retains an earlier producer, the verifier examines a bounded set of historical records and identifies the unique successful execution retained in the terminal job inventory. It preserves the original parent attempt through dispatch and authorization checks while still requiring the terminal parent to have succeeded.

Repository, workflow, ref, SHA, producer-job, child-attempt, and immutable archive checks remain enforced. Different producer executions, ambiguous records, and substituted evidence are rejected before registry verification. Artifact creation time and recency do not establish authority.

Evidence

The historical release failure is linked in #165848. A focused remote regression reproduces the original Missing exact parent release dispatch record error through the actual verifier and immutable archive fixture. The candidate also covers multiple historical attempts, normal and no-child outcomes, and invalid producer/evidence variants.

Remote Linux validation passed formatting, type-aware lint, script types, the affected root-script test type partition, and all 65 verifier cases. The final owner suite took 2.09 seconds (Vitest: 1.22 seconds); the single-worker pnpm test test/scripts/clawhub-postpublish.test.ts --maxWorkers=1 measurement was 1.99 seconds. The added cases share the existing in-process fixture and add no service boots or timers.

The plugin compatibility report, export scans, architecture checks, production dependency audit, and private-key scan passed. The full-tree unused-file scan retains the unrelated src/infra/open-file-descriptors.test-support.ts failure also observed on main. This patch leaves that helper and its discovery inputs unchanged.

@clawsweeper

clawsweeper Bot commented Oct 6, 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.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M labels Oct 6, 2026
@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 Oct 6, 2026
@clawsweeper

clawsweeper Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 5, 2026, 8:31 PM ET / October 6, 2026, 00:31 UTC.

ClawSweeper review

What this changes

The ClawHub postpublication verifier recovers dispatch evidence from an earlier successful job retained by a release retry, preserves its original authorization attempt, and adds recovery and rejection coverage.

Merge readiness

✅ Ready for maintainer review

The repair remains necessary: current main and v2026.9.8 still reject the retained dispatch artifact after a successful finalization retry. Actual GitHub job records corroborate the patch’s execution-matching assumptions, and no introduced blocking defect was found.

Priority: P2
Reviewed head: b67a7fd43ce2914dd06d30f32ecb72222f051990

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, provenance-preserving repair with meaningful rejection coverage and live corroboration of the GitHub job contract.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported after-fix execution uses the production verifier with mocked GitHub and registry responses; independently inspected live Actions records corroborate the retained-execution contract, but do not constitute an after-fix hosted run. No stored-data format is replaced.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported after-fix execution uses the production verifier with mocked GitHub and registry responses; independently inspected live Actions records corroborate the retained-execution contract, but do not constitute an after-fix hosted run. No stored-data format is replaced.
Evidence reviewed 12 items Pinned introduced change: Reviewed the merge-base-to-head production and test hunks. The verified test-merge comparison against its main parent contains the same two paths; unrelated endpoint drift is excluded.
Current main still needs the repair: Current main derives the dispatch artifact name from the terminal run attempt and throws when that exact artifact is absent. Subsequent authorization checks also use that attempt.
Latest-release check: The same exact-terminal-attempt dispatch lookup is present in the supplied latest release, v2026.9.8; this repair is not already implemented there.
Findings None None.
Security None None.

How this fits together

OpenClaw’s postpublication verifier consumes successful release completion events and authenticated GitHub artifacts. It checks the originally authorized package bytes against ClawHub and records verification results.

flowchart TD
  A[Successful release completion] --> B[Dispatch record selection]
  C[Historical jobs and artifacts] --> B
  B --> D[Original authorization checks]
  D --> E[Child package artifacts]
  E --> F[ClawHub byte verification]
  F --> G[Verification evidence]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +192, Other +136. Total +328 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 199 7 +192
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 169 33 +136
Total 2 368 40 +328

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #165848
Summary: This PR is the explicit implementation candidate for the retained-dispatch retry bug.

Members:

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

Technical review

Best possible solution:

Preserve terminal release success separately from original dispatch provenance so verification can recover without republishing or weakening artifact checks.

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

Yes, from current source and actual Actions records: a successful attempt-2 completion encounters an attempt-1-only dispatch inventory and fails the exact-name lookup. No executable reproduction was run during this read-only review.

Is this the best way to solve the issue?

Yes. Separating the terminal attempt from the authenticated original producer repairs the existing verifier while preserving exact child, authorization, and archive checks.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This fixes a concrete release-verification retry failure without evidence of incorrect published bytes or blocked user installation.
  • 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: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported after-fix execution uses the production verifier with mocked GitHub and registry responses; independently inspected live Actions records corroborate the retained-execution contract, but do not constitute an after-fix hosted run. No stored-data format is replaced.

Label justifications:

  • P2: This fixes a concrete release-verification retry failure without evidence of incorrect published bytes or blocked user installation.
  • 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: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported after-fix execution uses the production verifier with mocked GitHub and registry responses; independently inspected live Actions records corroborate the retained-execution contract, but do not constitute an after-fix hosted run. No stored-data format is replaced.

Evidence

What I checked:

  • Pinned introduced change: Reviewed the merge-base-to-head production and test hunks. The verified test-merge comparison against its main parent contains the same two paths; unrelated endpoint drift is excluded. (scripts/clawhub-postpublish.mjs:232, b67a7fd43ce2)
  • Current main still needs the repair: Current main derives the dispatch artifact name from the terminal run attempt and throws when that exact artifact is absent. Subsequent authorization checks also use that attempt. (scripts/clawhub-postpublish.mjs:191, eb405f0d5c50)
  • Latest-release check: The same exact-terminal-attempt dispatch lookup is present in the supplied latest release, v2026.9.8; this repair is not already implemented there. (scripts/clawhub-postpublish.mjs:191, fc23bc864e45)
  • Real terminal job projection: Release run 37357820450 attempt 2 reports a successful retained publication job with runner 1021393307, job times 18:43:49–19:10:19 UTC, and successful dispatch upload times 18:48:31–18:48:32 UTC. These are the execution facts compared by the fallback. (6bc3e8ae39ca)
  • Original execution matches: Attempt 1 exposes the same runner, job timestamps, and upload timestamps under run_attempt 1. This independently confirms that the successful producer was retained rather than executed again. (6bc3e8ae39ca)
  • Retained artifact inventory: The actual run inventory contains only openclaw-release-children-37357820450-1, artifact 11365023601, with digest sha256:2bc4a18b5d69a1552c69e4cf54a50f4bf0059c0a62a4c00e5ce85899d572f96b. There is no attempt-2 dispatch record. (6bc3e8ae39ca)

Likely related people:

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

@shakkernerd shakkernerd self-assigned this Oct 6, 2026
@shakkernerd
shakkernerd merged commit 2f1e555 into main Oct 6, 2026
103 checks passed
@shakkernerd
shakkernerd deleted the fix/clawhub-rerun-receipt branch October 6, 2026 00:34
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: ClawHub postpublish verification now preserves the original dispatch evidence across release finalization retries.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 6, 2026
Verify ClawHub publication after release finalization retries using the retained successful dispatch producer and its immutable evidence.

Fixes openclaw#165848.
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

[Bug]: ClawHub postpublish fails after a release finalization retry

1 participant