peppa/openspec/changes/archive/2026-11-13-pep-2-telegram-per-user/tasks.md
Асель 824ba56b74 PEP-2: Telegram per user — pairing from Settings, delivery by project access
- users.telegram_* replace the single global binding; one-time /start code
  per user (web Settings → Telegram, or peppa telegram pair <login>);
  a chat belongs to one user
- agent questions go to the project's owner and members who paired; an
  answer (button or reply) is accepted only from someone with access to
  the project; messages are closed for every recipient; /status is scoped
- CLI: telegram pair|status|unpair <login>, user ensure mock-<name>;
  dev stand pairs its test PM per user
- tests: several-users journey (bob without access, then as a member);
  70 e2e total, green
- BREAKING: the old global binding is removed; users pair again in Settings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 03:44:30 +05:00

13 lines
964 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tasks: PEP-2
## 1. Привязка и маршрутизация
- [x] 1.1 Поля Telegram у `users`; core: код привязки на пользователя, приём, отвязка, получатели вопроса, поиск вопроса по (чат, сообщение)
- [x] 1.2 Бот: рассылка получателям, проверка доступа на ответы и кнопки, `/status` по своим проектам, закрытие сообщений у всех
- [x] 1.3 Веб «Настройки → Telegram»; CLI `telegram pair <login>` / `status` / `unpair <login>`; dev-стенд
## 2. Проверка
- [x] 2.1 Тесты бота: привязка, два пользователя, участник, чужая кнопка; весь набор зелёный
- [x] 2.2 Выкатка (миграция, бот, веб), удаление глобальной привязки; `openspec validate`