Skip to content

fix: updates fail when plugin inspection retains import.meta - #155394

Merged
steipete merged 4 commits into
mainfrom
upd/candidate-doctor-import-meta
Sep 22, 2026
Merged

steipete merged 4 commits into
mainfrom
upd/candidate-doctor-import-meta

Conversation

@steipete

@steipete steipete commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Closes #155371

What Problem This Solves

Fixes upgrades that stop during candidate migration rehearsal when plugin source transformation retains import.meta.

User Impact

Valid ESM plugins no longer abort candidate Doctor inspection. Unparseable entries produce warnings naming the plugin, source path, and parser error while other entries continue. Source-integrity and private-state checks remain enforced.

Release-note context: This candidate-side repair works with already installed updaters, including 2026.9.4, without new options or configuration changes. Thanks @colehammond65 for the detailed report.

Why This Change Was Made

Acorn parsed Jiti's mixed ESM/CommonJS output as a script. Admit retained module syntax without imposing strict ESM semantics on CommonJS, contain per-entry syntax errors, and reuse inspected dependency graphs instead of rescanning them.

The reporter's exact plugin remains unidentified. The fix covers every plugin whose transformed entry retains import.meta. A synthetic plugin reproduces the exact published 9.5 Doctor crash at (1203:16): Jiti preserves line 1203 while formatting shifts the token from source column 14 to column 16.

Evidence

  • Published 2026.9.5 Doctor on Node 26.9.0 reproduced the exact maintenance failure and exited 1. Both new regressions failed on the original production code.
  • Corrected source: 41 tests per run, N=5 clean, 20.15–22.79 seconds wall per run. Additional unchanged loader/capture siblings: 157 tests passed.
  • Per-file serial checks: candidate repair (29 tests) 14.18 seconds wall; source inspection (4 tests) 1.94 seconds wall. Summed test execution was 1.002 seconds and 0.155 seconds respectively; shared transform/setup accounts for most wall time. Hosted PR CI timing is not yet available.
  • Complete check:changed passed in 1,412 seconds, including all 25 test-type shards, production types, lint, dead-export scans, and every selected guard. The initial no-map-spread lint finding was fixed with equivalent array concatenation; the complete corrected gate passed.
  • pnpm build passed in 5m 26.5s. The candidate tarball passed inventory and import-graph integrity checks.
  • Real published 2026.9.4 → corrected candidate openclaw update: exit 0 in 64.603 seconds, with status: ok and run.status: succeeded. Candidate Doctor, lint, config validation, plugin resolution, migration continuation, Gateway canary, and post-update Doctor all exited 0.
  • Candidate Doctor emitted the named parse warning below and exited 0. A temporary Node preload passively recorded child output because the 9.4 parent omits successful rehearsal output from its JSON. Updater/Doctor code, commands, and results were not replaced. An earlier uninstrumented update also completed, and serving Doctor with the valid ESM fixture exited 0.
  • Fresh P1 Codex autoreview: scoped-clean, no actionable P0/P1 findings.
  • Production +39/-13 (net +26), tests +50, docs +3. Growth carries plugin identity and warning containment; redundant rescanning is removed.
