patches/audition.cc: stale bank count in the allocation comment #63
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
bcox/tymbal#63
Loading…
Add table
Add a link
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?
patches/audition.cc:200reads:The bank is 30 patches as of
modal-cymbals(it was 29 before, and 28 beforethat), so the number has been stale through two additions.
Bank.HasThirtyPatchesin
patches/patches_test.ccis the live count.Trivial, comment-only. Worth doing with a sweep for the same shape elsewhere:
this class of stale count has now been found three times in this repo --
CLAUDE.md's "29 patch names" (fixed onmodal-cymbals), theEveryBlobsMacroKnobsAreItsOwnheader's blob counts (fixed on the samebranch), and this one. A count that has to be updated by hand on every patch
addition is a count that will go stale; if any of these can be derived from
patches::Count()instead, that is the better fix.Found by the whole-branch review of
modal-cymbals.The bank is 31 as of branch
fm-followups, which addspatches/chowning_horn.h-- sopatches/audition.cc:200's "28 allocations" is now three additions stale rather than two.That branch also introduces a second instance of the same shape:
patches/patches_test.cc:264reads "a 200-voice pool per patch to serialize 30 patches", which the branch itself made false. The live count moved correctly (Bank.HasThirtyOnePatches); only the prose counts drift.This is the fourth and fifth instance of this shape in the repo, which strengthens the issue's own recommendation: derive these from
patches::Count()rather than fixing the numbers again.Fixed on
worktree-audition-flags, together with #88, #69 and #81 — and this issue's own figures make the case better than it argued.It reports the comment as stale at 28 against a bank of 30, and names
Bank.HasThirtyPatchesas the live count. The bank is 40 today and the assertion isBank.HasFortyPatches(patches/patches_test.cc:3309, renamed at109447b). So between the report and the fix the number went stale twice more — 28 → 29 → 30 → 40 — including in the issue written to complain about it going stale.So it is dropped rather than corrected (bcox's call: "It's going to immediately go stale and we'll have to keep updating it"). The comment now reads:
The "about 110 seconds of audio" in the same sentence went too — it is the same bank-sized quantity wearing different units.
The sweep this issue asked for. No other count of this shape survives in
patches/: everything count-shaped there is a format minor, a Q-format width, or a frozen measurement ("Twelve of the twenty-eight printed peaks moved when both leaks were closed"is a record of what a change did, correctly frozen at the figure of the day, and is left alone).Bank.HasFortyPatchesstays as it is — a count inside an assertion cannot go stale silently, because the build tells you.The fourth instance of the class was
CLAUDE.md's test-target count, which is #81, fixed on the same branch by removing the number and saying why it is not there.