Skip to content

fix(release): validate frozen packages with trusted harness pnpm - #123206

Merged
RomneyDa merged 1 commit into
mainfrom
fix/release-harness-pnpm-cwd
Aug 14, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/release-harness-pnpm-cwd

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes a release-validation failure when the trusted main harness validates a frozen candidate whose pnpm pin differs from main.

Why This Change Was Made

The release harness already installs its own pinned pnpm. The validator now starts from that harness directory, so Corepack resolves the same pinned package manager before the validator receives the immutable candidate tarball path.

User Impact

Release maintainers can validate older or extended-stable candidate packages with the current trusted release workflow even when their pnpm pins differ from main. This does not alter candidate bytes, release refs, tags, or npm state.

Evidence

  • Reproduces the failure from Plugin Prerelease job 94457196850: Corepack selected frozen target pnpm 11.2.2 before pnpm --dir .release-harness applied the harness’s 11.15.1 directory, which pnpm correctly rejected.
  • The failing job had already verified the downloaded artifact digest and immutable candidate tuple: source fdc1c2e6c1b5f41d00edb2eb55244fa7c51f87dd, version 2026.6.35.
  • node scripts/run-vitest.mjs test/scripts/release-no-push-workflow.test.ts (15 passed)
  • actionlint .github/workflows/openclaw-live-and-e2e-checks-reusable.yml
  • node_modules/.bin/oxfmt --check test/scripts/release-no-push-workflow.test.ts
  • .agents/skills/autoreview/scripts/autoreview --mode local --base origin/main — clean, no accepted/actionable findings.

@clawsweeper

clawsweeper Bot commented Aug 13, 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 Aug 13, 2026
@clawsweeper clawsweeper Bot added 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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 13, 2026
@clawsweeper

clawsweeper Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 5:59 AM ET / 09:59 UTC.

ClawSweeper review

What this changes

The PR runs frozen-package validation from the trusted release-harness directory so Corepack selects the harness-pinned pnpm, with workflow-contract assertions for the new invocation.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer review. The patch correctly moves the process into the trusted harness before Corepack selects pnpm, fixing the current-main path that still resolves from the workspace root; the protected maintainer label and pending exact-head checks require a release-owner decision.

Priority: P2
Reviewed head: 0acd05da81ed2e38c402138fd0c79239a28d2f73
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-backed automation repair with a credible workflow-contract regression guard; exact-head release validation remains the material confidence enhancer.
Proof confidence 🌊 off-meta tidepool Not applicable: The PR author is a repository member, so the external-contributor proof gate does not apply; the remaining mismatch-run request is release-owner validation rather than contributor action.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The PR author is a repository member, so the external-contributor proof gate does not apply; the remaining mismatch-run request is release-owner validation rather than contributor action.
Evidence reviewed 5 items Current-main failure path: Current main still invokes pnpm --dir .release-harness; Corepack begins project-spec lookup from the process working directory before pnpm processes that flag.
Harness ownership contract: The trusted harness setup explicitly records that Corepack resolves packageManager from cwd before pnpm processes --dir; its package manager is installed from .release-harness/package.json.
Direct Corepack contract: Corepack’s installed source walks upward from its initial cwd until finding a packageManager, then uses that spec to execute pnpm; changing cwd before pnpm therefore selects the harness manifest.
Findings None None.
Security None None.

How this fits together

Release validation downloads an immutable package candidate and validates it before Docker E2E work proceeds. A trusted harness owns the package-manager pin and supplies the tarball validator, while the candidate tarball remains an input to that validator.

flowchart LR
  Candidate[Immutable candidate tarball] --> Validation[Release validation job]
  Harness[Trusted release harness] --> Pnpm[Pinned pnpm]
  Validation --> Harness
  Pnpm --> Validator[Tarball validator]
  Validator --> Identity[Artifact identity checks]
  Identity --> Result[Release validation result]
Loading

Decision needed

Question Recommendation
Should the release owner require a current-merge-ref frozen-candidate run with a mismatched pnpm pin before merging this trusted-harness change? Run the mismatch validation: Verify the exact merge result against a frozen candidate whose pnpm pin differs from the harness, then merge if checks are green.

Why: The source and focused workflow contract support the fix, but this protected release-automation path controls which package manager validates immutable candidates.

Before merge

  • Resolve merge risk (P1) - This changes trusted release automation; generic checks do not exercise a frozen candidate with a pnpm pin different from the harness, so the strongest remaining confidence comes from that exact current-merge-ref path.
  • Complete next step (P2) - The maintainer label and release-automation risk require release-owner review of the exact-head validation result; no code repair is identified.
Agent review details

Security

None.

PR surface

Tests +5, Config 0. Total +5 across 2 files.

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

Review metrics

Metric Value Why it matters
Production versus test delta workflow +1/-1 (net 0); tests +5/-0 The release-automation change is net-neutral and has a focused workflow-contract regression guard.

Merge-risk options

Maintainer options:

  1. Verify the mismatched-pin path (recommended)
    Run the current merge result with a frozen candidate whose pnpm pin differs from the trusted harness before merge.
  2. Accept source-level proof
    Merge after exact-head CI if the release owner accepts Corepack’s cwd contract and the focused regression guard as sufficient.

Technical review

Best possible solution:

Merge the cwd-before-pnpm fix after exact-head checks are green, preferably with one redacted frozen-candidate mismatch validation trace retained in the PR.

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

Yes, at source level: a frozen target with a different pnpm pin makes Corepack choose the workspace manifest before pnpm handles --dir; the supplied failed workflow gives a concrete occurrence. This read-only review did not execute a workflow run.

Is this the best way to solve the issue?

Yes. Entering .release-harness before invoking pnpm is the narrow owner-boundary repair because Corepack chooses its project pin before pnpm can apply a directory option.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: The affected behavior is release-maintainer automation rather than a user-facing runtime path.
  • merge-risk: 🚨 automation: The patch changes which pnpm instance validates immutable release-candidate packages.
  • 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 PR author is a repository member, so the external-contributor proof gate does not apply; the remaining mismatch-run request is release-owner validation rather than contributor action.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Current workflow and workflow-contract test lines blame to this recent commit. (role: recent current-main contributor; confidence: medium; commits: 14882ac44dcd; files: .github/workflows/openclaw-live-and-e2e-checks-reusable.yml, test/scripts/release-no-push-workflow.test.ts)
  • Peter Steinberger: History ties the trusted harness and its Corepack cwd contract to the typed Docker planner work. (role: release-harness architecture contributor; confidence: medium; commits: a828bfe04ec4; files: .github/actions/setup-release-harness/action.yml, .github/workflows/openclaw-live-and-e2e-checks-reusable.yml)

Rank-up moves

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

  • Let exact-head checks finish.
  • Optionally attach redacted output from a frozen candidate whose pnpm pin differs from the harness.

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-08-13T19:36:41.300Z sha eafbb00 :: needs maintainer review before merge. :: none

@RomneyDa
RomneyDa force-pushed the fix/release-harness-pnpm-cwd branch from eafbb00 to 0acd05d Compare August 14, 2026 09:52
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 14, 2026
@RomneyDa
RomneyDa merged commit 7c73f80 into main Aug 14, 2026
152 checks passed
@RomneyDa
RomneyDa deleted the fix/release-harness-pnpm-cwd branch August 14, 2026 10:10
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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