feat: add MemoryScoring bus family (#5560) - #110
Merged
Conversation
Adds the 21st memory bus capability family — Scoring — with three methods: - extract_entities(query) -> Vec<String> - embed_text(text) -> Vec<f32> - embedder_slug() -> String Routes three direct tinymemory-core engine calls through the memory bus, eliminating the remaining raw engine deps for entity extraction and embedding. - tinymemory-api: new MemoryScoring trait + null impl + driver accessor - tinymemory-bus: Capability::Scoring (index 20), ALL grows to 21 - tinymemory-module: ExtractEntities/EmbedText/EmbedderSlug handlers - tinymemory-tinycortex: full TinycortexProvider impl for the family
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
How this change flows2 changed behaviours across 9 relationships. 6 surrounding behaviours are shown (60 graph nodes walked). 30 further behaviours left out to keep the diagram readable. flowchart LR
n0["NullMemoryProvider<br/>changed"]:::changed
n1["Capability<br/>changed"]:::changed
n2["iter"]:::impacted
n3["...embers_are_exactly_the_published_contract"]:::impacted
n4["EngineRuntimeConfig"]:::impacted
n5["...served_method_is_declared_in_the_manifest"]:::impacted
n6["Result"]:::impacted
n7["blocking"]:::impacted
n2 -->|uses| n1
n3 -->|uses| n0
n3 -->|calls| n2
n3 -->|tests| n2
n5 -->|uses| n0
n5 -->|calls| n2
n5 -->|tests| n2
n7 -->|uses| n4
n7 -->|uses| n6
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge. |
The #[tinybus::interface] macro brings family traits into scope internally when generating dispatch code — no other family trait (MemoryRetrieval, MemoryCodingSessions, etc.) is imported at the module level either. The import was added incorrectly; the pattern is consistent without it.
…s names The module serves these three Scoring family methods but they were absent from METHODS in tinymemory-bus, causing the served-vs-published contract test to fail. Adds the three constants to the methods module and appends them to METHODS (123 -> 126), in the same declaration order as the module.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extract_entities,embed_text,embedder_slugtinymemory-corecalls on the host sideCapability::Scoringregistered at index 20;ALLarray grows from 20 to 21 entriesProblem
Three operations in the host (
extract_query_entities, embedder build+embed,effective_embedder_slug) called intotinymemory-coredirectly, bypassing the memory bus. This prevents the host from loading the engine as a module and routing those calls over the bus.Solution
tinymemory-api: newMemoryScoringtrait (scoring.rs) +NullMemoryProvidernull impl +MemoryDriver::as_scoring()accessortinymemory-bus:Capability::Scoringvariant, index 20,ALLlength → 21,as_str() = "scoring"tinymemory-module: three handlers in#[tinybus::interface]—ExtractEntities,EmbedText,EmbedderSlug— routed throughrequire_family!(as_scoring)tinymemory-tinycortex: fullimpl MemoryScoring for TinycortexProviderbacked by the existingtree::nlpandtree::score::embed::factorycode pathsSubmission Checklist
capabilities_tests.rsupdated (20 → 21,"scoring"in names vec)Unsupportedfor all three methodsImpact
Additive only — no existing callers changed. The host wires onto this in the companion openhuman PR (#5560).
Related