Published-driver warning and artifact provenance
Update checks could not inspect plugin parse-warning-fixture (<private-copy>/extensions/parse-warning-fixture/index.mjs): Invalid regular expression: /(/: Unterminated group (1204:17). Continuing without dependency repair for this entry.
candidate Doctor exitCode: 0
update status: ok
update run status: succeeded

Both fixture entries contain retained import.meta at transformed position (1203:16). The valid entry is accepted. The malformed sibling reaches its independent regex error on the next line and produces a warning.

Final head: e5d95712db3b46081887a96b33eef2c99d76aef7. Its tree 67c16cbe288b3c5b88a83016cdd4a554a299fb5f exactly matches the source tree verified by both Testbox lanes, including the one-line lint correction.

Candidate SHA-256: fb309da230459b8c08610158a1fcca1981f87a273be3b334b65841679cf1d22e.

  • Build/live: Blacksmith Testbox tbx_01m33kx44pydtd94qmxf5cw7yb, run 35684762044.
  • Complete changed-file gate: Blacksmith Testbox tbx_01m33kvj2cekjt5gk05cehkn3j, run 35684710463.

Both proof commands exited 0. Both leases were stopped after evidence collection.

Admit retained module syntax in transformed plugin source without imposing ESM strictness on CommonJS. Record candidate rehearsal parse failures as named plugin warnings and reuse inspected dependency graphs while preserving integrity checks.

Release-note context: Updates driven by older releases can complete candidate Doctor rehearsal when plugin transforms retain import.meta. Thanks @colehammond65 for the detailed report in #155371.
@clawsweeper

clawsweeper Bot commented Sep 22, 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 docs Improvements or additions to documentation size: S maintainer Maintainer-authored PR labels Sep 22, 2026
@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 22, 2026
@clawsweeper

clawsweeper Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 22, 2026, 1:56 AM ET / 05:56 UTC (Revision 3).

ClawSweeper review

What this changes

The PR lets plugin dependency inspection accept retained import.meta, turns individual parse failures into named warnings, and reuses inspected dependency graphs.

Merge readiness

⛔ Blocked before merge - 1 item remains

The fix remains necessary and has convincing upgrade evidence. No actionable defect was found; the previous generic migration-proof blocker does not apply to this patch.

Priority: P0
Reviewed head: 756bc9858971e8c9abd591af7e805146ded3faa6

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused repair with published-driver proof, meaningful regression coverage, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The captured published 2026.9.4 update run exercises candidate Doctor with retained import.meta and a malformed sibling, records the expected warning, and completes validation and activation successfully. Relevant production owners are unchanged from the proven revision. No stored-data contract changes require migration proof.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The captured published 2026.9.4 update run exercises candidate Doctor with retained import.meta and a malformed sibling, records the expected warning, and completes validation and activation successfully. Relevant production owners are unchanged from the proven revision. No stored-data contract changes require migration proof.
Evidence reviewed 9 items Verified introduced patch: Reviewed the pinned merge-base-to-head delta. Changes are limited to dependency parsing, per-entry diagnostics, graph reuse, focused regressions, and update documentation.
Current main still needs the fix: Fetched main still parses transformed source without allowImportExportEverywhere; candidate rehearsal also calls inspection without the new SyntaxError containment.
Latest release retains the parser defect: The supplied latest-release revision, v2026.9.5, also lacks the parser option in the transformed-source path.
Findings None None.
Security None None.

How this fits together

Before activating an update, candidate Doctor checks plugins in a private rehearsal copy. Dependency inspection identifies missing files for repair and reports warnings while preserving the existing source-integrity checks.

flowchart TD
  A[Installed updater] --> B[Private rehearsal copy]
  B --> C[Candidate Doctor]
  C --> D[Plugin source inspection]
  D --> E{Source parses}
  E -->|Yes| F[Check integrity and repair dependencies]
  E -->|No| G[Report plugin warning]
  F --> H[Continue candidate validation]
  G --> H
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +26, Tests +50, Docs +3. Total +79 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 3 39 13 +26
Tests 2 50 0 +50
Docs 1 4 1 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 93 14 +79

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/infra/update-candidate-plugin-repair.ts, unknown-data-model-change: src/infra/update-candidate-plugin-repair.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #155371
Summary: This PR is the explicit candidate fix for the reported candidate-Doctor parser crash; the issue should remain open until resolution.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep candidate-side inspection compatible with valid ESM and report isolated plugin parse failures without interrupting otherwise safe updates.

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

Yes: current-main parser settings and Acorn's implementation establish the retained-import.meta failure path, backed by the supplied published-release reproduction; this review did not execute it.

Is this the best way to solve the issue?

Yes: the repair uses the existing inspection and rehearsal owners, preserves CommonJS parsing semantics, and is backed by a published-updater upgrade run.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P0: The linked report establishes a repeatedly blocked stable update with no successful in-product recovery, despite the previous Gateway remaining available.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The captured published 2026.9.4 update run exercises candidate Doctor with retained import.meta and a malformed sibling, records the expected warning, and completes validation and activation successfully. Relevant production owners are unchanged from the proven revision. No stored-data contract changes require migration proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured published 2026.9.4 update run exercises candidate Doctor with retained import.meta and a malformed sibling, records the expected warning, and completes validation and activation successfully. Relevant production owners are unchanged from the proven revision. No stored-data contract changes require migration proof.

Evidence

What I checked:

  • Verified introduced patch: Reviewed the pinned merge-base-to-head delta. Changes are limited to dependency parsing, per-entry diagnostics, graph reuse, focused regressions, and update documentation. (src/infra/update-candidate-plugin-repair.ts:116, 756bc9858971)
  • Current main still needs the fix: Fetched main still parses transformed source without allowImportExportEverywhere; candidate rehearsal also calls inspection without the new SyntaxError containment. (src/plugins/plugin-source-references.ts:408, 4d50b52bce2b)
  • Latest release retains the parser defect: The supplied latest-release revision, v2026.9.5, also lacks the parser option in the transformed-source path. (src/plugins/plugin-source-references.ts:408, ec9c1a13db89)
  • Parser dependency contract: The target directly imports Acorn and pins version 8.18.0. Its parseImportMeta implementation accepts script-context import.meta when allowImportExportEverywhere is enabled, matching this repair without switching all transformed CommonJS to module semantics. Inspected Acorn source. (acorn/src/expression.js:555)
  • Published-driver behavior proof: The captured PR body, sourceRevision c4af5beff0d396eb774ca5ae0af876e49802b3d9defe31e67c02a0351905d07e, records published 2026.9.5 Doctor failing on the fixture, followed by a real 2026.9.4-to-candidate update exiting 0 in 64.603 seconds. Copied output shows the malformed sibling's named warning, candidate Doctor exit 0, and successful update status. Valid retained-import.meta inspection, Gateway canary, and post-update Doctor succeeded. The reporter's exact plugin remains unidentified; the demonstrated parser mechanism matches the reported failure. (e5d95712db3b)
  • Proof remains applicable after branch merges: No differences exist between the proven revision and reviewed head in the three changed production files or the dependency-inspection and copy owners. The previous review had no findings. No stored schema, serialization contract, configuration default, or migration changes are introduced, so its generic migration-proof next step is cleared. (src/infra/update-candidate-plugin-repair.ts:201, 756bc9858971)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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-22T03:34:33.058Z sha 2637277 :: blocked before merge. :: none
  • reviewed 2026-09-22T04:56:16.855Z sha e5d9571 :: blocked before merge. :: none

@steipete
steipete marked this pull request as ready for review September 22, 2026 04:49
@steipete
steipete enabled auto-merge (squash) September 22, 2026 04:52
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 22, 2026
@steipete
steipete merged commit b4b2da4 into main Sep 22, 2026
320 of 322 checks passed
@steipete
steipete deleted the upd/candidate-doctor-import-meta branch September 22, 2026 06:29
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 23, 2026
…w#155394)

* fix: updates fail when plugin inspection retains import.meta

Admit retained module syntax in transformed plugin source without imposing ESM strictness on CommonJS. Record candidate rehearsal parse failures as named plugin warnings and reuse inspected dependency graphs while preserving integrity checks.

Release-note context: Updates driven by older releases can complete candidate Doctor rehearsal when plugin transforms retain import.meta. Thanks @colehammond65 for the detailed report in openclaw#155371.

* style: avoid spread in plugin dependency aggregation
obviyus added a commit that referenced this pull request Sep 25, 2026
….meta.url (#157862)

## What Problem This Solves

Fixes: `openclaw update` stops with `Update state snapshot failed (exit): Assigning to rvalue (308:4)` when an installed plugin depends on valid JavaScript that assigns to `import.meta.url`. The error names no file, so the user cannot tell which dependency blocks the update.

A real trigger is `@jsquash/[email protected]` (`codec/pkg/squoosh_png.js`), reached through a literal dynamic import:

```js
if (import.meta.url === undefined) {
  import.meta.url = 'https://localhost';
}
```

Related: #146993 (added the native scan path), #155394 (earlier `import.meta` inspection fix).

## User Impact

Updates no longer stop for plugins whose dependencies assign to `import.meta` properties, such as `@jsquash/png` and `@jsquash/avif`. If plugin source inspection still cannot parse a file, the updater error now names that file and says the failure happened after the source transform.

Upgrade path: the installed updater runs the snapshot inspection itself. Installs that already run 2026.9.5 or 2026.9.6 keep the old inspection for the update that moves them to this fix, so that one update can still stop on such a plugin. The update troubleshooting page now documents the recovery for that one update: `openclaw plugins disable <id>`, `openclaw update`, then `openclaw plugins enable <id>`. Updates from releases before 2026.9.5 do not run this inspection in the snapshot. All later updates use the fixed inspection.

## Why This Change Was Made

- Plugin source inspection sends JavaScript that uses `import.meta` through the Jiti transform, so Jiti can rewrite reference anchors such as `import.meta.dirname` and `import.meta.resolve(...)`. Jiti also replaces `import.meta.url` with a string literal on the left side of an assignment. The output is then not valid JavaScript, and the parser rejects it.
- Before the transform, inspection now replaces an `import.meta.*` expression that receives a value (plain or compound assignment, update, destructuring, `for…in`/`for…of` target) with a plain identifier. The transform output is used only to find references and is never executed, so imports, `new URL(..., import.meta.url)` assets and `import.meta.dirname` anchors are still traced as before. The dependency is inspected, not skipped.
- The fix is in the transform path and not in the native fast path. Other syntax can also select the transform (for example `for (key in object)` in the `@jsquash/avif` encoder), so a native-only fix would still fail on that sibling file.
- If the transformed output still cannot be parsed, inspection now throws a `SyntaxError` that names the source file and the stage, and keeps the parser error as `cause`. Callers that already catch `SyntaxError` (candidate rehearsal warnings) keep their behavior.

## Evidence

Real `openclaw update --tag <future tarball> --yes --no-restart --json`, run in a disposable container with a throwaway profile. The profile has one path-loaded plugin that lazily imports `@jsquash/[email protected]/encode.js` and `@jsquash/[email protected]/encode.js` (the published packages, unmodified).

| Installed updater | Update target | Result |
| --- | --- | --- |
| `main` (base of this PR) | base + version bump | exit 1: `Update state snapshot failed (exit): Assigning to rvalue (308:4)` |
| this PR | this PR + version bump | exit 0, updated, only the normal advisory for a `plugins.load.paths` plugin |
| published 2026.9.6 | this PR + version bump | exit 1: same `Assigning to rvalue (308:4)` (the installed updater runs its own inspection; see User Impact) |
| published 2026.7.35 | this PR + version bump | exit 0, updated |
| published 2026.9.6, plugin disabled first (documented recovery) | this PR + version bump | exit 0, updated; `openclaw plugins enable` and `plugins inspect` then succeed |

The scanner on the exact dependency files:

| File | Before | After |
| --- | --- | --- |
| `@jsquash/png` `codec/pkg/squoosh_png.js` | `SyntaxError: Assigning to rvalue (308:4)` | ok, asset `squoosh_png_bg.wasm` traced |
| `@jsquash/avif` `codec/enc/avif_enc.js` | `SyntaxError: Assigning to rvalue (8:900)` | ok, asset `avif_enc.wasm` traced |
| `@jsquash/avif` `codec/enc/avif_enc_mt.js` | `SyntaxError: Assigning to rvalue (8:1752)` | ok, assets `avif_enc_mt.wasm` and `avif_enc_mt.worker.mjs` traced |

Focused tests:

- New `plugin-generation-source-inspection` cases fail on base (`Assigning to rvalue (4:2)`, and the parse error has no file name) and pass with the fix. The first case also checks that the dynamic import, the static import, `import.meta.resolve(...)`, the `new URL(..., import.meta.url)` asset and the `import.meta.dirname` asset are still traced.
- `plugin-generation-source-inspection`, `plugin-generation-artifact`, `plugin-module-generation`, `plugin-module-generation.sibling-assets`, `update-candidate-plugin-repair`, `update-candidate-plugin-sources`: 205 tests pass.

- Test cost: `pnpm test src/plugins/plugin-generation-source-inspection.test.ts --maxWorkers=1` runs in 2.2 s (5.0 s wall with startup); the two new cases take 30 ms and 7 ms. In CI (`checks-node-changed`) the file takes 3.1 s from shard begin to end (Vitest duration 1.98 s); the new cases take 33 ms and 6 ms.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
….meta.url (openclaw#157862)

## What Problem This Solves

Fixes: `openclaw update` stops with `Update state snapshot failed (exit): Assigning to rvalue (308:4)` when an installed plugin depends on valid JavaScript that assigns to `import.meta.url`. The error names no file, so the user cannot tell which dependency blocks the update.

A real trigger is `@jsquash/[email protected]` (`codec/pkg/squoosh_png.js`), reached through a literal dynamic import:

```js
if (import.meta.url === undefined) {
  import.meta.url = 'https://localhost';
}
```

Related: openclaw#146993 (added the native scan path), openclaw#155394 (earlier `import.meta` inspection fix).

## User Impact

Updates no longer stop for plugins whose dependencies assign to `import.meta` properties, such as `@jsquash/png` and `@jsquash/avif`. If plugin source inspection still cannot parse a file, the updater error now names that file and says the failure happened after the source transform.

Upgrade path: the installed updater runs the snapshot inspection itself. Installs that already run 2026.9.5 or 2026.9.6 keep the old inspection for the update that moves them to this fix, so that one update can still stop on such a plugin. The update troubleshooting page now documents the recovery for that one update: `openclaw plugins disable <id>`, `openclaw update`, then `openclaw plugins enable <id>`. Updates from releases before 2026.9.5 do not run this inspection in the snapshot. All later updates use the fixed inspection.

## Why This Change Was Made

- Plugin source inspection sends JavaScript that uses `import.meta` through the Jiti transform, so Jiti can rewrite reference anchors such as `import.meta.dirname` and `import.meta.resolve(...)`. Jiti also replaces `import.meta.url` with a string literal on the left side of an assignment. The output is then not valid JavaScript, and the parser rejects it.
- Before the transform, inspection now replaces an `import.meta.*` expression that receives a value (plain or compound assignment, update, destructuring, `for…in`/`for…of` target) with a plain identifier. The transform output is used only to find references and is never executed, so imports, `new URL(..., import.meta.url)` assets and `import.meta.dirname` anchors are still traced as before. The dependency is inspected, not skipped.
- The fix is in the transform path and not in the native fast path. Other syntax can also select the transform (for example `for (key in object)` in the `@jsquash/avif` encoder), so a native-only fix would still fail on that sibling file.
- If the transformed output still cannot be parsed, inspection now throws a `SyntaxError` that names the source file and the stage, and keeps the parser error as `cause`. Callers that already catch `SyntaxError` (candidate rehearsal warnings) keep their behavior.

## Evidence

Real `openclaw update --tag <future tarball> --yes --no-restart --json`, run in a disposable container with a throwaway profile. The profile has one path-loaded plugin that lazily imports `@jsquash/[email protected]/encode.js` and `@jsquash/[email protected]/encode.js` (the published packages, unmodified).

| Installed updater | Update target | Result |
| --- | --- | --- |
| `main` (base of this PR) | base + version bump | exit 1: `Update state snapshot failed (exit): Assigning to rvalue (308:4)` |
| this PR | this PR + version bump | exit 0, updated, only the normal advisory for a `plugins.load.paths` plugin |
| published 2026.9.6 | this PR + version bump | exit 1: same `Assigning to rvalue (308:4)` (the installed updater runs its own inspection; see User Impact) |
| published 2026.7.35 | this PR + version bump | exit 0, updated |
| published 2026.9.6, plugin disabled first (documented recovery) | this PR + version bump | exit 0, updated; `openclaw plugins enable` and `plugins inspect` then succeed |

The scanner on the exact dependency files:

| File | Before | After |
| --- | --- | --- |
| `@jsquash/png` `codec/pkg/squoosh_png.js` | `SyntaxError: Assigning to rvalue (308:4)` | ok, asset `squoosh_png_bg.wasm` traced |
| `@jsquash/avif` `codec/enc/avif_enc.js` | `SyntaxError: Assigning to rvalue (8:900)` | ok, asset `avif_enc.wasm` traced |
| `@jsquash/avif` `codec/enc/avif_enc_mt.js` | `SyntaxError: Assigning to rvalue (8:1752)` | ok, assets `avif_enc_mt.wasm` and `avif_enc_mt.worker.mjs` traced |

Focused tests:

- New `plugin-generation-source-inspection` cases fail on base (`Assigning to rvalue (4:2)`, and the parse error has no file name) and pass with the fix. The first case also checks that the dynamic import, the static import, `import.meta.resolve(...)`, the `new URL(..., import.meta.url)` asset and the `import.meta.dirname` asset are still traced.
- `plugin-generation-source-inspection`, `plugin-generation-artifact`, `plugin-module-generation`, `plugin-module-generation.sibling-assets`, `update-candidate-plugin-repair`, `update-candidate-plugin-sources`: 205 tests pass.

- Test cost: `pnpm test src/plugins/plugin-generation-source-inspection.test.ts --maxWorkers=1` runs in 2.2 s (5.0 s wall with startup); the two new cases take 30 ms and 7 ms. In CI (`checks-node-changed`) the file takes 3.1 s from shard begin to end (Vitest duration 1.98 s); the new cases take 33 ms and 6 ms.

Co-authored-by: Ayaan Zaidi <[email protected]>
steipete added a commit that referenced this pull request Oct 1, 2026
…rrors (#162298)

The candidate state snapshot step launched its worker from the installed driver's own dist instead of the candidate root, so an old driver parsed plugin bundles with pre-#155394 options and failed the whole snapshot on an ESM plugin's import.meta ("Cannot use 'import.meta' outside a module"), ending the update as runtime-verification-failed. The snapshot worker now resolves under candidateRoot, and an unparseable plugin is recorded as a bounded named warning through the inspection helper Doctor already shares, instead of aborting the snapshot. Already-installed 2026.9.5/9.6 drivers keep their old worker for that first hop; the issue records the disable/update/enable recovery.

Closes #162017
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
…rrors (openclaw#162298)

The candidate state snapshot step launched its worker from the installed driver's own dist instead of the candidate root, so an old driver parsed plugin bundles with pre-openclaw#155394 options and failed the whole snapshot on an ESM plugin's import.meta ("Cannot use 'import.meta' outside a module"), ending the update as runtime-verification-failed. The snapshot worker now resolves under candidateRoot, and an unparseable plugin is recorded as a bounded named warning through the inspection helper Doctor already shares, instead of aborting the snapshot. Already-installed 2026.9.5/9.6 drivers keep their old worker for that first hop; the issue records the disable/update/enable recovery.

Closes openclaw#162017
yozakura-ava pushed a commit to yozakura-ava/openclaw that referenced this pull request Oct 6, 2026
…rrors (openclaw#162298)

The candidate state snapshot step launched its worker from the installed driver's own dist instead of the candidate root, so an old driver parsed plugin bundles with pre-openclaw#155394 options and failed the whole snapshot on an ESM plugin's import.meta ("Cannot use 'import.meta' outside a module"), ending the update as runtime-verification-failed. The snapshot worker now resolves under candidateRoot, and an unparseable plugin is recorded as a bounded named warning through the inspection helper Doctor already shares, instead of aborting the snapshot. Already-installed 2026.9.5/9.6 drivers keep their old worker for that first hop; the issue records the disable/update/enable recovery.

Closes openclaw#162017

(cherry picked from commit f525f46)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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.

9.4 → 9.5 update: candidate doctor crashes with "Cannot use 'import.meta' outside a module (1203:16)" during candidate migration rehearsal

1 participant