Skip to content

Drop references to a design document that is not in any repo - #8

Merged
fylorn merged 1 commit into
mainfrom
dev
Sep 14, 2026
Merged

fylorn merged 1 commit into
mainfrom
dev

Conversation

@fylorn

@fylorn fylorn commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

What

Comments throughout this codebase cited section numbers — §3.8, (DESIGN.md §5.1), §4.3.0 说得很清楚 — from a design document that exists in none of the three repositories and never did here. Anyone following one of those pointers finds nothing. There were 890 such lines, plus one that gets written into the user's own config.yaml as a generated comment header.

The reasoning stays; only the citation goes. In nearly every case the sentence already carried the argument and the pointer added nothing to it.

How, because it matters for reviewing this

~830 sites were a citation alone inside its own parentheses. Removed by pattern, applied line by line — never to the whole file at once, because \s* in a pattern will happily eat a newline and weld two comment lines together.

The cleanup passes run only on lines that actually contained a citation. Closing up the space a deleted citation leaves between two Chinese characters, moving an orphaned 。 or : back onto the sentence it belongs to — an earlier version let those scan everything, and it rewrote a test fixture string of em-dashes ("———————————") into " —— —— ——". That line had nothing to do with this change and should not have moved a single byte. Worth stating plainly: a mechanical cleanup that touches lines outside its own scope will eventually corrupt one of them silently.

The remaining 61 sites were edited by hand. These are where the citation was part of the sentence rather than an aside — DESIGN.md 自己写着「验收标准写成测试值得单独记一笔」, §7.11 的表格自己就标了 — and deleting the pointer mechanically would have left a clause with no subject.

Known cosmetic cost

Line wrapping is left ragged where a deletion shortened a line. Rewrapping hand-formatted CJK comment blocks that contain markdown, code spans and list indentation is considerably riskier than the ragged edges are ugly.

Verification

grep -rn '§\|DESIGN\.md' over the tree returns nothing. cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings, 1066 tests, and scripts/smoke.sh (46 checks, 0 failures) all pass locally.

🤖 Generated with Claude Code

Comments throughout this codebase cited section numbers — `§3.8`,
`(DESIGN.md §5.1)`, `§4.3.0 说得很清楚` — from a design document that
exists in none of the three repositories and never did here. A reader
following one of those pointers finds nothing. There were 890 lines of
them, plus one that was written into the user's own config file as a
generated comment header.

The reasoning is kept; only the citation goes. In almost every case the
sentence already carried the argument and the pointer added nothing:
"**每次请求现扫一遍,什么都不存。**§7.12 说得很明确:没有「同步状态」这
个概念" loses a section number and keeps every word that explains why.

How this was done, because it matters for reviewing it:

  Roughly 830 sites were a citation alone inside its own parentheses.
  Those were removed by pattern, line by line — never across the whole
  file at once, because `\s*` in a pattern will eat a newline and weld
  two comment lines together.

  The cleanup passes (closing up the space a deleted citation leaves
  between two Chinese characters, moving an orphaned `。` or `:` back
  onto the sentence it belongs to) run **only on lines that actually
  contained a citation**. An earlier version let them scan everything
  and it rewrote a test fixture string of em-dashes into something
  else. A line that has nothing to do with this change must not move a
  single byte.

  The remaining 61 sites were edited by hand. Those are the ones where
  the citation was part of the sentence rather than an aside — "DESIGN
  .md 自己写着「验收标准写成测试值得单独记一笔」", "§7.11 的表格自己
  就标了" — and deleting the pointer mechanically would have left a
  clause with no subject.

Line wrapping is left ragged where a deletion shortened a line. Rewrapping
hand-formatted CJK comment blocks that contain markdown, code spans and
list indentation is far riskier than the ragged edges are ugly.

Verified: `grep -rn '§|DESIGN\.md'` returns nothing. fmt, clippy, 1066
tests, and the 46-check smoke script all pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@fylorn
fylorn merged commit 0d34ee7 into main Sep 14, 2026
3 checks passed
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