Skip to content

fix(i18n): spell two bn numerals in Western digits so the numerals ratchet holds - #14526

Closed
chenmingwei23 wants to merge 1 commit into
mainfrom
fix/bn-numerals-ratchet-14506
Closed

chenmingwei23 wants to merge 1 commit into
mainfrom
fix/bn-numerals-ratchet-14506

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Frontend Tests (2) passes on origin/main, so no pull request inherits a
red shard for a locale string it never touched.

website/src/i18n/style/bnStyle.test.ts encodes a rule from style/bn.md: the Bengali
catalog spells numbers in Western digits. It is a ratchet capped at 8 pre-existing
violations:

expect(bad.length, report(bad)).toBeLessThanOrEqual(8)

Main is at 9. The shard is red on origin/main, and every pull request whose merge ref
carries main's tip inherits it.

Why it matters

The failure lands on pull requests that cannot have caused it and cannot fix it.
Confirmed red on #13640, #13448, #13727, #13936, #14095 and #13374 -- including ones
whose entire diff is Python. Coverage Gate then fails closed on
frontend-test=failure, so one string costs every open pull request two red lanes, and
PR Readiness reports CI as a blocking item on top of that.

Re-running cannot clear it. The assertion is a count against a cap, not anything
timing-dependent: a head-verified gh run rerun --failed on #13640 reproduced it, and
no re-run on any of those six pull requests has cleared the lane.

Not a goal

Raising the cap to 9, which would clear the red while leaving the guard one string from
the next break.

Driving the cap to toBe(0), which is the right end state but is blocked on a
translation judgement -- see #14529. Converting the remaining seven strings pulls one of
them into the same file's zero-tolerance register rule, which is scoped to changed
values and which that string already violates. Measured on a real run: converting all
nine turned this shard red on the register rule. That work wants a Bengali speaker and
should not sit on the critical path of six blocked pull requests.

Nor does this address the sibling reds on the same main wave: #14491 (Electron Shell Tests), #14503 (Backend Tests (3.12, 2)) and #14504 (security line budget). Those are
still red here, because this pull request's merge ref carries main's tip like everyone
else's.

What changed (symptom -> root cause -> change)

The violation count went 7 -> 9 between 2c3ebcf2c7 and 20ed6a1dc7, crossing the cap.
The two strings that crossed it now spell their numbers in Western digits:

Key Digits
app.metrics_card_old_data 90
pages.membersPage.create_name_unusable 500

Nothing but digit characters changed -- the two line pairs are byte-identical once digit
characters are removed from both sides. create_name_unusable has an English
counterpart already reading 500, so the two catalogs now agree.

The count is back to 7 against a cap of 8, which is where it sat before this wave.

Tests

website/src/i18n/style/bnStyle.test.ts -- 3 passed, violations 7.

Frontend Tests (2) passed on CI at this change's earlier head, on a merge ref built
against main's red tip. That is the lane six pull requests are stuck on, so the result
is the point of this change rather than a side effect.

Mutation-proved, and the result is worth stating precisely because it is not flattering
to the cap: reverting one of the two strings leaves the shard green, since 8
still satisfies <= 8. Only reverting both fails, with AssertionError: 9 violation(s) -- the text CI reports. So this change is what moves the verdict, and the
cap cannot see a single violation. That is the argument recorded in #14529.

The file was restored from a copy taken outside the tree and verified by sha256 after
each mutation.

Any other suggestions on the work

Bundle Size Gate is red here and on #14095, reporting assets/t-*.js over its 955.0
KB budget by 28 B. It is pre-existing on main; this change only removes bytes from that
chunk, 10 raw bytes, since a Bengali-Indic digit costs 3 UTF-8 bytes and a Western digit
costs 1. Not enough to clear 28 B, and not this change's to clear -- it needs its own
issue and owner.

app.metrics_card_old_data has no counterpart at that path in en.json, which suggests
the key is stale or named differently in the source catalog. Out of scope here, but
worth a look by whoever owns that card.

Pattern harvest

Rule candidate: a ratchet whose cap equals its current count is indistinguishable from a
broken gate on the next commit, and it misattributes the break -- the pull request that
adds violation N+1 passes, and the failure surfaces on an unrelated pull request later.
When a mutation of the fix leaves the guard green, read that as information about the
guard rather than about the fix: here it was the signal that the cap, not the strings,
was the thing to change. Drive such a cap to zero as soon as the backlog it was holding
is empty, and if something blocks that, file it rather than leaving the cap at its own
count.

Fixes #14506

@chenmingwei23
chenmingwei23 requested a review from a team as a code owner September 27, 2026 20:00
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of f0ec2b074b52f0e37cdd1b773dfeeb6cc47ccfc0 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Cap left at 8 with count at 7: one new Bengali-digit string passes silently, then re-breaks an unrelated PR — confirm that headroom is deliberate.

Suggestions

[DESIGN-REVIEWED] f0ec2b0

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

UX-level review of f0ec2b074b52f0e37cdd1b773dfeeb6cc47ccfc0 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Nothing to check.

