Feat/vouch trust#248
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 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6fe1f2157
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d6fe1f2 to
3569804
Compare
|
@plind-junior please review |
What changed
Every dict-shaped
kb.*response now includes read-only_meta.vouch_trust: {remote, caller_kind, auth_subject}. A newsrc/vouch/trust.pymodule holds the trust model and contextvar wiring; JSONL (handle_request), MCP tools (wrapper on all FastMCP tools), HTTP/rpcand/mcp, and CLI--jsonoutput each set the appropriate preset before dispatch. README documents the block under the JSONL request/response section;CHANGELOG.mdupdated under[Unreleased].Why
Clients need to know the trust state a call was evaluated under — especially when they are talking to a remote, bearer-gated HTTP deployment rather than a local stdio MCP session. This mirrors gbrain's server-attached
_metapattern: opt-in to render, never authoritative over the KB payload. Closes #233.What might break
No on-disk layout changes. No review-gate or audit-log changes.
Wire-shape nuance: array-shaped read results (
kb.list_claims,kb.audit, etc.) are unchanged — arrays cannot carry_metainline, so trust metadata applies to dict-shaped results only. Clients that assumedresultwas always a bare array are unaffected; clients that parse_metaon dict responses will see a new sibling field under_meta.vouch_trust.VEP
Not required — additive response metadata only; no new
kb.*methods, no object-model or on-disk changes.Tests
make checkpasses locally (lint + mypy + pytest)tests/test_trust.py— JSONL read coverage, MCP HTTP/stdio presets, CLI--json, bearer fingerprint)CHANGELOG.mdupdated under## [Unreleased]