Skip to content

fix(release): verify target-declared worker artifacts - #137097

Draft
vincentkoc wants to merge 4 commits into
mainfrom
fix/release-worker-target-contract
Draft

vincentkoc wants to merge 4 commits into
mainfrom
fix/release-worker-target-contract

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Release verification can miss required worker helpers or apply incorrect scan exemptions when its artifact list differs from the selected release target.

User Impact

Release operators get installed-worker validation tied to the selected source, including all eight artifacts declared by the reviewed producer. No runtime configuration changes or migrations are required.

Postpublish verification now requires the frozen target root and full source SHA. The beta verifier and release runbooks pass those inputs explicitly.

Why This Change Was Made

  • Read the target's canonical WORKER_BUNDLE_ARTIFACT_PATHS, including literal helper paths and local constant references. Retain individual exported constants only for supported historical targets such as v2026.9.4 that predate the array.
  • Parse declarations without executing target modules. Bound the reader to 64 KiB and 1-16 unique, normalized artifact paths.
  • Validate the frozen checkout, commit and package/release identity before deciding applicability. Historical targets without the worker deployment producer impose no worker requirements; malformed applicable declarations fail closed.
  • Share target-derived requirements and bounded-scan exemptions across release, prepublish and postpublish verification. Required installed artifacts must be regular, non-symlink files.

This incorporates the current producer contract from #149158 and #154711 and addresses the earlier review's array, applicability and frozen-root findings.

Evidence

  • Linux Testbox: 376 passing behavioral cases across qualified runs, comprising 321 retained unaffected cases, 52 repaired cases and three selected workflow cases. Three causal baseline failures establish the missing-helper, non-regular-artifact and target-membership regressions.
  • All 21 checks selected for the explicit 20-path candidate are covered, including formatting, line-count ratchet, script and root-test typechecks, lint, TypeScript erasability and dead-export analysis. Final git diff --check passed.
  • The final nine-file formatting-only delta was independently reviewed. Behavioral evidence is carried through that transformation, not described as fresh execution of formatted bytes. Earlier failed aggregate receipts remain failed; successful completed stages were reconciled without replay.
  • Independent review completed. Two compatibility suggestions were rejected because these internal helpers have no published API contract and all production callers migrate together; restoring hardcoded exemptions would reintroduce target drift.
  • One warning-only test temp-directory migration advisory remains; the existing fixture has explicit afterEach cleanup. No failing check was waived.

Scoped proof is bound to candidate tree d7c108a253ea9e3350c67e76c0fad4c84ba155ca against frozen source 8eed7e856384313a8ae1be78c33e045a9f1ca598. The owned Testbox was stopped after all commands joined. This does not qualify an unverified composition with later main changes.

The PR is retained as a draft. Native review initialization stopped because PR metadata reports zero changed files while its file listing is nonempty. Trusted review also has an unresolved input-scanner admission hold; no unchanged review retry is requested. Resolve those admission issues, then qualify exact-head CI and native landing. No merge or release publication was performed.

@vincentkoc vincentkoc self-assigned this Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 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 docs Improvements or additions to documentation scripts Repository scripts size: M maintainer Maintainer-authored PR labels Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 24, 2026, 7:11 AM ET / 11:11 UTC (Revision 5).

ClawSweeper review

What this changes

The branch reads worker artifact declarations from a release target, checks those files in packaged and installed npm releases, and passes the target root through beta verification and release guidance.

Merge readiness

⛔ Blocked before merge - 7 items remain

This PR remains useful because current main still does not require target-declared worker files during installed-package verification. Its reader is incomplete for current main’s artifact array and producer-free frozen targets, and the public release guide leaves the target-root argument undefined.

