Commit graph

2,024 commits

Author SHA1 Message Date
Meta Vens
d9f73281f0 cultcache-py convert: delete the dead refused flag and guard; pin the late refusal path; README states the C# NaN-key bytes exactly
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 04:43:53 +02:00
Meta Vens
3b70479ffd cultcache-py tests: the no-path refusal test makes its canary directory per store kind
The previous commit's test reused one directory name across the two store kinds and errored on the second. Not run on this workstation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 03:35:25 +02:00
Meta Vens
ecfbaa8baa cultcache-py convert: create the destination inside its cleanup scope; refusals name the argument and a code, never a path
Fixes s4 interrupt-window-leaves-destination and convert-refusals-echo-paths. The mixed-width NaN
documented-refusal test reads the README paragraph of the previous commit. Not run on this workstation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 03:21:40 +02:00
Meta Vens
142613f4a7 cultcache-py README: record the mixed-width NaN key exception to the reference (s4 mixed-width-nan-divergence-unrecorded)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 03:21:39 +02:00
Meta Vens
9dd58010ba cultcache-py tests: fix the unterminated newline literals of the JSON Lines bytes test (160048b8 does not import)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 02:35:53 +02:00
Meta Vens
160048b896 cultcache-py tests: pin the JSON Lines file bytes and a destination removed mid-convert
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 02:27:44 +02:00
Meta Vens
6e13b5df3c cultcache-py tests: open the converted store under the default definitions without the unlisted type
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 02:16:36 +02:00
Meta Vens
cc9612ce9a cultcache-py tests: ConvertTests replace MigratePayloadsTests; codec rows for ext, NaN, read depth, timestamps; JSONL pull_all
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 02:11:50 +02:00
Meta Vens
62e5b2b04e cultcache-py: convert writes a new store and never its source; one carried-tree check and NaN key image
Deletes migrate_payloads (backup, live-byte compare, swap into the live store) and adds
convert(source, destination, definitions) per ruling py-migration-shape-ruled. Both store
kinds expose _file_bytes, the one encoder of _replace_all and convert. The MessagePack
codec decodes through the same _check_carried it writes through (depth past 256, extension
values, timestamps outside years 1 to 9999) and every NaN key is one key image.
Tests are updated in the next commit; this commit does not build the test suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 02:11:49 +02:00
Meta Vens
a59bbc7d44 cultnet-py test: the stamp router's rows pin the snake_case stamp, a non-text stamp, an unknown name and the KeyError's schema id
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 08:02:46 +02:00
Meta Vens
8263a998e0 cultcache-py tests: root integer bounds, a consumer codec's depth fault, the foreign-store TypeError text, and a vanished backup do not escape unpinned
Kills the mutmut survivors in _check_writable (root range ends), _fault_refusal (depth_limit branch) and migrate_payloads (TypeError text, unlink missing_ok).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 07:49:31 +02:00
Meta Vens
65ff258f1b cultcache-py: migrate_payloads copies the store to a backup that must not exist, rewrites from the copy, and swaps only an unchanged store
The backup is the rerun guard (payload bytes cannot say whether a store was migrated), the source is never written, a changed store or any refused record removes the backup and leaves the store as it was, and any exception class is named without its text. Tests: f32 collisions, the 256/257 seam, legacy inline keys, backup, rerun, existing backup, concurrent writer, refusal classes, zero count.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 07:40:03 +02:00
Meta Vens
fe93b66cfb cultcache-py: one container walk owns payload depth, float32 key images are refused on write, one reader owns map keys
_containers is the only depth counter (codec write, definition read and write); _PACK_DEPTH_LIMIT is gone. _check_writable refuses keys that collide once decoded (a Float32 beside an equal int, bool or float). The store's whole-file read and cultnet-py's stamp router read through the codec's reader instead of strict msgpack.unpackb, so no reader outside the codec decides key acceptability.

Does not pass the suite alone: two tests in test_payload_codec.py still assert the 511 bound; the next commit replaces them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 07:40:02 +02:00
Meta Vens
57f85acd6e cultcache-py test: a NUL byte in the migration test source made the module unimportable
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 06:37:34 +02:00
Meta Vens
d61ab8899c cultcache-py tests: the write walk's bound, fault text, schema-field forwarding, migration by schema name and by refusal class
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 06:35:31 +02:00
Meta Vens
0b0a2f2c04 cultcache-py test: migrated records are read directly, the unlisted-type record is not a registered type
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 06:25:57 +02:00
Meta Vens
eef1cb151b cultcache-py: the codec's write walk stops where packb does, not at the definition's depth limit; test fixes
The previous commit does not pass its own tests (5 errors in test_payload_codec and test_union_parity).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 06:22:45 +02:00
Meta Vens
ed0dc50243 cultcache-py: the MessagePack codec owns map keys and 64-bit integers both ways, one default author, payload-free refusals, atomic migrate_payloads
Fix batch h2 for cut py-msgpack-default (r2). The codec's read hook (_checked_map) and
write check carry the C# reference's key rule; PayloadCodecFault and a coded
CultCachePayloadFormatError replace the map_keys walk and the JSON remedy sentence;
refusals are raised after the except block so no decoder exception rides on
__context__. migrate_payloads rewrites a 0.3 store whole or not at all. The store's
schema-stamp recovery and the optional-msgpack guards are deleted.

