Commit graph

1,907 commits

Author SHA1 Message Date
Meta Vens
c85edf90bb cultcache-ts slots: a default fills only a missing slot, a nil is null in a reference slot and refused in a value slot, bytes reads a str
Held to tests/vectors/slot-nil/reads.msgpack, written by the C# reference (SlotNilVectorTests): every accepted row
rewrites to the reference's bytes, nil in an int slot is refused. 94a26431c000c0 round-trips byte-identical.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 21:05:09 +02:00
Meta Vens
6d410f9caf slot-nil vectors: the C# writer for what the reference reads and rewrites for a nil or short record in each slot kind
Does not build the vector yet: reads.msgpack is written in the next commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 21:01:33 +02:00
Meta Vens
8cff9b7f30 verify-eve-browser-network: a waiter matches only lines whose newline has arrived
A stdout chunk can end inside the benchmark JSON line; the waiter matched the half line and JSON.parse threw (seen once
in two runs on the rust image). Waiters now read complete lines only.

All commits build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 20:51:35 +02:00
Meta Vens
b25d86a873 Docs: DocumentPayload stops direct reads and assignment, not runtime narrowing or a cast
The cultcache-ts README, the DocumentPayload comment (comment only) and the cultmesh-browser README say plainly what the
opaque type guarantees and what it does not; documentPayloadBytes is the escape for bytes.

All commits build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 20:37:29 +02:00
Meta Vens
a6478a9cab CultMeshRudpDocumentPut discriminates a decoded document from an undecoded payload; the store read's schema-matched find is pinned
The put is a union on `decoded`: true carries the document read through the registry's definition, false carries the
opaque DocumentPayload, so the owner read on the undecoded branch compiles without a cast (compile fixture in
payload-type.test.ts) and the three test casts are gone. A store holding a foreign parsing record, a matched record that
does not parse and a matched record that parses must return the last, which kills the survivors on the schema-matched
second find in resolveCultMeshStoreDocumentRecord.

All commits build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 20:37:29 +02:00
Meta Vens
195c37b867 Eve browser sample reads its payloads through definitions, and the verifier type-checks the page
main.ts called decodeCultNetPayload with no definition, which the required-definition signature refuses; esbuild strips
types, so only the browser noticed. The sample now holds a counter definition and plain-map definitions for the Eve
documents, and verify-eve-browser-network.mjs runs tsc over main.ts against the module map the bundle uses (and builds
cultcache-ts, which cultmesh-browser now imports) before bundling. The receipt is read as the typed wire object instead
of a cast of the Eve receipt type.

All commits build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 20:37:29 +02:00
Meta Vens
13b0b02d82 Provider command refusals name the field and echo none of the values
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 19:51:08 +02:00
Meta Vens
9d2d25dae1 A RUDP put naming a schema with no registered definition reaches the handler as the untouched opaque payload
The put handler no longer plain-decodes such a payload, and does not refuse it either: five
existing server tests put through an empty registry, a catch-all server is a capability a general
library keeps, and the payload type already stops a plain read. CultMeshRudpDocumentPut.payload
documents the two cases; a handler that holds the definition reads it with decodeDocumentPayload.
Builds in every package; suites run at the end of the pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 19:45:59 +02:00
Meta Vens
0c5207b55f One typed owner of document-payload reads and writes: DocumentPayload is opaque, the definition is required
DocumentPayload is an opaque object type over the same runtime Uint8Array, keyed by a string
property, and types CultCacheEnvelope.payload, CultNetRawDocumentRecord.payload and
CultMeshRealtimeFrame.payload. decodeDocumentPayload(definition, payload) and
encodeDocumentPayload(definition, value) are the only reader and writer; documentPayloadFromBytes
and documentPayloadBytes are the two named escapes at the edges where bytes enter and leave.
resolveDocumentFormatter leaves the package index. The cache, cultnet replication, the mesh read
paths, the provider command (now a CultCache document), and the browser's decodeCultNetPayload
(definition required, cultcache-ts/document entry) all go through the owner.

