Skip to content

Trim codebase comments to one-line, caller-facing style - #60

Merged
chrisuthe merged 6 commits into
mainfrom
chrisuthe/task/trim-codebase-comments-to-one-line-caller-facing
Sep 15, 2026
Merged

chrisuthe merged 6 commits into
mainfrom
chrisuthe/task/trim-codebase-comments-to-one-line-caller-facing

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

Brings every comment in the repo in line with a less-is-more rule set, and codifies it in a root AGENTS.md (with CLAUDE.md symlinked to it). Comments and whitespace only: no functional change.

Rules applied

  • Doc comments are one plain /// line for the caller. @file/@brief are gone, and @param/@return stay only where they add something the signature doesn't.
  • Inline comments cover only non-obvious mechanics, in one line.
  • Rationale, history and cross-file narration are removed. Real traps survive as a single line: the ControlCommand::Delay keep-last rule, the SinkRecovery locking rule, the MAX_STATIC_DELAY_MS upstream clamp, the reusable-workflow bash -e/pipefail note, and "spell every matrix key on every leg".

Scale

Comment lines across src/, tests/, scripts/, .github/workflows/ and CMakeLists.txt drop from 9371 to 3528. Packaging comments drop from 218 to 60.

Verification

  • Every touched C++ file is token-identical to main after g++ -fpreprocessed comment stripping.
  • Non-C++ diffs touch only comment and blank lines. Heredoc # lines and the get_started_linux.sh --help usage block are unchanged.
  • License headers, NOLINT, clang-format/shellcheck directives, shebangs and #error messages are unchanged.
  • Build OK. scripts/smoke_test.sh passes all checks, shellcheck is clean, and the workflow YAML parses.
  • ctest passes 426 of 428. The two failures (ARelativeControlSocketIsMadeAbsoluteUnderZ, AConfiguredControlSocketIsAbsolutizedUnderDaemonize) come from the long worktree path this was built in: the absolutized socket path exceeds sun_path's 107 bytes. They are unrelated to this change.

Note on clang-format

main isn't clang-format clean: 30 files fail under every clang-format from 17 to 23. A full reformat would also reorder includes and wrap the #error line, so clang-format was applied to changed lines only. No file has more clang-format differences than it does on main.

@chrisuthe
chrisuthe marked this pull request as ready for review September 15, 2026 22:21
@chrisuthe
chrisuthe merged commit babf9ee into main Sep 15, 2026
15 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