Remove unreachable INSERT branch from storeMsgHeaderOnly - #37
Open
markmnl wants to merge 1 commit into
Open
Conversation
Code 11 is only responded when the message being added to is already stored (SS10.4 step 1), so the attach path always wins and the INSERT branch was dead. Had it ever run, the inserted row's psha256 would have equalled its own identity hash, making isMessageRetrievable recurse on itself. The attach path is now the only path and a missing shared row is an error. Co-Authored-By: Claude Fable 5 <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.
Confirmed follow-up (c) of #33:
storeMsgHeaderOnly's INSERT branch was unreachable — code 11 is only issued when the parent row exists (handleAddToPathrequires a stored, retrievable parent), soexistingMsgIDForAddToalways finds the shared row and the attach path always wins. Had the branch ever run, the inserted row would have carried its own identity hash aspsha256, andisMessageRetrievablewould have recursed onto itself.The function is now just: resolve the shared row, attach the batch's recipients, commit — with a missing shared row reported as an error instead of silently inserting a self-referential row.
No behaviour change on any reachable path.
🤖 Generated with Claude Code