Skip to content

fix(deploy): mark deploy-bundled externalized plugins as bundledDist - #9

Merged
tomorrowflow merged 2 commits into
mainfrom
worktree-fix-codex-bundled-convergence
Sep 29, 2026
Merged

tomorrowflow merged 2 commits into
mainfrom
worktree-fix-codex-bundled-convergence

Conversation

@tomorrowflow

@tomorrowflow tomorrowflow commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Problem

codex is stuck on 2026.9.6 after the 2026.9.7 update:

  • openclaw update status: Plugin "codex" data/settings upgrade is unfinished: The configured plugin package is missing or has not converged.
  • Doctor: Plugin "codex" refresh: already-current (2026.9.6) because npm latest is 2026.9.6; no @openclaw/[email protected] exists.
  • openclaw plugins install codex (bundled copy): Plugin settings are not ready for activation: codex. Run openclaw doctor --fix ...

Doctor defers codex's state migration until its package converges, and the bundled install refuses until the migration has run.

Root cause

resolveConfiguredPluginInstallContext (src/commands/doctor/shared/missing-configured-plugin-install.candidates.ts) builds bundledPluginsById without plugins that isExternallyDistributedPlugin reports as npm-distributed. Upstream never ships those in dist, but this fork's deploy-globally.mjs bundles them. So the 2026.9.7 codex copy in dist/extensions/codex never counts as availableWithoutPackageConvergence (plugin-migration-availability.ts).

Fix

deploy-globally.mjs stamps openclaw.build.bundledDist: true on each externalized plugin it bundles, only when the marker is unset (codex and ~80 others). isExternallyDistributedPlugin treats that as "this dist owns the plugin"; upstream's scripts/lib/package-bundled-plugins.mts:141-147 stamps the same marker for composed plugins. The 73 plugins that declare bundledDist: false (signal, whatsapp, slack, ...) are left untouched: false also selects the Gateway startup policy (gateway-startup-plugin-plan.ts:217-235), and flipping it would start opencode, teams-meetings and zoom-meetings by default. jq's //= also replaces false, so the filter tests for null explicitly.

Side effects for the newly stamped plugins (from review):

  • On openclaw update / doctor --fix, a tracked managed npm copy of such a plugin is removed and its install record dropped in favor of the bundled copy (post-core-plugin-convergence.ts:225-230, doctor-plugin-registry.ts:231-306), without a version check. On this host only codex still has a tracked npm install (all other enabled plugins were moved to bundled copies).
  • Dependency-status tracking and missing-dependency repair hints stop for them (official-external-plugin-repair-hints.ts:42,55); the deploy installs their dependencies and fails loudly if that fails.
  • The persisted plugin registry fingerprint changes once per deploy (one refresh).

Registered in docs/fork-features.txt.

Evidence

  • Live repro above, on 2026.9.7 (ca5f8f1).
  • Proof will come from the real path: deploy, then update status without the codex warning, plugins install codex succeeding, and codex loading 2026.9.7.
  • node --check, oxfmt --check, check-fork-features (82 present), git diff --check.

🤖 Generated with Claude Code

tomorrowflow and others added 2 commits September 29, 2026 18:00
Upstream treats officially externalized plugins (codex, signal, ...) as
npm-owned, so update convergence ignores the copies this fork's deploy
bundles into dist/extensions. With no npm release of 2026.9.7, codex's
settings migration waited forever for package convergence, and
`plugins install codex` refused until that migration finished: a
deadlock that kept codex on 2026.9.6.

Stamp `openclaw.build.bundledDist: true` on each bundled externalized
plugin, the core's declared marker that the dist owns it
(isExternallyDistributedPlugin).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
An explicit bundledDist: false also selects the Gateway startup policy;
overwriting it would start opencode, teams-meetings and zoom-meetings by
default. jq's //= would replace false too, so test for null explicitly.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@tomorrowflow

Copy link
Copy Markdown
Owner Author

Independent review (two passes): ship at a7f1474. First pass flagged that overwriting explicit bundledDist: false (73 plugins) would change the Gateway startup policy (opencode/teams-meetings/zoom-meetings); fixed by filling only an unset marker (jq == null check, not //=). Second pass: explicit false preserved; the 24 unset plugins change only convergence ownership (every startup/loading reader checks === false). Post-deploy proof should include memory-lancedb loading from dist/extensions.

@tomorrowflow
tomorrowflow merged commit 856b9ba into main Sep 29, 2026
@tomorrowflow
tomorrowflow deleted the worktree-fix-codex-bundled-convergence branch September 29, 2026 16:46
tomorrowflow pushed a commit that referenced this pull request Oct 5, 2026
…ersized rows (openclaw#164303)

The validating Doctor inside openclaw update died natively (SIGABRT, Reached heap limit, v8::String::NewFromOneByte <- node:sqlite UserDefinedFunction::xFunc <- DatabaseSync::Exec) while migrating a multi-GiB memory_embedding_cache: node:sqlite materializes each TEXT embedding as a JS string before the UDF runs, so one oversized row or a large table killed the child with no exit code and the update failed with no reason. The memory-storage migration now guards embedding size inside SQL (rows over 1 MiB never reach JS), reads 128-row windows, parses in JS, records skipped rows as recoverable Doctor warnings (count + first rowids), and stays idempotent on rerun. No schema version or table change; no heap flag. Reported on Discord (#9.5->9.7, raman hero).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant