The withRetry bookkeeping-failure branch is unpinned: removing its error check leaves the suite green #285
Reference in New Issue
Block a user
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?
Found by mutation testing during the second review of #263.
internal/delivery/target_http.go:130-141— thewithRetrybookkeeping-failure branch. Replacing itsrecordResulterror check with_ =leaves the ENTIREinternal/deliverysuite green. Its fire-and-forget twin at:80-86IS pinned by a test.Why this particular arm matters: it is the one that creates the retrying-with-a-successful-result state, which is exactly what findings 1 and 2 of that PR's first review were about — a delivery whose send succeeded but whose bookkeeping write failed. #263 fixed the handling of that state and added reconciliation for it. The handling is now correct and was verified live; what is missing is a test that would notice if it regressed.
Four other guards in that PR were mutation-checked and all went red when removed. This is the one that did not.
Definition of done
withRetry's bookkeeping-failure branch stops checking itsrecordResulterror. Mutation-verify it: make the mutation, confirm red; restore, confirm green. State that you did so.Not milestoned: the behaviour is correct as it stands and was verified by execution across both reader and no-reader arms. This is regression insurance for a mechanism that took two review rounds to get right, which is precisely the kind of code that should not be left unpinned.