Repository navigation
fix(pr): materialize dependencies for code-only wrappers - #149193
Conversation
Matching linked wrapper code could skip anchor materialization without local dependencies, so hosted preparation failed while importing a helper dependency. Reuse the verified anchor and pinned package path for locked commands while preserving dependency-free administrative commands. Validation: Bash syntax, targeted oxfmt, and full source review. Runtime validation is pending for the PR wrapper and hosted-gate test suites.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 12:54 PM ET / 16:54 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR routes matching linked checkouts without local dependencies through the existing trusted wrapper materializer and updates dependency-routing and cleanup fixtures. Merge readiness✅ Ready for maintainer review This remains a useful, bounded fix: current main and v2026.9.4 still contain the dependency-routing gap. No blocking introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s PR tooling selects trusted wrapper code and dependencies before running maintainer review, preparation, and merge commands. The selected wrapper then uses the existing per-PR supervision and locking machinery. flowchart TD
A[Maintainer command] --> B[Wrapper trust selection]
B --> C{Matching linked code lacks dependencies?}
C -->|Locked command| D[Verified anchor and pinned packages]
C -->|Other cases| E[Existing wrapper route]
D --> F[Command supervision and execution]
E --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +93, Other +14. Total +107 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep dependency-context selection in the existing trusted materializer while preserving installed checkouts and dependency-free administrative commands. Do we have a high-confidence way to reproduce the issue? Yes, from source: a matching linked wrapper without node_modules skips materialization when the canonical wrapper differs, then hosted preparation imports unavailable packages. No local execution was performed during this read-only review. Is this the best way to solve the issue? Yes. Reusing the existing materializer and locked-command predicate repairs the missing dependency context without introducing a second loader or changing the trust policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 05602f6e6745. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review Please review head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Taking prerequisite follow-through for this canonical wrapper dependency fix under the worktree-efficiency maintainer assignment. I inspected the current four-file diff at @vincentkoc: please flag any active writer or pending push so we can serialize overlapping work. My intended order is to complete the required review/native landing of this PR first, preserving your authorship and commits, then integrate the separate managed-worktree acceleration adapter. I will not open a replacement wrapper fix. Hunk boundary: this PR retains ownership of locked-command dependency routing and the shared The current CI gate is green and the latest ClawSweeper review is read; those are not a completed native landing. I am preparing the remaining proof/handoff while local checkout and fixture allocation are held. No shared checkout mutation, install, or bypass is planned. |
|
Merged via squash.
|
* improve(startup): reduce Gateway readiness work * perf(startup): defer migration imports and reuse snapshot fingerprints * fix(build): retain shared SQLite schema import * fix(startup): defer maintenance until startup settles * test(gateway): split post-ready startup coverage * test(codex): remove duplicate terminal inventory fixture case (#149349) (cherry picked from commit 60deb0d) * fix(test): unblock managed update fixture lint (#149423) (cherry picked from commit 6c28739) * test(pr): sync alias fixture dependencies Reuse the canonical fixture helper from Vincent Koc's #149193 (7450a11) and the alias setup from #149477 (bb1451c60785853ab3d0380ef825ec143f11233c). Keep supervisor delegation and refusal assertions intact when current main materializes missing linked-worktree dependencies. * test(pr): drop superseded alias fixture backport Revert 0045dc7 so main owns the canonical PR wrapper dependency setup. This avoids reintroducing a second setup call after the upstream fixture repair. Startup production and package inputs are unchanged.
…9193) * fix(pr): materialize dependencies for code-only wrappers Matching linked wrapper code could skip anchor materialization without local dependencies, so hosted preparation failed while importing a helper dependency. Reuse the verified anchor and pinned package path for locked commands while preserving dependency-free administrative commands. Validation: Bash syntax, targeted oxfmt, and full source review. Runtime validation is pending for the PR wrapper and hosted-gate test suites. * test(pr): provide dependencies for linked cleanup fixtures
* improve(startup): reduce Gateway readiness work * perf(startup): defer migration imports and reuse snapshot fingerprints * fix(build): retain shared SQLite schema import * fix(startup): defer maintenance until startup settles * test(gateway): split post-ready startup coverage * test(codex): remove duplicate terminal inventory fixture case (openclaw#149349) (cherry picked from commit df50b7d) * fix(test): unblock managed update fixture lint (openclaw#149423) (cherry picked from commit a41881e) * test(pr): sync alias fixture dependencies Reuse the canonical fixture helper from Vincent Koc's openclaw#149193 (9078929) and the alias setup from openclaw#149477 (bb1451c60785853ab3d0380ef825ec143f11233c). Keep supervisor delegation and refusal assertions intact when current main materializes missing linked-worktree dependencies. * test(pr): drop superseded alias fixture backport Revert 0045dc7 so main owns the canonical PR wrapper dependency setup. This avoids reintroducing a second setup call after the upstream fixture repair. Startup production and package inputs are unchanged.
What Problem This Solves
A linked checkout whose committed PR wrapper matched origin/main could skip materialization even when it had no local dependencies. Node then resolved helper imports from the linked checkout, and hosted preparation failed before gate validation.
User Impact
Matching, code-only linked checkouts reuse the existing verified anchor and pinned third-party package context for locked PR commands. Administrative commands keep their dependency-free paths. Existing dependency directories are retained; their presence is not a frozen-install qualification.
Why This Change Was Made
Reuse the existing locked-command predicate and materializer instead of adding another dependency loader. Developer opt-in still applies only to actual wrapper-code mismatches. Production: +14 lines, justified by the observed dependency-context failure; tests: +93 lines, including 10 added regression rows.
The existing linked cleanup fixtures now share the real third-party package-link setup and own materialized wrapper files through their tracked temporary directory. This test-only correction preserves all five lifecycle cases, assertions and deadlines; it adds no cases.
Evidence
b8c067c0f3065a5d14fa14d2c870c977c49a920f: complete actor and independent source review passed. The correction leaves production unchanged; the locking predicate and extraction/package-pinning implementation retain their reviewed behavior.0837530e0e0f1fd436e0e600a2db445ef44cc0e1(tree8b09673d2f3e0c5b4fedba368c1c7c6ae38c5710, parentse4f7de0e147399989d8bec4ec3758f7ca4b6f318and this signed head) contains the exact four reviewed postimages; selector and unchanged verifier contracts were also bound.Additional maintainer verification
b8c067c0f3065a5d14fa14d2c870c977c49a920f, Node 24.20.0 / pnpm 12.3.4: normal frozen install completed with scripts enabled.node scripts/run-vitest.mjs test/scripts/pr-wrappers.test.ts test/scripts/pr-operation-lock.test.ts -- --reporter=verbose: 2 files passed, 223 tests passed; the single Linux-only zombie-process case was skipped on macOS (the existing hosted Linux result remains above). No local test failures or guard suspensions.