docs: verify DNS/reconnect, revise encoding scope, document protocol traps (TODO-059,062,063,070)

Mark TODO-059 (auto-reconnect) and TODO-062 (DNS chain) as verified
complete with evidence. Revise TODO-063 from implementation to
verification task (tsclientlib handles encoding). Create protocol
implementation traps doc with 13 traps from YaTQA/ReSpeak/TeaSpeak.
This commit is contained in:
Edison Jwa
2026-06-11 14:42:32 +09:00
parent 008128defc
commit 475f6e0603
2 changed files with 163 additions and 4 deletions
+24 -4
View File
@@ -469,8 +469,18 @@
- **Priority:** P2
- **Source:** external-research §2 (ReSpeak)
- **Description:** tsclientlib explicitly notes auto-reconnect is "not yet there." Chanora must build this independently.
- **Evidence:** `core/chanora_core/src/lib.rs:1722-2123` — Supervisor with:
- Exponential backoff: `BACKOFF_SCHEDULE = [1, 2, 5, 15, 30, 60]` seconds
- Watchdog: 5s interval, 4s probe timeout, 3 max misses
- Network state awareness: pre-charges watchdog on offline, resets on online
- Audio re-attachment via `sup_inner` after successful reconnect
- Cancellation via `cancel_rx` oneshot on user disconnect
- Broadcasts `SessionEvent::Reconnecting { attempt, delay_secs }` to UI
- No max attempt limit (indefinite retry — correct for voice client)
- Cross-verified against ReSpeak §1.10 (exponential backoff for packet timeouts)
- **Effort:** L
- **Dependencies:** None
- **Status:** VERIFIED COMPLETE — supervisor with exponential backoff, watchdog, network awareness (2026-06-11)
### TODO-060 — Extract server error codes from YaTQA for error handling
- **Priority:** P3
@@ -494,15 +504,25 @@
- **Priority:** P1
- **Source:** yatqa-offline-reference §8.5
- **Description:** YaTQA documents the full DNS resolution order: SRV `_ts3._udp` → SRV TSDNS → TSDNS TCP port 41144 → DNS AAAA/A. First successful resolution wins, NO fallback on connection failure. Critical for connection reliability.
- **Evidence:** `crates/chanora_resolver/src/lib.rs:178-387` — Full chain implemented:
- Direct DNS resolution (`resolve_dns`, line 594)
- TSDNS SRV resolution (`resolve_tsdns_srv_candidates`, line 414)
- TSDNS TCP resolution (`resolve_tsdns_tcp_candidates`, line 454)
- First-wins semantics with `return Ok(resolution)` on first success
- No fallback on failure (errors accumulate, bail at end)
- Cross-verified against YaTQA §8.5 resolution order
- **Effort:** M
- **Dependencies:** None
- **Status:** VERIFIED COMPLETE — full resolution chain implemented (2026-06-11)
### TODO-063 — Handle TS character encoding quirks (UTF-8 vs UCS-2 vs CESU-8)
### TODO-063 — Verify tsclientlib encoding handling (UTF-8 vs UCS-2 vs CESU-8)
- **Priority:** P1
- **Source:** yatqa-offline-reference §1.3
- **Description:** TS claims UTF-8 but uses UCS-2 (BMP only). Mobile apps use CESU-8. Chanora must handle encoding conversion to avoid display bugs with nicknames, channel names, and messages containing characters outside BMP.
- **Effort:** M
- **Dependencies:** None
- **Description:** TS claims UTF-8 but uses UCS-2 (BMP only). Mobile apps use CESU-8. Server 3.2.0+ adds partial emoji support. tsclientlib/tsproto delivers Rust `String` (UTF-8) via `str::from_utf8()` at the protocol layer (ReSpeak §1.8.3 confirms: "Command string encoded in UTF-8"). If encoding bugs exist, the fix belongs in the EdisonJwa/tsclientlib fork, not in chanora_protocol.
- **Verification:** Confirm tsclientlib handles UCS-2 correctly. Document encoding behavior in protocol-implementation-traps.md (TODO-070).
- **Effort:** S (verification + documentation)
- **Status:** Scope revised from implementation to verification (2026-06-11)
- **Dependencies:** TODO-070 (protocol traps doc)
### TODO-064 — Implement client-side anti-flood point awareness
- **Priority:** P2