Files
hermes-agent/apps/shared
Teknium 82301e8698 fix(desktop): shared HTTP mutation identity retires superseded and refused intents
Mechanism (N101): createSessionMutationClient keeps an ambiguous write's
identity per key (destination + payload) and deleted only the sent key on
success. After A:X (lost ACK) -> B:Y (acknowledged, revision 8) -> A:X, the
retained A identity still presented the old expected_revision and could
only conflict. Mechanism (B2-22): the definitive-refusal list omitted
unknown_execution, not_found and mutation_identity_required, so e.g. a
Delete refused with unknown_execution kept its identity; after Discard bumped
runtime_revision the next click replayed it into revision_conflict and only
the third click went through.

Fix: an acknowledged write retires every other retained identity of the same
destination + session (key entries 0-1, as retireSupersededMutations does
for the canonical protocol); the three definitive reasons drop the identity.

Test: session-http-mutation-identity.test.ts (table over the intervening
outcomes, plus a different-session identity that must survive) is red on
r13-base2.

Review: dokterdok N101
Review: ahrazzle B2-22
2026-10-11 19:31:38 -07:00
..