Pre-repair executable revision: 721a607e8 (oracle extension on ef1e6a4aa). Repair executable revision: 182b99262.
Each change message must be valid for a consumer that has applied every earlier message: an insert names an absent key, and an update or delete names a present one. Authority: the change-message contract in packages/db/tests/change-event-history-oracle.test.ts and issue #1901, which require a consumer that applies every message to agree with the Collection.
When a sync commit made a previously absent key visible, state.ts checked for a completed optimistic request on that key. If one existed, it emitted an update whose previousValue was that request's value. Subscribers had last seen the key removed, usually by a completed optimistic delete, so they got an update for a row they did not hold.
The change-event oracle missed it because its mirror applied inserts and updates with the same Map#set. The message type was never checked.
A mutation round on the state stack found it. The mutant that limited this branch to updates (E3) survived the whole suite. With a strict mirror, the oracle's histories showed 78 invalid updates on main and none under E3.
| Run | Result |
|---|---|
| Owner on 721a607e8 (oracle only) | 26 of 378 fail, each on an update for a key the mirror lacks |
| Owner on 182b99262 | 378 pass |
| Mutant: the old update branch | the 26 failures above |
| Mutant: no event for a previously absent key | 92 of 538 owner tests fail |
On 182b99262, with the built dist: