Skip to content

docs(ui): stop restating the i18n counters and correct two stale gate claims - #310

Merged
argszero merged 1 commit into
mainfrom
docs/ui-readme-i18n-claims
Sep 27, 2026
Merged

argszero merged 1 commit into
mainfrom
docs/ui-readme-i18n-claims

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

The i18n section of ui/README.md stated counters and guard states the code has moved past, so a
reader 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.

Changes

  • ui/README.md: drop the restated counts and point at the mechanism that owns them; state that
    the 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 #180
before 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

  • 功能/修复说明 — five stale claims in the i18n section corrected; nothing else touched
  • 涉及配置/数据结构的改动已同步示例文件 — n/a, docs only

Tests

  • cargo test 全部通过 — 409 passed; 0 failed
  • cargo fmt --check 通过 — exit code 0
  • 新增/更新了单元测试(如适用) — n/a, docs only; the gate that reads ui/README.md
    (state_gate's toast-vocabulary contract line) is untouched and still green

Also ran cargo clippy --all-targets -- -D warnings: exit code 0.

Checklist

  • 分支命名符合约定(feat/ /fix/ /docs/ ...) — docs/ui-readme-i18n-claims
  • Commit message 使用 Conventional Commits 格式 — docs(ui): …
  • 单一职责,改动最小化 — 1 file changed, 7 insertions(+), 5 deletions(-)

… 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.
@argszero
argszero merged commit 194cc5f into main Sep 27, 2026
2 checks passed
@argszero
argszero deleted the docs/ui-readme-i18n-claims branch September 27, 2026 12:42
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.
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