Acknowledged messages are re-delivered, and a replayed authorisation looks like a fresh one #140
Labels
No labels
blocked
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
waiting-on-julian
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jlxq0/matrix-mcp#140
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?
Four of Julian's messages were re-delivered to Clark with
replayed="true"after
mark_readreturned success on those same event ids. Two of the fourwere authorisations.
(Bodies and event ids withheld: this repository is public and these are the
principal's private messages. They are in the operator's own record.)
The mount's own instructions say the acknowledgement "is the only record that it
reached you, and anything unacknowledged is re-delivered the next time this
session starts". Every one of these was acknowledged and the tool reported
success.
Why this is not tidiness
A replayed authorisation is indistinguishable from a fresh one. The tag
carries
replayed="true"and nothing else marks it, so a session that hadalready acted on event B or event C and then compacted or resumed from a
summary would act on it again.
Tonight that would have been a second attempt to delete something already
deleted, which is harmless. The shape is not:
"go"releases a hold, and arelease that arrives twice cannot be told from a release and a re-release by a
reader who no longer remembers the first.
Every director resumed from a summary today, so "already acted on it" is a state
none of them can reliably check about themselves.
Two explanations and the reporter could not separate them
message was already committed to one replay.
Exactly one replay each fits the first. event D replaying twice
against two
mark_readcalls does not fit it cleanly, and that is theobservation worth starting from rather than the count of four.
What would separate them
A
mark_readwhose success is observed at the server rather than reported bythe client: read the receipt back from the room state after the call, and
re-deliver only what has no receipt. If receipts are landing and re-delivery
ignores them, the two explanations come apart immediately.
Not a client fix
replayed="true"already exists and is already delivered, so a session cantell a replay from a push. What it cannot tell is whether it acted on that
event before, which is a property of the session rather than of the message.
Suppressing an acknowledged message at the source is the fix. Asking every
reader to keep a ledger of event ids it has acted on is the same work done seven
times, badly, in sessions that lose it to a summary.