Commit graph CultLib/packages/cultmesh-kotlin
Author SHA1 Message Date
Meta Vens
bad511f5ac Merge CultCache R1 (f789c8d1) into C2a: one reader per runtime, R1's failure taxonomy
R1's rules win where both sides decided the same question: a zero-byte file is
not a store (refused as unreadable in every runtime), only nothing at the path is
empty, a dangling link is an I/O error, refusals never echo stored values and echo
a header only as cultcache.store.v<digits>, writes report Rejected, NotReplaced
and ReplacedNotDurable. C2a's rules win on what it added: the v3 element-id
header, variants, whole-file proof, typed unreadable errors in C#, TypeScript and
Python. Rust keeps R1's CultCacheStoreUnreadable{path, kind}; C2a's
StoreUnreadableError is deleted. The readability manifest's zero-byte row is
refuses x4.

Not yet built or tested: verification follows in the next commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 19:41:35 +02:00
Meta Vens
0e6e6321c2 CultMesh Kotlin: the reconciliation self-test note gets its own schema
4002a996's refusal caught the self-test itself: the reconciliation block
registered kotlin.reactive_note beside kotlin.reactive_note.ui under one
schema id in one cache. The block tests reconciliation, not two types for one
schema, so its note is now kotlin.reconcile_note under its own schema id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 18:34:37 +02:00
Meta Vens
4002a996b8 CultMesh Kotlin: a cache refuses a second type for one schema id, typed
F7 (operator, 2026-09-30): "Schema aliasing sounds like a really bad idea,
I support retiring it." CultCache.register wrote its type and schema maps
unconditionally, and put, get, getAll and delete register implicitly, so one
Kotlin cache could hold two types for one schema and codecForSchema answered
with the last.

- register refuses a codec whose type already holds another schema id, or
  whose schema id another type holds, with the new
  CultSchemaConflictException (schema id, both document types, empty record
  key), the Kotlin counterpart of the other runtimes' typed conflict. The
  implicit registration in put, get, getAll and delete goes through the same
  check. Registering the same type for the same schema again stays allowed.
- Self-test: other-type same-schema and same-type other-schema claimants,
  through register, put, get, getAll and delete, each in a fresh cache; the
  first codec still answers for its schema afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 17:47:48 +02:00
Meta Vens
e079ba1ad3 cultmesh-kotlin: the bind self-test observes a wildcard, not its family
A JVM wildcard socket is dual-stack, so a client bound to 0.0.0.0 reports the
IPv6 wildcard as its local address and the self-test's first check failed on
Linux. Assert that a client for a remote endpoint binds a wildcard, and keep the
exact loopback checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:52:26 +02:00
Meta Vens
cf62461643 cultmesh-kotlin: an RUDP client for a remote endpoint binds the unspecified address
The CultMesh RUDP client entry points defaulted bindHost to 127.0.0.1. On
Windows a socket bound to loopback cannot send off the host (os error 10051),
so a default client could not reach a remote endpoint.

cultNetRudpClientBindAddress owns the rule: loopback for a loopback endpoint,
otherwise the unspecified address of the endpoint's family (0.0.0.0 or ::).
bindHost defaults to null on every client entry point, which uses the rule. An
explicit bindHost still wins; a CultMesh server still binds 127.0.0.1 unless
told otherwise. The self-test pins all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:49:31 +02:00
Meta Vens
fcc49cffa0 Consolidate CultNet schema contracts into CultLib/contracts/cultnet
REC-032 commit 1: move the canonical 33 TS + witness-artifact-bundle
schema files (34 total) into runtime-neutral CultLib/contracts/cultnet,
move the interop-note schema (and delete the zero-consumer discovery-*
schemas per D3, tagged parked/cultnet-discovery-contracts) into
contracts/cultnet/interop, and delete the 27 C# and 24 Rust duplicate
copies after confirming byte-for-byte equivalence (only
cultnet.snapshot-request differs: TS carries shardId/shardEpoch, a
known drift already resolved in favor of the TS shape).

