Repository navigation
refactor(embeddings): separate invocation contracts from host creation - #190394
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 embedding invocation contracts from provider creation and registration while preserving existing SDK exports. Example: Memory search uses an Ollama embedding provider with managed-service readiness.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored draft open: it delivers a coherent, authorized contract refactor, and source review found no actionable correctness or security defects. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherEmbedding adapters create providers from host configuration; memory and Gateway callers invoke them with inputs, cancellation, deadline controls, and usage observers to obtain vectors. flowchart LR
A[Host configuration] --> B[Provider creation contracts]
B --> C[Created embedding provider]
D[Invocation contracts] --> C
E[Memory and Gateway callers] --> C
C --> F[Embedding transport]
F --> G[Vectors and usage]
Technical reviewBest possible solution: Keep invocation contracts in the existing runtime owners, with creation depending on them and SDK facades retaining one shared deadline symbol. Do we have a high-confidence way to reproduce the issue? This PR addresses source ownership rather than a runtime bug; the base and current-main declarations confirm the coupling it removes. Is this the best way to solve the issue? The diff is the smallest coherent ownership cut: it reuses existing modules, migrates affected callers, removes superseded internal forwards, and retains public facade names and structural contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 47cb40a3b3f0. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -12, Tests -5. Total -17 across 21 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 1, 2026, 9:29 AM ET / 14:29 UTC. |
|
Merged via squash.
|
Reconcile the private memory-host bridge guard with the two type-only imports of canonical EmbeddingProviderCreateOptions introduced by #190394. Keep exact inventory equality, private exports, and combined runtime-barrel rejection intact. The existing guard fails on the base with the exact 21-versus-19 CI mismatch and passes all 8 cases on Node and Bun with this change. Targeted types, lint, format, and the test-line ratchet pass; no allocation or shared ceiling change.
Reconcile the private memory-host bridge guard with the two type-only imports of canonical EmbeddingProviderCreateOptions introduced by openclaw#190394. Keep exact inventory equality, private exports, and combined runtime-barrel rejection intact. The existing guard fails on the base with the exact 21-versus-19 CI mismatch and passes all 8 cases on Node and Bun with this change. Targeted types, lint, format, and the test-line ratchet pass; no allocation or shared ceiling change.
Related: #188252
What Problem This Solves
Embedding invocation contracts share type owners with host configuration, provider creation and registration.
User Impact
No intended user-visible behavior change. Existing SDK names, optional fields, mutable inputs, cancellation and deadline behavior stay compatible.
Why This Change Was Made
Use the existing generic and memory invocation owners for the complete data contracts, with creation and registration depending downward on them. Migrate affected callers, retire the private creation-options alias and obsolete internal type forwards, and keep the existing SDK facades.
The sole deadline symbol allocation and legacy memory alias remain one runtime identity. Transport, authority, readiness, cache identity and settlement algorithms are unchanged.
Evidence
7b33a50e.No runtime-performance or startup improvement is claimed.