Skip to content

feat(access): Isolate private Conversations - #2691

Merged
dcramer merged 1 commit into
mainfrom
feat/isolated-private-conversations
Nov 4, 2026
Merged

dcramer merged 1 commit into
mainfrom
feat/isolated-private-conversations

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Split out of #2672. Every private Conversation is fully isolated.

Rule between Conversations (policies/conversation-access.md, canAccessConversation in api/conversations/access.ts). The first match decides:

  1. Target in the requester's own tree → allow
  2. Target in another provider tenant → deny
  3. Public target → allow (read and find)
  4. Private target outside the requester's tree → deny, whoever the person is

A private requester never writes into a public Conversation. People who look at a private Conversation through the dashboard, API, MCP, or ACP keep participant access. That rule is kept separate from the rule between Conversations.

Behavior changes

  • messageAgent: a private top-level target is now always denied, also when the person is a participant. Only public agents can message each other. The private-reply prompt branch is gone, and so is the sender Actor lookup.
  • searchConversationEvents / readConversationEvent: main already followed rows 1–4. They now use the shared check. A missing Conversation now gets the same "not accessible" error as a private one, and the purged-transcript error shows only after access passes.

Not moved to the shared check

  • searchConversationBriefs / searchConversationMessages: these are already public-only and only in public Conversations. With no tenant, the Brief search covers every tenant. The policy lists this under Known gaps.
  • slackThreadRead and the plugin event reader (person-based canViewPrivateContent) were not changed.
  • Memory: fix(memory): Make all memory public #2684 makes memories public only.

--

View Session [Sentry]

A Conversation reads, finds, or messages another Conversation only when the
target is in its own tree or is public in the same tenant. Being a
participant of a private target no longer lets another Conversation reach
it. messageAgent and the event-read tools use one shared check, and a
missing Conversation gets the same error as a private one.
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 4, 2026 10:09pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

1 screenshot change — 1 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed

@dcramer
dcramer marked this pull request as ready for review November 4, 2026 22:23
@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 4, 2026
@dcramer
dcramer merged commit bc92e4a into main Nov 4, 2026
47 checks passed
@dcramer
dcramer deleted the feat/isolated-private-conversations branch November 4, 2026 23:39
dcramer added a commit that referenced this pull request Nov 5, 2026
…on access rule (#2672)

Proof of concept for "do you own #1591? it's got conflicts". The agent
finds the conversation that owns the PR, checks that conversation's
state, and messages it.

**searchAgents** replaces `listAgents` (hard cutover). With no args it
returns the same agents as before. New inputs:
- `scope`: `relatives` (default) or `top_level`. A child agent cannot
use `top_level`.
- `conversation_ids`
- `query`: matches the task or title for relatives. For `top_level` it
matches the latest Brief (full-text) or the title.
- `include_archived`
- `limit`
- `annotation`: a linked resource key such as `#1591`.
It finds the conversations that created, changed, or read that resource,
also through their child agents. The Brief, message, and agent searches
share one annotation key filter.

`top_level` returns only **public** root Conversations in the tenant of
the requester. It never returns a private one. Rows include status,
title, Brief summary, and dashboard link.

`messageAgent` and the event-read tools keep the rule they have on
`main`. The conversation access rule (isolated private Conversations)
moved to #2691.

Not done yet, so this is a draft:
- An eval for the PR-owner flow. The agent should call `searchAgents`
with the PR `annotation`, then ask, then `messageAgent`. When the
current conversation owns the PR, it should not call `searchAgents`.
- Slack permalinks on top-level rows.

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A0c58b0c6675a6c949e0c1d0d6137ddd0 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A0c58b0c6675a6c949e0c1d0d6137ddd0)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A0c58b0c6675a6c949e0c1d0d6137ddd0/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: David Cramer <[email protected]>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — c591bc75 Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant