Skip to content

fix: prevent sibling installs from breaking test runs - #154096

Merged
steipete merged 2 commits into
mainfrom
codex/fix-dependency-install-isolation
Sep 20, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/fix-dependency-install-isolation

Conversation

@steipete

@steipete steipete commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes compiler-input verification failing when another source checkout installs dependencies during a test run.

User Impact

Fresh source installs keep dependency file metadata independent across checkouts. Existing hardlinked installs require a fresh task-owned install; an up-to-date install does not migrate them. Filesystems without clone support use copies, which can use more disk space.

Why This Change Was Made

pnpm's Linux hardlink imports let a sibling install change an active input's ctime without changing its bytes. Selecting pnpm's existing clone-or-copy method fixes that at installation while preserving artifact hashes and the ctime check that detects source edits followed by restoration.

Evidence

  • Real pnpm 12.4.0, two offline fixture installs sharing their own store: the original setting fails because the first input's ctime changes; the candidate preserves ctime and independent contents. The regression seeds the repository's pinned package-manager lock document and preserves the canonical Corepack toolchain cache while keeping HOME and the package store isolated and network access disabled.
  • 20 separate cold runs of the original failing file passed: 3,860 tests, 428.218s combined wall time. Three cold runs with the original three-file arguments passed: 1,281 tests, 250.937s. Every run recorded a cache miss and fresh compiler generation with local cache policy enabled. Original arguments were preserved; no separate original scheduler receipt was available.
  • Six owner sibling files passed 83 tests in 4.989s, including unchanged artifact-integrity and edit/restore rejection coverage. The final regression plus verifier sibling passed all five tests. The new file costs 97ms of test time / 1.93s wrapper time with pnpm test test/scripts/pnpm-install-isolation.test.ts --maxWorkers=1 on Node 24.20.0 and pnpm 12.4.0; The repaired fixture takes 230ms in a local reproduction of CI's direct-Node launcher.
  • Fresh independent P2 review passed. All types, 101 npm lock mirrors, formatting, metadata/docs, boundaries, and dead-export scans passed. Full local lint reached its existing 15-minute core deadline under memory pressure (exit 124); remaining lint was canceled and all children joined. Exact-head CI on 0c9732e408752207a19feecadc94ac4194fb2ae6 is green: 149 passed, 15 skipped, none pending or failing. Full lint and both core lint jobs passed. The repaired fixture passed in 132ms inside its original 26-file, 603-test hosted shard. CI run.

The first hosted run exposed a fixture setup defect: its nested empty HOME hid CI's provisioned pnpm because the child environment dropped COREPACK_HOME. Reproducing the actual CI launcher failed offline before either install (77ms test / 3.032s wall). Passing the existing test-home owner's resolved cache location fixed it (230ms / 2.784s); all 66 runner, test-home, and artifact-verifier sibling tests passed through the same launcher in 37.264s. The final two-line fixture repair also passed root-test types, typed lint, formatting, and fresh independent P2 review. No network access, retry, timeout, or integrity assertion was relaxed.

@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: S maintainer Maintainer-authored PR labels Sep 20, 2026
@steipete
steipete marked this pull request as ready for review September 20, 2026 21:41
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Sep 20, 2026
@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: 0c9732e408752207a19feecadc94ac4194fb2ae6
  • Maintainer: @steipete
  • Repository role: admin

These dependency graph changes were made:

  • pnpm-workspace.yaml

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 6:05 PM ET / 22:05 UTC (Revision 2).

ClawSweeper review

What this changes

The PR makes fresh dependency installs clone or copy package files, documents existing-install limitations, and adds a real pnpm regression covering sibling checkout isolation.

Merge readiness

✅ Ready for maintainer review

The fix remains useful: pinned main and the latest release lack install isolation. No introduced correctness or security defect was found, and the latest fixture repair preserves the original assertions.

Priority: P2
Reviewed head: 0c9732e408752207a19feecadc94ac4194fb2ae6

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level fix with meaningful regression coverage, documented installation limits, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this maintainer PR. Its captured body nevertheless reports real pnpm 12.4.0 installs preserving ctime and independent contents, plus recovery of the actual CI launcher after the Corepack cache handoff repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this maintainer PR. Its captured body nevertheless reports real pnpm 12.4.0 installs preserving ctime and independent contents, plus recovery of the actual CI launcher after the Corepack cache handoff repair.
Evidence reviewed 8 items Introduced change: The pinned merge-base-to-head diff adds the existing pnpm clone-or-copy setting, installation guidance, and an offline two-install regression; it does not weaken compiler verification.
Current-main behavior: Pinned main retains the isolated linker but does not set packageImportMethod. Its compiler verifier still rejects inputs whose ctime crosses the compilation cutoff.
Latest-release check: The supplied latest release, v2026.9.5, also lacks packageImportMethod; this change is not established as shipped.
Findings None None.
Security None None.

How this fits together

OpenClaw’s source test runner checks compiled inputs for content and metadata changes. Dependency installation determines whether separate checkouts share file metadata that can accidentally trip those checks.

flowchart TD
  A[Shared package store] --> B[Clone or copy installation]
  B --> C[First checkout dependencies]
  B --> D[Sibling checkout dependencies]
  C --> E[Compiler input verification]
  E --> F[Test run result]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +127, Config +2. Total +129 across 3 files.

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

Review metrics

Metric Value Why it matters
Installation policy 1 existing setting selected: auto → clone-or-copy Fresh installs gain independent file metadata without adding a custom installer or changing integrity checks.

Technical review

Best possible solution:

Keep dependency isolation at pnpm’s installation boundary while preserving compiler integrity checks and explicit guidance for older hardlinked installs.

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

Yes, source establishes the mechanism: Linux pnpm imports share hardlinked inodes, while compiler verification rejects changed ctime. The PR reports a failing original two-install scenario; this review did not execute it.

Is this the best way to solve the issue?

Yes. Selecting pnpm’s existing isolation mode fixes the producer of shared metadata and retains meaningful edit-and-restore detection.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2275c485045a.

Labels

Label justifications:

  • P2: This fixes a bounded source-development reliability problem when sibling dependency installs overlap compiler verification.
  • 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 external-contributor proof gate does not apply to this maintainer PR. Its captured body nevertheless reports real pnpm 12.4.0 installs preserving ctime and independent contents, plus recovery of the actual CI launcher after the Corepack cache handoff repair.

Evidence

What I checked:

  • Introduced change: The pinned merge-base-to-head diff adds the existing pnpm clone-or-copy setting, installation guidance, and an offline two-install regression; it does not weaken compiler verification. (pnpm-workspace.yaml:55, 0c9732e40875)
  • Current-main behavior: Pinned main retains the isolated linker but does not set packageImportMethod. Its compiler verifier still rejects inputs whose ctime crosses the compilation cutoff. (pnpm-workspace.yaml:53, 2275c485045a)
  • Latest-release check: The supplied latest release, v2026.9.5, also lacks packageImportMethod; this change is not established as shipped. (pnpm-workspace.yaml, ec9c1a13db89)
  • Pinned dependency contract: The regression invokes pnpm pinned by OpenClaw’s package.json to 12.4.0, making its import contract directly relevant. That version’s importer starts with hardlinks on Linux; CloneOrCopy skips hardlinks and falls back from reflinks to copies. Existing targets can remain unchanged. (pnpm/crates/deps-restorer/src/link_file.rs, efc41ac88429)
  • Regression and re-review continuity: The fixture installs one synthetic archive into two private checkouts sharing a private store, checks unchanged ctime through the real verifier, and checks independent contents. The new head only imports and forwards the existing Corepack cache resolver. The previous completed review retained no findings or published rank-up moves. (test/scripts/pnpm-install-isolation.test.ts:56, 0c9732e40875)
  • Maintainer evidence and accepted limitations: The captured PR body reports real pnpm before/after installs, repeated cold compiler runs, and successful reproduction of the repaired direct-Node CI launcher. It explicitly accepts copy fallback disk usage and explains that existing hardlinked installs require a fresh task-owned install. These are documented limitations, not unresolved acceptance questions. Tests were not executed during this read-only review. Public docs: docs/reference/test/local.md. (docs/reference/test/local.md:51, 0c9732e40875)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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-09-20T21:51:00.996Z sha fa4978c :: needs maintainer review before merge. :: none

@steipete
steipete merged commit 7fc68b8 into main Sep 20, 2026
203 checks passed
@steipete
steipete deleted the codex/fix-dependency-install-isolation branch September 20, 2026 22:19
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
* fix(test): isolate dependency files across source checkouts

* test: preserve Corepack cache in install isolation fixture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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