docs(ui): stop restating the i18n counters and correct two stale gate claims - #310
Merged
Merged
Conversation
… claims The i18n section of ui/README.md described counters and guard states the code has moved past: a reader today learns numbers the gates no longer report and reads about a missing guard that in fact exists. - The pack size was frozen as "806 keys x2". That was true when 5183e41 (#249) wrote it; the positive-control constants in src/i18n_pack.rs own the real value now and fail loudly whenever the packs change. - The next line restated three more counts at once — "431 T() literals", "305 data-i18n*", "681-key union". The first two came from 818ed88 (#248) and fcff194 (#170); the 681 has no owner at all, neither a constant nor the smoke-test file it names. - The nested-data-i18n A/B note claimed orphan keys were unguarded ("today nobody guards them, 60-odd unreachable keys"), but every_pack_key_reaches_a_consumer landed two PRs later (a4cb622, #266), so the competing fix m_drop_parent is in fact rejected today: it makes the key unreachable while the sunset list stays put, and that gate compares the two exactly. The note also contradicted the section below it, which documents that very gate. - In the same section, shrinking the sunset list was still described as a follow-up round, although 77b2a82 (#270) landed it. A number a gate already owns is a second carrier of one fact, and restating it is how this drift happened; so the counts are dropped and the text points at the mechanism instead — the same treatment 45510ba (#309) gave the perf-gate header. The 681 is simply removed, since nothing carries it. No gate is added for prose: this repository has already ruled that documentation claims are corrected as data, not fenced in by a new test.
This was referenced Sep 27, 2026
argszero
added a commit
that referenced
this pull request
Sep 28, 2026
`ui/README.md`'s "设置 / 管理 / 运营布局约定(v1.22)" section still calls the operator overview's key card "上游 key 健康" and lists its three pills as "健康 / N 个异常 / 全部失败". That was true when `7d9b56e` (PR #174) wrote the line; C2158 (#269, `e5ee178`) then renamed the card and rewrote the pills, because the data has no health signal at all — `/api/ops/runtime` only returns `total` / `on` / `off`. #269 updated only the section it added itself further down this same file (`:1080`, which says the opposite), leaving this line behind, and its edit sheet (4 files / 7 edits) never listed it. Correct the wording to what the code ships: the title is `ops.keys.title` ("上游 key 状态") and the pills are `ops.keys.allOn` / `someOff` / `allOff` ("全部启用 / N 个停用 / 全部停用"). No gate: this is prose restating an implementation name, and the repo's standing decision for that axis is to fix the data, not to guard the prose (see PRs #309, #310, #312–#315). Verified on the branch tree: `cargo test` 417 passed / 0 failed (unchanged baseline), `cargo fmt --check` and `cargo clippy --all-targets -D warnings` both clean. The other claims on the same line were re-checked and are still true (`version` ← `env!("CARGO_PKG_VERSION")`, the five `uptime_*` fields, `split_uptime`, `fmtUptime`'s top-two-nonzero units, `ops.uptime.*`, `today_hours` zero-filled 0–23). The one remaining occurrence of the old wording (`:1084`) is the C2158 section quoting it as history and is left untouched.
This was referenced Sep 28, 2026
Merged
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.
Summary
The i18n section of
ui/README.mdstated counters and guard states the code has moved past, so areader today learns numbers the gates no longer report and reads about a missing guard that in fact
exists. Five claims in that section have drifted; each was true when it was written.
5183e41(fix(i18n): register every backend error in the wordlist, and stop the comment-stripper from mangling UTF-8 #249) wrote it. The positive-controlconstants in
src/i18n_pack.rsown the real value and fail loudly whenever the packs change(
ZH_KEY_COUNT/EN_KEY_COUNT).T()literals", "305data-i18n*", "681-key union" on the key-consistency line. Thefirst two come from
818ed88(fix(ui): label a market row's availability from the row, not from a missing key count #248) andfcff194(test(ui): guard the language-pack invariants that were previously unchecked #170); the 681 is owned by nothing — noconstant in
src/i18n_pack.rs, and no smoke-test file (the repository ships onlyapi.js/app.js/data.js/i18n.jsunderui/js/).data-i18nA/Bnote.
every_pack_key_reaches_a_consumerlanded two PRs later (a4cb622, test(i18n): every pack key must reach a consumer #266); it asserts thecomputed unreachable set equals
UNREACHABLE_PACK_KEYS, so the competing fixm_drop_parentis rejected today — it makes the key unreachable while the sunset list stays put. The note also
contradicted the section directly below it, which documents that very gate.
77b2a82(chore(i18n): drop 23 keys that no consumer can reach #270) landed it.Changes
ui/README.md: drop the restated counts and point at the mechanism that owns them; state thatthe orphan-key axis now has a gate, and that the list shrink has landed.
The counts are not refreshed to today's values. A number a gate already owns is a second carrier
of one fact; restating it here is how this drift happened in the first place, and the constants fail
loudly on their own. This is the treatment
45510ba(#309) gave the perf-gate header, and #180before it. The "681" is simply removed — nothing carries it. No gate is added for prose: this
repository has already ruled that documentation claims are corrected as data, not fenced in by a new
test.
Related Issue
None — the repository has no open issues, and this is a documentation-consistency fix found by recon,
not a reported bug.
Changes
Tests
cargo test全部通过 — 409 passed; 0 failedcargo fmt --check通过 — exit code 0ui/README.md(
state_gate's toast-vocabulary contract line) is untouched and still greenAlso ran
cargo clippy --all-targets -- -D warnings: exit code 0.Checklist
docs/ui-readme-i18n-claimsdocs(ui): …