Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog.d/20261128_core-one-pass-envelope-read-released.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### SDK feature matrix — cachekit-core's one-pass envelope read released in 0.7.5

- [`sdk-feature-matrix.md`](sdk-feature-matrix.md), **Wire format (ByteStorage)**, Rust: the one-pass envelope read
([cachekit-core#150](https://github.com/cachekit-io/cachekit-core/pull/150)) ships in crates.io `cachekit-core`
0.7.5, the first release after 0.7.4; the cell no longer calls it unreleased. Verified in the published 0.7.5
`.crate`: `src/byte_storage.rs` decodes through `decode_one_pass`, falling back to the pre-scan and typed decode,
and carries `one_pass_decode_matches_full_decode`.
4 changes: 2 additions & 2 deletions sdk-feature-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

**Feature parity and compliance status across all CacheKit SDK implementations.**

*Last updated: 2026-11-14 — Rust Wire format (ByteStorage) cell: `cachekit-core` `main` reads an envelope in the shape `store` writes in one bounded pass, unreleased after crates.io 0.7.4. Every version-keyed claim is verified against the **published artifact** (registry metadata, and the `.crate`/`.tgz` contents where an embedded dependency version decides the answer), not against a repo branch — see [decisions/matrix-version-verification.md](decisions/matrix-version-verification.md) for why and how. Per-PR fold verdicts are in [CHANGELOG.md](CHANGELOG.md); per-row history is `git log sdk-feature-matrix.md`.*
*Last updated: 2026-11-28 — Rust Wire format (ByteStorage) cell: `cachekit-core` reads an envelope in the shape `store` writes in one bounded pass from crates.io 0.7.5+. Every version-keyed claim is verified against the **published artifact** (registry metadata, and the `.crate`/`.tgz` contents where an embedded dependency version decides the answer), not against a repo branch — see [decisions/matrix-version-verification.md](decisions/matrix-version-verification.md) for why and how. Per-PR fold verdicts are in [CHANGELOG.md](CHANGELOG.md); per-row history is `git log sdk-feature-matrix.md`.*

*__Cells that reversed — check these if you built on them:__ Rust sync support (✅ → does not exist) and the Rust `::secure` preset (✅ → spelled `::encrypted` on every published `cachekit-rs` through 0.7.0 → `::secure` from 0.8.0¹¹), Builder API (py/ts ✅ → ❌), Hardware acceleration (rs ✅ → not re-exported → re-exported from 0.8.0, ts N/A → ❌ → surfaced from 0.2.1), TypeScript Arrow (🔜 → ❌), Python's encrypted read path (documented fail-closed → **fail-open by default**), and `cache.secure.wrap()` in TypeScript (implied encryption → no guarantee → **enforced since LAB-513: throws without encryption**). The TypeScript protocol-1.1 `bin` rollout also reversed twice in two days: it was **not** shipped on either ts path through 0.1.5, and ships on both from 0.2.1 (per-artifact evidence in the [cachekit-core architecture note](#architecture-notes)).*

Expand Down Expand Up @@ -296,7 +296,7 @@ its spec:
| Requirement | Python | Rust | TypeScript | PHP |
| :--- | :---: | :---: | :---: | :---: |
| Key generation (Blake2b) | ✅ Compliant | N/A auto mode¹⁴ — interop/v1 keygen ✅ merged ([#33](https://github.com/cachekit-io/cachekit-rs/pull/33)); `#[cachekit]` mints interop keys ([#35](https://github.com/cachekit-io/cachekit-rs/pull/35)) | ✅ Compliant | ⚠️ Untested |
| Wire format (ByteStorage) | ✅ Compliant¹⁵ since 0.25.0 (wheel run 2026-11-03), whose lockfile pins `cachekit-core` 0.7.2 ([cachekit-py#618](https://github.com/cachekit-io/cachekit-py/pull/618)): its `ByteStorage::retrieve` runs the [Retrieve Flow](spec/wire-format.md#retrieve-flow) step-2 envelope pre-scan ([cachekit-core#80](https://github.com/cachekit-io/cachekit-core/pull/80)), which `cachekit-core` 0.6.0 and older, the versions cachekit-py 0.24.1 and earlier pin, lack; runs all six `wire-format.json` 1.3.0 [Reject vectors](spec/wire-format.md#reject-vectors) through `ByteStorage.retrieve` since 0.21.0 ([cachekit-py#448](https://github.com/cachekit-io/cachekit-py/pull/448); `TestRejectVectors` in `tests/unit/protocol/test_envelope_wire_vectors.py`), asserting the error each row names, except that core shares one error between its zero-length and ratio checks, so the zero-length vector asserts the ratio message; all fourteen `wire-format.json` 1.4.0 reject vectors since 0.23.0 ([cachekit-py#550](https://github.com/cachekit-io/cachekit-py/pull/550)), each asserting the error its row names (the five step-2 typed-decode vectors the typed-decode error, `reject_original_size_sign_bit` the range-checked `u32` decode), and both `payload_reject_vectors` asserting the structural guard's own error after the envelope read; `reject_envelope_slots_overclaim` asserts the pre-scan's own error ([WIRE-9](spec/wire-format.md#wire-9)) since 0.25.0 ([cachekit-py#618](https://github.com/cachekit-io/cachekit-py/pull/618)), a strict expected failure before; the allocation bound for the size-cap and ratio vectors ([WIRE-17](spec/wire-format.md#wire-17)) is relied on through `cachekit-core`'s allocation probe ([cachekit-core#100](https://github.com/cachekit-io/cachekit-core/pull/100)), which core 0.7.0's publish job ran, under the passthrough rule in [Reject vectors](spec/wire-format.md#reject-vectors): `ByteStorage.retrieve` passes the envelope bytes to core with no allocation of its own sized from an envelope field, and a test fails unless the lockfile pins that release ([cachekit-py#627](https://github.com/cachekit-io/cachekit-py/pull/627), since 0.25.0) | ✅ Canonical (`cachekit-core`), unused for stored values¹⁵; step-2 pre-scan since crates.io 0.7.0 ([cachekit-core#80](https://github.com/cachekit-io/cachekit-core/pull/80)): `ByteStorage::retrieve` and `validate` pre-scan the envelope bytes before the typed `rmp_serde::from_slice` into `StorageEnvelope`; 0.6.0 and earlier lack it; 🚧 unreleased, on `main` after crates.io 0.7.4 ([cachekit-core#150](https://github.com/cachekit-io/cachekit-core/pull/150); the 0.7.4 `.crate` lacks it, checked 2026-11-14): an envelope in the shape `store` writes is read in one bounded pass instead, which holds the same decode bounds and accepts only what the pre-scan plus typed decode accept, into the same fields; every other input, every reject included, still takes the pre-scan and typed decode and gets the same error (`one_pass_decode_matches_full_decode` in `src/byte_storage.rs`) | ⚠️ Compliant except the allocation bound, which is unasserted (last clause); the envelope pre-scan exception is closed since npm 0.2.2: payload decodes are pre-scanned, and the envelope goes through `cachekit-core`'s `ByteStorage::retrieve` (`unpack` in both `cachekit-core-ts` and `cachekit-core-wasm`), whose step-2 pre-scan ships in `cachekit-core` 0.7.0 ([cachekit-core#80](https://github.com/cachekit-io/cachekit-core/pull/80)); npm 0.2.2+ pins both bindings at exactly 0.2.1, built against core 0.7 since [cachekit-ts#240](https://github.com/cachekit-io/cachekit-ts/pull/240), and both embed `cachekit-core` 0.7.2 (`strings` on every `cachekit-core-ts` 0.2.1 `.node` and the `cachekit-core-wasm` 0.2.1 `.wasm`, 2026-11-07); every `decode-bounds.json` vector runs through both `unpack` bindings since 0.2.2 ([cachekit-ts#245](https://github.com/cachekit-io/cachekit-ts/pull/245), in the `cachekit-v0.2.2` tag's history, checked 2026-11-07; see the Test vectors row); npm 0.2.1 lacks the envelope pre-scan, because it pins both bindings at exactly 0.2.0, which embed core 0.6.0 (`strings`, 2026-10-24); ✅ since npm 0.2.1 (PRs in the `cachekit-v0.2.1` tag's history, checked 2026-10-24; the Node lane passes at that tag), runs all fourteen `wire-format.json` 1.4.0 [Reject vectors](spec/wire-format.md#reject-vectors) on the envelope read path, asserting the error each row names, in the Node lane (`packages/cachekit/test/protocol/wire-format.protocol.test.ts`) and the Workers lane (`packages/cachekit/test/workers/wire-format.workers.test.ts`) ([cachekit-ts#198](https://github.com/cachekit-io/cachekit-ts/pull/198); 1.4.0 in [cachekit-ts#229](https://github.com/cachekit-io/cachekit-ts/pull/229)), and both [`payload_reject_vectors`](spec/wire-format.md#payload-decode-bounds), refused by the payload pre-scan; `reject_envelope_slots_overclaim` passes in both lanes since 0.2.1 ([cachekit-ts#232](https://github.com/cachekit-io/cachekit-ts/pull/232); `dist/serialization/envelope.js`): the SDK's own header walk keeps a running total of the declared slots and refuses the vector with the envelope pre-scan's own error ([WIRE-9](spec/wire-format.md#wire-9)), before element 1's type check and before core sees the bytes. The walk allocates nothing and admits only complete envelopes; ⚠️ the allocation bound for the size-cap and ratio vectors is unasserted: `cachekit-core` 0.7.0+ asserts it in its own unit tests (`src/read_allocation_probe.rs`), and npm 0.2.2+'s bindings embed 0.7.2, but no cachekit-ts test asserts the bound or relies on core's probe under the passthrough rule in [Reject vectors](spec/wire-format.md#reject-vectors) (`test/fixtures/wire-vectors.ts` defers it) | ⚠️ Untested |
| Wire format (ByteStorage) | ✅ Compliant¹⁵ since 0.25.0 (wheel run 2026-11-03), whose lockfile pins `cachekit-core` 0.7.2 ([cachekit-py#618](https://github.com/cachekit-io/cachekit-py/pull/618)): its `ByteStorage::retrieve` runs the [Retrieve Flow](spec/wire-format.md#retrieve-flow) step-2 envelope pre-scan ([cachekit-core#80](https://github.com/cachekit-io/cachekit-core/pull/80)), which `cachekit-core` 0.6.0 and older, the versions cachekit-py 0.24.1 and earlier pin, lack; runs all six `wire-format.json` 1.3.0 [Reject vectors](spec/wire-format.md#reject-vectors) through `ByteStorage.retrieve` since 0.21.0 ([cachekit-py#448](https://github.com/cachekit-io/cachekit-py/pull/448); `TestRejectVectors` in `tests/unit/protocol/test_envelope_wire_vectors.py`), asserting the error each row names, except that core shares one error between its zero-length and ratio checks, so the zero-length vector asserts the ratio message; all fourteen `wire-format.json` 1.4.0 reject vectors since 0.23.0 ([cachekit-py#550](https://github.com/cachekit-io/cachekit-py/pull/550)), each asserting the error its row names (the five step-2 typed-decode vectors the typed-decode error, `reject_original_size_sign_bit` the range-checked `u32` decode), and both `payload_reject_vectors` asserting the structural guard's own error after the envelope read; `reject_envelope_slots_overclaim` asserts the pre-scan's own error ([WIRE-9](spec/wire-format.md#wire-9)) since 0.25.0 ([cachekit-py#618](https://github.com/cachekit-io/cachekit-py/pull/618)), a strict expected failure before; the allocation bound for the size-cap and ratio vectors ([WIRE-17](spec/wire-format.md#wire-17)) is relied on through `cachekit-core`'s allocation probe ([cachekit-core#100](https://github.com/cachekit-io/cachekit-core/pull/100)), which core 0.7.0's publish job ran, under the passthrough rule in [Reject vectors](spec/wire-format.md#reject-vectors): `ByteStorage.retrieve` passes the envelope bytes to core with no allocation of its own sized from an envelope field, and a test fails unless the lockfile pins that release ([cachekit-py#627](https://github.com/cachekit-io/cachekit-py/pull/627), since 0.25.0) | ✅ Canonical (`cachekit-core`), unused for stored values¹⁵; step-2 pre-scan since crates.io 0.7.0 ([cachekit-core#80](https://github.com/cachekit-io/cachekit-core/pull/80)): `ByteStorage::retrieve` and `validate` pre-scan the envelope bytes before the typed `rmp_serde::from_slice` into `StorageEnvelope`; 0.6.0 and earlier lack it; from crates.io 0.7.5+ ([cachekit-core#150](https://github.com/cachekit-io/cachekit-core/pull/150); in the 0.7.5 `.crate`, checked 2026-11-28; the 0.7.4 `.crate` lacks it): an envelope in the shape `store` writes is read in one bounded pass instead, which holds the same decode bounds and accepts only what the pre-scan plus typed decode accept, into the same fields; every input the one-pass read declines, every envelope-decode reject included, still takes the pre-scan and typed decode and gets the same error; an envelope it accepts can still be refused by the checks that follow either decode, such as an `original_size` above 512 MiB (`InputTooLarge`), with the same error (`one_pass_decode_matches_full_decode` in `src/byte_storage.rs`) | ⚠️ Compliant except the allocation bound, which is unasserted (last clause); the envelope pre-scan exception is closed since npm 0.2.2: payload decodes are pre-scanned, and the envelope goes through `cachekit-core`'s `ByteStorage::retrieve` (`unpack` in both `cachekit-core-ts` and `cachekit-core-wasm`), whose step-2 pre-scan ships in `cachekit-core` 0.7.0 ([cachekit-core#80](https://github.com/cachekit-io/cachekit-core/pull/80)); npm 0.2.2+ pins both bindings at exactly 0.2.1, built against core 0.7 since [cachekit-ts#240](https://github.com/cachekit-io/cachekit-ts/pull/240), and both embed `cachekit-core` 0.7.2 (`strings` on every `cachekit-core-ts` 0.2.1 `.node` and the `cachekit-core-wasm` 0.2.1 `.wasm`, 2026-11-07); every `decode-bounds.json` vector runs through both `unpack` bindings since 0.2.2 ([cachekit-ts#245](https://github.com/cachekit-io/cachekit-ts/pull/245), in the `cachekit-v0.2.2` tag's history, checked 2026-11-07; see the Test vectors row); npm 0.2.1 lacks the envelope pre-scan, because it pins both bindings at exactly 0.2.0, which embed core 0.6.0 (`strings`, 2026-10-24); ✅ since npm 0.2.1 (PRs in the `cachekit-v0.2.1` tag's history, checked 2026-10-24; the Node lane passes at that tag), runs all fourteen `wire-format.json` 1.4.0 [Reject vectors](spec/wire-format.md#reject-vectors) on the envelope read path, asserting the error each row names, in the Node lane (`packages/cachekit/test/protocol/wire-format.protocol.test.ts`) and the Workers lane (`packages/cachekit/test/workers/wire-format.workers.test.ts`) ([cachekit-ts#198](https://github.com/cachekit-io/cachekit-ts/pull/198); 1.4.0 in [cachekit-ts#229](https://github.com/cachekit-io/cachekit-ts/pull/229)), and both [`payload_reject_vectors`](spec/wire-format.md#payload-decode-bounds), refused by the payload pre-scan; `reject_envelope_slots_overclaim` passes in both lanes since 0.2.1 ([cachekit-ts#232](https://github.com/cachekit-io/cachekit-ts/pull/232); `dist/serialization/envelope.js`): the SDK's own header walk keeps a running total of the declared slots and refuses the vector with the envelope pre-scan's own error ([WIRE-9](spec/wire-format.md#wire-9)), before element 1's type check and before core sees the bytes. The walk allocates nothing and admits only complete envelopes; ⚠️ the allocation bound for the size-cap and ratio vectors is unasserted: `cachekit-core` 0.7.0+ asserts it in its own unit tests (`src/read_allocation_probe.rs`), and npm 0.2.2+'s bindings embed 0.7.2, but no cachekit-ts test asserts the bound or relies on core's probe under the passthrough rule in [Reject vectors](spec/wire-format.md#reject-vectors) (`test/fixtures/wire-vectors.ts` defers it) | ⚠️ Untested |
| Storage container (auto mode)¹⁵ | CK v3 frame (Python-internal) | Plain MessagePack (`rmp` named) — no envelope; ⚠️ decodes cachekit-ts's bare ByteStorage envelope ([WIRE-21](spec/wire-format.md#wire-21)), in every release and on `main`¹⁵ | Bare ByteStorage envelope (default) | — |
| Temporal sentinels ([spec](spec/wire-format.md#datetime-extension-format)) | ✅ PyPI 0.22.0 (wheel run 2026-10-07): the default path revives `__datetime__`, `__date__` and `__time__` (each `temporal_sentinel_vectors` payload under `StandardSerializer`), as do `AutoSerializer` and interop mode, and all three write them; the three `wire-format.json` 1.4.0 `temporal_sentinel_vectors` run in CI since 0.23.0 ([cachekit-py#550](https://github.com/cachekit-io/cachekit-py/pull/550)) | ❌ crates.io 0.10.0 (`.crate` inspected 2026-10-07): revives none and writes none, in either mode; interop's value profile refuses a datetime; `main` at `b5fb2a6` likewise (no sentinel reviver in `src/`). cachekit-rs vendors no `wire-format.json` | ❌ npm 0.2.1 (`.tgz` inspected 2026-10-24; 0.1.5, inspected 2026-10-07, behaves the same): the default path revives none, and writes a `Date` as its ISO string (`dist/serialization/serializer.js`); interop mode revives only `__datetime__`, leaving `__date__` and `__time__` as maps, since JavaScript has no date-only or time-only type. Since 0.2.1 the `wire-format.json` 1.4.0 `temporal_sentinel_vectors` run in both lanes as expected failures naming [WIRE-20](spec/wire-format.md#wire-20), each pinning the map the read returns ([cachekit-ts#229](https://github.com/cachekit-io/cachekit-ts/pull/229)) | ⚠️ Untested |
| Encryption (AES-256-GCM) | ✅ Compliant | ✅ Canonical (cachekit-core) | ✅ Compliant | ⚠️ Untested |
Expand Down
Loading