fix(02-bot-skeleton-initdata-security): WR-03 honest rotate-on-new invariant + best-effort post-mint reconciliation (fold in IN-01b dead branch, IN-01c Phase-4 notes)

This commit is contained in:
araharah-executor
2026-10-22 20:21:11 +08:00
parent 3ea1fdd932
commit af691ae40e
3 changed files with 118 additions and 15 deletions
+5 -4
View File
@@ -16,10 +16,11 @@
* posts a verbatim Telegram.WebApp.initData string — capped at 4 KB
* (WR-01: over-cap bodies are rejected 413 before any parsing; real
* initData is ≪ 1 KB, so this touches no legitimate client); only an
* HMAC-validated,
* fresh identity obtains a one-time opaque session token (D-06). Rotation
* of any prior token for the chat is mintSession's own invariant (D-07) —
* this endpoint adds no extra branch and no extra write path (T-02-06).
* HMAC-validated, fresh identity obtains a one-time opaque session
* token (D-06). Rotation of any prior token for the chat is mintSession's
* own invariant (D-07 — best-effort under KV eventual consistency, see
* sessions.ts) — this endpoint adds no extra branch and no extra write
* path (T-02-06).
* Anything else → 404.
*
* D-14: the ONLY log statements are category-only — malformed/tampered/stale