[UX-REVIEWED] f0ec2b0

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of f0ec2b074b52f0e37cdd1b773dfeeb6cc47ccfc0 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Verify #14529 exists and tracks driving the cap to zero — the remaining 7-violation debt and the cap's blind spot rest on that filed issue.

What this change ships

Inventory (2 items) — 2 justified

Intent: FIX — turn Frontend Tests (2) green on main so unrelated pull requests stop inheriting a red shard from the Bengali-numerals ratchet.

  1. The metrics-card staleness message spells 90 in Western digits — justified
  2. The companion-name-unusable message spells 500 in Western digits — justified

Both items ARE the fix; nothing rides along. The test file and its cap of 8 are untouched, so no pin is deleted or rewritten. The defect is verifiable from the repo itself: bnStyle.test.ts:126 caps Bengali-digit keys at 8, and grepping bn.json for [০-৯] counts 7 keys after this change — reverting the two hunks yields 9, which fails on base. The rule is documented (style/bn.md §2, enforced per §7), so provenance is a documented invariant plus a linked issue (#14506). The 7 unfixed siblings of the same root cause are declared, measured (register-rule collision on full conversion), and deferred to #14529 — accepted-and-deferred, not a demand.

[FIRST-PRINCIPLES-REVIEWED] f0ec2b0

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of f0ec2b074b52f0e37cdd1b773dfeeb6cc47ccfc0 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] f0ec2b0

False positive or not applicable? A repository writer can comment:
/ai-review override gpt f0ec2b074b52f0e37cdd1b773dfeeb6cc47ccfc0: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed f0ec2b074b52f0e37cdd1b773dfeeb6cc47ccfc0 — this comment is updated in place on each push.

Review details

Advisory only — nothing blocks.

FINDING — website/src/i18n/style/bnStyle.test.ts:126 — converting two values drops the live Bengali-digit count from 9 to 7 while the ceiling stays toBeLessThanOrEqual(8), and the numeral rule has no diff-scoped counterpart (qa-checks.mjs CHECKS has no native-digit check, and the only diff-scoped bn gate is the §5 register one), so the next branch that writes one bn.json value containing U+09E6–U+09EF lands at 8 ≤ 8 and passes CI silently — the regression docs/ci/i18n-gates.md:217 ("Keep a relaxed ceiling tight against its live count") exists to prevent → Fix: in the same commit tighten toBeLessThanOrEqual(8) to (7) at bnStyle.test.ts:126 and update the Bengali-digit debt does not exceed 8 row at website/src/i18n/style/bn.md:90; both files are untouched by this PR, so the remedy sits outside the diff.

[OPUS-REVIEWED] f0ec2b0

Verdict parsed from the review's SHA-scoped output markers for commit f0ec2b074b52f0e37cdd1b773dfeeb6cc47ccfc0.

False positive or not applicable? A repository writer can comment:
/ai-review override fable f0ec2b074b52f0e37cdd1b773dfeeb6cc47ccfc0: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Sep 27, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/bn-numerals-ratchet-14506 branch from 85f2e54 to bf2a1cf Compare September 27, 2026 20:19
@chenmingwei23
chenmingwei23 requested a review from a team September 27, 2026 20:19
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 27, 2026
…tchet holds

The bn style guard caps pre-existing Bengali-Indic numerals at 8. Two strings
took main to 9, so Frontend Tests (2) is red on origin/main and every pull
request whose merge ref carries the tip inherits the shard, with Coverage Gate
failing closed behind it.

app.metrics_card_old_data and pages.membersPage.create_name_unusable now spell
90 and 500 in Western digits, matching en.json. Nothing but digit characters
changed, and the count returns to 7 against the cap of 8.

Driving the cap to zero is tracked in #14529: converting the remaining seven
pulls one string into the same file's zero-tolerance register rule, which is
scoped to changed values and which that string already violates, so it needs a
translation change rather than a mechanical one.

Fixes #14506
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 27, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/bn-numerals-ratchet-14506 branch from bf2a1cf to f0ec2b0 Compare September 27, 2026 20:44
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 27, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Superseded by #14518, which merged at 21:31:06Z and made the identical change:
app.metrics_card_old_data and pages.membersPage.create_name_unusable now spell
90 and 500 in Western digits on origin/main (f57c1dee40), taking the
violation count from 9 to 7 against the unchanged cap of 8.

Closing rather than rebasing: there is nothing left in this branch that main does
not already have.

The follow-up this work turned up is still open and still accurate: #14529 records
that driving the cap to toBe(0) needs one of the remaining seven strings rewritten
in the informal register first, because editing it for digits pulls a pre-existing
register violation into the same file's zero-tolerance [changed-values] rule.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Sep 27, 2026
@bolichen97
bolichen97 deleted the fix/bn-numerals-ratchet-14506 branch November 6, 2026 07:25
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.

ci: Frontend Tests (2) red on main -- bn numerals ratchet at 9 against a cap of 8

1 participant