Skip to content

chore: strip redundant comments and PR-number test prefixes#25

Merged
Itsusinn merged 2 commits into
mainfrom
chore/strip-redundant-comments-and-pr-test-prefixes
Jun 14, 2026
Merged

chore: strip redundant comments and PR-number test prefixes#25
Itsusinn merged 2 commits into
mainfrom
chore/strip-redundant-comments-and-pr-test-prefixes

Conversation

@Itsusinn

Copy link
Copy Markdown
Member

@

What

Two non-functional cleanups across all own crates (crates/, vendored patches/ untouched):

  1. Removed redundant comments (~782 lines). Section-divider banners (// ===== Foo =====, // ── bar ──), label comments naming obvious blocks, and comments that merely restate the adjacent code (plus stray trailing comments echoing their line).
  2. Stripped PR-number tokens from 22 test names. e.g. pr4_acl_ipv6_address_yields_128_host_routeacl_ipv6_address_yields_128_host_route, pr5_format_protocol_zero_alloc_outputformat_protocol_zero_alloc_output, test_pr2_fragmented_udp_emits_no_info_log_noisetest_fragmented_udp_emits_no_info_log_noise. The descriptive remainder is kept.

Why

The prN_ prefixes encode PR numbers that mean nothing to a future reader, and pair with the now-removed "PRn regression tests" banner comments. The comment pass drops noise that duplicated the code while keeping every comment that earns its place: rationale/"why", invariants, SAFETY: notes, protocol/RFC references, byte-layout annotations, user-facing config-field docs, and all //!//// module/API docs.

Reviewer notes

  • No logic changes. The full diff is comment deletions, trailing-comment trims, and fn renames only.
  • All 22 renamed functions are in-module #[test]/#[tokio::test] fns with no external callers; no collisions after stripping.
  • Updated one comment in wind-test/src/tuic.rs that referenced the old span name (test_pr2_..._noise:test_..._noise:); the tracing-test logs_assert filter derives the span from the live fn name, so behavior is unchanged. The descriptive "PR2 demoted log …" error string was intentionally left as prose.
  • cargo check --workspace --all-targets passes.
  • The pending .gitmodules / .github/remote-workflows submodule setup in the working tree is unrelated and deliberately not part of this PR.

🤖 Generated with Claude Code
@

Itsusinn and others added 2 commits June 13, 2026 23:26
chore: strip redundant comments and PR-number test prefixes

Remove restate-the-obvious comments across all own crates and drop the
PR-number tokens baked into test function names.

Comments: delete section-divider banners, label comments, and comments
that merely echo the adjacent code (and the stray trailing comments that
duplicate the line). All "why"/rationale, invariants, SAFETY notes,
protocol/RFC references, config-field docs, and module/API docs are kept.
~782 comment lines removed; no logic changes.

Test names: strip the prN_/test_prN_ prefixes that encoded PR numbers
(e.g. pr4_acl_ipv6_address_yields_128_host_route ->
acl_ipv6_address_yields_128_host_route), keeping the descriptive
remainder. 22 functions renamed; all are in-module tests with no external
callers.

cargo check --workspace --all-targets passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
style: rustfmt collapse call after trailing-comment removal

Removing the trailing comment let rustfmt fold the multi-line
test_socks5_udp_large_packet call onto one line. Fixes `cargo +nightly
fmt --all -- --check` on the Build / prepare CI step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
@Itsusinn Itsusinn merged commit ad67b72 into main Jun 14, 2026
17 checks passed
@Itsusinn Itsusinn deleted the chore/strip-redundant-comments-and-pr-test-prefixes branch June 14, 2026 09:51
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