Skip to content

fix(pr): materialize dependencies for code-only wrappers - #149193

Merged
fuller-stack-dev merged 2 commits into
mainfrom
fix/pr-code-only-wrapper-dependencies-20260915
Sep 15, 2026
Merged

fuller-stack-dev merged 2 commits into
mainfrom
fix/pr-code-only-wrapper-dependencies-20260915

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

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

  • Signed head 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.
  • Bash syntax on the unchanged production wrapper, targeted oxfmt 0.66 and diff checks passed. Exact-commit CLI review was clean but diff-only (confidence 0.90).
  • The original operation-lock job passed 138 cases and failed three linked merge-run cases before their lifecycle assertions because the isolated canonical fixture lacked the required packages. It did not execute the wrapper or hosted-verifier suites. This correction repairs that fixture setup; those earlier results do not validate the successor.
  • The successor's original CI attempt passed all 323 required cases with zero target skips or failures: 141 operation-lock cases, 83 wrapper cases, and 99 hosted-verifier cases. All five lifecycle variants passed, including the three that previously failed. The real-shim and dependency-routing regressions passed. Actual tested merge 0837530e0e0f1fd436e0e600a2db445ef44cc0e1 (tree 8b09673d2f3e0c5b4fedba368c1c7c6ae38c5710, parents e4f7de0e147399989d8bec4ec3758f7ca4b6f318 and this signed head) contains the exact four reviewed postimages; selector and unchanged verifier contracts were also bound.
  • The original CI attempt completed successfully: all 96 jobs are terminal (79 successful, 17 skipped), including its required CI gate. The owning test groups had 17 unrelated skipped cases; the three target suites had none. These are hosted results; native Node 26.7 execution remains unrun.

Additional maintainer verification

  • Exact head 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.
  • Fresh independent review of both canonical commits completed with no actionable P0–P2 findings. Bash syntax and diff checks passed.
  • This verification contains no acceleration, allocation, or source-profile follow-up changes.

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.
@vincentkoc vincentkoc self-assigned this Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 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 scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 15, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 15, 2026 15:15
@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 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 12:54 PM ET / 16:54 UTC (Revision 3).

ClawSweeper review

What this changes

The 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
Reviewed head: b8c067c0f3065a5d14fa14d2c870c977c49a920f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with useful boundary regressions, successful hosted validation, and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from external-contributor proof requirements; hosted wrapper and cleanup tests provide supplemental validation of dependency routing, without claiming a live preparation or merge run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from external-contributor proof requirements; hosted wrapper and cleanup tests provide supplemental validation of dependency routing, without claiming a live preparation or merge run.
Evidence reviewed 8 items Introduced production change: The pinned merge-base-to-head diff changes routing for matching linked wrappers without node_modules. The existing command classification, extracted-blob verification, selective package pinning, and operation-lock implementation remain intact.
Current-main necessity: Fetched main enters anchor materialization only when wrapper revisions differ or cannot be resolved; matching code can therefore execute from a linked checkout without its helper dependencies.
Latest-release comparison: The v2026.9.4 wrapper also uses revision mismatch alone to select materialization. Its source was retrieved through GitHub after local historical-blob access failed.
Findings None None.
Security None None.

How this fits together

OpenClaw’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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +93, Other +14. Total +107 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 108 15 +93
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 40 26 +14
Total 4 148 41 +107

Review metrics

None.

Technical review

Best 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.

Labels

Label justifications:

  • P2: This fixes a bounded maintainer-tooling failure when matching linked checkouts lack local dependencies.
  • 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 MEMBER-authored PR is exempt from external-contributor proof requirements; hosted wrapper and cleanup tests provide supplemental validation of dependency routing, without claiming a live preparation or merge run.

Evidence

What I checked:

  • Introduced production change: The pinned merge-base-to-head diff changes routing for matching linked wrappers without node_modules. The existing command classification, extracted-blob verification, selective package pinning, and operation-lock implementation remain intact. (scripts/pr:135, b8c067c0f306)
  • Current-main necessity: Fetched main enters anchor materialization only when wrapper revisions differ or cannot be resolved; matching code can therefore execute from a linked checkout without its helper dependencies. (scripts/pr:115, 05602f6e6745)
  • Latest-release comparison: The v2026.9.4 wrapper also uses revision mismatch alone to select materialization. Its source was retrieved through GitHub after local historical-blob access failed. (scripts/pr:115, 3a9d69db306c)
  • Production failure boundary: Hosted preparation invokes verify-pr-hosted-gates.mjs relative to the selected wrapper. Its implementation imports minimatch and yaml, establishing why selecting trusted source alone does not supply the required dependency context. This path does not depend on the Codex harness. (scripts/pr-lib/gates.sh:36, b8c067c0f306)
  • Regression coverage and review continuity: The added cases exercise helper loading through the real wrapper and shim, preserve installed dependencies and dependency-free administrative paths, and reject missing packages before handoff. The successor changes only fixture dependency setup and temporary-directory ownership; the five cleanup lifecycle cases retain their assertions and deadline. The previous review reported no findings. (test/scripts/pr-wrappers.test.ts:1099, b8c067c0f306)
  • Hosted validation: GitHub confirms run 34991070415 completed successfully for the reviewed head, and all three cited jobs succeeded. The captured PR body reports 323 passing target cases. Raw job-log inspection was blocked by the artifact-host allowlist, so those individual counts were not independently verified. The recorded test merge is historical validation, not a merge result against the pinned current base. (b8c067c0f306)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • 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 (2 earlier review cycles)
  • reviewed 2026-09-15T15:26:00.687Z sha aa0b2a0 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-15T15:57:31.800Z sha b8c067c :: needs maintainer review before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review head b8c067c0f3065a5d14fa14d2c870c977c49a920f after the linked cleanup fixture dependency and temporary-directory correction.

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@fuller-stack-dev

Copy link
Copy Markdown
Member

Taking prerequisite follow-through for this canonical wrapper dependency fix under the worktree-efficiency maintainer assignment. I inspected the current four-file diff at b8c067c0f3065a5d14fa14d2c870c977c49a920f; no branch changes have been made.

@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 linkPrWrapperDependencies fixture helper. The subsequent acceleration change will extend the existing materializer's pinned source/resources and selective package list and consume that same fixture helper; it will not recreate the removed inline helper. The operation-lock cleanup assertions and tracked temporary-directory ownership stay intact.

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.

@fuller-stack-dev
fuller-stack-dev merged commit 7450a11 into main Sep 15, 2026
146 of 147 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the fix/pr-code-only-wrapper-dependencies-20260915 branch September 15, 2026 21:38
@fuller-stack-dev

Copy link
Copy Markdown
Member

Merged via squash.

steipete added a commit that referenced this pull request Sep 16, 2026
* 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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
…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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

2 participants