Skip to content

fix(plugin-sdk): align speech runtime packaging#89899

Merged
steipete merged 1 commit into
openclaw:mainfrom
zhangguiping-xydt:feat/issue-89425
Jul 7, 2026
Merged

fix(plugin-sdk): align speech runtime packaging#89899
steipete merged 1 commit into
openclaw:mainfrom
zhangguiping-xydt:feat/issue-89425

Conversation

@zhangguiping-xydt

@zhangguiping-xydt zhangguiping-xydt commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Installed gateways could authorize speech-core/runtime-api.js as a bundled extension facade even though the npm package has no dist/extensions/speech-core sidecar. That makes replies fail before provider invocation. Closes #89425.

Why This Change Was Made

Speech is package-backed through plugin-sdk/tts-runtime and packages/speech-core/runtime-api.js; it is not a bundled extension. This rewrite removes it from QA extension staging and introduces one source-level contract for the two real facade sidecars: image generation and media understanding.

The installed-package verifier imports that contract and checks the exact activation runtime plus each declared sidecar. It no longer scans or parses generated JavaScript, so verification is independent of chunk names, minification, declaration formatting, and arbitrary file-count limits.

User Impact

Packaged installs no longer attempt to resolve a nonexistent speech extension before replies. The supported speech/TTS runtime remains unchanged. No config, migration, provider, auth, or public SDK surface changes.

Evidence

  • Latest stable v2026.6.11 reproduces the contract mismatch: speech-core is allowlisted while extensions/speech-core is absent.
  • Blacksmith Testbox: 184 focused package/release, facade-runtime, and QA-staging tests passed.
  • Blacksmith Testbox: scoped changed gates passed typechecks, core/extensions/scripts lint, storage guards, runtime-sidecar checks, and import-cycle checks.
  • Production and Control UI builds passed.
  • Clean main independently reproduces the unrelated config-baseline preflight drift.
  • Fresh autoreview: no accepted or actionable findings (0.94).
  • git diff --check passed.

Contributor credit is preserved in the maintainer rewrite commit and changelog.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts extensions: qa-lab size: M proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 3, 2026
@clawsweeper

clawsweeper Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 1, 2026, 1:48 AM ET / 05:48 UTC.

Summary
The PR removes speech-core from always-allowed bundled runtime facade staging and adds installed-package verification/tests for missing or drifting always-allowed runtime facade sidecars.

PR surface: Source -2, Tests +198, Other +177. Total +373 across 7 files.

Reproducibility: yes. at source level. Current main and v2026.6.11 still allow speech-core/runtime-api.js as a bundled runtime facade while the packaged sidecar inventory lacks dist/extensions/speech-core/runtime-api.js; I did not run a fresh installed Gateway repro in this read-only review.

Review metrics: 2 noteworthy metrics.

  • Always-Allowed Runtime Facades: 1 removed, 0 added. Each allowlist entry bypasses normal bundled-plugin activation for runtime-api.js, so removing speech-core is a compatibility contract decision.
  • Installed Facade Release Gate: 1 fail-closed verifier path added. The package verifier can now block releases when an allowlisted runtime facade lacks a packaged sidecar or the activation marker drifts.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #89425
Summary: This PR is the active candidate fix for the canonical speech-core bundled public-surface packaging mismatch; earlier sidecar or resolver attempts are closed unmerged or superseded.

Members:

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

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Get maintainer signoff on the package-backed speech-core contract versus sidecar compatibility.
  • [P2] Let pending current-head CI shards settle before merge.

Risk before merge

  • [P1] Compatibility: merging confirms dist/extensions/speech-core/runtime-api.js is unsupported, so any caller depending on that sidecar must use the package-backed openclaw/plugin-sdk/tts-runtime path or a sidecar-compatible packaging fix.
  • [P1] Automation: the postpublish/prepublish verifier can fail closed when the facade activation runtime, static allowlist marker, required sidecars, or root dist scan limit drifts, so release owners need to accept that operational gate.

Maintainer options:

  1. Accept Package-Backed Speech-Core Contract (recommended)
    Land this path if maintainers agree dist/extensions/speech-core/runtime-api.js is not a shipped public sidecar and openclaw/plugin-sdk/tts-runtime is the supported contract.
  2. Package The Sidecar Instead
    If the sidecar path is considered shipped compatibility, replace the allowlist removal with packaging for dist/extensions/speech-core/runtime-api.js and rerun installed-package proof.
  3. Pause For Release-Gate Review
    Hold this PR if release owners are not ready to make static-marker drift, duplicate activation runtime files, missing sidecars, or scan-limit overflow fail package verification.

