Skip to content

fix(tts): resolve bundled summary models on cold starts - #146183

Merged
steipete merged 1 commit into
mainfrom
codex/tts-cold-static-catalog-20260912
Sep 12, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/tts-cold-static-catalog-20260912

Conversation

@steipete

@steipete steipete commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Related: #130706, #144354.

What Problem This Solves

Fixes an issue where TTS summarization reports Unknown model for a bundled model on a cold start, even though the captured plugin catalog contains that model. A discovered registry entry or configured provider endpoint could mask the missing fallback path.

Why This Change Was Made

Normal TTS preparation now enables the existing captured static-catalog fallback, as the runtime LLM and worker inference callers already do. The change is one replaced production line, with no new option or model resolver. The shipped injected-callback contract is unchanged.

User Impact

Bundled summary defaults and explicit summary-model overrides work before provider discovery populates a registry. Disabled, denied, and unallowed plugins and unknown models remain rejected before HTTP.

Evidence

  • The baseline reproduced three canonical/default/override failures alongside five passing rejection controls. All eight cases and 92 existing TTS/simple-completion tests passed after the repair.
  • Full pinned changed-file checks, independent P2 review, and one normal pnpm build passed on b4ad24e9b254be34a57aebb4004940dc4067ae80.
  • Eight fresh compiled child processes passed through the published speech and simple-completion SDKs: three completed Kimi selections and five pre-HTTP rejections. Each ran under loopback-only OS egress controls verified with an EPERM probe. All 13,186 build files stayed unchanged; child processes exited naturally and successful-run state was cleaned up.
  • The compiled fixture uses the public transport-host seam to redirect the exact native Kimi target through the original guarded fetch builder to loopback. This proves compiled selection, auth handoff, and SSE completion, not hosted Kimi inference or the native-endpoint fetch guard.
  • Failed fixture attempts are preserved: an initial global-fetch interception was bypassed and one synthetic-only request received native 401; its hardcoded zero-request claim is invalid. A subsequent sandboxed attempt was denied before native egress. No production or build changes were made to make the final fixture pass.

The three documented legacy Kimi aliases still fail independently on this build and remain a separate follow-up; this cut repairs canonical catalog availability.

Required CI passed on attempt 2 at the same head. The first attempt had two selected Blacksmith jobs with runner_id 0, no executed steps, no logs, and GitHub annotations that the jobs were never acquired. One failed-job retry completed successfully; no code, tests, deadlines, or runner configuration were changed.

Use the existing captured static-catalog fallback when preparing TTS summaries before provider discovery has populated a registry. Preserve selected model IDs, plugin policy, credentials, and the shipped injected callback contract.

Prove canonical defaults and explicit summary overrides through ordinary TTS with the bundled Kimi provider and synthetic loopback HTTP. Disabled, denied, unallowed, and unknown model controls send no request.

Related: #130706
@clawsweeper

clawsweeper Bot commented Sep 12, 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 size: S maintainer Maintainer-authored PR labels Sep 12, 2026
@steipete
steipete marked this pull request as ready for review September 12, 2026 16:20
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 12:27 PM ET / 16:27 UTC.

ClawSweeper review

What this changes

TTS summarization enables the existing bundled model-catalog fallback and adds coverage for cold-start defaults, explicit overrides, and rejected models.

Merge readiness

✅ Ready for maintainer review

The cold-start repair remains necessary on current main. The patch reuses the existing resolver, preserves configured overrides and plugin exclusions, and introduces no blocking correctness finding.

Priority: P2
Reviewed head: b4ad24e9b254be34a57aebb4004940dc4067ae80

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful regression controls and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its captured body reports compiled speech-SDK cold-start completion and pre-HTTP rejection through loopback transport; hosted Kimi inference and native-endpoint guard behavior are explicitly outside that evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its captured body reports compiled speech-SDK cold-start completion and pre-HTTP rejection through loopback transport; hosted Kimi inference and native-endpoint guard behavior are explicitly outside that evidence.
Evidence reviewed 8 items Verified introduced production change: The merge-base-to-head diff changes only the normal summary acquisition argument to enable the existing fallback; the injected preparation callback remains unchanged.
Current main still needs the repair: Fetched main still passes only cfg to summary model acquisition. It does not enable the static-catalog fallback.
Existing fallback preserves resolution ownership: The shared resolver checks explicit and dynamic models before static fallback, applies configured provider overrides, and retains configured fallback afterward. TTS introduces no parallel resolver.
Findings None None.
Security None None.

How this fits together

OpenClaw summarizes long replies before converting them to speech. The summary preparer selects a configured language model, acquires its provider runtime and credentials, and returns text for speech synthesis.