Priority: P2
Reviewed head: 38f6a112cd7586ebf8dd859c3e5b63f7db8cd4c9

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The branch has useful release-boundary coverage, but three concrete integration defects prevent a reliable current-main verdict.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: This member-authored PR is exempt from the external-contributor proof gate. Its body reports historical package-verification tests and a linked Testbox run at an earlier parent, but no repaired current-main integration; no stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) 3 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored PR is exempt from the external-contributor proof gate. Its body reports historical package-verification tests and a linked Testbox run at an earlier parent, but no repaired current-main integration; no stored-data contract changes.
Evidence reviewed 11 items Introduced reader: The branch reads only exported individual WORKER_BUNDLE_*_PATH string constants and requires at least two declarations.
Current artifact contract: Current main’s canonical array declares seven artifacts, including two literal service-child filenames that have no individual path constants.
Frozen-target compatibility: Current main checks whether the target has a worker producer before reading declarations; its test accepts a producer-free target.
Findings 3 actionable findings [P1] Read the canonical worker artifact array
[P1] Allow frozen targets without a worker producer
[P2] Define the validated target root in the release guide
Security None None.

How this fits together

Release tooling compares a frozen source checkout with a built or registry-installed npm package. Its result tells maintainers whether required worker files are present before and after publication.

flowchart LR
A[Frozen release checkout] --> B[Worker artifact declarations]
B --> E[Release verification]
C[Built npm package] --> E
D[Registry-installed package] --> E
E --> F[Pass or failure report]
Loading

Before merge

  • Read the canonical worker artifact array (P1) - Current main declares seven required files in its canonical array, including two literal service-child filenames. This loop reads only five individual constants, so installed-package verification misses those files. Resolve array entries and their local constant references first; retain the constant fallback for historical targets.
  • Allow frozen targets without a worker producer (P1) - Current main explicitly accepts frozen targets with shared hash helpers but no worker producer. The unconditional file read and minimum-count requirement make those targets fail before the existing applicability check can run.
  • Define the validated target root in the release guide (P2) - The public recovery command now requires a target-root placeholder, but this guide does not say which checkout it denotes or require its HEAD to match the immutable release candidate. An operator can therefore verify the published package against the wrong artifact contract.
  • Resolve merge risk (P1) - Integrating the installed-worker check with current main must preserve its companion-manifest and legacy dependency-ownership inputs; the conflicted branch has no verified merge result.
  • Resolve merge risk (P1) - The introduced release-tooling code grows by a net 49 lines. Integration should absorb current main’s separate declaration parser into one owner so the two contracts do not drift.
  • Complete next step (P2) - Integrate against current main: read the canonical array with historical fallback, preserve producer-free and installed-scan compatibility paths, define the frozen root in public guidance, and validate the repaired head before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P1] Read the canonical worker artifact array — scripts/lib/worker-deploy-target-contract.mts:17-21
  • [P1] Allow frozen targets without a worker producer — scripts/lib/worker-deploy-target-contract.mts:9-11
  • [P2] Define the validated target root in the release guide — docs/reference/RELEASING.md:173
Agent review details

Security

None.

PR surface

Tests +187, Docs +4, Other +49. Total +240 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 5 199 12 +187
Docs 3 13 9 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 5 95 46 +49
Total 13 307 67 +240

Review metrics

Metric Value Why it matters
Production versus test delta release tooling +49 net lines; tests +187; guidance +4 The tooling growth adds a shared reader and installed checks, and should be consolidated with main’s existing parser during integration.
Verifier input surface 1 optional target-root CLI argument added Postpublish checks depend on selecting the same frozen checkout as the published candidate.

Stored data model

Persistent data-model change detected: unknown-data-model-change: scripts/release-check.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Integrate the release contract (recommended)
    Repair the reader and frozen-target behavior, preserve main’s installed-scan inputs, and validate the resulting release gates against historical and current targets.
  2. Pause this branch
    Keep the draft open until its conflicts can be resolved without losing current release-verification behavior.

Technical review

Best possible solution:

Use one bounded, non-executing reader for the canonical artifact array, with individual-constant support only for historical targets; apply it only where a worker producer exists, retain current installed-scan inputs, and document the SHA-validated frozen root.

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

Yes, at source level: current main’s artifact array and producer-free fixture expose paths the branch reader cannot handle. This read-only review did not execute a release check.

Is this the best way to solve the issue?

No. Sharing target-derived requirements is the right direction, but the reader must implement main’s canonical array and producer-applicability contract before it can replace the current checks.

