fix(chat): stop painting what YouTube removed, and retire the local word filter

TASK 49 is retired (creator ruling): YouTube owns chat moderation. Its blocked-words filter and
hold-for-review run upstream of `liveChatMessages.list` — held messages are never returned
(https://stackoverflow.com/questions/74511524/) — so a second local list would duplicate a switch
the creator already owns, with a second set of false positives and a second support surface.

What we actually owed the platform, and had wrong:

- The parser added every item to the overlay. A deleted message arrives as a `tombstone` carrying
  no text at all ("it has since been deleted … only liveChatId, type and publishedAt are present" —
  https://developers.google.com/youtube/data/live/reference/rest/v3/liveChatMessages), so every
  deletion rendered as a BLANK chat row. `hasDisplayContent:false` messages and chat-mode events
  did the same.
- Deletion events (`messageDeletedEvent`/`messageRetractedEvent`/`userBannedEvent`) are documented
  but have not been delivered to clients for years (https://stackoverflow.com/questions/44346893/),
  so nothing is built on them; they are skipped if they ever arrive.
- Found while testing: Super Chat read `displayString`, but YouTube's field is `amountDisplayString`
  — every amount silently fell back to a recomposed string, which mangles non-dollar locales. The
  model's own comment said this was the reason the field exists.

Test: `ChatModerationParseTests` — tombstone, no-display-content, chat-mode events all produce no
row; a real Super Chat still parses its pre-rendered amount (constraint 4: reward fields are never
reinterpreted).

Docs: TASK 49 marked retired with the citations, the rule recorded in decisions.md, HANDOFF updated.
verify.sh: 550 passed, 0 failed, 0 warnings.
This commit is contained in:
2026-11-05 08:39:46 -08:00
parent 7bb1207fb2
commit a814bcd502
6 changed files with 171 additions and 4 deletions
+8
View File
@@ -209,6 +209,14 @@ Do not build these; each was explicitly ruled out.
never forced. The original objection was webcam background removal (ML model, lighting, support
weight); none of it applies to a clip the creator supplied. The webcam still gets the shipped ONNX
path, and NVIDIA-only effects stay out.
- **Chat profanity filtering is YouTube's job (2026-11-05, creator ruling):** TASK 49's local wordlist is
retired. YouTube's blocked-words filter and hold-for-review both run upstream of `liveChatMessages.list`
(held messages are never returned: <https://stackoverflow.com/questions/74511524/>), so a local list would
duplicate a switch the creator already owns. The rule that replaces it: **never render what YouTube has
removed** — a deleted message arrives as a `tombstone` with no text
(<https://developers.google.com/youtube/data/live/reference/rest/v3/liveChatMessages>) and is skipped, as are
`hasDisplayContent:false` messages and chat-mode events. Deletion events are documented but not delivered
(<https://stackoverflow.com/questions/44346893/>), so no client-side moderation machinery is built on them.
- Virtual camera output — a different product and a device-driver swamp; our output is one
YouTube stream.
- Replay buffer, stream clipping, multi-destination restreaming, an in-app bug reporter, and an