Next step before merge

  • No automated repair is appropriate because the remaining blocker is maintainer acceptance of the unsupported sidecar contract and the stricter release verifier.

Security
Cleared: No concrete security or supply-chain concern found: the diff changes local facade authorization and package verification without dependency, lockfile, workflow, secret, download, or lifecycle-hook changes.

Review details

Best possible solution:

Land after maintainers confirm speech-core is package-backed through openclaw/plugin-sdk/tts-runtime; otherwise switch to a narrow sidecar-compatible packaging fix.

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

Yes, at source level. Current main and v2026.6.11 still allow speech-core/runtime-api.js as a bundled runtime facade while the packaged sidecar inventory lacks dist/extensions/speech-core/runtime-api.js; I did not run a fresh installed Gateway repro in this read-only review.

Is this the best way to solve the issue?

Yes, if maintainers accept the package-backed speech-core contract. The allowlist removal plus installed-package verification is narrower than a broad resolver fallback, while a shipped sidecar contract would require the sidecar-compatible alternative.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2c7e989686ba.

Label changes

Label justifications:

  • P1: The PR targets a shipped Gateway regression that can stop installed replies before provider execution.
  • merge-risk: 🚨 compatibility: The diff changes whether speech-core/runtime-api.js is treated as an always-allowed bundled extension sidecar.
  • merge-risk: 🚨 automation: The new verifier can fail release/package verification on activation-runtime, marker, sidecar, or scan-limit drift that normal green unit tests do not fully settle.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes after-fix local-tarball installed-binary live output with verifier results, Gateway startup, authenticated RPCs, and absence of the reported speech-core public-surface error.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix local-tarball installed-binary live output with verifier results, Gateway startup, authenticated RPCs, and absence of the reported speech-core public-surface error.
Evidence reviewed

PR surface:

Source -2, Tests +198, Other +177. Total +373 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 0 2 -2
Tests 4 205 7 +198
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 177 0 +177
Total 7 382 9 +373

What I checked:

  • Current main still authorizes speech-core sidecar access: Current main includes speech-core in ALWAYS_ALLOWED_RUNTIME_DIR_NAMES, and runtime-api.js requests for that set return allowed before manifest checks. (src/plugin-sdk/facade-activation-check.runtime.ts:30, 2c7e989686ba)
  • Supported TTS path is package-backed: Current source already documents and tests that the supported TTS runtime path goes through openclaw/plugin-sdk/tts-runtime to packages/speech-core/runtime-api.js, not an extensions/speech-core public-surface sidecar. (src/tts/tts.test.ts:14, 2c7e989686ba)
  • PR changes the implicated contract and verifier: The PR patch removes speech-core from the always-allowed set and QA staging, adds collectInstalledAlwaysAllowedRuntimeFacadeErrors, and covers missing sidecars, duplicate/missing activation runtimes, marker drift, and scan-limit failures. (scripts/openclaw-npm-postpublish-verify.ts:411, 707305fb3933)
  • Latest release still has the old behavior: Tag v2026.6.11 still contains speech-core in the always-allowed runtime facade set and the sidecar inventory still lacks dist/extensions/speech-core/runtime-api.js; the PR head is not contained in any local release tag. (src/plugin-sdk/facade-activation-check.runtime.ts:30, e085fa1a3ffd)
  • Linked canonical issue is still open with this PR as the only open direct fix: Live GitHub search for open PRs mentioning the canonical issue returned only this PR; closed alternatives used sidecar-addition or fallback approaches and are not active landing paths.
  • Real behavior proof was supplied in PR body and checked by automation: The PR body includes copied installed local-tarball output showing verifier [], Gateway health/status/agent.identity RPC success, and no speech-core/runtime-api.js public-surface error; GitHub checks include a passing Real behavior proof check, while a few CI shards were still pending when inspected. (707305fb3933)

