Skip to content

fix: bind ClawHub publication source to the authorized commit - #135368

Merged
steipete merged 2 commits into
mainfrom
codex/release-2026.8.2-clawhub-source
Sep 1, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/release-2026.8.2-clawhub-source

Conversation

@steipete

@steipete steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes official plugin publication to ClawHub failing after package sealing and approval. The 2026.8.2 release reached the trusted publisher, then every package was rejected because its source ref named a release tag instead of the authorized candidate commit.

Why This Change Was Made

ClawHub validates both source.commit and source.ref against the candidate SHA bound into the publish token. The caller already supplied that SHA as source_commit and as the transaction seal's TARGET_SHA, but supplied a tag or workflow ref as source_ref. Both source fields now use the same resolved candidate SHA. This preserves the existing authorization, package inventory, approval receipts, and independent tooling identity.

The parsed-workflow regression compares both publication source fields with the candidate used by transaction sealing. It protects the cross-workflow contract without introducing a runtime helper or duplicating the ClawHub validator.

User Impact

Approved official plugin artifacts can finish trusted ClawHub publication with correct immutable source attribution. This is a release-tooling repair; it does not change plugin runtime behavior or the published release candidate.

Evidence

  • The live failure is recorded in release job 33530355103: Trusted publish source ref must match the authorized candidate SHA.
  • Directly inspected the pinned ClawHub source validation contract and reusable workflow source-argument forwarding. Omitting the ref would restore the workflow's tag/ref default, so passing the candidate explicitly is required.
  • The new regression failed on the original tag expression, then all 11 parent-authorization tests passed after the fix. Targeted lint, formatting, and diff checks passed.
  • Fresh isolated review found no P0 findings. The previously validated release artifacts are unchanged; this PR does not claim a new live publication from its branch.

Runtime production delta is zero. Workflow delta is +2/-1, including the contract comment; tests are +22/-0. No configuration, dependency, or persistent-state changes.

@clawsweeper

clawsweeper Bot commented Sep 1, 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 size: XS maintainer Maintainer-authored PR labels Sep 1, 2026
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The previous review generation failed before publishing findings. The two-file publisher fix and head remain unchanged; please retry the review.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review the unchanged two-file fix at 4d43fa7. The previous generation exited before producing a review; retrying that exact job returned lease_not_active because its queue lease was already terminal. This request allocates a fresh review lease for the same head.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@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: 🦐 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. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 1:33 PM ET / 17:33 UTC.

ClawSweeper review

What this changes

The PR makes ClawHub publication metadata use the sealed candidate commit in both source fields and adds a regression test for that workflow contract.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No introduced correctness defect was found, but this protected maintainer PR should remain open until the pinned ClawHub reusable-workflow contract is independently rechecked; the review host could not retrieve that external source.

Priority: P2
Reviewed head: 4d43fa714d3d9126714a2afea42155286156364a
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is narrowly scoped and has focused regression coverage, but the authoritative external input contract could not be independently inspected.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored release-tooling repair is exempt from the external-contributor proof gate; the supplied release failure is before-fix evidence and no post-fix publication is claimed.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored release-tooling repair is exempt from the external-contributor proof gate; the supplied release failure is before-fix evidence and no post-fix publication is claimed.
Evidence reviewed 7 items Introduced change: The PR changes only the reusable publisher input so source_ref matches source_commit, both resolved from the preview job’s candidate revision.
Current-main behavior: Current main still supplies a tag or workflow ref as source_ref while supplying the candidate SHA as source_commit, so the proposed repair is not already present.
Owner and caller path: The sealing job records the same preview revision as TARGET_SHA; the publish job is its downstream caller and is pinned to the ClawHub reusable workflow.
Findings None None.
Security None None.

How this fits together

Official plugin releases seal an approved candidate commit before sending packaged plugins to ClawHub. The release workflow passes source metadata to ClawHub’s reusable publisher, which validates it against the authorization token.

flowchart LR
  A[Release candidate] --> B[Package artifacts]
  B --> C[Transaction sealing]
  C --> D[Authorized candidate SHA]
  D --> E[Reusable publish workflow]
  E --> F[ClawHub validation]
  F --> G[Published plugin]
Loading

Decision needed

Question Recommendation
Should this protected release-workflow repair wait for independently inspectable pinned-ClawHub contract or trusted dry-run evidence before merge? Verify the pinned publish contract: Confirm the pinned reusable workflow accepts the candidate SHA for source_ref and obtain a trusted nonpublishing or release-path result before merging.

Why: The proposed value is correct only if the external reusable workflow compares source_ref as the PR states, and that authoritative source could not be retrieved here.

Before merge

  • Resolve merge risk (P1) - If the pinned ClawHub reusable workflow requires source_ref to remain a Git ref rather than the authorized SHA, this workflow-only change would continue to block official plugin publication; independent upstream contract verification is unavailable in this review host.
  • Complete next step (P2) - The protected maintainer PR has no mechanical review finding, but its external reusable-workflow contract needs release-owner confirmation before merge.
Agent review details

Security

