Skip to content

fix(api): Require read access for conversation read reports - #2876

Merged
BYK merged 1 commit into
mainfrom
fix/read-report-access
Nov 7, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/read-report-access

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Follow-up to #2828 for Warden's finding: PUT /api/conversations/:id/read-position had no access check.

Any signed-in viewer could store a read position on any Conversation. The endpoint also answered 200 for a private Conversation that exists and 404 for one that doesn't, so it showed which private Conversations exist. #2828 added unreadReply to the response, but the missing check is older: before that, the route called markConversationRead directly with no guard.

reportConversationRead now reads the viewer's access first, the same way the detail route does, and returns the same 404 as a missing Conversation when access is denied. This follows policies/conversation-access.md: a write needs read access, and "no access" gives the same error as "not found".

Access rule: the gate is canViewPrivateContent (a participant, or anyone for a public Conversation), not isParticipant. A non-participant who opens a public Conversation can read the transcript, so their reporter keeps working instead of starting to get 404s. Mark as unread and MCP markConversationRead still require isParticipant, because they only make sense for Conversations in your feed.

unreadReply: still computed for public non-participants. They can read the transcript, so it leaks nothing, and their feed doesn't include the Conversation anyway, so the flag changes nothing for them.

A private non-participant can still open the redacted detail. The dashboard reporter now gets a silent 404 there, and no client change is needed.

Tests: the read-position integration scenario now has a denied case. It checks a private Conversation the reader isn't in: the response matches the missing-Conversation 404 and no row is stored. The other read-position cases now use public Conversations, because their readers are not participants.

Checks run: typecheck, lint, the tests/integration/api/conversations and tests/integration/api/mcp suites (40 files, 134 tests), and the conversations-read-position and conversations-attention e2e specs (17 passed). This changes no UI, so there are no screenshots.

via @BYK.

--

View Session in Sentry

PUT /:conversationId/read-position stored a read position for any
signed-in viewer and answered 200 for any existing Conversation. It now
reads the viewer's access first and answers 404, like a missing
Conversation, unless the viewer may read the transcript (a participant,
or anyone for a public Conversation).
@vercel

vercel Bot commented Nov 7, 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 7, 2026 12:38pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

11 screenshot changes — 11 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Conversation Attachment Zoom · Desktop
Conversation Attachment Zoom · Desktop
Changed
Conversation Captured Memories Popover · Desktop
Conversation Captured Memories Popover · Desktop
Changed
Conversation Captured Memories Popover · Mobile
Conversation Captured Memories Popover · Mobile
Changed
Show 5 more changed screenshots
Conversation Details Watched Linked Work · Desktop
Conversation Details Watched Linked Work · Desktop
Changed
Conversation Details Watched Linked Work · Mobile
Conversation Details Watched Linked Work · Mobile
Changed
Conversation Event Log Virtual · Desktop
Conversation Event Log Virtual · Desktop
Changed
Conversation Long Transcript Touch · Mobile
Conversation Long Transcript Touch · Mobile
Changed
Conversations Sections Collapsed · Desktop
Conversations Sections Collapsed · Desktop
Changed

@BYK
BYK merged commit e487d6b into main Nov 7, 2026
45 checks passed
@BYK
BYK deleted the fix/read-report-access branch November 7, 2026 13:47

This branch was successfully deployed

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

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant