Awesome Reviewers

Reviewer · Documentation

Document current behavior accurately

Comments, doc strings, and user-facing docs (flags, config.md, package docs) must describe the system as it exists today, not how it used to work or how a related-but-different concept behaves. When a refactor changes a unit, type, or scope (e.g. a limit that used to count "data objects" now counts "ToC windows"), update every comment and doc that...

Instruction

Comments, doc strings, and user-facing docs (flags, config.md, package docs) must describe the system as it exists today, not how it used to work or how a related-but-different concept behaves. When a refactor changes a unit, type, or scope (e.g. a limit that used to count “data objects” now counts “ToC windows”), update every comment and doc that references the old concept, including config field docs, flag help text, and generated docs like configuration.md — don’t leave stale terminology that misleads readers about what the value actually bounds. Avoid explaining legacy/removed behavior in comments (“older binaries used to write version 1…”); if backward-compatibility logic is gone, delete the comment along with the code, and rely on tests/changelog to capture historical behavior instead of making readers carry outdated mental models. When introducing a new term (e.g. “payload”), define it where it’s first used instead of assuming it’s obvious. Finally, call out non-obvious semantics explicitly rather than leaving them implicit: ownership/aliasing of slices or structs passed into a function (e.g. “Append keeps a reference to pointer.PostingKeys; do not mutate it afterwards”), the lifetime of returned data (e.g. “fields of the returned record are valid only until the next call to Next()”), and the exact scope of a value (e.g. “this limit applies per-step, not for the whole query”). For example:

// concurrency is the maximum number of ToC windows that one flush has in
// progress. A ToC window in progress holds the sorted object of one builder
// at a time, so concurrency also bounds the sorted objects in memory.
// It is at least 1.
FlushConcurrency int

rather than a stale comment that still talks about “data objects” after the unit changed. Treat comment/doc updates as a required part of any change that alters behavior, semantics, or terminology, not an optional follow-up.