None.

PR surface

Tests +22, Config +1. Total +23 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 22 0 +22
Docs 0 0 0 0
Config 1 2 1 +1
Generated 0 0 0 0
Other 0 0 0 0
Total 2 24 1 +23

Review metrics

Metric Value Why it matters
Production versus regression coverage workflow +1/-1, tests +22/-0 The only production behavior change is the publication metadata binding; the added test protects that exact seal-to-publish invariant.

Merge-risk options

Maintainer options:

  1. Verify the external publisher contract (recommended)
    Inspect the pinned ClawHub reusable workflow and confirm the exact candidate-SHA source_ref path with a trusted nonpublishing run before merge.
  2. Defer until release tooling is inspectable
    Keep this small repair open until the external contract can be independently checked rather than relying only on the reported failure.

Technical review

Best possible solution:

Preserve the existing artifact and token flow while passing the sealed candidate SHA through both publication source fields, after confirming the pinned reusable workflow accepts that contract.

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

Unclear for an independent current-main run: source shows the two fields diverge and the PR supplies a release failure, but the pinned external validator could not be exercised or retrieved here.

Is this the best way to solve the issue?

Unclear: binding both publisher inputs to the sealed candidate is the narrowest owner-boundary repair if the pinned ClawHub contract compares them as stated; that dependency contract remains independently unverified.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded repair for official plugin release tooling with limited runtime blast radius.
  • add merge-risk: 🚨 automation: The changed reusable-workflow input directly controls whether official plugin publication succeeds.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored release-tooling repair is exempt from the external-contributor proof gate; the supplied release failure is before-fix evidence and no post-fix publication is claimed.

Label justifications:

  • P2: This is a bounded repair for official plugin release tooling with limited runtime blast radius.
  • merge-risk: 🚨 automation: The changed reusable-workflow input directly controls whether official plugin publication succeeds.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored release-tooling repair is exempt from the external-contributor proof gate; the supplied release failure is before-fix evidence and no post-fix publication is claimed.

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Verify the pinned ClawHub reusable-workflow source_ref contract and capture a redacted trusted dry-run or release-path result.

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

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

The ClawHub publisher rejected the sealed 2026.8.2 candidate because this workflow sent a tag in source_ref, while the server requires the authorized candidate SHA in both source_commit and source_ref. Both fields now come from the same revision used to seal publication authorization. This fixes the caller and preserves ClawHub's authorization checks.

The regression check failed with the old tag expression and passed with the repaired mapping; all 11 focused checks passed. The server contract and pinned reusable publisher were inspected directly. Exact-head CI and native prepare passed at 4d43fa714d3d9126714a2afea42155286156364a. The existing main protocol-declaration fix resolved the unrelated initial build failure; one unchanged process-liveness test passed on its targeted retry. The owned patch stayed identical through the main merge.

The change is one workflow input plus its explanatory comment (+2/-1) and 22 test lines; no product runtime, package bytes, release identity, permissions, or persistent state changed. The current release's manual publication recovery remains separate from this repair.

ClawSweeper's external-contract question is resolved by direct inspection of the pinned validator and reusable publisher. The validator explicitly requires both source fields to match candidateSha; the reusable workflow forwards the supplied value unchanged. Omitting it would default to the workflow ref and retain the bug.

A nonpublishing probe executed that exact pinned validator function after stripping TypeScript types: the release candidate SHA was accepted and returned in both fields; the release tag and tooling SHA were each rejected. This is direct source-contract proof, not a claim of a new OIDC publication. The original automated release failure exercised the same rejection in production: https://github.com/openclaw/openclaw/actions/runs/33530355103. Authenticated manual recovery has separately verified 88 public packages from the sealed artifacts; it is not presented as OIDC evidence. These checks address the review's rank-up request without republishing completed versions.

@steipete
steipete merged commit e2af1ca into main Sep 1, 2026
331 of 333 checks passed
@steipete
steipete deleted the codex/release-2026.8.2-clawhub-source branch September 1, 2026 17:37
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Separate ClawHub upload follow-up observed during the completed 2026.8.2 release: CLI 0.23.3 selects staged upload only above 18 MiB, but the sealed 5,517,809-byte Matrix archive received HTTP 413 through the public multipart route. Selecting the existing staged-upload path preserved the exact archive and completed binary storage successfully.

The final publication request then exceeded the CLI's 120-second request deadline. An isolated manual request with a longer deadline still hit Undici's independent 300-second headers limit. The server subsequently completed publication, and public latest, metadata, integrity, and downloaded bytes verified successfully. No further upload occurred after that verification.

The owning server path stores all 1,843 archive entries sequentially before creating the publication attempt (convex/httpApiV1/packagesV1.ts, storeClawPackFiles). The CLI timeout helper also stops its abort timer when headers arrive, leaving response-body consumption outside that timer. Follow-up belongs in ClawHub's upload selection, asynchronous publication/receipt handling, and coherent request/header/body deadlines; it must preserve memory bounds, authorization, package identity, and inspection gates. This is separate from the source-ref repair in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS 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