Full review comments:

  • [P1] Read the canonical worker artifact array — scripts/lib/worker-deploy-target-contract.mts:17-21
    Current main declares seven required files in its canonical array, including two literal service-child filenames. This loop reads only five individual constants, so installed-package verification misses those files. Resolve array entries and their local constant references first; retain the constant fallback for historical targets.
    Confidence: 0.96
  • [P1] Allow frozen targets without a worker producer — scripts/lib/worker-deploy-target-contract.mts:9-11
    Current main explicitly accepts frozen targets with shared hash helpers but no worker producer. The unconditional file read and minimum-count requirement make those targets fail before the existing applicability check can run.
    Confidence: 0.94
  • [P2] Define the validated target root in the release guide — docs/reference/RELEASING.md:173
    The public recovery command now requires a target-root placeholder, but this guide does not say which checkout it denotes or require its HEAD to match the immutable release candidate. An operator can therefore verify the published package against the wrong artifact contract.
    Confidence: 0.89

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded release-verification improvement with concrete integration defects, not an active user runtime outage.
  • merge-risk: 🚨 automation: The current reader omits two declared artifacts, so a merged release gate could undercheck worker files.
  • merge-risk: 🚨 compatibility: The unconditional declaration read would reject frozen targets that current main explicitly accepts without a worker producer.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This member-authored PR is exempt from the external-contributor proof gate. Its body reports historical package-verification tests and a linked Testbox run at an earlier parent, but no repaired current-main integration; 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)
  • 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.

  • Cover canonical arrays and producer-free frozen targets through the shared reader and release-verification consumers.
  • Define the SHA-validated frozen target root in the public guide, then verify the integrated checks on historical and current target packages.

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 (4 earlier review cycles)
  • reviewed 2026-09-03T06:45:39.022Z sha 6babcb6 :: blocked before merge. :: [P2] Pass the validated target root in every release runbook invocation
  • reviewed 2026-09-03T07:05:03.344Z sha 38f6a11 :: blocked before merge. :: [P2] Define the frozen target root in the public release guide
  • reviewed 2026-09-03T07:14:13.832Z sha 38f6a11 :: blocked before merge. :: [P2] Define and test the frozen target root in public release docs
  • reviewed 2026-09-23T05:55:19.236Z sha 38f6a11 :: blocked before merge. :: [P1] [P1] Read the canonical artifact array when the target declares it | [P1] [P1] Preserve verification for targets without a worker producer | [P2] [P2] Define the frozen target root in the public release guide

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 3, 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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. labels Sep 3, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 23, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 26, 2026 14:30
@vincentkoc
vincentkoc requested a review from a team as a code owner September 26, 2026 14:30
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: zalo Channel integration: zalo and removed scripts Repository scripts labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(release): verify target-declared worker artifacts This is item 1/1 in the current shard. Shard 0/1.

This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

This branch has not been deployed

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

Labels

app: android App: android app: ios App: ios app: linux app: macos App: macos app: wearos App: wearos app: web-ui App: web-ui channel: a2a channel: buzz channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: qa-channel Channel integration: qa-channel channel: qqbot channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: twitch Channel integration: twitch channel: zalo Channel integration: zalo clawsweeper-recovery-stuck docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: acpx extensions: active-memory extensions: admin-http-rpc extensions: agentsapi extensions: alibaba extensions: amazon-bedrock extensions: amazon-bedrock-mantle extensions: anthropic extensions: anthropic-vertex extensions: apple-fm extensions: arcee extensions: baseten Extension: baseten extensions: brave extensions: browser extensions: byteplus extensions: canvas extensions: cerebras extensions: chutes extensions: clawrouter Extension: clawrouter extensions: clickclack extensions: cloudflare-ai-gateway extensions: codex extensions: copilot extensions: fish-audio Extension: fish-audio extensions: github GitHub plugin: link previews and reader extensions: onepassword 1Password plugin extensions: openai extensions: qa-lab extensions: tts-local-cli fleet gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: azure-speech Azure Speech plugin plugin: beam Beam session sharing plugin plugin: bonjour Plugin integration: bonjour plugin: code-mode-quickjs plugin: facetime FaceTime plugin plugin: file-transfer plugin: geolocation Geolocation plugin (IP to coarse city) plugin: google-meet plugin: linux-node plugin: migrate-claude plugin: migrate-hermes plugin: onnx plugin: session-share plugin: team-reports plugin: typesafe plugin: workboard rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security Security documentation size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant