Skip to content

chore: strip issue-number refs from code comments; document the rule#144

Merged
bastien-gallay merged 2 commits into
mainfrom
chore/strip-issue-refs-from-comments
Jul 5, 2026
Merged

chore: strip issue-number refs from code comments; document the rule#144
bastien-gallay merged 2 commits into
mainfrom
chore/strip-issue-refs-from-comments

Conversation

@bastien-gallay

Copy link
Copy Markdown
Collaborator

What

Removes #NN GitHub issue references from every Rust comment, doc-comment, and
assert-message string across the workspace (27 files), and codifies the
convention that prompted the cleanup.

Why

Git already links code to its issue through commit/PR history
(git blame → commit → PR → issue). An in-code #NN is redundant provenance
that rots silently when issues are renumbered, migrated, or closed — and a
reader can't act on it. Comments should say what/why at an altitude that
outlives any one ticket.

Scope & safety

  • Comments only. No code, behaviour, or test logic changed — the diff is a
    near-perfect 1:1 line swap (420/420 on the code files).
  • Trailing parentheticals dropped, leading #NN: label prefixes removed, and
    the handful of mid-sentence references rewritten to stay grammatical.
  • Preserved: requirement tags (FR5, G1) and feature slugs
    (F-capture) — they name stable design artifacts, not tickets — and all
    #[...] Rust attributes.
  • Issue numbers still belong in commit/PR bodies and ROADMAP.md/PRD prose;
    those are untouched.

The rule, written down

  • CONTRIBUTING.md (new) — full rationale: git-is-the-link, where issue
    numbers do/don't belong, and boy-scout-not-crusade for future edits.
  • AGENTS.md — one-line entry in Conventions pointing to it.

Verification

cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, and
cargo test --workspace all pass (the lone failure is the pre-existing
sandbox-only pty openpty test, unrelated). markdownlint-cli2 clean on the
new/edited docs.

Remove `#NN` GitHub issue references from every Rust comment, doc-comment,
and assert-message string across the workspace (27 files). Git already links
code to its issue via commit/PR history, so an in-code `#NN` is redundant and
rots when issues are renumbered or migrated.

Prose was kept grammatical: trailing parentheticals dropped, leading label
prefixes removed, and the handful of mid-sentence references rewritten. Only
comments changed — no code, behaviour, or test logic. Requirement tags (FR5,
G1) and feature slugs (F-capture) are preserved; they name stable design
artifacts, not tickets.

Codify the convention:
- CONTRIBUTING.md — new file, full rationale (git-is-the-link, where issue
  numbers do/don't belong, boy-scout-not-crusade).
- AGENTS.md — one-line entry in Conventions pointing to it.
- Acknowledge the one-time baseline sweep as the sanctioned exception to
  "no retroactive crusade" (the delivering PR would otherwise contradict it).
- Drop "or closed" — a closed issue still resolves; only renumber/migrate
  break the link.
- Reword the test-name example so the inline code span isn't line-final,
  bringing the line back under the 80-col convention.
@bastien-gallay bastien-gallay merged commit 149fe17 into main Jul 5, 2026
16 checks passed
@bastien-gallay bastien-gallay deleted the chore/strip-issue-refs-from-comments branch July 5, 2026 14:59
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