Commit graph CultLib/packages/cultnet-ts/test/interop
Author SHA1 Message Date
Meta Vens
95493862bd Split the Python runtime into cultcache-py, cultnet-py, cultmesh-py
One distribution named cultcache-py carried three libraries. Rust and
TypeScript layer them as cultcache < cultnet < cultmesh; Python now does
the same, one package per layer, module names unchanged so every
`from cultmesh_py import ...` keeps working.

Two imports ran against that layering and are resolved by moving code to
where the dependency direction says it lives, not by adding a shim:

- cultnet_py.interop_peer imported the Verse/peer catalog, authority
  lease, stream, and simulation-fact contracts from cultmesh_py. They are
  wire contracts a bare peer has to speak without owning a node, which is
  why cultnet-rs and cultnet-ts keep them in the net layer. They now live
  in cultnet_py.cultmesh_contracts; cultmesh_py re-exports them.
- cultcache_py.benchmark imported cultnet_py. It measures framed CultNet
  parse beside cache paths, so it and compare_csharp move to cultnet_py.
  verify checks all three packages and moves to cultmesh_py.

The single 6,693-line test module is split by what each test touches: a
test using any cultmesh_py name lands in cultmesh-py, else cultnet_py in
cultnet-py, else cultcache-py. Each suite runs with only its layer and the
layers below on the path, so a test that reaches up fails to import
rather than quietly binding the packages back together. 11 / 53 / 78 =
the same 142.

Workflows install all three; the publish job is one matrix over the
three packages keyed by tag prefix. The TS test harnesses put all three
src directories on PYTHONPATH. cultcache-py bumps to 0.2.0 because it no
longer contains cultnet_py or cultmesh_py; the new packages start at
0.1.0. Nothing was ever published, so no PyPI consumer moves.

  cultcache-py  11 tests, path: cultcache-py/src
  cultnet-py    53 tests, path: + cultnet-py/src
  cultmesh-py   78 tests, path: + cultmesh-py/src
  python -m cultmesh_py.verify -> ok, all five checks
  cultnet_py.interop_peer imports with cultmesh_py absent

Not run here: the cultnet-ts interop ring and cultcache-ts store matrix
need dotnet/kotlin peers; their PYTHONPATH change is four lines.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 13:10:47 +02:00
Meta Vens
77313ed48c Stop the interop harness leaking peers and hanging after it passes
The suite finished its work in about 60 seconds and then never exited. Four runs
were left alive for hours, holding 11 node and 2 dotnet peers, and a stranded
peer holding cultnet_interop_peer.exe is what made two unrelated cargo builds
fail with LNK1104. In CI this is a job that burns its whole timeout on green
tests.

Two real defects, found by asking the stuck process what it was waiting on
rather than by guessing. process.getActiveResourcesInfo reported four UDPWraps
and two PipeWraps still held after the last test.

The four UDP sockets: eight tests bind a server socket with bindUdpSocket and
close only the transport wrapper in their finally, never the socket itself. Four
leaked per run, matching the four Python lanes that fail on a machine without
msgpack -- the wrapper is built inside the try, so when the peer's readiness
rejects it never exists to be closed, and the raw socket is orphaned. Now closed
through a guarded helper that tolerates a transport having adopted it.

The teardown registration: t.after was registered after every `await ready`, so
a peer whose readiness rejected skipped the registration entirely and stranded
every peer already spawned. Moved ahead of the spawns at all four sites.

With those fixed the suite still does not drain on its own, so test:interop now
passes --test-force-exit. That is safe only because cleanup demonstrably
completes first: a forced run now leaves zero peers behind, where before it left
nine. Forcing the exit without the fixes above would have guaranteed orphans
rather than prevented them.

Verified: 65 seconds, exit 1, the expected 15 pass and 12 fail, no surviving
processes. The 12 failures are the Python lanes, which cannot run on this
machine and are unrelated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 16:32:10 +02:00
Meta Vens
8cb3b7282b Publish the non-Rust packages and make the licensing uniform
Rust consumers pin a CultLib revision through cargo git dependencies, which is
how Ghostlight, Epiphany, CodexConnector and Odin already consume the core
stack. npm and pip cannot take a package from a subdirectory of a git repo at
all, which is why the TypeScript and Python consumers vendored forks instead:
there was nothing else to depend on. This gives them a versioned artifact.

Tagging cultcache-ts-v* or cultcache-py-v* builds, tests and publishes. The tag
version must match the manifest version or the workflow refuses rather than
shipping a mislabelled artifact. PyPI uses trusted publishing, so no long-lived
token is stored; npm needs an NPM_TOKEN secret.

cultcache-ts is now @gamecult/cultcache-ts. The scope is not cosmetic: it makes
the package unambiguously org-owned on a public registry, and it is what lets
CultLib hold the name rather than racing for an unscoped one. CultLib's own
cultmesh-ts and cultnet-ts and their imports move with it; all three packages
typecheck and cultcache-ts passes 12 of 13 tests, the exception being the
cross-runtime store test that shells out to Python, which cannot run on this
machine because its Python has no msgpack.

