Repository navigation
Description
Summary
When a user tries to access an agent via a public link or a channel (Telegram, Slack, WhatsApp) without permission, the system creates an access request and tells them: "You'll be notified once the agent owner responds." That notification is never sent. Users must proactively retry the conversation to discover their status has changed — they get no feedback on approval or denial.
Context
Research into the access control flow reveals three related gaps:
-
Broken notification promise —
routers/public.py:457andadapters/message_router.py:420both tell users they'll be notified when the owner responds. Thesharing.py:decide()handler only updates the DB row; it fires no outbound message. -
Silent denial — Denied users receive zero feedback. Their request silently disappears from the pending list. The user who was told "I'll let you know" never hears back.
-
No status inquiry — There is no
/statusor/requestcommand for channel users to check whether their pending request is still open.
Affected surfaces:
- Public link chat (
routers/public.py) - Telegram (
adapters/telegram_adapter.py—/loginflow) - Slack (
adapters/slack_adapter.py— DM verification flow) - WhatsApp (
adapters/whatsapp_adapter.py—/loginflow)
Key files:
src/backend/routers/sharing.pylines 208–274 —decide()endpoint that processes approval/denial (no notification sent)src/backend/adapters/message_router.pylines 410–425 — creates access request, sends pending message with unfulfilled promisesrc/backend/routers/public.pylines 457–460 — same unfulfilled promise on web
Acceptance Criteria
- When an owner approves an access request, the user receives a notification on the channel they used to request access (Telegram DM, Slack DM, WhatsApp message, or email for public links)
- When an owner denies an access request, the user receives a clear message explaining their request was not approved
- The pending-state message no longer makes a promise that can't be kept (or the promise is now fulfilled)
- Telegram and WhatsApp users can send
/statusto check whether their access request is pending, approved, or denied - Notifications are sent via the same adapter that handled the original request (channel routing preserved)
Technical Notes
The sharing.py:decide() handler at line 208 knows: agent_name, approved/denied decision, the request row (with channel field and requester email). The notification dispatch should look up the user's channel identity from telegram_chat_links / slack_channel_agents / whatsapp_chat_links by email and dispatch via the appropriate adapter.
For public link users (no persistent channel identity), send an email notification instead.
Consider adding a notified_at column to access_requests to prevent double-sends on retries.
Activity
vybe commentedon Jul 3, 2026
Groom note (2026-07-03): partially superseded by #951, which shipped fire-and-forget approval notifications on the requester's originating channel (telegram/slack/whatsapp). Remaining scope if this graduates from incubation:
routers/public.py) is still unmet./status-style command for a channel user to check a pending request.vybe commentedon Sep 24, 2026
Ruling 2026-09-24 (trinity-enterprise#564): the denial-feedback / public-link residual becomes an event on the daily personal report rail (trinity-enterprise#702), not a fourth one-off path. Stays incubating until that rail exists.