Skip to content

Friend DM: a shared Bot's reply to the grantee is silently denied (grantee's Bot not shared back), never held or delivered #272

Closed

Description

@Birfy

Summary

A person writes to a friend's Bot that was shared with them. The Bot answers, but the answer never reaches the person. Nothing is held, and neither side sees an error. Because B's Chief was not shared back to A, A cannot address it, so the reply is denied without any notice.

Environment

Repro

  1. On B, open SelfA1220's Chief in the sidebar (it has the Friend's Bot marker).
  2. Type Hi from B, what's 2+2? and send it.
  3. Wait at least 1 minute, then reload B.

Actual

  • B: the line shows as B's own right-aligned bubble and is not held (correct, Direct chat with a friend's Bot: my own typed line is sent as Chief and held for my approval (regression of #179 in DMs) #227). A "Weighing the options…" row with the Bot's avatar appears, then disappears after about 20 s with no reply. After a reload, B's chat still has only B's line. Screenshot: B's DM with SelfA1220's Chief after the waiting row went away, showing only B's line.
  • A: the line goes into A's own Chief main chat, mixed in with A's own conversation, shown as the person (typedBy SelfB1220). A's Chief answered 4. there (turn completed, deepseek-v4-flash). That answer was not held: A has no approval card, and flybot/approvals and social/approvals are both empty on A and B. It never reached B. Screenshot: A's Chief chat showing B's line and then 4..
  • The web.log files have no warning. A's state.exchanges has only the inbound request and no reply.

Expected (design)

Hunch (code read on ab723ac, not verified)

  • The inbound line arrives with source.remote.handle = @chief.selfb1220.home (B's talk-through Chief). turns.js L443 answer() → rt.flybotReplyRemote → hooks.js L984 send({ to: { kind: 'remote', handle: '@chief.selfb1220.home' }, role: 'reply', via: 'auto-reply' }).
  • reach() allows it: A's Chief has a grant whose grantee is @chief.selfb1220.home.
  • The social send middleware (plugins/social/src/social.js ~L1025) then calls remoteBot(msg.target.handle). That only knows Bots granted to A (list_remote_bots). B's Chief was never shared back, so the lookup is undefined, and the middleware returns { action: 'deny', reason: '@chief.selfb1220.home is not a Bot of a friend on Bot Social' }. This happens before the hold branch.
  • replyRemote only .catch()es thrown errors. A deny verdict resolves normally, so nothing is logged or shown. That would explain no hold, no card, no warning, and no reply.
  • A friend Bot's reply to a typed DM is held on its owner and no approval card ever shows (overlay hook crash, no in-chat card for the replying Bot) #254 and A friend Bot's reply the owner approved never leaves: Bot Social holds it a second time, on a card nobody sees #258 were tested with a setup where the replier could see the requester's Bot. With the default one-way per-Bot grant (no reverse grant), this path is never reachable. A reply addressed to the Bot that carried a request to a granted Bot probably needs to be allowed (and held), even when that Bot is not in Friends' Bots. The Auto-send toggle for that pair also needs a home, because A has no friend-Bot row for B.

Note (by design, not part of this bug)

The request landing in A's Chief's own chat follows turns.js L165 ("the turn stays in the Bot's own chat, where the user sees it"). Still, it reads poorly: B's question and A's Chief's answer are mixed into A's own conversation, and A's sidebar has no entry for SelfB1220. The model's reasoning even assumed "the user does not see it." Worth a design look once the reply works.

Related: #254, #258 (closed; different root cause), #227, #138/#161 (no reverse grant), #273 (Bot sends to a friend's Bot refused), #275 (header of the inbound line).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions