Skip to content

feat: add MemoryScoring bus family (#5560) - #110

Merged
YellowSnnowmann merged 5 commits into
mainfrom
feat/5560-memory-scoring
Aug 27, 2026
Merged

feat: add MemoryScoring bus family (#5560)#110
YellowSnnowmann merged 5 commits into
mainfrom
feat/5560-memory-scoring

Conversation

@YellowSnnowmann

Copy link
Copy Markdown
Contributor

Summary

  • Adds the 21st memory bus capability family: MemoryScoring with three methods — extract_entities, embed_text, embedder_slug
  • Routes entity extraction and text embedding through the bus contract, eliminating direct tinymemory-core calls on the host side
  • Capability::Scoring registered at index 20; ALL array grows from 20 to 21 entries

Problem

Three operations in the host (extract_query_entities, embedder build+embed, effective_embedder_slug) called into tinymemory-core directly, 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: new MemoryScoring trait (scoring.rs) + NullMemoryProvider null impl + MemoryDriver::as_scoring() accessor
  • tinymemory-bus: Capability::Scoring variant, index 20, ALL length → 21, as_str() = "scoring"
  • tinymemory-module: three handlers in #[tinybus::interface]ExtractEntities, EmbedText, EmbedderSlug — routed through require_family!(as_scoring)
  • tinymemory-tinycortex: full impl MemoryScoring for TinycortexProvider backed by the existing tree::nlp and tree::score::embed::factory code paths

Submission Checklist

  • Tests added or updated — capabilities_tests.rs updated (20 → 21, "scoring" in names vec)
  • No new external network dependencies
  • Null impl returns Unsupported for all three methods

Impact

Additive only — no existing callers changed. The host wires onto this in the companion openhuman PR (#5560).

Related

  • Closes: openhuman #5560 (host-side wiring in companion PR)

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
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ae8adcb9-9975-4862-b362-4f2185c47343

Warning

Your free Security trial is over. An organization admin can activate Security or dismiss this notice.


Comment @coderabbitai help to get the list of available commands.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

$0.0000 · 0 in / 0 out

@tinysweeper

tinysweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown

How this change flows

2 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
Loading

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.

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Aug 27, 2026
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.
@YellowSnnowmann
YellowSnnowmann merged commit e26383d into main Aug 27, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant