Skip to content

comments: converge two repeated blocks — and the ± note was asserting the opposite of the truth - #709

Merged
christopherthompson81 merged 1 commit into
mainfrom
sweep-boilerplate
Aug 7, 2026
Merged

comments: converge two repeated blocks — and the ± note was asserting the opposite of the truth#709
christopherthompson81 merged 1 commit into
mainfrom
sweep-boilerplate

Conversation

@christopherthompson81

Copy link
Copy Markdown
Owner

You asked for consistency over letter-by-letter, so this is the one uniform pass: the ± note (25 files) and the NOT QUITE VERBATIM inventory note (5 files), each of which had drifted into several wordings.

Converging them turned up a defect the duplication had been hiding.

The ± note was asserting the opposite of the truth

Every copy asserted an ordering — "Runs BEFORE the + rule" — and then gave as its reason the fact that makes that ordering irrelevant: "± is a single character, so the + rule cannot see it." Both halves cannot be true.

The second one is. ± is U+00B1; + is U+002B:

/(^|[\s(])\+\s?(\d)/u.test("±5")      false

Kazakh is the proof by counterexample. Its ± rule runs after two + rules and has always been correct — which is exactly what exposed this: I wrote a check to verify the claim across all 21 files rather than trust it, and Kazakh failed. (Luxembourgish also flagged, but that was my detector not recognising named-constant regexes.)

So the ordering is free, and the note now says the thing that actually matters:

⚠ ± IS A SINGLE CHARACTER (U+00B1), NOT A +, so no + rule can ever match inside it. It needs its own rule or the sign is dropped in silence; ordering against the + rule is free.

That is the useful warning — an unclaimed sign is dropped, not misread, so it is invisible to every check that looks for a wrong reading.

Also dropped

  • "zero new sourcing" / "nothing is invented" — justification aimed at a reviewer of the original change, not at a porter reading the file;
  • "the FORM is the one every language that already read ± uses (bg/da/is/nb/ro/sv…)" — a survey of other languages, in files about Macedonian, Welsh, Japanese…;
  • "± IS NOW FREE, and it was not before this commit" (hu, pl) — a dangling reference to a commit nobody reading the file can find.

Kept — and deliberately not propagated

Four things were load-bearing but present in only some copies. Copying them everywhere would have been inventing claims about languages that never made them, so each stays exactly where it was:

kept where
SIGN names vs OPERATION names — ± marks a tolerance, not an addition af, ca, kk, cy
the same distinction, with Korean's own pair: 더하기/빼기 are operators, 플러스/마이너스 are signs ko
min comes from the register rather than from another rule, because this language has no true minus sign nl
wiki citations naming the sign word against the glyph tr, hu

NOT QUITE VERBATIM

Lost four lines of history and an anecdote about a Romanian word (Thérèseˈthrese) that appeared in files for five other languages. What remains is the fact: these letters are absent because the g2p has no rule for them, and native-inventory.test.ts measures that rather than trusting it.

Verification

Comment-only — emitted code byte-identical across all 32 files (--removeComments, both revisions, diff -r). Typecheck clean, 3118 tests pass.

One code finding, not fixed here

polish/normalize.ts runs s = s.replace(/±/gu, " plus minus ") twice, at lines 367 and 373, each with its own comment block. The second is dead — no ± survives the first. Pre-existing on main; a separate one-line PR follows, so this one keeps its byte-identity guarantee.

… the opposite of the truth

The ± note appeared in 25 files and the NOT QUITE VERBATIM inventory note in
5, each drifting into several wordings. Converging them turned up a defect
that the duplication had been hiding.

THE ± NOTE WAS BACKWARDS. Every copy asserted an ordering — "Runs BEFORE the
+ rule" — and then gave, as the reason, the fact that makes the ordering
IRRELEVANT: "± is a single character, so the + rule cannot see it." Both
halves cannot be true. The second one is: ± is U+00B1 and `+` is U+002B, so
`\+` can never match inside it —

    /(^|[\s(])\+\s?(\d)/u.test("±5")   →   false

Kazakh is the proof by counterexample: its ± rule runs AFTER two + rules and
has always been correct. So the ordering is FREE, and the note now says the
thing that actually matters — ± needs its OWN rule, because no + rule will
ever claim it and an unclaimed sign is dropped in silence rather than misread.

Also dropped from that block: "zero new sourcing" (justification aimed at a
reviewer, not a porter) and the survey "bg/da/is/nb/ro/sv all juxtapose with
no conjunction", which belongs in none of the 25 files it appeared in.

KEPT, because they are load-bearing and were NOT in every copy — propagating
them would have been inventing claims, so each stays only where it was made:
  · SIGN names vs OPERATION names — ± marks a tolerance, not an addition
    (af, ca, kk, cy, and ko, which keeps 더하기/빼기 apart from 플러스/마이너스);
  · nl's note that `min` comes from the register rather than from another
    rule, since nl has no true minus sign;
  · tr's and hu's wiki citations naming the sign words directly.

NOT QUITE VERBATIM lost four lines of history and an anecdote about a
Romanian word that appeared in files for five other languages. What remains
is the fact: these letters are absent because the g2p has no rule for them,
and native-inventory.test.ts measures that rather than trusting it.

Comment-only; the emitted code is byte-identical over all 32 files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
@christopherthompson81
christopherthompson81 merged commit 9decb15 into main Aug 7, 2026
2 checks passed
@christopherthompson81
christopherthompson81 deleted the sweep-boilerplate branch August 7, 2026 04:31
christopherthompson81 added a commit that referenced this pull request Aug 7, 2026
`s = s.replace(/±/gu, " plus minus ")` appeared TWICE, six lines apart, each
under its own comment block. The second could never fire: the first is a
global replace, so no ± survives it.

Pre-existing — it predates the comment sweep. It was found while converging
the ± comment blocks (#709), which is what put the two copies side by side;
each block described the rule as if it were the only one.

Behaviour unchanged, checked rather than assumed:
  ±5 stopni        → plˈus mˈinus pjˈɛɲt͡ɕ stˈɔpɲi
  temperatura ±0,5 → … plˈus mˈinus zˈɛrɔ pʂɛt͡ɕˈinɛk pjˈɛɲt͡ɕ
  +30 i -5         → plˈus tʂɨd͡ʑˈɛɕt͡ɕi ˈi mˈinus pjˈɛɲt͡ɕ


Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
christopherthompson81 added a commit that referenced this pull request Aug 7, 2026
Both were mine, both written during this sweep, and both are the exact
failure the ± cleanup (#709) had just fixed: asserting a MUST where the code
is order-independent.

I wrote that the plus rule "MUST PRECEDE the degree rule, or `+30°C` has lost
its sign by the time the plus rule looks." It has not. The degree rule
captures its digit and re-emits it, so the `+` survives either order —
simulated on the rules as written, in both languages:

    plus then degree : 'प्लस 30 डिग्री सेल्सियस भन्दा'
    degree then plus : 'प्लस 30 डिग्री सेल्सियस भन्दा'   identical

The ordering constraint that IS real in these files is stated at its own step
and is unaffected. The note now records only what the sign words are.

Lesson taken: an ordering claim needs a counterexample-or-simulation before
it goes in a comment, the same as any other assertion. Writing "MUST" is not
free.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
christopherthompson81 added a commit that referenced this pull request Aug 7, 2026
…ey sat on (#711)

* comments: the n* sweep — three comments that contradicted the code they sat on (#711)

Continues the alphabetical comment sweep. 14 files across nahuatl, naija,
nama, nepali, nogai, norwegian. Comment-only: the emitted code is
byte-identical with --removeComments.

THREE STALE COMMENTS THAT ASSERTED THE OPPOSITE OF THE BEHAVIOUR. Each was a
decision that a later change reversed, where the new rule was added and the
old note left in place:

  · nepali/normalize.ts step 13: "NEITHER PLUS NOR MINUS IS CLAIMED, and that
    is a measured decision, not an omission." Step 8, six lines above, claims
    both — and the engine reads them:
        +30 डिग्री  →  plˈʌs t̪ˈis ɖˈiɡɾi
        तापमान -5   →  t̪ˈapman mˈainʌs pˈãt͡s
    A porter would have read that note as licence to drop the signs.

  · nepali.ts: "A one-letter `m` is deliberately NOT declared", three lines
    above `m: ["मिटर"]` in the same object literal. `5 m` → pˈãt͡s mˈiʈʌɾ.

  · the same block reasoned from "घन ×0" and was then corrected by a SECOND
    comment underneath explaining that the token probe was wrong (the word is
    written fused, घनमिटर) — both left in place, the first still arguing for
    caution the second had already dissolved.

Also in norwegian/normalize.ts step 14, one block stated the same two
constraints twice — "runs AFTER ranges … requires a boundary before the sign"
appears at its start and again at its end, a half-merged paste.

The rest is the standing standard: audio decode transcripts, cross-language
surveys, "the fleet's FIRST X" chronology, Phase-N labels for shipped work,
and issue/playbook references out; invariants and traps kept. The ★/🔷 glyphs
and the duplicated NATIVE_CLASS doc-block pair are gone from n* as from a-m.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr

* review: two ordering claims I invented, in nepali and malayalam

Both were mine, both written during this sweep, and both are the exact
failure the ± cleanup (#709) had just fixed: asserting a MUST where the code
is order-independent.

I wrote that the plus rule "MUST PRECEDE the degree rule, or `+30°C` has lost
its sign by the time the plus rule looks." It has not. The degree rule
captures its digit and re-emits it, so the `+` survives either order —
simulated on the rules as written, in both languages:

    plus then degree : 'प्लस 30 डिग्री सेल्सियस भन्दा'
    degree then plus : 'प्लस 30 डिग्री सेल्सियस भन्दा'   identical

The ordering constraint that IS real in these files is stated at its own step
and is unaffected. The note now records only what the sign words are.

Lesson taken: an ordering claim needs a counterexample-or-simulation before
it goes in a comment, the same as any other assertion. Writing "MUST" is not
free.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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