Skip to content

fix: keep frozen Knip validation compatible across pnpm versions - #1003

Merged
steipete merged 1 commit into
mainfrom
codex/clawsweeper-pnpm-cache-compat
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/clawsweeper-pnpm-cache-compat

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Problem

Deep independent review of the newly deployed frozen Knip helper found that pnpm 10 and early pnpm 11 use a 64-character dlx cache key, while current pnpm 11 uses a 32-character key. Their registry metadata layouts also differ. The original helper could therefore miss its own reviewed frozen dependency graph or reject older package-manager checkouts before validation.

Changes

  • Create one integrity-verified frozen dependency installation and expose both package-manager cache keys as aliases to the exact same immutable package graph.
  • Generate exact-version, integrity-bound registry metadata directly from the reviewed lock and installed package manifest for both legacy pnpm 10 and current pnpm 11 layouts.
  • Preserve the actual pinned package publication time and target release-age policy.
  • Verify the complete generated dependency graph before publishing any synthetic registry metadata.
  • Keep every validation offline, retain package lifecycle restrictions and private per-command cache copies, preserve standalone local review, and leave OpenClaw fix PRs create-only on gpt-5.6-sol / xhigh with merge and auto-merge disabled.

Real behavior proof

Real offline execution of pinned [email protected], each using the exact same frozen reviewed dependency graph:

[
  {"packageManager":"pnpm 10.33","exitCode":0,"output":"6.8.0"},
  {"packageManager":"pnpm 11.0","exitCode":0,"output":"6.8.0"},
  {"packageManager":"pnpm 11.15","exitCode":0,"output":"6.8.0"}
]

The real OpenClaw-style changed-validation command also succeeds with its minimum release-age policy raised to seven days:

{"actualPinnedKnipExecuted":true,"offlineValidationSucceeded":true,"commands":["pnpm check:changed"],"targetJitiCacheCreated":false}
{"minimumReleaseAgeMinutes":10080,"frozenDependencyGraph":true}

Focused regression coverage asserts that both cache keys reach the same verified installation, both metadata formats expose only version 6.8.0, the metadata carries the exact committed SHA-512 integrity, custom registry ports remain bound, and tampered dependency graphs still fail closed.

Security-boundary disposition

This narrows the existing dependency boundary: generated metadata advertises exactly one reviewed version and its integrity is taken directly from the committed frozen lock. Both cache aliases resolve to the same verified installation; no second package graph can be created. Package staging remains frozen, lifecycle scripts and pnpmfiles remain disabled, package code cannot execute during installation, every command gets a private cache copy, and OpenClaw PRs remain create-only.

Verification

  • pnpm run build:repair
  • pnpm run lint:repair
  • pnpm run lint:scripts
  • pnpm exec oxfmt --check src/repair/pinned-openclaw-validation-helper.ts test/repair/target-validation.test.ts
  • Focused target-validation integration tests.
  • Real network-isolated pinned-Knip execution under pnpm 10.33, 11.0, and 11.15.
  • Real OpenClaw-style changed validation with a seven-day minimum release-age policy.
  • Independent Codex /review.

@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 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 repository_dispatch).
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 proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 10:14 AM ET / 14:14 UTC.

ClawSweeper review

What this changes

The PR makes OpenClaw’s pinned offline Knip validation helper compatible with pnpm 10 and pnpm 11 by aliasing their cache-key layouts and generating exact-version registry metadata from the verified lockfile and installed manifest.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for normal merge review. The two-file patch preserves the existing frozen-install boundary while adding a single full-key cache graph, a legacy-key alias, and exact integrity-bound metadata for pnpm cache layouts; the submitted real offline execution evidence covers pnpm 10.33, 11.0, and 11.15. Likely related people: steipete is the high-confidence routing candidate because current main’s helper and this compatibility follow-up both trace to their commits.

Priority: P2
Reviewed head: 6048b79c8353beb469e1471a7ec37d033d49205c

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused compatibility repair with credible real offline proof, narrow regression coverage, and no actionable correctness or security finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body contains after-fix live output for network-isolated pinned Knip execution on three pnpm versions and for the OpenClaw-style changed-validation command with the seven-day release-age policy.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body contains after-fix live output for network-isolated pinned Knip execution on three pnpm versions and for the OpenClaw-style changed-validation command with the seven-day release-age policy.
Evidence reviewed 5 items Full-key graph and legacy alias: The PR creates the helper graph under the full SHA-256 key, then aliases the 32-character key to that same directory before validating the one trusted lockfile.
Metadata remains bound to the reviewed graph: Generated metadata verifies the installed package identity and reads the SHA-512 integrity from the committed frozen lock before exposing only the pinned Knip version in both current and legacy pnpm metadata locations.
Focused regression coverage: The changed target-validation test verifies both cache-key paths, both metadata layouts, the version-only metadata set, and SHA-512 integrity presence while retaining the lock-tamper failure case.
Findings None None.
Security None None.

