Skip to content

fix(plugins): keep SDK alias validation on demand - #150840

Merged
RomneyDa merged 1 commit into
mainfrom
fix/plugin-sdk-alias-demand-20260917
Sep 17, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/plugin-sdk-alias-demand-20260917

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • inspect the requested module before materializing the prepared Plugin SDK alias inventory
  • preserve source-SDK fallback while avoiding eager reads of unrelated SDK artifacts

Failure signature

Full Validation 35199323060 failed seven loader.lazy-alias cases after #150622 because requiresSourceSdkTransform evaluated the full alias inventory before checking whether the target referenced Plugin SDK.

Validation

  • pnpm test src/plugins/loader.lazy-alias.test.ts (34 passed)
  • pnpm exec oxfmt --check src/plugins/plugin-module-loader-cache.ts
  • pnpm exec oxlint src/plugins/plugin-module-loader-cache.ts
  • git diff --check

Exact-head build and profile

  • exact rebased head: f4e2c38333a7d4b7f81df7a6c5ece4da054d71c9
  • pnpm build passed on that head, including all 154 public Plugin SDK subpaths, 52 built plugin control-plane loads, runtime postbuild, and the production precompressed Control UI build
  • required bundled-plugin profile: OPENCLAW_LOCAL_CHECK=0 node --import tsx scripts/profile-extension-memory.mts --extension discord --skip-combined --concurrency 1
  • discord result: success, 303.6 MiB max RSS, 258.4 MiB over the 45.2 MiB baseline

Published-driver upgrade proof

  • combined exact-head Package Acceptance: run 35239288546
  • candidate/tooling/package ref: f4e2c38333a7d4b7f81df7a6c5ece4da054d71c9
  • lane: published-upgrade-survivor
  • baseline: [email protected]
  • scenario: custom-plugin-siblings
  • status: in progress

The earlier run 35227831612 did not execute package acceptance because its workflow-ref identity assertion rejected a mistyped SHA. It is not evidence for this PR.

@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 size: XS maintainer Maintainer-authored PR labels Sep 17, 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 Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 17, 2026, 11:36 AM ET / 15:36 UTC (Revision 4).

ClawSweeper review

What this changes

The plugin loader checks whether a requested module needs source SDK code before scanning SDK aliases, avoiding reads of unrelated artifacts.

Merge readiness

⛔ Blocked before merge - 2 items remain

This remains a useful, narrowly scoped repair: current main still performs the eager alias scan, and no introduced correctness defect was found. The earlier build/profile concern is resolved.

Priority: P2
Reviewed head: f4e2c38333a7d4b7f81df7a6c5ece4da054d71c9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with existing regression coverage and no actionable code findings; required upgrade validation remains outstanding.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from external-contributor proof requirements; its build and compiled-plugin profile are recorded, while the separate repository-required published-driver upgrade check remains pending.
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; its build and compiled-plugin profile are recorded, while the separate repository-required published-driver upgrade check remains pending.
Evidence reviewed 8 items Verified introduced change: The pinned base-to-head diff changes only predicate order; native loading, transformation fallback, alias resolution, and cache ownership remain in their existing owners.
Still necessary on fetched main: Fetched main still calls hasSourceSdkAliases before referencesSourceSdk. No fixing release is established; inspection of the supplied release tag’s file was unavailable because its Git object was missing.
Demand-driven alias ownership: The prepared alias owner captures host and private-access facts at creation. resolveAlias resolves an individual SDK subpath, while hasSourceSdkAliases can traverse the inventory and materialize the complete map; reordering does not transfer or broaden authority.
Findings None None.
Security None None.

How this fits together

OpenClaw’s plugin loader receives module paths from plugin discovery and runtime loading. It selects native execution or source transformation and returns module exports to the requesting subsystem.