Likely related people:

  • vincentkoc: Authored the voice refactor that moved speech-core into a package-backed runtime and several recent npm verifier changes adjacent to this release failure. (role: feature-history and release-verifier contributor; confidence: high; commits: 27b15a19e84c, 5296dc378f85, ea0330963c30; files: src/plugin-sdk/tts-runtime.ts, packages/speech-core/runtime-api.ts, tsdown.config.ts)
  • gumadeiras: Introduced the QA bundled-plugin staging path that includes the always-stage runtime plugin list touched by this PR. (role: adjacent QA staging contributor; confidence: medium; commits: d5933af80bf1, 82fe6f50efc4; files: extensions/qa-lab/src/bundled-plugin-staging.ts, extensions/qa-lab/src/gateway-child.test.ts)
  • steipete: Recent history links this account to facade activation and speech-core facade documentation around the same package/runtime boundary. (role: facade-adjacent contributor; confidence: medium; commits: 0b8aabe8648e, aafdf67d3983, ee6052a1691b; files: src/plugin-sdk/facade-activation-check.runtime.ts, packages/speech-core/runtime-api.ts, docs)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jun 3, 2026
@byungskers

Copy link
Copy Markdown

I like the direction here: removing the unsupported always-allowed path and then adding a postpublish verifier is much better than silently keeping the bad contract around. The new verifier also feels reusable for future runtime-facade regressions. Minor thought: since the parser currently expects ALWAYS_ALLOWED_RUNTIME_DIR_NAMES to stay in a statically discoverable new Set([...]) shape, a short code comment near that constant or in the verifier about that coupling could save someone from “harmless” refactors breaking release validation later.

@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 3, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 3, 2026
@vincentkoc vincentkoc self-assigned this Jun 16, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 Jun 19, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 19, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 19, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 19, 2026
@clawsweeper clawsweeper Bot added 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. 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jun 20, 2026
@zhangguiping-xydt zhangguiping-xydt changed the title fix #89425: [Bug]: Missing extensions/speech-core/ in npm tarball (v2026.5.28) — "Unable to resolve bundled plugin public surface speech-core/runtime-api.js" fix(package): include speech-core in npm tarball Jun 22, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Jun 23, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Jun 23, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jul 1, 2026
@steipete
steipete force-pushed the feat/issue-89425 branch from 707305f to e09e47a Compare July 7, 2026 06:28
@steipete steipete changed the title fix(package): include speech-core in npm tarball fix(plugin-sdk): align speech runtime packaging Jul 7, 2026
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Land-ready maintainer rewrite complete at signed head e09e47a7104d2257017e59ef330d2e921798a91e.

  • Restored the runtime owner boundary: speech remains package-backed through plugin-sdk/tts-runtime; only image generation and media understanding are bundled extension facade sidecars.
  • Replaced the contributor's generated-JavaScript AST parser and 10,000-file scan with one six-line source contract consumed by runtime activation and installed-package verification.
  • Release verification now checks the exact activation runtime and every declared sidecar. QA staging uses the same corrected classification; no runtime shim, fallback, config, or public SDK surface was added.
  • Blacksmith Testbox tbx_01kwxh9xadqgh8a3yrdafdy52b: 184 focused tests passed (95 package/release tooling, 18 facade runtime, 71 QA gateway/staging).
  • Same Testbox: scoped changed gates passed typechecks, core/extensions/scripts lint, database/storage guards, runtime-sidecar checks, import-cycle checks, and related repository guards.
  • Production and Control UI builds passed. A real npm pack tarball contained the activation runtime, both declared extension sidecars, and plugin-sdk/tts-runtime, while correctly omitting extensions/speech-core.
  • Clean main independently reproduces the generated config-baseline drift that blocks the umbrella release preflight. The broader dependency-install smoke exits in npm 11 registry resolution without reporting a package error; this occurs before package execution and is outside the changed surface.
  • The contributor's existing isolated-prefix installed-Gateway proof reached ready state, passed authenticated health/status/identity RPCs, and logged no speech facade resolution error.
  • Fresh autoreview: clean, no accepted/actionable findings (0.94). git diff --check passed.
  • Exact-head hosted CI: https://github.com/openclaw/openclaw/actions/runs/28846337282

Known proof gap: the full registry dependency install could not complete in the current Testbox because npm exited during registry metadata resolution without an error record. The built tarball contract, focused verifier tests, shipped-package reproduction, and prior installed-Gateway/RPC proof cover the regression itself.

@steipete
steipete merged commit de152b1 into openclaw:main Jul 7, 2026
113 of 116 checks passed
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 7, 2026
sheyanmin pushed a commit to sheyanmin/openclaw that referenced this pull request Jul 8, 2026
giodl73-repo pushed a commit to giodl73-repo/openclaw that referenced this pull request Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S stale Marked as stale due to inactivity 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.

[Bug]: Missing extensions/speech-core/ in npm tarball (v2026.5.28) — "Unable to resolve bundled plugin public surface speech-core/runtime-api.js"

4 participants