Skip to content

fix(plugins): concurrent remote skill discovery fails on Node - #174252

Merged
steipete merged 1 commit into
mainfrom
ci/fix7-workspace-module-load
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
ci/fix7-workspace-module-load

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #150287

What Problem This Solves

Fixes remote workspace skill discovery failing intermittently when a Node source installation starts concurrent requests.

User Impact

Concurrent skill requests wait for the plugin's dependencies to finish loading. Existing installations also stop reusing the old broken transform after updating; no config or data migration is required.

Why This Change Was Made

Jiti can expose a handler's exported function before its awaited static dependency initializes. The second request then fails with INVALID_REQUEST: TypeError: Cannot read properties of undefined (reading 'readWorkspaceSkillsRequest') before inference. This is reproducible without an import cycle.

Apply the existing import-result coalescing to Node as well as Bun, and isolate the changed transform from legacy disk-cache entries. Native loading and lazy activation retain their existing owners. No retries, timeout changes, or authority changes.

Evidence

  • The new owner regression fails on unchanged main with the exact hourly TypeError. A separate owner probe shows that enabling the guard alone still fails with old cached transforms.
  • Final loader tests: 15 passed across the cache owner, native SDK compatibility and source-resolution controls. The new table covers both cold and legacy-cache loads. Node 24.22 on macOS; 135.68s Vitest including cold worker preparation, 166.64s total wrapper.
  • Targeted core/test types, lint, boundary lint, format, line-cap and full architecture checks pass. P2 review found no actionable issues.
  • Unchanged required-native-same-session.e2e.test.ts passed all four scenarios and all eight turns; every terminal agent.wait status was ok. Same vitest.e2e.config.ts as the worker-E2E CI row, with --maxWorkers=1 on Node 24.22/macOS. 191.77s Vitest; 781.36s wrapper including the actual runtime build (8m32.6s). No provider credentials or live provider used.

The sixth hourly's nested TypeError is attributable to this loader behavior. The previous five logs contained only the outer discovery error, so they cannot all be retrospectively attributed. Local proof is macOS/Node; PR CI supplies the selected platform coverage.

Release-note context: prevent concurrent cold remote workspace skill discovery from failing while source plugin dependencies are still loading. Updating uses the corrected transform cache without changing stored data.

Concurrent remote workspace skill requests could call a Jiti handler before
its static imports finished, producing readWorkspaceSkillsRequest errors.
Extend the existing import-result cache to Node and separate the changed
transform from legacy disk-cache output. Preserve native loading, lazy
activation, and request authority.

Regression proof covers cold and pre-existing transform caches. This extends
the import-result preservation introduced in #150287.
@clawsweeper

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

@steipete
steipete marked this pull request as ready for review October 16, 2026 13:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T13:33:10.560489Z 481e58a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete enabled auto-merge (squash) October 16, 2026 13:38
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 16, 2026
@steipete
steipete merged commit 515b3c4 into main Oct 16, 2026
193 of 194 checks passed
@steipete
steipete deleted the ci/fix7-workspace-module-load branch October 16, 2026 13:43
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
Concurrent remote workspace skill requests could call a Jiti handler before
its static imports finished, producing readWorkspaceSkillsRequest errors.
Extend the existing import-result cache to Node and separate the changed
transform from legacy disk-cache output. Preserve native loading, lazy
activation, and request authority.

Regression proof covers cold and pre-existing transform caches. This extends
the import-result preservation introduced in openclaw#150287.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant