[Review] Comment coverage — every module should explain itself to a stranger #444
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of the v4.6.0 release-readiness gate.
What
Bring the whole codebase up to the standard the best parts already set: a reader arriving cold should be able to work out why the code is the way it is, not merely what it does.
The standard already exists here
The strong examples are the ones that explain a decision and its cost:
transcribe_sessionargues from first principles that any echo-based attribution join is unverifiable, and pre-empts the obvious "join on ids instead" objection.PerUserPCMSinkexplains why placement is absolute rather than incremental, and bounds the error that choice leaves._MAX_FOLD_DEPTHrecords that unbounded folding climbs until the OOM killer takes the worker and the session sits in "processing" forever with nothing logged.settings_servicemodule docstring enumerates four policies for "no LLM configured" and says what is not acceptable, because eight behaviours had grown for one condition.Each answers a question the next reader would otherwise have to rediscover. That is the bar.
What to add
# increment the counterearns nothing.# non-cumulative, so it cannot drift over a four-hour sessionearns its line._COMPACT_MAX_RUN_SECONDSstates the worst-case timestamp error its merging introduces — that is what makes it reviewable.beat_service; both ends say so.What to avoid
A hard rule from experience
A wrong comment is worse than no comment. VAD's docstring claimed the opposite of the truth for months, and #427's docstring confidently justified behaviour that destroyed a real session. This pass must correct stale prose wherever it is found — that counts as in-scope work here, not a distraction from it.
Acceptance criteria