Check that the app knows the words it says it knows - #44
Merged
Conversation
`vocabulary.ts` is a list of words with meanings attached and `describe.ts` reads them: typing what you want and getting a sound is the thing this app does that nothing else does. Seven hundred lines, and nothing checked any of it. Every entry in those tables is a promise that saying that word changes the sound in a particular direction. A word that has stopped reaching what it names is the same failure as the soundfont path that fetched samples nothing played -- a listed capability that quietly does nothing -- and worse, because there is no way to tell from outside. A synonym that broke looks like a synonym the app was never going to know. Fifteen tests, sweeping every entry rather than sampling: every word is understood rather than handed back as nonsense, every synonym reaches its voice, and each of size, length, place, push and level moves its own axis in the direction its number says. Negators cancel, amount words scale, joining words ask for both voices, unknown words come back, filler does not. Two things the writing of it turned up. The push table sets the dirt rather than adding to it, and the first version of this asked that every push word drove the voice harder than it went on its own. Three failed -- "smooth", "mellow" and "warm", at 0.05, 0.05 and 0.2 against a hit already dirtier than that. They were right and the test was wrong: "a smooth hit" is a hit with the dirt taken off, and a word that could only ever add would have no way to say so. The synonym sweep cannot catch a word being renamed. It reads every entry in the table and asks the describer to find it in the same table, so both sides move together and it passes while the word somebody would type has stopped working -- checked by renaming one and watching it not notice. Nine everyday words are spelled out instead, and those do catch it. Verified by breaking three things: a renamed synonym fails the spelled-out words, never consulting the length table fails two, and negators that stop cancelling fail one. 283 unit tests, 88 browser tests, suite still under ten seconds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ux1kydvUkLRoMbHp82ofDi
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vocabulary.tsis a list of words with meanings attached anddescribe.tsreads them. Typing what you want and getting a sound is the thing this app does that nothing else does — 700 lines, and nothing checked any of it.Every entry in those tables is a promise that saying that word changes the sound in a particular direction. A word that has stopped reaching what it names is the same failure as the soundfont path that fetched samples nothing played — a listed capability that quietly does nothing — and worse, because there's no way to tell from outside. A synonym that broke looks like a synonym the app was never going to know.
Fifteen tests, sweeping every entry rather than sampling. Every word is understood rather than handed back as nonsense; every synonym reaches its voice; size, length, place, push and level each move their own axis in the direction their number says. Negators cancel, amount words scale, joining words ask for both voices, unknown words come back, filler doesn't.
Two things the writing of it turned up
The push table sets the dirt rather than adding to it. My first version asked that every push word drove the voice harder than it went on its own. Three failed:
They were right and the test was wrong. A
hitis already dirtier than that, and "a smooth hit" is a hit with the dirt taken off. A word that could only ever add would have no way to say so.A table-driven sweep cannot catch a word being renamed. The synonym sweep reads every entry in
SYNONYMSand asks the describer to find it — in the same table. Rename an entry and both sides move together, so it passes while the word somebody would actually type has stopped working. I confirmed this by renamingclangand watching the sweep not notice.Nine everyday words are spelled out as anchors instead, and those do catch it:
Verified by breaking three things
283 unit tests (was 268), 88 browser tests, suite still under ten seconds.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ux1kydvUkLRoMbHp82ofDi
Generated by Claude Code