How this fits together

The repair lane prepares a frozen Knip dependency graph before running OpenClaw’s changed-file validation without network access. The prepared pnpm cache is copied into disposable validation profiles, where the target repository’s pnpm command consumes the cached helper and registry metadata.

flowchart LR
  Target[OpenClaw target checkout] --> Setup[Repair-lane toolchain setup]
  Setup --> Graph[Verified frozen Knip graph]
  Graph --> Cache[Private pnpm cache]
  Cache --> Keys[pnpm 10/11 cache-key layouts]
  Cache --> Metadata[Integrity-bound registry metadata]
  Keys --> Gate[Offline changed-file validation]
  Metadata --> Gate
Loading

Before merge

  • Resolve merge risk (P1) - Merging changes the repair lane’s dependency-security boundary: an incorrect cache alias or malformed synthetic metadata could make offline OpenClaw validation fail or cease to use the intended frozen graph. The patch mitigates this by retaining one verified graph, checking the trusted lock, and publishing only the exact pinned version and integrity.
  • Complete next step (P2) - No discrete repair is needed: the patch has no actionable review finding and should proceed through normal maintainer merge review with the stated security-boundary awareness.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch scope 2 files affected; 68 added, 28 removed The change is contained to the pinned-helper implementation and its matching integration test.
Submitted live coverage 3 pnpm versions The PR body reports successful real offline Knip execution on pnpm 10.33, 11.0, and 11.15.

Merge-risk options

Maintainer options:

  1. Accept the verified cache-boundary change (recommended)
    Merge the focused patch because the two cache-key layouts resolve to one lock-verified installation and the metadata exposes only the pinned package integrity.
  2. Pause if pnpm support policy changes
    Hold this PR only if maintainers intend to stop supporting one of the pnpm cache layouts rather than preserving compatibility in the repair lane.

Technical review

Best possible solution:

Land the focused compatibility repair while preserving the single verified dependency graph and its integrity-bound metadata; retain the narrow regression coverage whenever the pinned Knip or supported pnpm range changes.

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

Yes: current source shows that the prior helper created only a 32-character dlx cache key, while the PR’s focused test exercises both the 32- and 64-character lookup paths and both metadata layouts. The PR body also provides after-fix offline execution output for pnpm 10.33, 11.0, and 11.15.

Is this the best way to solve the issue?

Yes: aliasing both pnpm cache-key layouts to one frozen, verified graph is narrower and safer than building separate installations, and generating metadata from the installed manifest plus committed lock preserves the existing trust boundary.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded repair-lane compatibility fix whose failure would affect OpenClaw validation automation but not the primary runtime.
  • add merge-risk: 🚨 security-boundary: The patch changes how a frozen dependency graph and registry metadata are presented to pnpm during offline validation.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains after-fix live output for network-isolated pinned Knip execution on three pnpm versions and for the OpenClaw-style changed-validation command with the seven-day release-age policy.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body contains after-fix live output for network-isolated pinned Knip execution on three pnpm versions and for the OpenClaw-style changed-validation command with the seven-day release-age policy.

Label justifications:

  • P2: This is a bounded repair-lane compatibility fix whose failure would affect OpenClaw validation automation but not the primary runtime.
  • merge-risk: 🚨 security-boundary: The patch changes how a frozen dependency graph and registry metadata are presented to pnpm during offline validation.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body contains after-fix live output for network-isolated pinned Knip execution on three pnpm versions and for the OpenClaw-style changed-validation command with the seven-day release-age policy.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains after-fix live output for network-isolated pinned Knip execution on three pnpm versions and for the OpenClaw-style changed-validation command with the seven-day release-age policy.

Evidence

What I checked:

Likely related people:

  • steipete: The current main helper is attributed to the frozen-Knip implementation commit and this compatibility follow-up is authored by the same person. (role: introduced current helper and recent area contributor; confidence: high; commits: 5b0ff665559a, 6048b79c8353; files: src/repair/pinned-openclaw-validation-helper.ts, test/repair/target-validation.test.ts)

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 merged commit e9f97b3 into main Aug 1, 2026
22 checks passed
@steipete
steipete deleted the codex/clawsweeper-pnpm-cache-compat branch August 1, 2026 14:17
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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