Repository navigation
fix: keep frozen Knip validation compatible across pnpm versions - #1003
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 10:14 AM ET / 14:14 UTC. ClawSweeper reviewWhat this changesThe 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 readinessKeep 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: Priority: P2 Review scores
Verification
How this fits togetherThe 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
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Co-authored-by: Peter Steinberger <[email protected]>
Problem
Deep independent review of the newly deployed frozen Knip helper found that pnpm 10 and early pnpm 11 use a 64-character
dlxcache 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
gpt-5.6-sol/xhighwith 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:repairpnpm run lint:repairpnpm run lint:scriptspnpm exec oxfmt --check src/repair/pinned-openclaw-validation-helper.ts test/repair/target-validation.test.ts/review.