Not yet run: this commit's tests are verified by the next commit's job.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 06:15:30 +02:00
Meta Vens
7f2c747743 cultcache-py tests: the format refusals pin their exact text and their type, codec and direction
Kills the mutants that rewrote the remedy sentence and the write refusal's attributes. Builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 03:42:44 +02:00
Meta Vens
c042100729 cultcache-py: a definition's PayloadCodec owns its payload format; MessagePack is the default
define_document_type payloads are MessagePack (ruling py-msgpack-default). PayloadCodec,
MESSAGEPACK_PAYLOAD_CODEC and JSON_PAYLOAD_CODEC replace the payload_encoder/payload_decoder pair,
_STACK_FAULTS and the optional-msgpack guards. A payload that is not one value of the codec's format
is CultCachePayloadFormatError naming the remedy; a map key the default cannot read back is refused on
write; JSON reads past the interpreter stack are the depth refusal. interop_peer drops its lambdas.
Breaking: 0.3 JSON stores read with payload_codec=JSON_PAYLOAD_CODEC. Builds; not yet run on Yggdrasil.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 03:21:33 +02:00
Meta Vens
b3bd8dd5e5 Merge hands/py-typed-leaves: C# leaf vectors (leaf-vectors-cs) and cultcache-py typed leaves that own each slot's C# type name and checks, held to them
leaf-vectors-cs Soul-held at pass 3 (cultlib-gaps:verdict:cut-leaf-vectors-cs.s3); py-typed-leaves Soul-held at pass 2 (cultlib-gaps:verdict:cut-py-typed-leaves.s2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:28:58 +02:00
Meta Vens
10521f3598 cultcache-py test: the any-row comment cites the ruling in force, any-rewrite-binds-kind-and-value
Comment only. Soul finding cut-py-typed-leaves.s2.stale-superseded-ruling-comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:28:26 +02:00
Meta Vens
8e0a6cf428 Merge hands/union-bounds-ts: cultcache-ts payload nesting bound (256) in the one document-payload owner, held to the C# bounds vectors
Soul-held at pass 3 (cultlib-gaps:verdict:cut-union-bounds-ts.s3). Lands follow-up ts-codec-pin-gaps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:10:50 +02:00
Meta Vens
4282d507cf Caching tests: the wrong-catalog refusal is raised while the store is added, so both steps sit inside the asserted call
Previous commit 122894f5 failed these four cases (AddBackingStore threw outside Assert.CatchAsync).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 02:06:26 +02:00
Meta Vens
122894f5f8 Caching tests: the reference opens a Python-written typed-leaf store and refuses wrong type names
Vectors py-store/*.cc are written only by cultcache-py (CULTCACHE_WRITE_VECTORS=1).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 02:01:48 +02:00
Meta Vens
100088520e cultcache-py test: the any-row comparison tells bool, int and float apart; README points at the kind-and-value ruling
Ruling any-rewrite-binds-kind-and-value: kind-strict, exact value, recursive, numeric width free.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 02:01:47 +02:00
Meta Vens
3b2af2b232 cultcache-ts: previewPayload reads through decodeBoundedPayload (the inspector's one walk site); the map32 and array32 counts are pinned above 65535
The wide-count test announced map32 as 32770 pairs, which fits in 16 bits, so a
count read as its low 16 bits survived. map32 now announces 65537 pairs and
array32 65540 children; both low halves close the container early.

Builds: yes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:50:05 +02:00
Meta Vens
0451e4afc1 cultcache-ts test: the plain-document write refusal names its document type (kills the Stryker survivor on the encode subject)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:32:15 +02:00
Meta Vens
eb01c414a6 cultcache-py: one number path for the float leaves (no write/read flag); tests pin the refusal texts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:24:35 +02:00
Meta Vens
986faf1f33 test:pack:ts probe shows each exported function a map and a slot record (readWire refuses a map, so a wrapper of it passed the map-only probe)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:22:47 +02:00
Meta Vens
ed30592ea7 cultcache-py: an extension is reported as an extension (a namedtuple was read as an array); boundary tests for the leaves
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:17:28 +02:00
Meta Vens
542a3d904e cultcache-ts test: the deep codec document uses a slot codec that writes N nested arrays (a self-recursive list codec has no finite type name)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:11:18 +02:00
Meta Vens
d64f688459 test fixes: the grey-image schema is a custom check, and the pack probe treats a throwing result as not a reader
Fixes the previous commit (05f9937b, mislabelled wip): its test file did not compile (TS2322) and the pack probe threw on a lazy codec's getters. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:08:44 +02:00
Meta Vens
8ebe43fe7a cultcache-py test: the leaf-record mirror is one function
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:07:52 +02:00
Meta Vens
05f9937bbc wip 2026-10-12 01:07:51 +02:00
Meta Vens
58ee315d11 cultcache-py: typed leaves own each slot's C# type name, write check and read check; the catalog derives from them
leaves.py (string, boolean, bytes, int32, int64, float32, float64, any, list, array, nullable, lazy) held to the
numeric-leaves vectors. Removed: DatabaseEntryField.many, callable codecs and _resolve, the System.Object literal,
the present-nil default, the union's nil pass-through, interop.py's hand-written catalog. A float32 keeps its width
through _pack_tree. Nil is refused unless wrapped in nullable; a default fills only a slot past the payload's end.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:06:24 +02:00
Meta Vens
27b9e2b315 test:pack:ts denies payload readers by identity and behaviour, not by name
Finding pack-denial-by-name: the package-internal readers (readWire, resolveDocumentFormatter, @msgpack decode) are loaded from the packed dist by path and searched by identity through every packed entry, including default and namespace members; every other exported function is shown a MessagePack map and must not return it decoded.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:04:27 +02:00
Meta Vens
c40cc555e1 cultcache-ts: the payload walk covers library-written MessagePack only; a user formatter's bytes are its own, and the 32-bit walk lengths are pinned
Findings custom-formatter-bytes-walked (ruling depth-walk-covers-library-msgpack: the owner skips the walk when the definition carries a formatter; the grey 0x91 image round-trips, plain and codec stay bounded; README says so) and wide-length-unpinned (bin32/str32/ext32 of 65539 bytes and array32/map32 of more than 65535 children before a chain at and past the limit). The same tests pin the inspector refusing to recover a stamp from a past-limit payload. Not yet built.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:04:27 +02:00
Meta Vens
ef682ad7b0 cultcache-ts inspector: recoverCatalogEntry reads through the same bounded door as previewPayload
Finding inspector-recover-unwalked: one decodeBoundedPayload (walk, then decode) serves both the stamp recovery and the preview, so a payload past the limit is never decoded by either.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:04:26 +02:00
Meta Vens
7f38134155 Caching tests: regenerate leaves-reads.msgpack from the C# reference (11 leaves x 28 tokens, 308 rows) and the README: timestamp rows, any rewrite binds value
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:35:06 +02:00
Meta Vens
2bcbe17253 Caching tests: leaves-reads tokens for the timestamp32/64/96 exts and same-shaped non-timestamp exts (vector tests fail here: vectors stale)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:34:09 +02:00
Meta Vens
51631f07d5 Caching tests: regenerate leaves-reads.msgpack from the C# reference (11 leaves x 23 tokens, 253 rows) and the README rows
leaf-record.msgpack is unchanged. The any leaf now has a ext refusal (d40100) and the record leaves read a complete second slot.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:19:25 +02:00
Meta Vens
08e1a2cd37 Caching tests: drop the timestamp ext token, which the any leaf accepts (vectors not yet regenerated)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:18:46 +02:00
Meta Vens
719cf655b6 Caching tests: leaves-reads tokens for ext values and a complete record, and a list-of-records leaf (vectors not yet regenerated; the vector tests fail at this commit)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:17:41 +02:00
Meta Vens
9df32ec64f cultcache-ts test: the walk's header counts, the never-used 0xc1 and the longest fixstr, and a scalar that ends a full-depth chain
Kills the survivors of the first mutation sweep (fixext2 skip, 0xc1, the fixarray/fixmap/fixstr upper bounds, map16 and map32 child counts).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:17:09 +02:00
Meta Vens
85d8d575cf Caching tests: write slot-nil/reads.msgpack from the C# reference with the two four-byte UTF-8 rows (CULTCACHE_WRITE_VECTORS=1 on Yggdrasil)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:09:37 +02:00
Meta Vens
c114820c0c Caching and cultcache-ts tests: slot-nil rows for a four-byte UTF-8 character in a string slot and in a byte[] slot
The C# cases and the TS assertions are here; the vector file is written from the reference in the next commit, so the
slot-nil tests of both runtimes fail at this commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:08:23 +02:00
Meta Vens
8dfdcd8a53 cultcache-ts test: the Node arm list names Wrap, and the put-refused assertion keeps the store's type
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:05:27 +02:00
Meta Vens
b69d3057a5 cultcache-ts: the payload nesting bound (256) in the one document-payload owner, so every TS payload door shares it
checkPayloadDepth is an iterative header walk run by decodeDocumentPayload before the formatter and by
encodeDocumentPayload on the formatter's bytes; the two plain-decode inspection doors call it first. The plain
formatter's encoder depth is set above the limit so the walk decides. Tests: the C# bounds vectors, the walk's
header and scalar rules, the owner, the inspector, the legacy version inference, and the mesh network doors;
test:pack:ts denies decoder-shaped exports by enumerating the packed entries.

Builds and passes untested at this commit (verification runs on Yggdrasil next).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:01:59 +02:00
Meta Vens
067d015122 Caching tests: write leaves-reads.msgpack and leaf-record.msgpack from the C# reference (CULTCACHE_WRITE_VECTORS=1 on Yggdrasil)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 23:58:04 +02:00