Rewrite every $id from https://github.com/GameCult/cultnet-ts/contracts/
and .../cultnet-ts/integration/contracts/ to
https://github.com/GameCult/CultLib/contracts/cultnet/(interop/); give
the two shard-catalog schemas URL ids per D1, replacing the bare
cultnet.shard_catalog_*.v0 identifiers; leave ghostlight.agent-state's
Ghostlight-owned $id untouched per D5.

Repoint every runtime's load path and id literal at the new location:
C# csproj EmbeddedResource + LogicalName, Rust include_str! paths,
TS contracts.ts imports + swarm-contracts manifest/tooling + package.json
files/prepack, and the id/path literals in the C#, Rust, Python and
Kotlin interop tests and peers. Python and Kotlin still build their own
schema JSON in-process (D2); only their base constants, id literals,
and (for Kotlin) contentHash literals were swapped. Every Kotlin
contentHash was recomputed from the final canonical files using the
runtime's own stable-stringify + SHA-256 function; all matched the
planner's precomputed values except cultnet.schema-catalog-response,
where the planner's proposed value did not match recomputation and the
freshly computed value was used instead.

REC-032, decisions D1/D2/D3/D5.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 17:27:41 +02:00
Meta Vens
fd676ce74d Finish the sequence-domain split in Python and Kotlin
Separating the reliable and lossy sequence domains landed in Rust, TypeScript
and C# on a branch. The Python and Kotlin halves were written at the same time
and left uncommitted in the worktree, so three runtimes spoke the new contract
and two spoke the old one -- the exact cross-runtime disagreement this
repository exists to prevent.

Both were already complete and implement the same three rules as the others:
ordered delivery requires reliability, sequenced channels carry their own
per-channel counters with latest-wins delivery, and duplicate suppression is
gated on packet.reliable so lossy datagrams are remembered nowhere.

Python also gains the three tests Rust, TypeScript and C# each received and it
did not: lossy packets cannot create reliable ordered gaps, unreliable
sequenced delivery is scoped to its channel, and unreliable ordered delivery is
rejected. Python passes 141.

