fix: address all 12 PR review findings#6
Merged
seanb4t merged 1 commit intoseanb4t/beads-pickupfrom Feb 8, 2026
Merged
Conversation
Critical fixes (P0): - SetKeywords sends nil (JSON null) instead of false to remove keywords per RFC 8621 §4.1.1 - Delete propagates transient resolveMailbox errors instead of silently falling through to permanent destroy - MCP argument helpers return type-mismatch errors instead of silently returning defaults Important fixes (P2): - Vacation --enable/--disable enforced as mutually exclusive - MCP mail_flag validates read/unread and flagged/unflagged mutual exclusivity - MCP resources return actual errors instead of fake success with error text in body - SearchWithFilter deep-copies filter map to avoid caller mutation - convertEmails returns ([]Email, error) instead of writing to stderr - mailbox delete without --force returns error (matches mail delete) Suggestions (P3): - Move removes redundant Get call before Email/set - internal/jmap/ migrated from fmt.Errorf to samber/oops - All 22 getAccountID call sites wrapped with operation context Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses all 12 findings from the PR #5 code review, organized by severity:
Critical (P0) — Data integrity
nil(JSON null) instead offalseto remove keywords per RFC 8621 §4.1.1resolveMailboxerrors instead of silently falling through to permanentdestroy()Important (P2) — Validation & correctness
--enable/--disableenforced as mutually exclusive via Cobraread/unreadandflagged/unflaggedmutual exclusivitySearchWithFilterdeep-copies filter map before modifying([]Email, error)instead of writing to stderrmailbox deletewithout--forcereturns error (matchesmail delete)Suggestions (P3) — Code quality
Getcall beforeEmail/setinternal/jmap/migrated fromfmt.Errorftosamber/oopsgetAccountIDcall sites wrapped with operation contextTest plan
-raceacross all 9 packagesgo build ./...compiles cleanly🤖 Generated with Claude Code