Skip to content

fix: restore worker imports in plugin SDK loaders - #164662

Merged
shakkernerd merged 1 commit into
mainfrom
fix/worker-runtime-resolution
Oct 4, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
fix/worker-runtime-resolution

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The worker-runtime extraction in #164537 left plugin SDK loading paths unable to resolve the new private package. Offline memory status fails while the native plugin loader imports process-runtime. Native ESM plugins can fail at the same boundary when they load a source SDK without prebuilt worker-package artifacts.

User Impact

Source-based plugin SDK consumers can load worker helpers again, and packaged resolution recognizes the existing root dist/worker-runtime artifacts. Public SDK entrypoints remain unchanged; plugins do not need to add a dependency on the private worker package. There is no configuration change, state migration, or visible UI change.

Why This Change Was Made

The core test resolver already knows the package, but Jiti and the persistent native loader maintain separate explicit alias sets. Register the root, worker, and lifecycle entrypoints with those existing owners while retaining their source/dist selection and parent-root restrictions. Extend the existing regression cases to cover source and packaged layouts, plus an external plugin loading a source-only SDK through native ESM with worker package artifacts absent.

The UI test alias correction in #164061 is already on the base branch; this PR contains only the remaining plugin-loader changes and their regression coverage.

Evidence

The scheduled main CI run 37164039730 recorded the missing worker-runtime import in offline memory status. On the Cloud Mac, removing only the native registration from this candidate made the source-only ESM regression fail because it selected a worker package without the fixture's expected export. Restoring the exact PR source made the complete focused batch pass.

At 90ec7e53336c7705df1d93fc7e15b47c41d53b74, Node 24.21.0 and pnpm 12.5.1 on the Cloud Mac passed 102 tests across five files, with one existing Windows-only case skipped. The batch took 48.68 seconds wall time, including 14.13 seconds of cold compiled-worker preparation:

Focused group Result Runner duration
Offline memory status 5 passed 38.55 s
General aliases and native resolver 83 passed, 1 Windows-only skip 4.73 s
Config and cron UI regression suites 14 passed 2.83 s

The extended source/dist alias cases took 12 ms and 10 ms; the native ESM assertion took 1 ms after its shared probe setup. The negative control took 3.04 seconds. The checkout remained clean at the same head and tree after proof.

Exact-head CI passed all 53 executed jobs. This includes runtime/Control UI builds and real-Gateway tests. The selected SDK boundary job freshly emitted 11,962 declarations for 210 SDK roots, including the changed resolver modules and worker-runtime entrypoints, and passed Codex, Slack, and Telegram consumer compilation. These results supply the relevant build/type evidence without repeating the same runtime build on the Cloud Mac.

Changed-file formatting and focused type-aware source lint passed. The final four plugin-loader files are unchanged from the reviewed candidate; the rebase only removed the UI alias hunk already supplied by main.

@clawsweeper

clawsweeper Bot commented Oct 4, 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.

@shakkernerd
shakkernerd force-pushed the fix/worker-runtime-resolution branch from 8047086 to 90ec7e5 Compare October 4, 2026 01:21
@shakkernerd shakkernerd changed the title fix: restore worker imports in plugin loaders and UI tests fix: restore worker imports in plugin SDK loaders Oct 4, 2026
@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 Oct 4, 2026
@clawsweeper

clawsweeper Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 9:27 PM ET / October 4, 2026, 01:27 UTC.

ClawSweeper review

What this changes

The PR restores resolution of the private worker package through existing plugin SDK loaders for source checkouts and packaged installations.

Merge readiness

✅ Ready for maintainer review

The repair remains necessary on fetched main. The pinned changes fit the existing loader contracts, and no actionable introduced defect was found.

Priority: P2
Reviewed head: 90ec7e53336c7705df1d93fc7e15b47c41d53b74

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with useful boundary regression coverage and no actionable source finding; broader validation is still pending.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported native resolver fixture exercises source SDK imports, while Cloud Mac runtime proof remains pending; no runtime pass is inferred. No stored-data contract changes.
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 the external-contributor proof gate. Its reported native resolver fixture exercises source SDK imports, while Cloud Mac runtime proof remains pending; no runtime pass is inferred. No stored-data contract changes.
Evidence reviewed 8 items Pinned introduced changes: The introduced delta adds worker-runtime to the existing native resolver inventory and Jiti workspace aliases, with regression coverage extending existing fixtures. It introduces no public SDK export, configuration, dependency, or stored-data change.
Repair still missing on main: Fetched main lacks worker-runtime in the workspace alias inventory and native exported-package inventory. Its existing process-runtime SDK facade reaches worker-task-pool, which imports the private worker package.
Package and build contracts match: The package exports root, worker, and lifecycle entrypoints; the existing build emits root dist/worker-runtime artifacts. The added aliases match these contracts and retain the existing source/dist preference logic.
Findings None None.
Security None None.

How this fits together

Plugin SDK loaders connect plugin imports to OpenClaw’s host libraries. Their aliases select available source or built artifacts so plugins can use process and worker helpers.

flowchart TD
  A[Plugin imports] --> B[Plugin SDK loader]
  B --> C[Host and parent-root selection]
  C --> D[Source or built artifact selection]
  D --> E[Worker package entrypoints]
  E --> F[Process and worker helpers]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +3, Tests +32. Total +35 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 3 0 +3
Tests 2 33 1 +32
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 36 1 +35

Review metrics

None.

Technical review

Best possible solution:

Keep worker-package resolution in the existing loaders while preserving host identity, parent-root isolation, and source/packaged selection.

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

Yes, source inspection establishes the missing alias path from the process SDK to the private worker package. The extended native ESM fixture provides a focused regression path, but this review did not execute it.

Is this the best way to solve the issue?

Yes, extending the existing alias inventories is the narrow repair; it preserves public entrypoints and avoids requiring plugins to depend on a private host package.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This repairs a bounded plugin-loading failure affecting source SDK consumers and offline memory status.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add 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 the external-contributor proof gate. Its reported native resolver fixture exercises source SDK imports, while Cloud Mac runtime proof remains pending; no runtime pass is inferred. No stored-data contract changes.

Label justifications:

  • P2: This repairs a bounded plugin-loading failure affecting source SDK consumers and offline memory status.
  • 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 the external-contributor proof gate. Its reported native resolver fixture exercises source SDK imports, while Cloud Mac runtime proof remains pending; no runtime pass is inferred. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • RoboClaw: Raw commit 50b029c adds src/plugins/sdk-alias-workspace.ts:100 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 50b029c6620e; files: src/plugins/sdk-alias-workspace.ts)

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.

@shakkernerd shakkernerd self-assigned this Oct 4, 2026
@shakkernerd
shakkernerd merged commit dc77a98 into main Oct 4, 2026
149 of 151 checks passed
@shakkernerd
shakkernerd deleted the fix/worker-runtime-resolution branch October 4, 2026 01:38
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: plugin SDK loaders resolve worker helpers from source checkouts and packaged installs.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
…164662)

Restore worker-runtime imports through the plugin SDK loaders for source checkouts and packaged installs while preserving native parent-root restrictions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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