已关闭
[TELEGRAM-01] Adapt Telegram bindings and ingress to canonical user events #36
urandon创建于  8月4日关闭于  28 天前
urandon
urandon成员
8月4日 创建

Parent and architecture

Outcome

Adapt Telegram transport identity, update deduplication, commands and attachments to the frontend-neutral canonical user-event ingestion contract after the core event spine is complete.

Estimate

  • 3 SP / 2 engineering days
  • Risk: medium

Scope

  • Map Telegram user/chat/topic identities to canonical external identities and frontend bindings.
  • Initialize the first authorized DM binding through the enrollment/membership policy; never derive tenant authority from a chat or user ID.
  • Translate a normal Telegram update into the generic append-user-event/run request from #22.
  • Translate /new into canonical session creation plus atomic binding switch.
  • Preserve Telegram update/message deduplication and transport metadata without using them as canonical session IDs.
  • Store Telegram files through canonical tenant/session/event attachment manifests.
  • Preserve DM-only and unsupported-update behavior.
  • Replace remaining Telegram context-epoch command/help semantics.
  • Update public Telegram adapter documentation and tests.

Verification

  • Duplicate Telegram updates create one canonical user event, run, attempt and dispatch.
  • Two /new commands create distinct sessions and retain prior history.
  • Two Telegram tenants cannot cross-bind or access another tenant's sessions/files.
  • Stale concurrent binding switches fail safely.
  • Transport failures do not leave a partial canonical event/run.

Acceptance criteria

  • Telegram is an adapter over the same ingestion contract used by the WebUI and synthetic frontend.
  • No Telegram ingress path creates or advances context_epoch.
  • Telegram remains authoritative only for Telegram transport facts.
  • This issue can be scheduled after the canonical core and WebUI auth slices.

Non-goals

  • Canonical event persistence implementation.
  • Assistant/tool finalization.
  • External cloud reachability edge #17.
  • Telegram result projection.
likedislike
urandonurandon成员
8月4日 修改了issue 的描述
urandonurandon成员
8月10日 关联了pull request:[SESSION-03] Implement frontend-neutral canonical user-event ingestion
urandon
urandon成员
29 天前 评论:

Started implementation on branch codex/telegram-01-canonical-ingress from merged main 48af703df753a2910b8655c709226c7c092433d7.

Initial work:

  • map the existing Telegram webhook/control-plane path onto the canonical ingress and session API contracts
  • retain update/message deduplication as transport facts
  • implement /new as idempotent canonical session creation plus atomic frontend binding switch
  • audit attachment ownership, tenant membership, stale fences, DM-only behavior, and remaining context-epoch semantics
  • extend focused tests and documentation before full Makefile-backed verification

SESSION-08 #27 remains blocked on this task, TELEGRAM-02 #37, and WebUI E2E #35.

likedislike
urandonurandon成员
29 天前 关联了pull request:TELEGRAM-01: route Telegram ingress through canonical sessions
urandon
urandon成员
28 天前 评论:

Completed in merged MR !34.

Merge commit: 7f2b517 (head reviewed and validated at 7767c591ad4b1da4fdefcc1c74dcf34e2024dddc).

Delivered:

  • ordinary Telegram messages now commit canonical user events/runs through the frontend-neutral session ingress;
  • Telegram transport IDs and file IDs are preserved as metadata, not product authority;
  • canonical attachment manifests/blob paths and durable dispatch wake are used;
  • /new keeps the atomic command transaction while switching the canonical binding;
  • command duplicate/mutation paths reauthorize active tenant membership and writable session participation;
  • /new uses expected binding revision CAS fencing;
  • legacy/canonical binding identities interoperate without duplicate bindings;
  • docs, unit/race, YDB integration, and multi-service tests updated.

Independent review found two P1s; both were fixed and the reviewer verified no remaining blockers. GitHub Actions run 32152021972 passed all jobs on the final reviewed SHA, including fresh YDB and local multi-service stand.

likedislike
urandonurandon成员
28 天前 关闭了 issue
urandonurandon成员
21 天前 添加了label:mvptelegram
urandonurandon成员
21 天前 关联了里程碑:MVP — Core platform (#6)