Skip to content

fix(pr): give materialized wrappers their dependency context - #150504

Merged
steipete merged 2 commits into
mainfrom
ci-burden/pr-wrapper-closure-no-bare-imports
Sep 17, 2026
Merged

steipete merged 2 commits into
mainfrom
ci-burden/pr-wrapper-closure-no-bare-imports

Conversation

@steipete

@steipete steipete commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes scripts/pr failing when an older worktree materializes a newer trust-anchor wrapper with a larger dependency graph:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@openclaw/fs-safe' imported from <anchor>/src/infra/fs-safe-defaults.ts

User Impact

The verified anchor child completes its own selective dependency context before loaders, supervision, or operation locking. Missing or outdated canonical packages fail with instructions to restore the frozen installation. Materialization preserves existing real package-directory pins, installs nothing, and does not link the whole workspace dependency tree.

Why This Change Was Made

#149585 expanded runtime imports while leaving dependency setup in the launching parent. Older parents only pin their original four tooling packages. This change lets the anchored child complete and version-check its dependencies against the extracted manifest.

The #133913 handoff remains compatible in both directions: newer parents prepare older anchors using the extracted manifest, and pre-#149585 anchors without a manifest retain their original four-package contract.

#150399 is merged into main as 68663e6c648a958067343b5a68ea410c8c736bc0. Its final implementation owns the shared eager-import collector, plain-Node type-erasure checks, and rewritten worktree fixture checks. This PR keeps those owners and adds package export validation plus resolution of workspace aliases within the extracted root.

The separate wrapper guard and regression files from the earlier stack were removed. All handoff regressions now live in the existing eager-import-closure.test.ts; there are no new test files or inventory edits, and main's provisioning/setup tests remain unchanged.

Related: #149585, #133913, #150312, #150399.

Evidence

  • All 10 eager-import/handoff tests pass, including empty and legacy dependency contexts, outdated-package refusal before locking, and newer-parent/older-anchor compatibility with different manifest versions.
  • All 789 routing tests pass, including both broad-shell chunking cases that failed with additional test files.
  • The unchanged provisioning suite reports 17 passes, one platform skip, and a 120-second APFS cold/warm deadline failure.
  • The unchanged operation-lock suite reports 134 passes, one platform skip, and six deadline failures: one 30-second case, two Git subprocess timeouts, and three 10-second cold-entry subprocess limits. Both healthy fresh-main cases pass. Host load averages were roughly 62–87 during these runs; the deadline failures remain a validation gap for a quieter host.
  • The real stale parent at 57beb816a81323d59967890f8199446af46c4f36 successfully materializes c711b353aed704ddbf5555c512de96e2f671d10f; the provisioning entrypoint reaches argument validation without module-resolution errors or operation locks. Temporary fixtures were removed.
  • node scripts/check-changed.mjs, oxfmt --check, git diff --check, and the line-cap ratchet pass. Pre-commit and committed-branch reviews are clean at P1, with no accepted/actionable findings.

No timeouts, assertions, shard baselines, or expected-failure settings were weakened.

@clawsweeper

clawsweeper Bot commented Sep 17, 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: M maintainer Maintainer-authored PR labels Sep 17, 2026
@steipete
steipete force-pushed the codex/pr-disable-auto-maintenance-20260916 branch from 4a137f1 to cc36bea Compare September 17, 2026 02:10
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 17, 2026, 2:43 AM ET / 06:43 UTC (Revision 4).

ClawSweeper review

What this changes

The PR lets extracted maintainer-command wrappers complete and version-check their dependencies, preserves older-wrapper handoffs, and extends the shared import checker.

Merge readiness

⛔ Blocked before merge - 4 items remain

This remains a useful fix absent from current main. The earlier duplicate-scanner concern is resolved, and no blocking code defect was found; the reported deadline failures remain an unresolved validation gap.

Priority: P2
Reviewed head: a1b7c4f2d0d38ba70b6eff1015c18d1f65f92761

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with useful handoff coverage and no blocking finding, with a remaining validation gap.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER classification exempts this PR from the external-contributor proof gate. Its reported real stale-parent run exercises the changed bootstrap path, whose production blobs remain unchanged; it does not prove completed provisioning or resolve the deadline failures.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER classification exempts this PR from the external-contributor proof gate. Its reported real stale-parent run exercises the changed bootstrap path, whose production blobs remain unchanged; it does not prove completed provisioning or resolve the deadline failures.
Evidence reviewed 8 items Introduced production change: The pinned introduced delta adds child-side dependency completion and replaces the parent’s inline setup with the extracted helper, falling back to the caller helper only for older anchors.
Dependency and compatibility contract: The helper validates every package before creating links, preserves existing pins, compares installed versions with the extracted manifest, and retains four-package setup for manifest-free historical anchors. Current package declarations use exact versions.
Current main still needs the fix: Fetched main retains parent-only dependency setup and performs no completion in the anchor child. The new helper is absent from both fetched main and v2026.9.4; no merged related PR establishes this repair.
Findings None None.
Security None None.

