Repository navigation
fix: allow fetched plugins and Code Mode in AOT builds - #182818
Merged
Merged
Conversation
Allow fetched CJS and TypeScript plugins, Node Code Mode and QA evaluation through their existing owners. Report interpreted execution once per process and feature, and add guidance only after genuine runtime failures. Keep Doctor diagnostics tied to the selected execution profile.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
steipete
marked this pull request as ready for review
October 24, 2026 19:28
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 25, 2026
* fix(runtime): allow interpreted features in AOT builds Allow fetched CJS and TypeScript plugins, Node Code Mode and QA evaluation through their existing owners. Report interpreted execution once per process and feature, and add guidance only after genuine runtime failures. Keep Doctor diagnostics tied to the selected execution profile. * fix(runtime): keep AOT notice outside env namespace
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
AOT standalone hosts reject fetched plugins, Node Code Mode, and QA expressions even though these features can run in the interpreter.
User Impact
Fetched CJS and TypeScript plugins can load through the existing loader and share the compiled host SDK. Code Mode cells, retained continuations, and QA expressions/lambdas execute normally. Each interpreted feature emits one performance notice per process, with the same execution facts visible in Doctor diagnostics.
Why This Change Was Made
The previous runtime profile conflated AOT compilation with a ban on runtime code. This removes its rejection branches and keeps the profile as the owner of execution diagnostics. Plugin trust, source capture, cache generations, and tool authority stay with their existing owners.
Actual failures retain actionable guidance: missing runtime modules identify the disk-loader/rebuild options, while a code-generation restriction names the disabling flag. No strict flag, new configuration, or automatic executor switch is introduced.
Evidence
The execution regressions fail on the original profile guards and pass after the cutover. All 107 focused assertions pass with
pnpm test <file> --maxWorkers=1:src/infra/runtime-profile.test.tssrc/infra/runtime-capabilities.test.tssrc/plugins/plugin-module-loader-cache.runtime-profile.test.tssrc/agents/code-mode-executor.runtime-profile.test.tsextensions/qa-lab/src/scenario-flow-runner.runtime-profile.test.tssrc/plugins/plugin-module-loader-cache.test.tssrc/agents/code-mode-executor.test.tsextensions/qa-lab/src/scenario-flow-runner.test.tstest/scripts/bun-standalone-metadata.test.tsThe longer runs include cold compiled-worker preparation; the new Code Mode test body takes 2.06s. Its collection preload keeps that fixture work outside the unchanged cell execution budget. Targeted core/QA lint, source/test types, formatting, and documentation link/glossary checks pass.
Small probes use the experimental Bun AOT toolchain (
5d8fe974f); no whole-application AOT build was run. The final six-module probe uses the production loader's bounded static closure and the standalone native/import/require adapters in the real two-stage order. With no supplied factory, fetched CJS and TypeScript/Jiti each return 42 and preserve compiled SDK object/class identity while the SDK source, staged Jiti CJS sources, and entire emitted module directory are hidden. Compilation took 4.592s. A separate repeated-load probe returns 42 then 44 from the same SDK object and emits one notice. Earlier raw-source fixture attempts lacked the builder's transformation order and CJS classification; those failures are not claimed as product defects.The actual profile-owner probe returns 42 from VM and Function code, preserves actionable missing-import guidance, and emits exactly one notice per feature across the parent and a compiled worker. Its nine-module compile took 2.510s. Strict VM/Function/Jiti controls fail with code-generation guidance. The interpreter tripwire was not used as proof. These are execution/SDK boundary probes, not qualification of arbitrary native ESM, workers, child programs, or plugin dependencies.
CI initially found that the warning identifier used the environment-variable namespace. The diagnostic is now
AOT_INTERPRETED; the unchanged environment-variable budget passes at 457/457. The eight runtime-profile tests, focused lint, and formatting pass after this correction. The initial CI run also hit a Telegram polling timing failure in unchanged code; the exact case passes locally without a source or timeout change (175.65s including cold worker preparation). The identical assertion reproduces on current maine1e498602cec224ef4adb16f13512ca6aea26d98with the same missingstatus/stopevents (118.55s Vitest duration including cold worker preparation). The polling test and implementation are unchanged by this PR. These observations establish an inherited timing failure; the passing PR replay is not claimed as a fix.The final independent Codex review through P2 is scoped-clean, including source-integrity verification. The owner retains diagnostics and removes the obsolete admission policy; no second SDK, loader, or authority owner is introduced.
Follow-up to #182346. Full artifact qualification remains with the standalone build lane.
Current-head CI run 40126830978 completed all 86 jobs. The only failed test job is the identical Telegram polling assertion reproduced on main; its aggregate CI gate is red. The ratchet, security check, and all other jobs passed or were skipped. This PR uses the native pre-existing-failure landing route and does not claim green CI.