Skip to content

feat(server): extend _meta.vouch_hot_memory to all read-side kb.* tools#261

Open
jsdevninja wants to merge 2 commits into
vouchdev:testfrom
jsdevninja:feat/hot-memory-universal-coverage
Open

feat(server): extend _meta.vouch_hot_memory to all read-side kb.* tools#261
jsdevninja wants to merge 2 commits into
vouchdev:testfrom
jsdevninja:feat/hot-memory-universal-coverage

Conversation

@jsdevninja

@jsdevninja jsdevninja commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What changed

Every primary read-side kb.* tool now attaches _meta.vouch_hot_memory — a TTL-cached sidebar of recently approved claims — when the KB has recent activity. Coverage extends from kb.search / kb.context / kb.read_claim to kb.read_page, kb.read_entity, kb.read_relation, and all kb.list_* methods. kb.list_* responses are wrapped in {"items": [...], "_meta": {...}} with a deprecation note for clients that expected a flat list. kb.capabilities advertises the contract under hot_memory.

Closes #225

Why

Gbrain attaches its hot-memory sidebar to every MCP read response; vouch only covered three tools after the initial hot-memory work. Agents calling kb.read_entity or kb.list_pending had to make a second round-trip to learn what just changed. This is the cheap follow-up that fully closes that gap.

What might break

Breaking (JSONL / MCP): kb.list_pages, kb.list_claims, kb.list_entities, kb.list_relations, kb.list_sources, and kb.list_pending no longer return a bare list. They return a dict envelope with an items key. _meta.deprecation documents the migration (result.items instead of result). No on-disk .vouch/ layout changes; no new write paths; the review gate is untouched.

Non-breaking: Dict-returning read tools (kb.read_*, kb.search, kb.context) keep their existing top-level shape; _meta.vouch_hot_memory is additive and omitted when the sidebar would be empty.

VEP

Not required — read-side response decoration only; no object model, on-disk layout, bundle format, or audit-log shape changes.

Tests

  • make check passes locally (lint + mypy + ruff)
  • New / changed behaviour has a test (tests/test_hot_memory.py, including test_hot_memory_universal_coverage)
  • CHANGELOG.md updated under ## [Unreleased]

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 03ccebeb-9c83-480c-b8ec-89c3ce2152c3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@jsdevninja jsdevninja force-pushed the feat/hot-memory-universal-coverage branch from bf18f7c to 4e914a1 Compare June 29, 2026 21:18
@github-actions github-actions Bot added docs documentation, specs, examples, and repo guidance mcp mcp, jsonl, and http surfaces storage kb storage, migrations, schemas, and proposals retrieval context, search, synthesis, and evaluation schemas json schemas and generated schema assets tests tests and fixtures size: L 500-999 changed non-doc lines labels Jun 29, 2026
@jsdevninja jsdevninja force-pushed the feat/hot-memory-universal-coverage branch from 4e914a1 to a23eae1 Compare June 30, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation, specs, examples, and repo guidance mcp mcp, jsonl, and http surfaces retrieval context, search, synthesis, and evaluation schemas json schemas and generated schema assets size: L 500-999 changed non-doc lines storage kb storage, migrations, schemas, and proposals tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant