Skip to content

docs(option_escape_gate): drop the stale README esc count from the module note - #395

Merged
argszero merged 1 commit into
mainfrom
docs/option-escape-gate-readme-esc-count
Oct 13, 2026
Merged

argszero merged 1 commit into
mainfrom
docs/option-escape-gate-readme-esc-count

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

The module note of src/option_escape_gate.rs (the option-template escaping
gate, R71) claimed:

ui/README.md 五处写「先 esc()」。

— "ui/README.md writes 'esc() first' in five places". No reading of that
file yields five today.

Related Issue

None — a drive-by documentation fix found while auditing doc comments against
today's tree.

Changes

src/option_escape_gate.rs: drop the stale count, keep the assertion —
ui/README.md 里写着「先 esc()」.

Census of ui/README.md today (and at the commit that wrote this line):

what is counted today at 1484311 (#337, wrote this line)
lines containing esc( 8 8
lines containing esc() 4 4
lines containing 转义 4 —
lines containing the literal 「先 esc()」 1 (:161) 1

So the number never counted the phrase it names. It matches at most the
esc( line count of 1484311's parent tree (5) — and 1484311 itself
raised that count to 8 by adding the R71 section to ui/README.md. A
snapshot of a quantity its own author keeps raising is an ownerless count,
so the fix is to drop the number rather than refresh it (cf. deploy_gate.rs
and state_gate.rs, R162/R164/R165). The assertion stays true:
ui/README.md:161 (the highlight bullet) does write 「先 esc()」.

Tests

  • cargo build
  • cargo test — 557 passed, 0 failed
  • cargo fmt --check — rc 0
  • cargo clippy --all-targets -- -D warnings — rc 0
  • Comment-only change; no gate added, no cache-bust needed (the file is
    src/*.rs and ui/README.md is untouched).

Checklist

  • Conventional-commit style
  • No unrelated changes

…dule note

The module note of the option-template escaping gate cited "`ui/README.md`
五处写「先 `esc()`」" -- "ui/README.md writes 'esc() first' in five places".
No reading of that file yields five today:

- lines containing `esc(`                         -> 8
- lines containing `esc()`                        -> 4
- lines containing `转义`                          -> 4
- lines containing the literal 「先 `esc()`」      -> 1 (only :161)

The number never counted the phrase it names. At `1484311` (#337) -- the
commit that wrote this line and created this gate -- the literal phrase
appeared once as well. It matches at most the `esc(` line count of that
commit's *parent* tree (5), and `1484311` itself raised that count to 8 by
adding the R71 section to `ui/README.md`: a snapshot of a quantity its own
author keeps raising, i.e. an ownerless count.

No test asserts it, so this is the repo's established "drop the number,
keep the assertion" fix (cf. `deploy_gate.rs` / `state_gate.rs`,
R162/R164/R165). The assertion stays true: `ui/README.md` does write
「先 `esc()`」 (the highlight bullet at :161).
@argszero

Copy link
Copy Markdown
Owner Author

Self-review

Verified on the branch (docs/option-escape-gate-readme-esc-count, off
upstream/main@d63341a):

  • The claim was false about today under every reading. Census of
    ui/README.md at this base: lines containing esc( = 8, esc() = 4,
    转义 = 4, the literal 「先 esc()」 = 1 (only the highlight bullet at
    :161). None is five.
  • It was never true either. git show 1484311^:ui/README.md | grep -c 'esc('
    = 5, and git show 1484311:ui/README.md | grep -c 'esc(' = 8 — the very
    commit that wrote this note raised the esc( count by adding the R71
    section to ui/README.md. The literal phrase was 1 at authoring time too.
  • No owner. grep -rn '五处' --include='*.rs' hits only this line; the
    only other hit repo-wide is CHANGELOG.md:18, a release-history sentence
    about ui/js/app.js's five <option> builders — a different fact. No test
    asserts the number.
  • Fix = drop the number, keep the assertion (repo practice:
    deploy_gate.rs R162, state_gate.rs R164/R165). The assertion survives:
    ui/README.md:161 does write 「先 esc()」.
  • Comment-only, 1 insertion / 1 deletion, line count unchanged (488).
  • cargo build ok · cargo test 557 passed / 0 failed · cargo fmt --check
    rc 0 · cargo clippy --all-targets -- -D warnings rc 0.
  • No gate added, no cache-bust (src/*.rs edit; ui/README.md untouched).
  • Tested blob 76ecdfe2d84580f36cad48e9383b9e86c4b8410a.

@argszero
argszero merged commit 99fa079 into main Oct 13, 2026
2 checks passed
@argszero
argszero deleted the docs/option-escape-gate-readme-esc-count branch October 13, 2026 05:44
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