|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 2.1.4 - 2026-05-10 |
| 4 | + |
| 5 | +**Patch: Codex review follow-ups on v2.1.3 (PR #28).** Two real |
| 6 | +reliability holes that the automated Codex bot caught right after |
| 7 | +v2.1.3 merged. |
| 8 | + |
| 9 | +### Fixes |
| 10 | + |
| 11 | +- **P1 — drain inbox queue on `EV_ERROR`**, not just `EV_DONE`. |
| 12 | + v2.1.3 added a FIFO inbox queue on `comp.storage` so messages |
| 13 | + that arrive while a turn is in flight aren't lost. The queue |
| 14 | + drained one entry per `EV_DONE`, but failed turns emit |
| 15 | + `EV_ERROR` (and `EV_STATE: idle`) without calling |
| 16 | + `_drain_inbox_one()`. So a queued message after an errored turn |
| 17 | + sat in storage indefinitely until a later successful turn |
| 18 | + happened to fire `EV_DONE`. Fix in |
| 19 | + `td_component/tdpilot_api_extension.py::_handle_event` — |
| 20 | + `EV_ERROR` now drains too. Tests: |
| 21 | + `tests/test_v214_codex_followups.py::test_p1_*`. |
| 22 | +- **P2 — safety net for the send-button gate when WS drops.** |
| 23 | + v2.1.3 moved the send-button re-enable from the `/send` fetch |
| 24 | + resolution onto the WebSocket-driven `setAgentStatus()` call. |
| 25 | + If the WS dropped between `/send` and the terminal status |
| 26 | + event, `awaitingTurnEnd` stayed `true` and the button was |
| 27 | + permanently disabled — the user was locked out of the chat |
| 28 | + until they reloaded the page. Fix in |
| 29 | + `td_component/tdpilot_api_chat.html`: |
| 30 | + - **90s safety timer** (`TURN_END_SAFETY_MS`) — a hard cap on |
| 31 | + how long the gate can pin the button. If the timer fires |
| 32 | + before a status event arrives, the button re-enables and the |
| 33 | + UI surfaces "idle (timeout)". |
| 34 | + - **`ws.onopen` reset** — every reconnect clears |
| 35 | + `awaitingTurnEnd` so a turn that was in flight when the WS |
| 36 | + dropped doesn't keep the button locked. If the runtime is |
| 37 | + genuinely still busy, the next status event re-disables; |
| 38 | + if the user fires a message while the runtime is busy, the |
| 39 | + v2.1.3 FIFO inbox queue catches it (no message lost). |
| 40 | + - Centralised `clearAwaitingTurnEnd()` helper — resets the |
| 41 | + flag, the timer, AND the button's `disabled` attribute in |
| 42 | + one call so future call sites can't forget the timer. |
| 43 | + Tests: `tests/test_v214_codex_followups.py::test_p2_*`. |
| 44 | + |
| 45 | +### Context |
| 46 | + |
| 47 | +Both bugs were caught by [Codex's automated review on PR #28](https://github.com/dreamrec/TDPilot_deepseekv4/pull/28). |
| 48 | +Both were graded P1/P2 by the bot and both are real — the |
| 49 | +v2.1.3 fixes regressed reliability on edge paths that the new |
| 50 | +queue + gate introduced. v2.1.4 closes them. |
| 51 | + |
3 | 52 | ## 2.1.3 - 2026-05-09 |
4 | 53 |
|
5 | 54 | **Security hardening + chat-pipe queue + path harmonization for |
|
0 commit comments