send_email's error path has no test: discarding the builder's Result reds nothing #31
Labels
No labels
waiting-on-julian
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jlxq0/jmap-mcp#31
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?
build_email_objectnow validates internally and returnsResult, so the guard cannot be omitted. Its error can still be discarded at the call site and no test notices.Confirmed twice, by the jmap-mcp lead and again by me before merging
#30.Closing it needs a test that drives
send_emailitself. The handler takes aRequestContext<RoleServer>and fabricating one is a harness rather than a few lines, which is why it is here and not in#30.The class this belongs to, and the reason it was invisible: a mutation set that only edits function bodies cannot see whether the function is called.
#30's first four mutations were each red on exactly one test and every one pointed a layer below the fault. Mutate the call site as well as the callee, and when a mutation reds nothing, say so rather than dropping it.