flowchart TD
  A[Long reply text] --> B[TTS summary preparation]
  C[Summary override or default model] --> B
  B --> D[Shared model resolver]
  E[Bundled catalog and plugin policy] --> D
  D --> F[Authenticated model completion]
  F --> G[Summary for speech synthesis]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +175. Total +175 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 1 175 0 +175
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 176 1 +175

Review metrics

Metric Value Why it matters
Cold-start regression coverage 3 successful selections and 5 rejection controls The cases distinguish repaired catalog availability from accidental relaxation of plugin policy.

Technical review

Best possible solution:

Keep summary selection within the shared completion owner, using its policy-filtered bundled catalog while preserving explicit provider settings and callback compatibility.

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

Yes, from source: a cold bundled model absent from the runtime registry cannot reach the flag-gated catalog fallback through current-main TTS preparation. The supplied baseline reports this failure; this review did not execute it.

Is this the best way to solve the issue?

Yes. Enabling the already-supported resolver path is a focused repair, and the new coverage avoids configured endpoints that could conceal the missing catalog lookup.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 63e204c2e5ed.

Labels

Label changes:

  • add P2: This repairs a bounded TTS summarization failure; documented truncation fallback preserves audio output.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its captured body reports compiled speech-SDK cold-start completion and pre-HTTP rejection through loopback transport; hosted Kimi inference and native-endpoint guard behavior are explicitly outside that evidence.

Label justifications:

  • P2: This repairs a bounded TTS summarization failure; documented truncation fallback preserves audio output.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its captured body reports compiled speech-SDK cold-start completion and pre-HTTP rejection through loopback transport; hosted Kimi inference and native-endpoint guard behavior are explicitly outside that evidence.

Evidence

What I checked:

  • Verified introduced production change: The merge-base-to-head diff changes only the normal summary acquisition argument to enable the existing fallback; the injected preparation callback remains unchanged. (src/tts/tts-core.ts:204, b4ad24e9b254)
  • Current main still needs the repair: Fetched main still passes only cfg to summary model acquisition. It does not enable the static-catalog fallback. (src/tts/tts-core.ts:204, 63e204c2e5ed)
  • Existing fallback preserves resolution ownership: The shared resolver checks explicit and dynamic models before static fallback, applies configured provider overrides, and retains configured fallback afterward. TTS introduces no parallel resolver. (src/agents/embedded-agent-runner/model.ts:370, b4ad24e9b254)
  • Plugin exclusions remain enforced: Bundled manifest catalog rows are filtered through the existing owner policy; provider catalog lookup also restricts candidates to activatable bundled owners. The new test covers disabled plugins, global disablement, denylist exclusion, restrictive allowlisting, and unknown models before HTTP. (src/tts/tts-summary.static-catalog.test.ts:19, b4ad24e9b254)
  • Established summary contract: Documentation specifies that automatic summaries use summaryModel or the global primary model; failed summaries fall back to truncation before synthesis. Public docs: docs/tools/tts/output.md. (docs/tools/tts/output.md:74, b4ad24e9b254)
  • Prior merged work is related but does not supersede this repair: fix(tts): preserve selected summary models #144354 established captured summary selection. GitHub's commit patch confirms that acquisition still omitted the fallback flag. Current-main history also shows subsequent resource-lifecycle maintenance in this path. Some deeper local history reads failed on unavailable blobs; GitHub commit metadata supplied the relevant patch. (src/tts/tts-core.ts:203, bdb61168c086)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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.

@steipete
steipete merged commit 92565eb into main Sep 12, 2026
385 of 388 checks passed
@steipete
steipete deleted the codex/tts-cold-static-catalog-20260912 branch September 12, 2026 17:07
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 12, 2026
Declare the documented kimi-code, k2p5, and k3[1m] aliases before provider runtime loads. Read the same manifest map from the existing public helper so cold model selection and runtime normalization share one policy.

Preserve registered hooks and public exports, and remove the obsolete type-assertion allowance. Static parser regressions fail for all three legacy IDs on the baseline and retain canonical model controls.

Related: #130706
Prerequisite: #146183
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 13, 2026
…6183)

Use the existing captured static-catalog fallback when preparing TTS summaries before provider discovery has populated a registry. Preserve selected model IDs, plugin policy, credentials, and the shipped injected callback contract.

Prove canonical defaults and explicit summary overrides through ordinary TTS with the bundled Kimi provider and synthetic loopback HTTP. Disabled, denied, unallowed, and unknown model controls send no request.

Related: openclaw#130706
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 13, 2026
…w#146261)

Declare the documented kimi-code, k2p5, and k3[1m] aliases before provider runtime loads. Read the same manifest map from the existing public helper so cold model selection and runtime normalization share one policy.

Preserve registered hooks and public exports, and remove the obsolete type-assertion allowance. Static parser regressions fail for all three legacy IDs on the baseline and retain canonical model controls.

Related: openclaw#130706
Prerequisite: openclaw#146183
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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.

1 participant