Skip to content

Commit b9df976

Browse files
ernadoclaude
andcommitted
docs(roadmap): mark Phase 6 complete
Errors, flood-wait/rate-limiting and context-cancellation done; reconnect is transparent and migration is surfaced via AsChatMigrated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ef22230 commit b9df976

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

docs/roadmap.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,23 @@ Deferred within Phase 5: payment answers
148148

149149
## Phase 6 — Errors, rate limiting, resilience
150150

151-
- ☐ Complete `tgerr` → Bot API code mapping (`errors_map.go`)
152-
- ☐ Flood-wait retry middleware (`tgerr.AsFloodWait`) + proactive limiter
153-
- ☐ Context-cancellation semantics (return wrapped `ctx.Err()`)
154-
- ☐ Reconnect/migration behavior surfaced sanely to callers
151+
**Done** on `main`. See `errors_map.go`, `errors.go`, `ratelimit.go`.
152+
153+
-`tgerr` → Bot API mapping completed: a ~50-entry table of verbatim official
154+
descriptions (`errors_map.go`, mirroring telegram-bot-api `Client.cpp`), plus
155+
the server's code-normalization (sub-400/404 → 400, SCREAMING_CASE 403 → 400)
156+
and prefix/casing fallback for unmapped errors. Helpers `AsFloodWait`,
157+
`AsChatMigrated`, `Code`.
158+
- ☑ Flood-wait retry + proactive limiter: opt-in `Options.FloodWait`
159+
(+ `MaxFloodWaitRetries`) and `Options.RequestsPerSecond` (+ `RequestBurst`),
160+
wired as client invoker middlewares via `gotd/contrib`
161+
(`floodwait`/`ratelimit`). Off by default.
162+
- ☑ Context-cancellation semantics: `asAPIError` passes `context.Canceled`/
163+
`DeadlineExceeded` through unchanged (even when RPC-wrapped) so callers can
164+
`errors.Is` on `ctx.Err()`.
165+
- ◐ Reconnect handled transparently by the gotd client + gaps manager; group →
166+
supergroup migration is surfaced via `AsChatMigrated`. A connection-state
167+
callback is deferred to Phase 7 polish.
155168

156169
## Phase 7 — Multi-bot, server, polish
157170

0 commit comments

Comments
 (0)