flowchart TD
  A[Requested plugin module] --> B[Inspect SDK references]
  B --> C{Source SDK needed?}
  C -->|No| D[Native loading]
  C -->|Yes| E[Check SDK aliases]
  E --> F[Source transformation]
  D -->|Fallback needed| F
  D --> G[Module exports]
  F --> G
Loading

Before merge

  • Resolve merge risk (P1) - Compatibility with an existing published installation remains unverified until the current candidate’s required upgrade scenario completes.
  • Complete next step (P2) - Complete and record the exact-head published-driver upgrade scenario in run 35239288546 before merge.
Agent review details

Security

None.

PR surface

Source 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 1 0

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the existing loader and its source fallback with demand-first alias inspection, backed by completed published-driver upgrade evidence.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the existing loader and its source fallback with demand-first alias inspection, backed by completed published-driver upgrade evidence.

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

Yes: current main’s predicate order reaches inventory validation before checking an alias-free module, matching the existing lazy-alias regressions and independent reported failures. This review did not execute tests.

Is this the best way to solve the issue?

Yes: reordering the existing checks repairs the demand boundary without adding another resolver, changing configuration, or removing source fallback.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs unnecessary SDK artifact reads in plugin loading without evidence of an urgent user-facing outage.
  • 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; its build and compiled-plugin profile are recorded, while the separate repository-required published-driver upgrade check remains pending.

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)

Rank-up moves

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

  • Record the completed exact-head published-upgrade-survivor result for custom-plugin-siblings from [email protected].

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-17T11:16:28.659Z sha 4835634 :: blocked before merge. :: none
  • reviewed 2026-09-17T13:42:03.690Z sha ff58d55 :: blocked before merge. :: none
  • reviewed 2026-09-17T15:22:07.540Z sha f4e2c38 :: blocked before merge. :: none

@RomneyDa

Copy link
Copy Markdown
Member Author

Corrected package-acceptance proof is running at https://github.com/openclaw/openclaw/actions/runs/35228127246 against exact head ff58d55.

Candidate resolution, package integrity, npm 12 install.sh, shared-image preparation, and the artifact-only selection gates are green. The targeted published-upgrade-survivor lane is still active.

The earlier run https://github.com/openclaw/openclaw/actions/runs/35227831612 did not execute package acceptance: I mistyped the workflow_ref SHA, so its identity assertion correctly rejected the dispatch. It is not evidence for this PR.

@RomneyDa
RomneyDa force-pushed the fix/plugin-sdk-alias-demand-20260917 branch from ff58d55 to f4e2c38 Compare September 17, 2026 15:17
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 17, 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:

@RomneyDa

Copy link
Copy Markdown
Member Author

Combined exact-head package acceptance is running after the Doctor fixture and packed-SDK verifier dependencies merged: https://github.com/openclaw/openclaw/actions/runs/35239288546 Candidate/tooling/package ref: f4e2c38. Targeted lane: published-upgrade-survivor, baseline [email protected], scenario custom-plugin-siblings.

@RomneyDa

Copy link
Copy Markdown
Member Author

The missing private-canary Doctor dependency is fixed by #150978. Exact combined proof is green: Package Acceptance 35243361810, targeted job 105283976877. Published [email protected] → combined candidate b80da1c519d607d0bd9997a90c3446d5ed508bed; custom-plugin-siblings passed in 185s, including private Doctor contract execution, private Gateway registration, sibling source containment, original hash preservation, and before/after runtime loading. This also proves #150840 keeps SDK alias discovery on demand in the installed candidate.

I will rebase this PR after #150978 lands, then rerun exact-head CI/review before merge.

@RomneyDa
RomneyDa merged commit 05ccbbd into main Sep 17, 2026
234 of 236 checks passed
@RomneyDa
RomneyDa deleted the fix/plugin-sdk-alias-demand-20260917 branch September 17, 2026 16:25
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
zhangguiping-xydt pushed a commit to zhangguiping-xydt/openclaw that referenced this pull request Sep 19, 2026
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. 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