Skip to content

feat(core,cli,server,mcp): recall min_trust filter and trust_tier field (#1651) - #1661

Merged
ajianaz merged 1 commit into
developfrom
feat/recall-min-trust-1651
Nov 4, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/recall-min-trust-1651

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

What

  • Optional min_trust (human | agent | external | untrusted, lowercase) on recall for CLI (--min-trust), POST /recall and MCP uteke_recall. An invalid value is a 400 / validation error.
  • Each memory result carries trust_tier, the lowercase string of TrustTier::of(memory): the same string the provenance report writes in JSON and min_trust takes. The MCP text lines show tier <x>. Unified/pack results carry it too; documents have no tier and are dropped when min_trust is set.
  • The filter runs before the limit, reusing the window-widening fetch from recall: make --strict filter on vector similarity, add an additive similarity field #1650 (candidate passes do not count as recalls).
  • Omitting min_trust changes nothing.
  • Docs: CLI reference, configuration, MCP, skill copies, CHANGELOG, generated API reference. They state that this filters the provenance tier only, a different axis from any future trust state, and that author_type is self-declared, so it is a convenience filter and not a security boundary.

Why

Closes #1651. A caller that wants only human-stated facts had to filter client-side. Wire names agreed in uteke-cloud#460 (Amendment 3); the tier table is unchanged (Human = author_type human AND source_type user).

Testing

  • Core: a store with one memory per tier, each min_trust value returns the expected set; trust_tier on each result matches TrustTier::of; limit 1 with min_trust=human still returns the human note that ten agent notes outrank; omitting it is byte-identical; invalid values rejected.
  • HTTP and MCP tests for the filter and the trust_tier/tier output.
  • cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, cargo test --workspace pass locally; docgen output committed.

…ld (#1651)

`min_trust` (human|agent|external|untrusted, lowercase) on CLI, HTTP and
MCP recall keeps results whose provenance tier is at least that, applied
before the limit through the shared window-widening fetch. Every memory
result carries `trust_tier`, the same lowercase string the provenance
report emits. Omitting it changes nothing. It filters the provenance tier
only, not a trust state, and author_type is self-declared, so it is not a
security boundary; documents have no tier and are dropped when it is set.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 090ce13 into develop Nov 4, 2026
15 checks passed
@ajianaz
ajianaz deleted the feat/recall-min-trust-1651 branch November 4, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

recall: optional min_trust filter and trust_tier field on results

1 participant