Kotlin is committed unverified. This machine has no JVM or Gradle, and the
package carries no runtime-local test file, so its only gate is the interop
lane in CI. The change mirrors the four runtimes proven here line for line, but
mirroring is not evidence and CI is the witness.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 00:40:05 +02:00
Meta Vens
75c180782a Acknowledge retransmits across RUDP horizons 2026-08-23 19:15:22 +02:00
Meta Vens
fda51fad50 Acknowledge reliable RUDP windows cumulatively 2026-08-23 19:00:33 +02:00
Meta Vens
a2e3d3fa35 Bind reliable windows to the RUDP ACK horizon 2026-08-23 18:54:18 +02:00
Meta Vens
f4dabfefb0 Bound RUDP reliable transmission windows 2026-08-23 18:35:49 +02:00
Meta Vens
b155e32541 Add Kotlin reactive document sync 2026-06-28 00:36:59 +01:00
Meta Vens
41427d3762 Document typed alias sync ergonomics 2026-06-28 00:14:55 +01:00
Meta Vens
8533da0037 Add Kotlin and Rust alias sync coverage 2026-06-28 00:12:05 +01:00
Meta Vens
b2f2e1a0ff Add Kotlin interop RUDP serve dial path 2026-06-17 12:45:30 +01:00
Meta Vens
2ec98d60da Add Kotlin CultMesh connected RUDP clients 2026-06-17 05:42:02 +01:00
Meta Vens
e06e3f5b3a Add cross-runtime interop workflow 2026-06-16 17:09:33 +01:00
Meta Vens
c399451880 Add Kotlin authorized RUDP peer sugar 2026-06-16 16:45:21 +01:00
Meta Vens
57bb43b10e Add Kotlin built-in schema filters 2026-06-16 16:21:13 +01:00
Meta Vens
2355617eca Add Kotlin built-in schema catalog 2026-06-16 16:03:18 +01:00
Meta Vens
9c21270f40 Unify Kotlin schema transport catalog helpers 2026-06-16 14:42:57 +01:00
Meta Vens
38d772c250 Add Kotlin catalog transport helpers 2026-06-16 12:57:54 +01:00
Meta Vens
49a5a2ae30 Add Kotlin WebSocket schema message sugar 2026-06-16 11:41:32 +01:00
Meta Vens
e2ea266136 Add Kotlin schema shard facade sugar 2026-06-16 10:43:54 +01:00
Meta Vens
4622c9bfa7 Add Kotlin catalog watch ergonomics 2026-06-16 10:02:07 +01:00
Meta Vens
35f259a2a2 Add Kotlin WebSocket transport helper 2026-06-16 07:14:31 +01:00
Meta Vens
86da35fedb Add Kotlin RUDP reconnect loop 2026-06-16 06:08:22 +01:00
Meta Vens
4a54966b10 Add portable reconnect controllers 2026-06-16 05:29:45 +01:00
Meta Vens
fa985255da Add Kotlin RUDP endpoint client sugar 2026-06-16 04:39:22 +01:00
Meta Vens
9e97d94796 Advertise RUDP reconnect policy in profiles 2026-06-16 04:01:41 +01:00
Meta Vens
b3be836115 Add portable reconnect policy helpers 2026-06-16 03:07:31 +01:00
Meta Vens
5201dd6ce6 Add Kotlin CultMesh facade 2026-06-16 00:50:29 +01:00
Meta Vens
0d3c653f96 Add Kotlin CultMesh stream catalog 2026-06-16 00:38:48 +01:00
Meta Vens
c1521c3ba0 Add Kotlin authority lease ergonomics 2026-06-16 00:17:35 +01:00
Meta Vens
601fc770ca Add Kotlin shard replication primitives 2026-06-15 23:00:33 +01:00
Meta Vens
5803b17688 Add Kotlin schema catalog ergonomics 2026-06-15 22:49:04 +01:00
Meta Vens
bfc1278583 Add Kotlin raw snapshot sync helpers 2026-06-15 22:38:49 +01:00
Meta Vens
7bea107622 Add Kotlin CultMesh discovery catalogs 2026-06-15 22:25:03 +01:00
Meta Vens
cf7330f31b Add Kotlin schema-v0 RUDP ergonomics 2026-06-15 22:14:13 +01:00
Meta Vens
908db9e5a7 Add Kotlin typed cache ergonomics 2026-06-15 21:36:54 +01:00
Meta Vens
0d2bbe7029 Add Kotlin RUDP ergonomic helpers 2026-06-15 21:23:34 +01:00
Meta Vens
c85b5fb561 Add RUDP reliable queue bounds across runtimes 2026-06-15 15:24:11 +01:00
Meta Vens
8287926921 Add RUDP ping timeout parity 2026-06-15 03:26:40 +01:00
Meta Vens
59146888c0 Propagate RUDP disconnect reasons across runtimes 2026-06-15 03:11:46 +01:00
Meta Vens
436654de75 Prove RUDP reordering across runtimes 2026-06-15 02:52:01 +01:00
Meta Vens
d6f5ee28b0 Add RUDP fragmentation across runtimes 2026-06-15 02:26:34 +01:00
Meta Vens
4209bbb9b6 Prove RUDP response resend across runtimes 2026-06-15 01:40:43 +01:00
Meta Vens
13a70db012 Add Kotlin RUDP interop proof 2026-06-15 01:17:08 +01:00
Meta Vens
b695b3867a Add Kotlin RUDP transport parity 2026-06-14 23:47:55 +01:00
Meta Vens
e7a570111d Add Kotlin Eve media observation contract 2026-05-31 14:19:50 +01:00