Repository navigation
fix: prepare frozen Knip for network-isolated OpenClaw validation - #1001
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 9:37 AM ET / 13:37 UTC. ClawSweeper reviewWhat this changesThe PR stages an integrity-pinned Knip dependency cache for OpenClaw repair validation, allowing the existing changed-code check to run offline without downloading packages in the isolated validation profile. Merge readinessThis PR remains necessary: current Priority: P2 Review scores
Verification
How this fits togetherClawSweeper repair jobs prepare a disposable target-repository toolchain, then run selected validation commands before publishing a repair PR. For OpenClaw source changes, this patch supplies the Knip dead-code checker from a frozen private cache so the network-isolated changed-code gate can execute without modifying the protected checkout. flowchart LR
A[Repair candidate] --> B[Changed-file validation plan]
B --> C{OpenClaw source gate needed?}
C -->|Yes| D[Frozen Knip staging]
D --> E[Private offline pnpm cache]
C -->|No| F[Normal validation setup]
E --> G[Isolated changed-code validation]
F --> G
G --> H[Repair PR decision]
Decision needed
Why: The patch appears technically sound and is backed by real offline proof, but accepting a new third-party dependency staging mechanism inside a repair security boundary is a maintainer policy decision rather than a mechanical contributor fix. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain OpenClaw’s real changed-code validation gate, but land it only with the frozen lockfile as the sole dependency source, lifecycle-free staging outside target checkouts, per-command private cache restoration, and the focused containment coverage preserved. Do we have a high-confidence way to reproduce the issue? Yes, from current source and the supplied run evidence: OpenClaw’s changed-code path uses Is this the best way to solve the issue? Yes, subject to maintainer acceptance of the security boundary: preparing the exact locked helper only when the existing OpenClaw changed-code gate needs it is narrower and safer than granting network access to isolated validation or disabling the real gate. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 86cc49d4e0ee. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…enclaw#1001) * fix: stage frozen OpenClaw deadcode tooling for isolated validation * fix: reject traversal paths in mutating formatter hints * fix: bind offline pnpm registries across supported versions --------- Co-authored-by: Peter Steinberger <[email protected]>
Problem
OpenClaw root-cause issue repairs were reaching their real changed-validation gate and then failing because
pnpm dlx --package [email protected] kniptried to download Knip inside ClawSweeper's deliberately network-isolated validation sandbox. For example, repair run 30695474227 reachedERR_PNPM_META_FETCH_FAIL/EAI_AGAINinstead of creating its OpenClaw pull request. A green outer workflow alone did not indicate successful repair.Changes
[email protected]helper when the selected changed-validation plan actually includes an OpenClaw source file scanned by Knip; docs-only repairs, disabled changed gates, and ordinary toolchain preparation never fetch it.config/openclaw-knip-6.8.0.pnpm-lock.yamlwith--frozen-lockfile, and fail closed on any graph mismatch before downloaded package code can execute.dlxcache from that frozen installation without running downloaded package code or package lifecycle scripts.node_modules/.cache/jitiwhile OpenClaw's own plugin-loader cache tests retain their normal behavior.PNPM_CONFIG_OFFLINE=trueandPNPM_CONFIG_REGISTRYvariables, while preserving pnpm 10's legacynpm_config_offline=true, so either supported pnpm generation remains network-isolated and cannot silently fall back to the public registry or a fresh package download..segments, and..traversal segments in otherwise trusted mutating formatter hints.gpt-5.6-sol/xhighwithCLAWSWEEPER_ALLOW_MERGE=0; generated OpenClaw PRs remain create-only and never enable auto-merge.Security-boundary disposition
The frozen dependency graph is completely committed and integrity-bound; package staging uses
--frozen-lockfileand rejects any mismatch before helper execution. Lifecycle scripts, pnpmfiles, pre/post scripts, and the global virtual store are disabled. Setup can write only to a disposable private profile outside the protected OpenClaw checkout. The digest-bound cache is frozen, then copied privately for each isolated validation command. Only the fixed Knip launcher disables Jiti's filesystem cache. Production pnpm is explicitly forced offline and bound to the same approved registry used during frozen setup, including custom registries and nondefault ports. The real pinned helper, the protected target checkout, and the existing plugin-loader suite were verified end to end. OpenClaw fix PRs remain create-only; no target PR receives merge or auto-merge authority.Real behavior proof
Verified head:
2261169240cbb4d570a956c521767d7735c786ca.The actual pinned package was installed with
--frozen-lockfile, full lifecycle execution disabled, and release-age enforcement enabled; then the real OpenClaw-stylepnpm check:changedgate executed real[email protected]with networking unavailable:{ "actualPinnedKnipExecuted": true, "offlineValidationSucceeded": true, "commands": ["pnpm check:changed"], "targetJitiCacheCreated": false }The same actual end-to-end proof also succeeds when the target repository's policy is increased to seven days:
{ "actualPinnedKnipExecuted": true, "offlineValidationSucceeded": true, "minimumReleaseAgeMinutes": 10080, "frozenDependencyGraph": true }Separately, copying only the staged pnpm cache into a fresh profile and pointing HTTP/HTTPS/all proxies at an unreachable listener still ran the actual pinned package successfully and printed
6.8.0.Independent execution also confirmed that real pnpm 11 runs the frozen pinned helper with
PNPM_CONFIG_OFFLINE=true, while pnpm 10 reports offline mode only when the preserved legacynpm_config_offline=trueaccompanies it. Focused integration coverage requires both settings and the same approved registry for every isolated validation command.Focused coverage asserts that helper setup never writes to the OpenClaw checkout, installs only its complete frozen
[email protected]dependency graph, preserves the 48-hour release-age policy, rejects a tampered transitive dependency graph, works with registries on nondefault HTTPS ports, never downloads Knip for docs-only or disabled-gate validation, disables every package execution hook and the global virtual store, restores a clean private cache for each validation command, prevents Knip-only Jiti checkout writes without breaking existing plugin-loader tests, and rejects absolute/traversal formatter paths.Verification
pnpm run build:allpnpm run lint:repairpnpm run lint:scriptspnpm run format:checkpnpm run check:active-surfacepnpm run check:limitssrc/plugins/plugin-module-loader-cache.test.tssuite: 19/19 passed with Knip's cache override scoped to Knip alone./reviewon the exact current head.