Repository navigation
refactor: keep private media preparation in its owners - #178002
Conversation
|
🦞👀 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. |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7c6fca690
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,157 +0,0 @@ | |||
| import type { OpenClawConfig } from "../config/types.openclaw.js"; | |||
There was a problem hiding this comment.
Remove the deleted overlay from QA codeRefs
Deleting this module without updating qa/scenarios/media/video-generation-invocation.yaml:26 leaves that scenario pointing at a nonexistent file. extensions/qa-lab/src/scenario-catalog.test.ts:24-36 resolves every codeRefs entry and asserts that it exists, so the QA Lab catalog test now deterministically fails; replace or remove the stale reference as part of the cutover.
AGENTS.md reference: AGENTS.md:L46-L51
Useful? React with 👍 / 👎.
|
Merged via squash.
|
* refactor: keep private media preparation in its owners * test(qa): remove folded video overlay reference
Keep provider option tags and PCM byte accounting local after openclaw#178002 and openclaw#178011 removed their external consumers. Keep the V1 TypeSafe evaluator local after openclaw#158565 moved registration to V2; exercise its retained cancellation and sanitized-error contract through the existing V2 fixture adapter.
目的: プラグインがプロバイダーに合わせた発話ガイダンスを組めるよう、 現在有効な一次 TTS プロバイダー・モデル・ペルソナを合成せずに取得する。 変更: api.runtime.tts.prepareSpeechPromptContext を追加する。通常の TTS と同じ ユーザー設定、agent / channel / account 層、ペルソナ binding、 モデル解決を使い、auto オフ・テキスト上書き不許可・一次 binding 不可は ready: false を返す。合成、fallback、credential、音声ファイル、 テキスト書き換えは行わず、プロバイダー設定や秘密情報も返さない。 runtime facade は選択中 registry とプラグインの寿命に束縛する。 検証: tts-prompt-context と registry.runtime-config のテストが通過。 rebase 時のコンフリクト解決 (onto 57fd13e, 元コミット 89d6eb7578c): - 上流 329a56d (openclaw#178002) が resolveReadySpeechProvider を単一呼び出しとして フォールバックループ内のクロージャへ畳み込んだ。本コミットで tts-prompt-context.ts が2つ目の呼び出し元になるため、export した関数として 1か所に戻し、ループ側のクロージャはその呼び出しに置き換えた。 畳み込みで外れていた VoiceModelRef の import も戻した - 上流 b3d00c9 (openclaw#183424) が types-core.ts の TTS 型エイリアスを TtsRuntimeApi[...] の直接参照へ畳んだ。エイリアスは復活させず、 prepareSpeechPromptContext も同じ直接参照の形で追加 rebase 時のコンフリクト解決 (onto 258d034, 元コミット 892cff4dd4d): - 上流 00ebec0 (openclaw#188280) が getResolvedSpeechProviderConfigForVoiceModel の 引数を providerId から provider (SpeechProviderPlugin) へ変えた。export 済みの resolveReadySpeechProvider をその形へ合わせ、ループ側は本コミットの呼び出しを採用 - 上流 e1f1a79 (openclaw#188398) が prepareTtsRequest を runtime-api.ts から外し、 loadTtsRequestRuntime の読み込み先を tts-request.js へ変えて、knip の 動的 consumer 追跡に lazy TTS メソッドを登録した。そのままでは prepareSpeechPromptContext が tts-request.js に無く実行時に解決できないため、 同じ方式で tts-prompt-context.js 専用の lazy loader / binder を足し、 型も typeof import(tts-prompt-context.js) の直接参照にし、 knip-dynamic-consumers.mjs に consumer を登録した。runtime-api.ts からの 再 export は上流の方針どおり置かず、test-support は直接 import する
What Problem This Solves
Private one-consumer modules and argument packets separate internal operations from the callers that already own their context. Direct helper tests also retain otherwise unnecessary production exports.
What Changed
Fold video capability overlays, status assembly, TTS readiness/configuration, media reader/playback/store/parsing/probe handoffs and PTY invocation preparation into their existing owners. Keep provider-specific request, voice discovery, workflow and decode packets in their actual operations. Fold the internal terminal display leaf into its sole renderer, retain public SDK APIs while simplifying their private request preparation, and keep worker dispatch and Markdown HTML annotation in their existing callers. Public-boundary tests replace the retired overlay/formatter entry points.
Strict production delta: +1,635 / -2,140 = 505 net lines removed. Tests, fixtures, test-support, generated files and declarations excluded. The source/test packet spans32 paths; the QA scenario also drops its obsolete reference to the folded overlay module, with the runtime owner already retained. Exactly two obsolete assertion-baseline rows are deleted.
User Impact
No intended capability, configuration, CLI/protocol, public SDK/package, dependency, persisted-format or schema change. Preserve all security and live-authority checks, byte/resource limits, exact prompt/wire bytes, source precedence, lazy imports, ordinary concurrency, cancellation, filesystem integrity, durability, cleanup and write-capable settlement. Standalone Phase E session memory and its factory/registry/expiry/federation machinery and tests are untouched.
Best-effort tradeoffs accepted
Evidence
unknown formatbut received the existing 1000ms subprocess timeout. Its exact-case replay passes without edits (343ms case,17.49s Vitest/23.95s wrapper). The original timeout remains unexplained; this is not a proven repair, green initial run or inherited-CI claim. Assertions, timeouts, retries and source skips are unchanged.Broad proof is hosted CI on the exact pushed head. Local commands use isolated HOME/OpenClaw/XDG state, nice10, focused one-worker Vitest and targeted native type graphs. No local broad suites, whole-graph typecheck, build, E2E, vendor/device or operator-state proof is claimed. The real-decoder long-recording test is retained but not claimed as locally executed.
Review follow-up: the initial e7c6fca head completed hosted CI successfully, but review correctly identified the stale QA codeRef. Its one-line removal retains the scenario's objectives, success criteria, execution and existing runtime reference. The actual catalog reference test passes (1 case, 1.31s test / 10.39s wrapper; the other cases were selected out, not newly skipped). The repaired head requires its own CI; initial-head green is not claimed as repaired-head proof.