[Review] Simplification pass — make the code as tight as it can honestly be #443
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
A deliberate pass to reduce the surface a future maintainer has to hold in their head: remove duplication, delete what is dead, collapse what has accreted, and narrow what is broader than it needs to be.
Where to look
pg_dumpwas invoked from two places with independently-maintained argument lists (cli.pyandreminder_tasks.py); the version check had to be added twice. That pattern is a bug factory.process_audiois long, and a missing step inside it was invisible to every test (#432). Extractingnarrow_speakers_to_capturedmade it testable — the same treatment is owed elsewhere.cleanup_trashed_audioandenforce_retentionpass 1. Both are correct today; one of them is redundant.The bar
Simplification must not remove information. This codebase's comments carry hard-won reasoning — why VAD defaults on, why an echo-based join is unverifiable, why placement is absolute rather than incremental. Deleting that to make a file shorter is a net loss, and re-learning it costs sessions.
So: delete code freely, delete reasoning almost never. If a comment explains a decision that is still load-bearing, it stays even when the code around it shrinks.
Equally, a refactor that touches behaviour is not a simplification — it is a change, and it needs the same regression discipline as any other.
Acceptance criteria
Related
#440 (adversarial sweep) will surface candidates; expect these two to interleave rather than run in sequence.