Compile-fail fixtures per payload-carrying package pin the type with expect-error lines.
check-typescript-tests-wired.mjs fails when a test file is run by no script; cultcache-ts now
runs dist-test/test/*.test.js, and the portability workflow runs the check and the cache suite.

Builds in every package (tsc, src and tests); the suites run once, at the end of the pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 19:33:42 +02:00
Meta Vens
a3a45c79eb Delete the text-scan payload guards, the schemaId overloads and the definition-less decode door
The two payload-decode-owner text-scan tests go, as do the string-schemaId overloads and
branches of the cultMeshDocumentFrom* functions and statics, decodeCultMeshPayload,
decodeCultNetRawDocumentPayload, toUint8Array, replication's second decodeDocumentValue, and the
undefined branch of decodeDocumentPayload. decodeDocumentPayload now requires the definition and
also runs its schema (the one reader). A publication binding names a definition, never a bare
schema id; the RUDP put handler refuses a schema with no registered definition instead of
plain-decoding it. Builds in every package; tests not yet rerun.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 19:21:32 +02:00
Meta Vens
294469e300 Payload-owner guard finds its package root from the file; refusals pinned in the decode tests
The guard test counted its package root from the compiled layout and failed under tsx and for a one-file src; it now walks up to
the package.json. The browser's non-messagepack refusal and the cache's codec-and-formatter refusal are pinned by message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 10:31:08 +02:00
Meta Vens
f1e7b36a39 Payload decode has one owner: cultcache-ts decodeDocumentPayload; wire values go through cultnet-ts/wire
The RUDP put handler and the browser payload reader decoded a codec document with plain msgpack. cultcache-ts now
exports decodeDocumentPayload (definition or plain), the RUDP server reads a put through the registry's definition,
and decodeCultNetPayload takes the formatter. cultmesh-ts and cultmesh-browser no longer depend on @msgpack/msgpack:
frames and commands use cultnet-ts/wire, and a test per package scans src and the manifest. The envelope probe fixture
now runs the plain record first and last. Not yet built or tested on this commit; the verify job follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 10:25:29 +02:00
Meta Vens
8fa2d11042 codec-documents test: the alias found by parsing skips a plain record, and the snapshot probe picks the codec record among two
Builds; run at the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:54:10 +02:00
Meta Vens
8d5c3c0923 union-parity test: only a quiet-bit-clear NaN is signalling; a finite float32 with bit 22 clear still reads
Builds; kills the Stryker survivor at wire.ts:111 (the exponent test replaced by true).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:47:01 +02:00
Meta Vens
cf9d2fd2b5 codec-documents test: the alias record is found by parsing, and a peer snapshot handle reads a codec document
Builds; TS suites run at the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:38:56 +02:00
Meta Vens
5d2a880ffc numeric-leaves vectors: the 2^24+1 reads row and float32-nan.msgpack, written by the C# reference
Regenerated with CULTCACHE_WRITE_VECTORS=1 on Yggdrasil (dotnet 10 image, 16 vector tests green). Completes the previous commit; both build, and the TS suites are checked once at the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:31:45 +02:00
Meta Vens
1e0c5a9209 batch 4 code: mesh readers decode through the definition's formatter, float32 sNaN refused, slot keys capped at 65535
cultmesh-ts reads document payloads through resolveDocumentFormatter at its five plain-msgpack sites; WireFloat carries a signalling flag and the float32 leaf refuses it; slots() refuses a key above 65535 at definition. The C# vector writer gains the 2^24+1 reads row and float32-nan.msgpack, whose committed files land in the next commit: this commit does not build its tests (union-parity numeric vectors, row count 160 and float32-nan.msgpack are absent).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:18:18 +02:00
Meta Vens
26ff9d27e9 numeric-leaves vectors gain two float32 rows; float32 integer rounding drops its redundant guard
An odd kept value just past exact pins the tie rule (the Stryker survivor). The excess <= 0 guard was equivalent to the
general path for the only values that reach it, so it is deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:45:48 +02:00
Meta Vens
6640b9d358 NumericLeafVectorTests: an odd float32 value just past exact, the case a wrong tie rule rounds up
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:45:04 +02:00
Meta Vens
44dbf41362 union-parity test: the unknown-arm payload is one array, not two values
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:39:42 +02:00
Meta Vens
fa1c006bee cultcache-ts and cultnet-ts: replication writes a codec document through the codec; numeric oracle read from the C# vectors; float32 rounds once; arm and slot keys span the reference's Int32
- cultnet-ts replication calls cultcache-ts's resolveDocumentFormatter (now exported) and loses its private
  @msgpack/msgpack default, so a raw put and a snapshot of a codec document carry the codec's bytes.
- the hand-written numeric table is deleted; the tests read tests/vectors/numeric-leaves.
- an integer past 2^53 in a float32 slot rounds once (ties to even), not through a double.
- a union arm key is any Int32 (negative too, sorted numerically); a slot key is 0 to Int32 max.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:34:31 +02:00
Meta Vens
35386acc51 numeric-leaves vectors: reads, writes and a mixed record, written by the C# reference
Regenerated twice on Yggdrasil under CULTCACHE_WRITE_VECTORS=1 and byte-identical. The cultcache-ts test still
imports the deleted hand table until the next commit, so this commit and its parent do not build the TS tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:34:30 +02:00
Meta Vens
3eb4cb641f NumericLeafVectorTests: a mixed-record vector, the shape a replicated document has
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:32:18 +02:00
Meta Vens
42f746de20 NumericLeafVectorTests: the coverage floor matches the cases (int32 accepts 8)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:30:48 +02:00
Meta Vens
c38974f3c6 C# numeric-leaf vector writer: reads and writes of int, long, float, double slots, gated by CULTCACHE_WRITE_VECTORS
The vector files follow in the next commit; the new tests fail until they are committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:30:04 +02:00
Meta Vens
0882eee9d2 cultcache-ts wire: delete the dead guards the mutation run found; pin the width and Int32 boundaries
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 05:04:23 +02:00
Meta Vens
0f40e42904 cultcache-ts README: leaves, type names, arm keys
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 04:56:29 +02:00
Meta Vens
17df29cc9c cultcache-ts tests: numeric leaves held to the C# reference's reads and writes
The table is the reference's own answer for 120 one-slot reads and 46 writes, from a job-only probe of src/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 04:55:22 +02:00
Meta Vens
b4f41385e3 cultcache-ts tests: arm keys, wire, catalog parity, one codec-or-formatter owner (not yet run; does not build until the numeric table lands)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 04:51:51 +02:00
Meta Vens
485b570cf5 cultcache-ts codec: reference-typed numeric leaves, a wire reader and writer, one owner for codec-vs-formatter (work in progress, tests not yet run)
The codec path owns a small MessagePack reader and writer so it can tell an integer from a float and keep 64-bit
integers whole. Leaves int32, int64, float32, float64 replace number; every codec carries the reference's type name and
a slot record derives its catalog members from them. Not built or run at this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 04:49:13 +02:00
Meta Vens
5aca6a8902 cultcache-ts README: slot records and unions
Docs only; the code and tests are unchanged from the previous commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 04:13:56 +02:00
Meta Vens
bea5564b3a union-parity test: the one list-element probe is cast so the test project compiles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 04:09:57 +02:00
Meta Vens
9073d582e7 cultcache-ts codec: Number.isFinite alone decides a number
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 04:06:43 +02:00
Meta Vens
344630259a cultcache-ts codec: tests for refusal messages and leaf shapes; drop a redundant key sort and regex quantifier
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 04:03:04 +02:00
Meta Vens
21dec1ef56 union-parity test: find the vectors by walking up, so the test runs from source as well as from dist-test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 03:54:30 +02:00
Meta Vens
82aab7d83e union-parity test: the canary check counts the payloads that carry it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 03:51:37 +02:00
Meta Vens
f43a0d26f9 cultcache-ts codec: unit arm is a frozen object, recursive test codec annotated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 03:51:11 +02:00
Meta Vens
499887484c cultcache-ts: slot record and union codecs, held to the union-parity golden
Unverified first pass; not yet compiled or run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 03:50:23 +02:00
Meta Vens
b0f4057704 Merge hands/union-golden: the recursive-union and arm-refusal goldens, written reproducibly by the C# reference
Soul holds at cultlib-gaps:verdict:cut-union-golden.s2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 03:45:15 +02:00
Meta Vens
e63f93e4a5 Union golden: union-surface.cc regenerated with the pinned store clock
Written by the C# reference with CULTCACHE_WRITE_VECTORS=1; two regenerations on Yggdrasil were byte-identical.
The 12 payload vectors and outcomes.msgpack are unchanged. Builds and passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 02:59:51 +02:00
Meta Vens
b4edbb1eeb Union golden: the store's clock is an internal seam, the writer pins it, the gate test runs under any switch
CultCache mints storedAt from an internal Clock (default the wall clock); the vector writer pins it, so
union-surface.cc is regenerated in process and byte-compared on every run. The gate test sets the switch
itself and writes only a probe, so it neither skips nor touches a committed vector.

This commit does not pass: union-surface.cc still holds the old wall-clock stored-at; the next commit
regenerates it. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 02:58:54 +02:00
Meta Vens
e5cfb10674 Union parity vectors: committed bytes written by the C# reference, outcomes as data, README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 00:28:20 +02:00
Meta Vens
3c75cae4f0 Union parity vectors: the recursive-union fixture, refusal and extra-slot cases, written only under CULTCACHE_WRITE_VECTORS=1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 00:26:15 +02:00
Meta Vens
8d3bf52ed5 Merge hands/union-refusal-cs: the C# reference refuses unknown union arms and unnamed subtypes
Held by cultlib-gaps:verdict:cut-union-refusal-cs.s2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 00:21:15 +02:00
Meta Vens
a0e0cceaaa Union guard tests: pin the Int32 bounds and full-width encodings of an arm key
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 00:07:37 +02:00
Meta Vens
3042757701 Union guard: name an out-of-range or non-integer arm key, pin interface unions, name the schema on a variant refusal, changelog the exception type
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 23:48:49 +02:00
Meta Vens
506ec8c540 Union guard: the store refusal is readable from its outermost message; a consumer formatter for the union is wrapped, not replaced
Manual mutants survived: the record key and schema id were only asserted through the
cause chain, and an inner built from StandardResolver alone passed every test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 22:56:53 +02:00
Meta Vens
62a0e9ac98 Union guard tests: pin the composite's resolver order and that a union owns its keys
Stryker survivors on the Compose line and on the inherit argument.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 22:41:04 +02:00
Meta Vens
28d79b190a Union guard tests: forge a directory-store page the way its manifest commits to it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:50:53 +02:00
Meta Vens
286e8a71e9 cultlib-gaps: slot read-only probe (any depth), section S of the union parity map
Probe facts for ruling cultlib-gaps:ruling:extra-trailing-slots: the C# skip site and why a
resolver guard sees every nested object and arm, the mark arriving at depth 0, 1, 2, in an arm
and in a list element in C#, Rust, Python and TS, the cost on Aetheria.cc against an A/A
control, a live nested case in Aetheria (WeaponData.Tracking), the C# whole-view flush that
re-encodes every held record, and Kotlin's missing library slot codec. Cut order step 4 and
the model page follow the ruling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:41:45 +02:00