Licensing was inconsistent with the repo. cultcache-py declared itself "Private
GameCult infrastructure" and cultcache-rs and cultmesh-rs declared nothing,
inside a repo whose LICENSE is MIT and whose every other package says MIT. All
three now say MIT. That was load-bearing here: a package that calls itself
private is not one to push to a public registry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 04:41:44 +02:00
Meta Vens
b2f2e1a0ff Add Kotlin interop RUDP serve dial path 2026-06-17 12:45:30 +01:00
Meta Vens
cd3f3c28f6 Add C# interop RUDP serve dial path 2026-06-17 11:22:17 +01:00
Meta Vens
c80703172a Add Rust interop RUDP serve dial path 2026-06-17 10:07:37 +01:00
Meta Vens
91d9ecda93 Add Python interop RUDP serve dial path 2026-06-17 08:05:41 +01:00
Meta Vens
25847c0845 Add TypeScript interop RUDP serve dial path 2026-06-17 07:28:47 +01:00
Meta Vens
e9ee0b59a1 Harden interop lane diagnostics 2026-06-16 18:52:02 +01:00
Meta Vens
f0ae8aed7f Harden interop discovery lane timeouts 2026-06-16 18:05:23 +01:00
Meta Vens
fad79906be Route TS interop through transport port 2026-06-16 09:51:00 +01:00
Meta Vens
8f50f2eece Assert RUDP reconnect policy in interop profiles 2026-06-16 04:22:19 +01:00
Meta Vens
9e97d94796 Advertise RUDP reconnect policy in profiles 2026-06-16 04:01:41 +01:00
Meta Vens
0569462efd Prove Rust schema messages over RUDP 2026-06-16 02:23:02 +01:00
Meta Vens
409a42e0f7 Prove Python schema messages over RUDP 2026-06-16 01:42:02 +01:00
Meta Vens
6373f8126b Add C# RUDP schema message ergonomics 2026-06-15 23:38:42 +01:00
Meta Vens
cf7330f31b Add Kotlin schema-v0 RUDP ergonomics 2026-06-15 22:14:13 +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
6040efb213 Prove RUDP resend across runtimes 2026-06-15 01:27:23 +01:00
Meta Vens
13a70db012 Add Kotlin RUDP interop proof 2026-06-15 01:17:08 +01:00
Meta Vens
d070869c75 Prove CSharp RUDP interop with TypeScript 2026-06-15 01:06:43 +01:00
Meta Vens
ff356aa177 Prove Rust RUDP interop with TypeScript 2026-06-15 00:45:48 +01:00
Meta Vens
da6c8cf69a Prove bidirectional TS Python RUDP interop 2026-06-15 00:29:09 +01:00
Meta Vens
eacc2e776f Add TS Python RUDP interop proof 2026-06-15 00:13:58 +01:00
Meta Vens
48d2a0bc0d Add TypeScript CultNet transport port 2026-06-14 21:28:23 +01:00
Meta Vens
a2bc9aeab4 Advertise CultNet transport profiles 2026-06-14 21:20:52 +01:00
Meta Vens
0c0f71dfb8 Prove Python prediction reconciliation over CultNet 2026-06-14 01:12:03 +01:00
Meta Vens
a2779d7493 Prove Python simulation facts over CultNet 2026-06-14 00:56:23 +01:00
Meta Vens
1d0a700f9e Watch Python CultNet database changes 2026-06-14 00:14:36 +01:00
Meta Vens
6b0caf2b21 Emit Python CultMesh node raw mutations 2026-06-14 00:02:37 +01:00
Meta Vens
17b15c972a Sync Python CultMesh nodes from CultNet 2026-06-13 23:51:00 +01:00
Meta Vens
664f6b96d9 Add Python CultNet raw client 2026-06-13 23:22:20 +01:00
Meta Vens
6d20e69a6c Add Python CultMesh discovery client 2026-06-13 23:05:10 +01:00
Meta Vens
536d056ba8 Strengthen Python wire schema catalog 2026-06-13 22:57:14 +01:00
Meta Vens
9d69445e47 Publish Python wire schema catalog 2026-06-13 22:49:56 +01:00
Meta Vens
dec000882d Add Python CultNet delete interop 2026-06-13 22:42:30 +01:00
Meta Vens
46adcea7da Add Python witness artifact interop 2026-06-13 22:25:42 +01:00
Meta Vens
7bb68cef34 Add Python simulation consensus interop 2026-06-13 22:15:32 +01:00
Meta Vens
a0907366ab Add Python shard catalog interop 2026-06-13 22:04:54 +01:00
Meta Vens
3d67576444 Add Python CultNet subscription interop 2026-06-13 21:54:03 +01:00
Meta Vens
45f7db14b5 Serve Python CultMesh discovery over CultNet 2026-06-13 21:37:57 +01:00
Meta Vens
26de320f7f Add Python CultNet interop peer 2026-06-13 21:21:51 +01:00
Meta Vens
5c69bfc581 Bring language packages into CultLib monorepo 2026-05-30 00:39:39 +01:00