Repository navigation
refactor(transcription): separate provider host contexts - #193390
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: needs maintainer review before merge. What this changesThis PR separates config-bearing transcription provider contexts from ordinary session types while preserving existing SDK exports. Example: An official transcription plugin implements createSession with providerConfig.model set to "stt-model".
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored draft open: the focused type extraction preserves existing contracts, and source review found no actionable defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherTranscription provider descriptors connect host configuration and callbacks to plugin-created sessions, which consume audio and emit transcript events through existing transport and lifecycle owners. flowchart LR
Host[Host configuration] --> Contexts[Provider context types]
Contracts[Session and callback types] --> Contexts
Contexts --> Descriptor[Provider descriptor]
Descriptor --> Plugin[Transcription plugin]
Plugin --> Session[Session lifecycle and transport]
Session --> Events[Transcript events]
Technical reviewBest possible solution: Retain the focused extraction and validate the unchanged supported descriptor contracts through the existing build and SDK checks. Do we have a high-confidence way to reproduce the issue? No runtime bug is claimed; source inspection confirms the original session-contract module imports host configuration and the proposed extraction removes that dependency. Is this the best way to solve the issue? The diff is the smallest coherent extraction: one context owner, unchanged fields, complete caller migration, preserved exports, and no compatibility shim or added test machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7ec1d3e861ce. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +7, Tests 0. Total +7 across 6 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 5, 2026, 5:23 AM ET / 10:23 UTC. |
|
Merged via squash.
|
Problem
The ordinary realtime transcription protocol/session types also owned configuration-bearing provider contexts, pulling host configuration into data-only consumers.
Change
Move the three complete host contexts into the adjacent private
provider-contexts.tsowner. Keep four ordinary declarations in import-freeprovider-types.ts, and migrate the descriptor, existing SDK type routes and relay type import together. No forwarding shim or new public name is introduced.Runtime bodies, callback optionality, config/auth/registration, transport ordering and cleanup stay unchanged. The relay test keeps its 635-line body and assertions. Production grows by seven lines for the boundary; test/allocation growth is zero. No performance improvement is claimed.
Validation
Validated at
17dd517de8e6d6d8dce15fa5018fcc861dbd42fa:core/plugin-entrydeclarations covers all four provider callbacks and descriptor/factory registration (strict: true,skipLibCheck: false). The three transcription SDK subpaths remain intentionally JS-only/private-local.The initial native initialization preflight failed before checkout/binding; a later ordinary read and one same-route initialization succeeded. Its original cause remains unknown. That setup attempt is preserved, not presented as a candidate defect or a passing first attempt.
Normal preparation retained the exact reviewed head and skipped an unnecessary push. Exact-head CI run 42019099924, attempt 1, completed successfully, including security-fast, the core type lanes, baseline ratchets and
openclaw/ci-gate. Skipped jobs are not counted as passing execution. The actual hosted merge preserves the independent music, speech and Node capability changes and all 635 relay-test lines; its first-parent delta contains only these six paths. A bounded reference census at captured mainde04fbe0caa9332999bdcc28d5d4e049672afb16found no new or removed reference rows. This snapshot does not freeze future main movement.Normal current security/review/authority and squash-landing checks remain enforced. No CI exception, live/paid provider or Gateway workload, or performance qualification is claimed.