Commit Graph
2 Commits
Author SHA1 Message Date
70f059e5ff [5cab5a17] Relocate mount_telegram_miniapp_auth out of roboco/api/routes/telegram.py (#786)
* [5cab5a17] refactor(api): relocate mount_telegram_miniapp_auth from routes/telegram.py into app.py

Move the bare top-level helper (a conditional router mount + LoginRateLimiter
registration, not route-handler logic) out of roboco/api/routes/telegram.py
into roboco/api/app.py as private _mount_telegram_miniapp_auth, next to its
sole call site. This resolves pr_gate finding 276ae32f: classify_python.py
flags any non-@router-decorated top-level function as 'helper', which
.roboco/conventions.yml forbids under roboco/api/routes. The sibling
mount_cloud_auth already lives outside routes/ in roboco/api/auth/routes.py,
which is the same architectural precedent.

telegram.py: removed the function, the now-unused LoginRateLimiter import,
and the TYPE_CHECKING FastAPI block; updated docstring/comment references.
app.py: added _mount_telegram_miniapp_auth before create_app, imported
webapp_auth_router from routes.telegram and LoginRateLimiter from auth.login_limit.
test_telegram_webapp_auth.py: updated import and three call sites.

No route paths, schemas, or observable behavior changed.

* [5cab5a17] docs(map): reflect mount_telegram_miniapp_auth relocation into app.py

Update the agent-facing codebase map (docs/map/api-routes-schemas.md,
regenerated into _complete_map.md) for the placement-only refactor in
PR #786 / task 5cab5a17: mount_telegram_miniapp_auth moved out of
roboco/api/routes/telegram.py into roboco/api/app.py as private
_mount_telegram_miniapp_auth. Route-table row, Key Endpoints, Entry Points,
Config Flags, and the Changes-Since-Baseline note (Batch C trailing sentence
+ a new task 5cab5a17 entry) now point at the new location/name. No
route/schema/behavior change to document — placement only.

---------

Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech>
Co-authored-by: Backend Documenter <be-doc@roboco.tech>
2026-08-01 18:54:08 +00:00
c40a7a39c3 feat: Telegram V3 — Mini App cockpit (initData auth + /tg surface) (#554)
* feat(telegram): Mini App auth — initData validation mints the cloud-auth session cookie

* feat(panel): /tg Mini App cockpit — approvals, inbox, read-only board, A2A chat

* fix(telegram,panel): unconditional webapp-auth rate limit, future-dated initData rejection, anchored /tg matcher

* docs(map,rag): Telegram Mini App auth route, initData validator, (tg) surface

---------

Co-authored-by: Renn F <rennf93@users.noreply.github.com>
2026-07-18 02:47:59 +02:00