Skip to content

Feat/vep 0005 richer scopes#190

Merged
plind-junior merged 2 commits into
vouchdev:testfrom
jsdevninja:feat/vep-0005-richer-scopes
Jun 16, 2026
Merged

Feat/vep 0005 richer scopes#190
plind-junior merged 2 commits into
vouchdev:testfrom
jsdevninja:feat/vep-0005-richer-scopes

Conversation

@jsdevninja

Copy link
Copy Markdown
Contributor

What changed

Introduces structured ArtifactScope (visibility, project, agent) on Claim and Source, plus viewer-context filtering in kb.search, kb.context, vouch search, and vouch context. A new scoping module resolves viewer context (request param → env → config) and filters claim/source hits post-retrieval. JSON schemas regenerated; kb.capabilities advertises scoping.

Why

A single flat scope enum can't express which project or agent owns an artifact. With multi-agent KBs and deterministic sync, retrieval surfaces unrelated project claims and can't distinguish one agent's private notes from another's. VEP-0005 defines structured scopes so shared KBs stay usable.

Fixes #189

What might break

  • On-disk layout: No file moves. Existing scope: project strings still parse; artifacts rewrite to the object form on next write (lazy migration).
  • kb.search / kb.context behavior: Viewers with project or agent set see fewer hits (intentional). Default viewer (no project/agent) behaves as before.
  • JSONL kb.search result shape: Now matches MCP — {backend, viewer, hits} instead of a bare hit list. JSONL clients that expected an array need to read result.hits.
  • JSON Schemas: claim / source scope changed from enum string to object.
  • Not access control: private filters retrieval only; artifacts remain plaintext on disk.

VEP

VEP-0005: Richer scopes on Claim/Source (draft — should be accepted or marked in-progress before merge)

Tests

  • make check passes locally (lint + mypy + pytest)
  • New / changed behaviour has a test (tests/test_scoping.py; updated JSONL/embedding search tests)
  • CHANGELOG.md updated under ## [Unreleased]

@jsdevninja jsdevninja changed the base branch from main to test June 9, 2026 12:53
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

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: f5936c34-b494-4d5b-9d31-e75bbc4ab7c0

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 and usage tips.

@jsdevninja jsdevninja force-pushed the feat/vep-0005-richer-scopes branch from ff19d86 to f3ab51c Compare June 16, 2026 11:32
@plind-junior plind-junior merged commit 0d90564 into vouchdev:test Jun 16, 2026
6 checks passed
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.

Richer scopes on Claim/Source: (visibility, project, agent) retrieval filtering (VEP-0005)

2 participants