How this fits together

OpenClaw’s PR tooling extracts verified main-branch wrapper code when a working checkout cannot supply it. That wrapper needs installed third-party packages before it can load helpers and supervise review or merge commands.

flowchart TD
  A[Working checkout command] --> B[Verify and extract main wrapper]
  B --> C[Read extracted package manifest]
  D[Canonical installed packages] --> E[Complete and validate package pins]
  C --> E
  E -->|Compatible| F[Load helpers and supervise command]
  E -->|Missing or mismatched| G[Stop with recovery instructions]
Loading

Before merge

  • Resolve merge risk (P1) - Materialized commands now stop when installed package versions differ from the extracted manifest; affected operators must restore the matching frozen installation before retrying.
  • Resolve merge risk (P1) - Seven reported provisioning and operation-lock deadline failures remain unexplained by a comparable main baseline; bootstrap success does not settle those longer-running paths.
  • Complete next step (P2) - Resolve the seven reported provisioning and operation-lock deadline failures under unchanged test limits, or document comparable main-baseline evidence explaining them.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Tests +229, Docs 0, Other +49. Total +278 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 241 12 +229
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 102 53 +49
Total 6 344 66 +278

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: scripts/pr-lib/materialize-dependencies.mjs, unknown-data-model-change: scripts/pr-lib/materialize-dependencies.mjs. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete handoff qualification (recommended)
    Retain the documented version-mismatch refusal and resolve the reported deadline failures under unchanged limits, or establish comparable main-baseline evidence.

Technical review

Best possible solution:

Keep one anchor-owned dependency setup path with preserved package pins, explicit version-mismatch recovery, and validated historical handoffs.

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

Yes, from source: an older parent supplies only four packages, while current main’s extracted child does not complete the larger dependency set required by provisioning. This review did not execute the failing path.

Is this the best way to solve the issue?

Yes. Child-owned completion addresses parents that cannot be updated, and the fallback preserves historical anchors while reusing the existing import checker.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs a bounded maintainer-tooling bootstrap failure without affecting ordinary OpenClaw conversations.
  • merge-risk: 🚨 compatibility: The introduced exact-version check can stop previously executable materialized commands until the canonical dependency installation matches the anchor.
  • 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 supplied MEMBER classification exempts this PR from the external-contributor proof gate. Its reported real stale-parent run exercises the changed bootstrap path, whose production blobs remain unchanged; it does not prove completed provisioning or resolve the deadline failures.

Evidence

What I checked:

  • Introduced production change: The pinned introduced delta adds child-side dependency completion and replaces the parent’s inline setup with the extracted helper, falling back to the caller helper only for older anchors. (scripts/pr:81, a1b7c4f2d0d3)
  • Dependency and compatibility contract: The helper validates every package before creating links, preserves existing pins, compares installed versions with the extracted manifest, and retains four-package setup for manifest-free historical anchors. Current package declarations use exact versions. (scripts/pr-lib/materialize-dependencies.mjs:49, a1b7c4f2d0d3)
  • Current main still needs the fix: Fetched main retains parent-only dependency setup and performs no completion in the anchor child. The new helper is absent from both fetched main and v2026.9.4; no merged related PR establishes this repair. (scripts/pr:79, b54d624830a6)
  • Prior production proof remains applicable: The captured body reports that stale parent 57beb81 materialized c711b35 and reached provisioning argument validation without module-resolution errors. GitHub contents identities match current scripts/pr and materialize-dependencies.mjs exactly: 35d630eb343cfd04c4c2776275dcef2d2469eda2 and bc03ddd709253054b0020ad1a6655f39e474de39. This supports bootstrap loading, not completed provisioning. (scripts/pr-lib/materialize-dependencies.mjs:1, a1b7c4f2d0d3)
  • Re-review continuity and remaining validation: The complete captured body and matching live body report 10 passing eager-import/handoff tests and 789 passing routing tests, but retain one provisioning deadline failure and six operation-lock deadline failures. Host load is reported, without comparable main-baseline evidence establishing those failures as unrelated. (a1b7c4f2d0d3)
  • Shared scanner ownership preserved: Merged fix(pr): unify worktree source checks and suppress automatic repacks #150399 supplies the shared eager-import collector. This branch extends that owner with extracted-root resolution and package-export validation rather than retaining the earlier parallel scanner. (test/scripts/eager-import-closure.test-support.ts:31, 68663e6c648a)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve the seven reported deadline failures with unchanged tests on a quieter host, or establish comparable main-baseline evidence explaining them.

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 (3 earlier review cycles)
  • reviewed 2026-09-17T02:17:46.315Z sha a12766e :: blocked before merge. :: none
  • reviewed 2026-09-17T04:58:48.468Z sha a12766e :: blocked before merge. :: [P1] Extend the shared eager-import guard instead of duplicating its scanner
  • reviewed 2026-09-17T05:49:08.365Z sha c711b35 :: blocked before merge. :: none

@steipete
steipete force-pushed the codex/pr-disable-auto-maintenance-20260916 branch 4 times, most recently from 584a751 to 4d414d9 Compare September 17, 2026 04:03
Base automatically changed from codex/pr-disable-auto-maintenance-20260916 to main September 17, 2026 04:50
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 17, 2026
@steipete
steipete force-pushed the ci-burden/pr-wrapper-closure-no-bare-imports branch from a12766e to c711b35 Compare September 17, 2026 05:40
steipete added a commit that referenced this pull request Sep 17, 2026
Bind the TypeScript resolution host to the selected closure root so alias
lookups cannot fall back to the calling checkout during anchor validation.

Refs: #150399, #150504.
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 17, 2026
Let the verified anchor child complete and validate its package pins when an
older parent hands it an incomplete dependency context. Preserve pinned real
package directories and bootstrap older anchors against their own manifest.

Extend the extracted-source guard to cover pinned bare imports, package export
subpaths, and copied workspace aliases. Keep the inventory repair with #150399.

Refs: #149585, #133913, #150312, #150399.
Bind the TypeScript resolution host to the selected closure root so alias
lookups cannot fall back to the calling checkout during anchor validation.

Refs: #150399, #150504.
@steipete
steipete force-pushed the ci-burden/pr-wrapper-closure-no-bare-imports branch from c711b35 to a1b7c4f Compare September 17, 2026 06:37
@steipete
steipete merged commit 7f2637f into main Sep 17, 2026
153 checks passed
@steipete
steipete deleted the ci-burden/pr-wrapper-closure-no-bare-imports branch September 17, 2026 07:07
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 17, 2026
Protect deferred file-preview English fallback registration through a direct modal import. Assert that preview-only copy stays out of startup, becomes available when the modal loads, and preserves the selected German translation and shared Support files label.

The canonical runtime owner already landed in #150420; the wrapper manifest-discovery and dependency-context fixes are on main through #150399 and #150504. This change adds only regression coverage: production/tooling 0 lines, tests +32/-0. No runtime or visible UI change.

Validation: r3 Codex review scoped-clean; exact-head ClawSweeper review without findings; native CI watcher GREEN for run 35196349026 on 243bc15. The existing PR evidence records the successful changed checks and the separate, unchanged local wrapper timeout cases; the test-only hosted run does not claim to rerun those cases.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
…w#150504)

* fix(pr): give materialized wrappers their dependency context

Let the verified anchor child complete and validate its package pins when an
older parent hands it an incomplete dependency context. Preserve pinned real
package directories and bootstrap older anchors against their own manifest.

Extend the extracted-source guard to cover pinned bare imports, package export
subpaths, and copied workspace aliases. Keep the inventory repair with openclaw#150399.

Refs: openclaw#149585, openclaw#133913, openclaw#150312, openclaw#150399.

* test(pr): resolve workspace aliases within the extracted root

Bind the TypeScript resolution host to the selected closure root so alias
lookups cannot fall back to the calling checkout during anchor validation.

Refs: openclaw#150399, openclaw#150504.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
…50465)

Protect deferred file-preview English fallback registration through a direct modal import. Assert that preview-only copy stays out of startup, becomes available when the modal loads, and preserves the selected German translation and shared Support files label.

The canonical runtime owner already landed in openclaw#150420; the wrapper manifest-discovery and dependency-context fixes are on main through openclaw#150399 and openclaw#150504. This change adds only regression coverage: production/tooling 0 lines, tests +32/-0. No runtime or visible UI change.

Validation: r3 Codex review scoped-clean; exact-head ClawSweeper review without findings; native CI watcher GREEN for run 35196349026 on 243bc15. The existing PR evidence records the successful changed checks and the separate, unchanged local wrapper timeout cases; the test-only hosted run does not claim to rerun those cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M 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