Commit graph CultLib/packages/cultcache-py
Author SHA1 Message Date
Meta Vens
6d98b03471 Drop the license classifier setuptools now refuses
setuptools >= 77 rejects "License :: OSI Approved :: MIT License" once a
PEP 639 license expression is set, and `pip install -e` builds with the
newest setuptools. That has failed both CI workflows at the install step
since 2026-09-04. `license = "MIT"` is the expression; the classifier
said the same thing and is gone from all three Python manifests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 13:55:46 +02:00
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
b6b1d9c660 Bound the Python fragment reassembly map
cultcache-py removed a fragment buffer only on successful reassembly, the
same shape cultnet-ts had: a set that loses one fragment is kept for the
life of the session and the map grows under any loss on a fragmenting
channel. Cap at 64 to match the other runtimes, evict the oldest stranded
set (dict insertion order) rather than refuse the payload, and expose
fragment_sets_evicted so the drop is observable.

The fragment id already wrapped correctly here; only the Rust allocator
saturated.

  PYTHONPATH=src python -m unittest tests.test_cultcache -> 142 run, 1
  pre-existing error (interop fixture path is cwd-relative, same on main)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 11:42:17 +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
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
44abedfc9f Measure reactive performance across runtimes 2026-08-18 03:08:01 +02:00
Meta Vens
fbf93f3570 Measure and bound reactive document cost 2026-08-18 02:37:13 +02:00
Meta Vens
669f638111 Share one scheduler across Python reactive documents 2026-08-18 02:25:22 +02:00
Meta Vens
ba680020b9 Prove reactive scheduling scales with edits 2026-08-18 00:44:41 +02:00
Meta Vens
1e1cfd840c Remove CultMesh Python mutation polling 2026-08-17 20:03:42 +02:00
Meta Vens
9266bbec22 Add Python reactive document sync 2026-06-28 00:24:46 +01:00
Meta Vens
6627eb4746 Add Python publication catalog sync 2026-06-28 00:00:15 +01:00
Meta Vens
420e91f4f9 Add Python publication document sync 2026-06-27 23:44:06 +01:00
Meta Vens
abdfff6f4e Add publication sync and reconciliation coverage 2026-06-27 23:37:15 +01:00
Meta Vens
719ea7950a Add Python typed document subscriptions 2026-06-27 23:23:50 +01:00
Meta Vens
c1ceb860a0 Add typed Python snapshot fanout coverage 2026-06-27 23:09:16 +01:00
Meta Vens
bd98bfe979 Add Python fanout document sync helper 2026-06-27 23:03:30 +01:00
Meta Vens
1885e2244a Expose Python facade document sync 2026-06-27 22:58:50 +01:00
Meta Vens
854165e943 Add Python one-call document snapshot sync 2026-06-27 22:56:17 +01:00
Meta Vens
31af506691 Emit Python alias-shaped mesh watch changes 2026-06-27 22:51:18 +01:00
Meta Vens
4f4a4699e5 Resolve Python collection reads by schema alias 2026-06-27 22:40:42 +01:00
Meta Vens
a825974e9a Resolve Python shard snapshots by schema alias 2026-06-27 22:29:56 +01:00
Meta Vens
d9ffdd77a4 Resolve Python raw deletes by schema alias 2026-06-27 22:13:28 +01:00
Meta Vens
54543b5db0 Resolve Python shard discovery filters by schema alias 2026-06-27 22:00:13 +01:00
Meta Vens
c0eacb885b Resolve Python subscription filters by schema alias 2026-06-27 21:50:00 +01:00
Meta Vens
bff2e552c8 Resolve Python snapshot discovery by schema alias 2026-06-27 21:42:32 +01:00
Meta Vens
dcf5f73003 Canonicalize Python payload-resolved schema sync 2026-06-27 21:27:25 +01:00
Meta Vens
defc416f9f Convert Python node aliases through payload schema 2026-06-27 20:55:17 +01:00
Meta Vens
a2ec06f90e Resolve Python node document aliases transparently 2026-06-27 20:52:26 +01:00
Meta Vens
a0b31b8f2a Recover schema-stamped cache records across runtimes 2026-06-27 14:34:53 +01:00
Meta Vens
91d9ecda93 Add Python interop RUDP serve dial path 2026-06-17 08:05:41 +01:00
Meta Vens
8da99394cc Add Python CultMesh RUDP server listener 2026-06-17 06:34:30 +01:00
Meta Vens
ce9d709dae Add Python RUDP schema client transport 2026-06-16 23:37:59 +01:00
Meta Vens
0680855925 Mirror authorized RUDP peer sugar 2026-06-16 16:52:20 +01:00
Meta Vens
44c010a867 Add Python CultMesh RUDP factories 2026-06-16 16:42:03 +01:00
Meta Vens
9120d0a372 Add Python CultMesh catalog factories 2026-06-16 16:31:13 +01:00
Meta Vens
e65c0d0fc6 Add Python schema transport client port 2026-06-16 16:13:56 +01:00
Meta Vens
4335ab10bd Fix RUDP ordered control sequence parity 2026-06-16 13:18:39 +01:00
Meta Vens
bec4701389 Route Python interop through transport port 2026-06-16 10:33:55 +01:00
Meta Vens
259ede745f Add Python RUDP reconnect loop 2026-06-16 06:28:22 +01:00
Meta Vens
4a54966b10 Add portable reconnect controllers 2026-06-16 05:29:45 +01:00
Meta Vens
a7efd1ebaf Route Python local server through transport port 2026-06-16 04:11:24 +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
4431d7bc93 Update RUDP parity evidence 2026-06-16 00:06:56 +01:00
Meta Vens
c85b5fb561 Add RUDP reliable queue bounds across runtimes 2026-06-15 15:24:11 +01:00