Repository navigation
fix: pinned-base tests fail without a cached pnpm runtime - #1260
Conversation
Run actual check.js in dependency-free fixtures through the existing command seam, retaining offline containment.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 3:27 AM ET / 07:27 UTC. ClawSweeper reviewWhat this changesThe PR makes six pinned-base validation fixtures supply a scoped pnpm command adapter so their real check scripts run without a host-cached pnpm distribution. Merge readinessKeep open: this is a focused, still-unique test repair with convincing before/after runtime evidence and no blocking patch defect found; the exact-head hosted check remains the landing gate. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe repair lane recreates validation failures at a pinned base in a disposable checkout, then classifies the resulting command output before deciding whether a repair is safe. This patch affects only the fixture-side command used to exercise that reproduction path. flowchart LR
A[Repair validation request] --> B[Pinned-base reproducer]
B --> C[Disposable base checkout]
C --> D[Contained validation command]
D --> E[Captured failure output]
E --> F[Repair classification]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the fixture-only adapter and land it once the exact-head hosted checks confirm the focused reproduction remains stable. Do we have a high-confidence way to reproduce the issue? Yes, source and the submitted before/after trace establish the path: dependency-free pinned-base fixtures skip setup and otherwise resolve the host pnpm before reaching their check script. Is this the best way to solve the issue? Yes. The scoped adapter uses the existing command-resolution seam, executes the actual fixture check script, and leaves production preparation and containment unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ff813ac2fa76. LabelsLabel changes:
Label 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
|
What Problem This Solves
Resolves a problem where six pinned-base validation tests fail on pnpm distribution resolution instead of reaching their intended
check.jsassertions when the host does not have the fixture's pinned pnpm version in the disposable offline cache. The failure was independently reproduced on unchanged baseline5cb6777eea2da37e2c2481e15215c2f8be9c774f.Why This Change Was Made
These dependency-free fixtures deliberately use
installTargetDeps: false, so the fixtures own supplying their executable. A scoped adapter uses the existingwithMockCommand/mockCommandBinEnvboundary to run the actual fixturecheck.jsin the real validator's working directory and environment. It rejects unexpected invocations and forwards the child's output and exit status; it does not manufacture the expected lint diagnostic or mock reproduction/classification.The pnpm pin, existing assertions, production preparation, disposable profiles, and offline containment remain unchanged. The first existing case additionally checks the pinned HEAD, independent checkout, offline flags, fresh HOME/cache/Corepack directories across two reproductions, and cleanup. Production LOC: +0/-0. Tests: +99/-34 in one file.
User Impact
Developers can run the pinned-base reproduction tests without depending on their installed pnpm version or a pre-warmed distribution cache. There is no production behavior or public API change.
OpenClaw Bay Impact
None. This changes only local test-fixture execution, not review publication, queues, telemetry, dashboards, or data contracts.
Documentation Impact
Reviewed
AGENTS.md,CONTRIBUTING.md, anddocs/repair/README.md. Their preparation and containment contracts remain accurate; no documentation or changelog change is needed for this test-only repair.Evidence
The original six cases failed before this repair and pass afterward. The full adjacent pinned-base group passes on the committed head with external networking denied. The changed file passes formatting, lint, and
git diff --check; fresh isolated Codex reviews before commit and on the committed branch againstorigin/mainboth reported no accepted/actionable findings in their default P0 scope.The local full
pnpm run checkwas also attempted and is not green: 3,703 passed, 46 failed, 9 skipped. Forty-two failures match the separately reproduced inherited Git-pruning defect; two other fixtures still try to resolve host pnpm; one live-proof test cannot access the host tmux socket under the stricter outer sandbox; and one setup-deadline test times out at an earlier Git identity inspection. Those failures are not hidden, skipped, or folded into this patch. Exact-head hosted CI remains a landing gate.Real Behavior Proof
Revision:
f8536584ad1bc26f50f5d81a08cafd669ad10f49(same reviewed test patch; relevant validation files are unchanged on current baseff813ac2fa76d853d8a9129e6763d09624cafe72).Claim and exercised surface: the six affected fixtures now execute their real
check.jsthroughreproduceValidationFailureAtPinnedBaseand the production contained command runner, without resolving an external pnpm distribution. Real local Git repositories exercise partial clones, historical blob hydration, comparison refs, SHA-256 object format, checkout-hook rejection, and adjacent fail-closed cases.Environment: macOS, Node 24.19.0, repository pnpm 11.10.0. Dependencies were prepared offline with zero downloads. The focused proof adds an outer macOS sandbox denying non-loopback networking and restricts Git transports to local files; production isolation is not relaxed.
Build command:
Focused proof command:
Observed result and trace: before the repair, all six selected cases stopped at
Failed to resolve @pnpm/[email protected] in package mirror …, beforesrc/base.ts:1: lint failed. After the repair, the actual scripts emit that lint diagnostic, and the existing partial-clone/ref/object-format/hook assertions succeed. The first case also emits apinned-base-profileobservation from insidecheck.js; assertions verify the pinned HEAD, separate disposable cwd and profiles, both offline flags, and removal after each run. The adjacent group, including its independent-runtime and fail-closed cases, finishes:Limits: this is executable fixture/reproduction proof, not integration proof for downloading or installing the external pnpm distribution. No production runtime changed. macOS proof does not establish Linux namespace availability; the existing platform-specific containment tests retain their platform limits. The separate local full-gate failures above remain disclosed.