Skip to content

Spoiler-free mode, HTTP hardening, and TTS underrun fix (1.6.0) - #5

Merged
xymeow merged 2 commits into
mainfrom
codex/readme-docs-wiki
Jul 15, 2026
Merged

Spoiler-free mode, HTTP hardening, and TTS underrun fix (1.6.0)#5
xymeow merged 2 commits into
mainfrom
codex/readme-docs-wiki

Conversation

@xymeow

@xymeow xymeow commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Ships Matchday Mod 1.6.0 — full bilingual notes in docs/releases/1.6.0.md.

Spoiler protection / 防剧透模式

  • Global persistent spoiler_free_mode preference with toggles on the device /setup page and the watcher-local page, plus a dedicated hot-update API (POST /api/match-setup/spoiler).
  • Suppresses every proactive Kalshi-derived alert (price moves, suspected goals, closing notices) while confirmed ESPN events, the probability bar, and the ticker continue as usual.

Reliability fixes

  • HTTP head-of-line blocking: the accept loop no longer awaits request handling. Previously one stalled POST body froze the server until reboot, and every spoken alert made it deaf for the whole playback. Now: concurrent per-connection handling, 45s watchdog, concurrency cap, listener auto-restart. Verified on device — a stalled POST no longer blocks other clients, and /api/status stays responsive through a 36-second speech.
  • Silent restarts: vendored rejection-safe listener (matchday/listen-safe) observes both connection promises at creation, ending the unhandled rejection aborts; lastAbort is consumed at boot so it only ever reports the immediately previous run.
  • TTS dropouts on long sentences: vendored streamer (matchday/tts-remote-safe) with a 1500ms buffer and 16-slot audio queue (the host pins 600ms and the default 8-slot queue halves the effective depth). Measured via the streamer's Ready traces: 2 mid-sentence underruns per long speech → 0 under normal load. Falls back to the host tts-remote on stock hosts.
  • Archives the Moddable SDK tcp.c race patch and analysis under host/sdk-patches/ (upstream ESP32: use-after-free panic in ECMA-419 TCP tcpReceive when a socket closes with data in flight (lwIP tcpip thread vs XS thread race) Moddable-OpenSource/moddable#1655, PR ESP32 419 TCP: marshal the teardown callback clear to the tcpip task Moddable-OpenSource/moddable#1656).

Testing

  • python3 -m unittest discover -s tools: 191 tests green, including new layout guards and an http-server-safe behavior suite (stalled-body isolation, watchdog reclaim, load shedding, error paths).
  • Release build of the mod is installed and soaking on the CoreS3.

🤖 Generated with Claude Code

xymeow and others added 2 commits July 14, 2026 14:35
- Spoiler protection: global spoiler_free_mode preference, phone/watcher
  setup toggles, dedicated hot-update API, and market-alert suppression
  semantics (docs/releases/1.6.0.md)
- Fix HTTP head-of-line blocking: requests are served concurrently with a
  45s per-connection watchdog, a concurrency cap, and listener auto-restart.
  Previously a stalled POST body froze the server until reboot and every
  spoken alert made it deaf for the whole playback
- Vendor a rejection-safe listener (matchday/listen-safe) so early peer
  resets can no longer become silent "unhandled rejection" restarts; consume
  lastAbort at boot so /api/status only reports the previous run
- Vendor the remote TTS streamer (matchday/tts-remote-safe) with a 1500ms
  buffer and 16-slot audio queue, removing audible mid-sentence dropouts on
  long speeches; falls back to the host tts-remote on stock hosts
- Archive the Moddable SDK tcp.c race patch and its analysis
  (host/sdk-patches, upstream moddable#1655 / PR moddable#1656)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Xiaoyi He <xymeow@users.noreply.github.com>
@xymeow
xymeow merged commit 5323d6d into main Jul 15, 2026
1 check passed
@xymeow
xymeow deleted the codex/readme-docs-wiki branch July 15, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant