Repository navigation
Conversation
…ience FIX158 fallback (option C), built to ship in 158 only if the audience-aware fix (#629) is not ready. Defty reads with the asker's access, so a reply in a public room named a restricted task that the member and guest reading it get 404 on. Now, where anyone but the asker can read the conversation, Defty runs nothing (no reads, no action drafts) and replies once: "I can't answer here: other people can read this conversation, and my answer could include things not all of them can see. Ask me in a direct message." Readers are the conversation's active members and, for an unarchived public room, every active non-guest workspace member. Defty never counts; an agent counts while its employee is active. A followed thread turn stays silent, a redelivered job posts once, and an unknown conversation counts as shared. A 1:1 DM, or a room only the asker reads, answers as before. DEFT_DEFTY_SHARED_ANSWERS=on restores answers in shared conversations. The API test runner sets it so the reply suites keep testing Defty's room logic; defty-dm-only-db tests the stop-gap with it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fallback only. Do not merge unless 158 ships without #629. This is option C for FIX158. Merge it only if the audience-aware fix (#629) isn't merged in time.
The defect: in a public room, Defty's threaded reply named a restricted task. The member and the guest who read it get 404 on the task itself. Defty reads with the asker's access, but answers to everyone who can read the conversation.
With this change, where anyone but the asker can read the conversation, Defty doesn't run. That covers a room, a thread in a room, a group DM and a DM between two people. It makes no reads and no action drafts, and replies once: "I can't answer here: other people can read this conversation, and my answer could include things not all of them can see. Ask me in a direct message."
DEFT_DEFTY_SHARED_ANSWERS=onrestores answers in shared conversations, leak included. It is documented in.env.example. The API test runner sets it, so the existing reply suites keep testing Defty's room logic.defty-dm-only-dbtests the stop-gap with it off.Tests:
defty-dm-only-dbcovers rooms, group DM, DM with a person, a thread, a followed turn, redelivery, the switch, a 1:1 DM, a room only the asker reads, and a DM whose other person left. It passes locally.Created with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code