CultLib/packages
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens c2ffc32ff6 Make the TypeScript route verifier the C# rules exactly
verifyP256 handed WebCrypto `view.slice().buffer`. For a Node Buffer,
`slice` is `subarray`, so `.buffer` is the shared pool: a pooled Buffer or
a subarray of a larger allocation verified false while the same bytes as a
plain Uint8Array verified true. Copy exactly the viewed bytes.

Trust rules that had drifted from `CultMeshAuthorityProof.cs`:

- A certificate whose signature is empty or whitespace is an unsigned
  route (C# `Verify` line 120): local-development loopback accepts it,
  everything else refuses with the unsigned message.
- Loopback is `System.Uri.IsLoopback`: any 127.0.0.0/8 host, `::1`, the
  IPv4-mapped `::ffff:127.0.0.1` (only `.1`), and the host names
  `localhost` and `loopback`. WHATWG URL normalises `127.1`, `0x7f000001`
  and `2130706433` the way System.Uri does. Probed on the C# side through
  the public policy before the rule was written; the test pins that set.
- The root lookup runs before the validity window, so an expired route
  under an unknown root is refused as untrusted on both sides.
- A policy listing one Odin key id twice is refused at first use, the
  closest a plain object gets to the C# constructor throwing.

One test per rule, one mutation per rule in the runner's list. A fixture
whose protocol ids are unsorted and whose expected transcript is the
sorted one means removing the sort is now killed.

The runner now matches anchors in the file's own line ending. On an
autocrlf checkout the two multi-line anchors it already had ("route
transcript field order", "session transcript binds the nonce") matched
nothing, so the run threw at those entries instead of testing them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 16:24:41 +02:00
..
cultcache-py Refuse re-entrant Python cache mutations and adopt legacy-key globals on load 2026-09-14 12:27:55 +02:00
cultcache-rs Require an atomic push_all from every Rust backing store 2026-09-14 12:28:07 +02:00
cultcache-ts Delete the TypeScript re-entry guard; state the store-wait rule once 2026-09-14 12:43:46 +02:00
cultmath Add PCG integer hashes to CultMath and release 0.2.3 2026-09-14 18:19:53 +02:00
cultmesh-browser Delete the browser copy of the route verifier 2026-09-16 15:59:09 +02:00
cultmesh-kotlin Consolidate CultNet schema contracts into CultLib/contracts/cultnet 2026-09-13 17:27:41 +02:00
cultmesh-py Consolidate CultNet schema contracts into CultLib/contracts/cultnet 2026-09-13 17:27:41 +02:00
cultmesh-rs Give every cultcache-rs entry type one home store 2026-09-14 00:38:41 +02:00
cultmesh-ts Merge the CultCache store-routing cuts into main 2026-09-14 15:16:29 +02:00
cultnet-py Merge the CultCache store-routing cuts into main 2026-09-14 15:16:29 +02:00
cultnet-rs Merge the CultCache store-routing cuts into main 2026-09-14 15:16:29 +02:00
cultnet-ts Make the TypeScript route verifier the C# rules exactly 2026-09-16 16:24:41 +02:00