comments: cut the development log from the four largest offenders - #684
Merged
Conversation
Cut the discovery attribution ('reported by the Ukrainian run', 'found by the Italian fan-out run',
'the Polish run hit this and had to omit its own złoty') and the blast-radius tables, keeping every
rule and trap: longest-first magnitude ordering, the apostrophe in the trailing guard, the mark guard
following unspacedScript, why the connective is consumed on the unit path but generated on the
currency path, and why both halves of NOT_VERSION are needed.
Also removed a duplicated pair of lines about the percent signs.
185 of the remaining 345 are API docs for the ~30 SymbolData fields — specification, not narrative.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
The 67-line header was half a tabulation of pre-fix readings; what survives is the ordinal-period discriminator (lowercase follower = ordinal, uppercase or end-of-utterance = sentence period, and the year rule Croatian uses would destroy every utterance-final pause here), the four-way DUAL agreement and why slavicCountForm cannot serve it, and the numeral-gender repair. ⚠ Hit a real trap doing it: *tri*/*štiri* inside a block comment forms `*/` and terminates it, so the rest of the block parses as code. Typecheck caught it but pointed two lines past the cause. Now noted in CONTRIBUTING.md, and the replacement script asserts no candidate text contains `*/`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
The 107-line header — the largest single comment block in the repo — was mostly a tabulation of pre-fix readings and a post-change measurement. What survives: the ordinal detector's rule and the invariant it protects (no sentence-final pause lost; an ordinal before a capital is knowingly given up to hold it), why year-before-month must stay cardinal, why vowel harmony costs nothing, the deliberate omissions, and why × is an unshipped harmonic suffix rather than a word. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
Header 52 → 21: the corpus tabulation and the before-readings go; what stays is why the tokenizer skips these characters at all, that native ០-៩ outnumber ASCII so every pattern must match both, why the decimal point is removed rather than voiced, and why there is deliberately no clock rule. Also cut the currency block's account of an earlier wrong conclusion, keeping the two rules it established: US$ needs its own key because the tier refuses a sign after a Latin letter, and CN¥ is declared while bare ¥ is not because the sign is yen/yuan-ambiguous where the code is not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
Wrote a test to detect an accidental comment terminator, then found it cannot be made precise: 'no space before */' also flags legitimate comments ending 'text*/', and the pattern matches glob strings like "src/**/*.ts" that are not comments at all. Four false positives on clean code. The premise was wrong anyway. I justified the test by worrying it could pass silently at the tail of a file, but the text following an accidental terminator is always prose, which never parses as valid TypeScript — typecheck catches this reliably every time. A noisy guard gets disabled; the accurate note does not. CONTRIBUTING now says typecheck ALWAYS catches it, that the error points past the real cause and reads as an unterminated regex, and what to look for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
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.
Continues the standard set in #683 — write it the way you would if you were porting the file to another language — against the biggest remaining files. All four are token-identical to their originals; comments only.
slovenian/normalize.tscore/normalizeSymbols.tshungarian/normalize.tskhmer/normalize.tsRunning total across both PRs: 146 → 142 files, 16,610 → ~14,300 comment lines over 1:1.
What came out
Corpus tabulations of pre-fix readings (Hungarian's header listed a dozen wrong outputs with their IPA), post-change measurements ("355 of 1,995 utterances differ; periods went from 2,373 to 2,254"), discovery attribution ("reported by the Ukrainian run", "the Polish run hit this and had to omit its own złoty"), and accounts of earlier wrong conclusions (Khmer's currency block explained at length why a previous pass had recorded the yuan word as unsourceable).
What stayed
Every rule and every trap:
slavicCountFormcannot serve itnormalizeSymbols' longest-first magnitude ordering, the apostrophe in the trailing guard, the mark guard followingunspacedScript, and why both halves ofNOT_VERSIONare needednormalizeSymbolsdeliberately stopped at 345Measured the split: 185 of those lines are API documentation for the ~30
SymbolDatafields — four exponent positions, count-form selectors, prefix/suffix variants. That is specification a caller needs. Cutting it would make the module harder to use, not cleaner.A real trap found, now documented
Writing
*tri*/*štiri*in a block comment — markdown emphasis around a slashed alternative — forms*/and terminates the comment, so the rest parses as code. Typecheck caught it but pointed two lines past the cause, which made it look like a regex error.CONTRIBUTING.mdnow warns about it, and the replacement scripts assert no candidate text contains*/.224 test files / 3114 tests, typecheck clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr