ic-memory 0.41.0

Durable stable-memory allocation governance for Internet Computer canisters
Documentation
<p align="center">
  <img src="https://raw.githubusercontent.com/dragginzgame/shared-assets/main/ic-memory/ic-memory-readme-header.svg" alt="IC Memory — Stops upgrades from mixing up stored data" width="100%">
</p>

# ic-memory Current Wire Fixtures

These fixtures pin the current durable wire shape.

Files ending in `.hex` contain lowercase hexadecimal bytes. Tests decode the
hex into the actual durable bytes, recover or validate them, and re-encode the
current output to catch accidental wire-format drift in reviewable text form.

Intentional protocol hard cuts replace these fixtures in place. The repository
contains exactly one current fixture set and one current decoder path.

Slots encode their numeric ID directly. Construction and decoding both reject
sentinel ID 255. The 0.41.0 hard cut replaces the former nested representation.

Current logical payload envelopes carry the `ICMEMLED` family magic followed
by the distinct `ICMN` format marker, format version `1`, payload length, and
CBOR ledger bytes. Earlier logical ledger images require explicit disposition;
there is one current reader and no automatic clearing.

Logical ledgers contain a commit counter and current ownership records only.
Opaque committed payloads use definite-length CBOR byte strings. Retained
installations require explicit disposition before deployment. See
[the current ledger contract](https://github.com/dragginzgame/ic-memory/blob/main/docs/current-ledger.md).
The logical format version remains `1`; there is no old-shape reader.

Fixture groups:

- `*_payload_envelope.hex`: logical `LedgerPayloadEnvelope` bytes.
- `ledger_commit_store_single_active.cbor.hex`: full `LedgerCommitStore` bytes
  with one active allocation snapshot.
- `snapshot_store_valid.cbor.hex`: one valid current physical snapshot.
- `snapshot_store_corrupt.cbor.hex`: one corrupt current snapshot; recovery
  refuses it without initializing or publishing allocations.
- `stable_cell_record.cbor.hex`: `StableCellLedgerRecord` value bytes stored
  inside the `ic-stable-structures::Cell` envelope.
- `memory_manager_slot.cbor.hex`: checked `MemoryManagerSlot` bytes.

The 0.39.0 physical hard cut uses one required `current` snapshot field and the
`ICMESNAP` marker. The current snapshot carries its checked counter, bounded
opaque logical payload and checksum. Previous physical representations are
incompatible; there is no fallback reader. The 0.41.0 numeric-slot cut retains
that physical representation and changes the logical discriminator, slot bytes
and resulting payload lengths/checksums.