SingleFileMessagePackBackingStore.push and delete matched an existing
record by `candidate.type === entry.type`. A record read back carries its
catalog entry's schema name as its type and a fresh write carries the
definition's type, so for any definition whose type is not its schema name
a rewrite appended a duplicate and a delete removed nothing. The bug has
been present since the monorepo import (5c69bfc5).
isSameRecord now decides identity the way the cache resolves a persisted
record to a definition: same key, and the stored record's schema id is one
the written envelope answers to (its own or a declared compatible id), else
its schema name, else its type label (legacy envelopes). push and delete
share it.
Follow-up: once hands/variants-c2a merges, schemaIdentityOf (426c956a)
should own the set of ids and names an envelope answers to, and this
function should read it rather than re-derive it from the catalog entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>