Improve comment quality and flag comment slop during review - #12781
Open
stdevMac wants to merge 1 commit into
Open
Improve comment quality and flag comment slop during review#12781stdevMac wants to merge 1 commit into
stdevMac wants to merge 1 commit into
Conversation
stdevMac
requested review from
LukaszRozmej,
MarekM25,
asdacap,
damian-orzechowski and
rubo
as code owners
August 12, 2026 02:32
Clean up a small set of low-value comments and add a comment-quality dimension to the review skill and claude-review workflow so redundant or residue comments get flagged during PR review going forward. Per AGENTS.md: "Comments that merely restate the code are noise — don't add them, and remove them when you encounter them." Cleanup: - SpmcRingBuffer / BloomFilter: drop the "AI generated" attribution, keep the substantive behaviour/provenance notes. - FlatDbManager: delete the "First it go to here" / "And here in parallel" narration; keep the perf note. - ColumnDb: replace "Not sure how to handle" / "Maybe" musings with a real explanation and fill the empty <exception> doc. - KeccakHash: delete "// Return the result." above `return output;`. Review steering: - review skill: flag added comments that restate adjacent code, tautological XML docs, or carry uncertainty/generation residue — held to the existing >80% confidence bar, with an explicit do-not-flag list (why / spec-EIP / invariant / caller warning). - claude-review.yml: mirror the rule as a Low-severity focus item so it advises inline without tripping the mergeable merge gate. Signed-off-by: Marcos Maceo <marcosmaceowork@gmail.com>
stdevMac
force-pushed
the
chore/comment-quality
branch
from
August 12, 2026 02:33
c7cabc2 to
a47077a
Compare
hudem1
approved these changes
Aug 12, 2026
| private readonly Channel<TransientResource> _populateTrieNodeCacheJobs; | ||
|
|
||
| // Then eventually a compacted snapshot will be sent here where this will decide what to persist exactly | ||
| private readonly Task _persistenceTask; |
Contributor
There was a problem hiding this comment.
Nit The three removed comments here (// First it go to here, // And here in parallel., // Then eventually a compacted snapshot will be sent here where this will decide what to persist exactly) weren't pure restatement — together they sketched the three-stage pipeline (compactor → trie-node-cache populate, in parallel → persistence) and, in particular, the last one described the role of the persistence task, which isn't obvious from the _persistenceTask field name alone. The broken English justified rewording, but consider keeping a one-line note on _persistenceTask explaining that it receives compacted snapshots and decides what to persist. Optional — the surrounding code makes it inferable.
batrr
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Following internal feedback that AI-generated comment slop is creeping into the codebase, this does two things: cleans up a small focal set of low-value comments, and — more importantly — closes the gap that let them land by giving the automated review a comment-quality dimension.
This is grounded in our own rule (AGENTS.md):
What this changes
Cleanup (7 comments across 5 files)
SpmcRingBuffer/BloomFilter— drop theAI generated/AI-generatedattribution, keep the substantive notes (the "will hang if called by multiple producers" warning and the RocksDB provenance).FlatDbManager— delete stream-of-consciousness narration (// First it go to here,// And here in parallel.,// Then eventually...); keep the real performance note.ColumnDb— replace// Not sure how to handle.../// Maybe it should be...musings with an actual explanation, and fill the empty<exception>doc.KeccakHash— delete// Return the result.sitting abovereturn output;.Review steering (the durable part)
.agents/skills/review/SKILL.md— the review skill now flags added comments that restate adjacent code, are tautological XML docs, or carry author uncertainty / generation residue (// AI generated,// not sure how to handle this,// as requested, bare// TODO). Held to the skill's existing >80% confidence bar, with an explicit do-not-flag list: comments that explain why, cite a spec/EIP, state an invariant, or warn the caller are good and must not be touched..github/workflows/claude-review.yml— mirrors the rule as a Low-severity focus item. Low is deliberate: themergeablegate only trips on Critical/High/Medium, so comment-quality notes surface as inline advice without blocking merges.Why prevention over a big cleanup
An audit of the existing comment corpus came back essentially clean (~0.15% flag rate; the single biggest cluster is 2019-era human legacy, not AI). The corpus barely needs scrubbing — what needs controlling is new inflow, and the review bot was previously configured to only flag comments that contradict code, so restating/narration/residue passed straight through. This flips that.
Scope / safety
prompt:block: no newrun:step, no untrusted-input interpolation. YAML validated.Deliberately not included (open for discussion)
.github/copilot-instructions.md/ Cursor rules to cover non-Claude AI entry points.slop-lintCI check (ripgrep → reviewdog, added-lines-only) for the few near-zero-FP patterns.<param></param>/<returns></returns>tags) — fill-vs-delete is a per-member judgement call.