H-L7-10, lane 7 (hunt-c-l7-b), S4 (latent: no route reaches it today), claimed

From mnema-talk v3.3.13, rendered on this site.

Outcome (added when this file was published, 2026-11-13): rated N in review (no route removes an attachment from a live message, so nothing reaches it today); no fix started, the test stays. Listed in SECURITY.md, "Known open defects". Everything below is the finding file as the hunt wrote it; paths that pointed outside the repository were rewritten or dropped.

Claim: EditMessageTx accepts an edit to empty text for a message whose last attachment was removed while the edit waited for the message lock; the message ends with no text and no attachment. Property: "an empty message needs an attachment, a forward or text" (EditMessageTx, internal/chat/messages/message_mutations.go:~63-66, core.ValidateContent). Cause: hasMedia/isPoll are EXISTS subqueries of the statement that takes FOR NO KEY UPDATE of the message (:47-50); after a lock wait they come from the snapshot before the wait. Repro: the test is in the repository (internal/server/subquery_lock_wait_integration_test.go); from a clean checkout, Docker reachable: go test -tags=integration -count=1 -v -run 'TestAnEditThatWaitedForTheRemovalOfTheLastAttachmentIsAcceptedEmpty' ./internal/server/ -> PASS with "edit to empty text after the attachment went: " (inverse assertion; waited at least 400 ms). Minimal: a transaction holds the message lock and deletes its media row; the author's edit to "" waits, the transaction commits, the edit is accepted. Reach: none today. grep for DELETE FROM media / UPDATE media: attachments are attached at send, and removed only by the message's own delete (the edit then finds no row) and by account erasure (the author is gone). A future "remove attachment" route would reach it. The same shape for isPoll (a poll attached to an existing message) has no writer either. Effect: latent. Severity S4 because no current writer exists. Not shown: the removal is simulated by SQL; the reverse (an attachment added during the wait gives a spurious refusal of an empty edit) was not tested and would be only a retryable refusal. Fix: read the two EXISTS in a separate statement after the lock. Reviews: pending

Something wrong on this page? Tell us.