feat(server): extend _meta.vouch_hot_memory to all read-side kb.* tools#261
Open
jsdevninja wants to merge 5 commits into
Open
feat(server): extend _meta.vouch_hot_memory to all read-side kb.* tools#261jsdevninja wants to merge 5 commits into
jsdevninja wants to merge 5 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
bf18f7c to
4e914a1
Compare
4e914a1 to
a23eae1
Compare
a23eae1 to
01105b4
Compare
rebasing feat/hot-memory-universal-coverage onto main's kb.list_pages (frontmatter filters, vouchdev#234-adjacent) collided with this branch's own kb.list_pages (hot-memory envelope, vouchdev#225) — both touched the same function. the conflict resolution keeps both: filter_pages() runs first, then the result wraps in {"items": [...], "_meta": {...}} like every other kb.list_* method. test_page_filters.py predates that envelope and asserted on the bare list; update the two JSONL/MCP assertions to read result["items"].
…lugin.json _load_host_compat (vouchdev#237) has been reading openclaw.compat from openclaw.plugin.json since it shipped in 1.2.0, so kb.capabilities.host_compat has always reported {} — that manifest never carries a top-level "openclaw" key (test_manifest_carries_no_dead_dialect_fields enforces this; it's a dead field from the pre-2026.6 dialect). openclaw.compat.pluginApi has only ever lived in package.json, alongside openclaw.extensions. repoints _load_host_compat (renamed _PLUGIN_MANIFEST_PATH -> _HOST_COMPAT_MANIFEST_PATH for clarity) and the mirroring test at package.json. fixes test_capabilities_host_compat_matches_openclaw_manifest and test_capabilities_host_compat_present_and_nonempty, both failing before this change.
follow-up to cc64e81 — the host_compat field description changed in models.py (package.json, not openclaw.plugin.json) but the generated schema wasn't refreshed. scripts/gen_schemas.py brings it back in sync.
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.
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 fromkb.search/kb.context/kb.read_claimtokb.read_page,kb.read_entity,kb.read_relation, and allkb.list_*methods.kb.list_*responses are wrapped in{"items": [...], "_meta": {...}}with a deprecation note for clients that expected a flat list.kb.capabilitiesadvertises the contract underhot_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_entityorkb.list_pendinghad 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, andkb.list_pendingno longer return a bare list. They return a dict envelope with anitemskey._meta.deprecationdocuments the migration (result.itemsinstead ofresult). 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_memoryis 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 checkpasses locally (lint + mypy + ruff)tests/test_hot_memory.py, includingtest_hot_memory_universal_coverage)CHANGELOG.mdupdated under## [Unreleased]