docs(memory): record the gap tts-dev found in my served-page gate

They adopted the gate as tts-stack tools/gate_served_page.py and extended it in a
place that matters: my version would have passed a broken page.

A worklet lives inside a template literal, so a syntax error in it is invisible to
a parse of the enclosing script - it is just a string until addModule compiles it
at runtime, where it fails as a rejected promise and the page quietly falls back to
buffered playback or records nothing. Silent degradation, which is harder to notice
than a dead page rather than easier. They parse the worklet separately, and they
positive-controlled the whole thing against two deliberately broken pages rather
than assuming a gate that has only ever passed is not blind. The second control -
valid enclosing script, broken worklet - is the one my version fails.

The lesson on my own work is the useful part: I built a gate for the failure I had
just been shown and stopped at its boundary. The class is 'code that is a string at
parse time and code at run time'; an inline script is one instance and a
template-literal worklet is another. I checked the instance, not the class.

Also promotes the underlying rule to the index, since it was named twice tonight
from two unrelated directions: a check that reads an artifact as stored cannot see
a transformation that happens between storage and execution.
This commit is contained in:
vh
2026-09-15 08:29:25 -07:00
parent e113660b08
commit 8bc46e5132
2 changed files with 31 additions and 0 deletions
@@ -72,6 +72,33 @@ configured intent, not the running reality. Both check the INPUT to a transforma
and get reported as if they checked its OUTPUT. See
`2026-09-15-parakeet-stt-fv-ml1.md` for the ASR instance of the same shape.
## ⚠ My fifth gate had a GAP — tts-dev found it and fixed it
Adopted into tts-stack as **`tools/gate_served_page.py`** (`uv run tools/gate_served_page.py <url>`;
needs only curl-equivalent and node). But **my version would have passed a broken page**:
**A worklet lives inside a template literal**, so a syntax error in it is invisible to a
parse of the *enclosing* script — it is just a string until `addModule` compiles it at
runtime, where it fails as a **rejected promise**. The page then quietly falls back to
buffered playback, or records nothing at all on the capture side. **Silent degradation,
which is harder to notice than a dead page, not easier.** Their version parses the
worklet separately.
They **positive-controlled it** rather than assuming it worked — a gate that has only
ever passed cannot tell you it is not blind. Two deliberately broken pages, both exit 1:
the exact escape bug -> block 0 SYNTAX ERROR
broken worklet, valid script -> block 0 OK, worklet SYNTAX ERROR <- mine passes this
⚠ **Empty block list exits 2, not 0.** A page that suddenly has no inline script is a
different page or a broken build; passing there would make the gate a no-op exactly
when it matters most.
⭐ Lesson on my own work: I built a gate for the failure I had just been shown and
stopped at its boundary. The failure class is "code that is a string at parse time and
code at run time" — an inline `<script>` is one instance of it, a template-literal
worklet is another, and I checked the instance rather than the class.
## Host compose verified, not assumed
tts-dev claimed the host copy was byte-identical to the repo, "unlike voice-studio".