From d7cc039028d5cfe6ed17448e44dd18b64011f708 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 22 Oct 2026 22:47:23 +0200 Subject: [PATCH] cultcache-ts tests: bytes that only look like an array or a string are not a stamp Builds. Co-Authored-By: Claude Sonnet 5.5 --- packages/cultcache-ts/test/cult-cache.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cultcache-ts/test/cult-cache.test.ts b/packages/cultcache-ts/test/cult-cache.test.ts index b1e5f44e..367f152e 100644 --- a/packages/cultcache-ts/test/cult-cache.test.ts +++ b/packages/cultcache-ts/test/cult-cache.test.ts @@ -1553,6 +1553,9 @@ test("bytes with no readable store stamp are not refused", () => { "first element is not a string": [0x92, 0x01, 0xb2, ...stamp], "a bare string": [0xb2, ...stamp], "a map": [0x81, 0xb2, ...stamp], + "a map whose bytes read as an array32 count": [0x81, 0x00, 0x00, 0x00, 0x01, 0xb2, ...stamp], + "a small integer before a stamp-looking body": [0x91, 0x12, ...stamp], + "a uint32 before a stamp-looking body": [0x91, 0xce, 0x00, 0x00, 0x00, 0x12, ...stamp], "str8 cut before its length": [0x91, 0xd9], "str16 cut before its length": [0x91, 0xda, 0x00], "str32 cut before its length": [0x91, 0xdb, 0x00, 0x00, 0x00],