CultLib/packages
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 7a9fabfa2c CultNet selection: port the C# alias rule into cultnet-rs, delete the hash matcher
Self's ruling, 2026-09-22 ("the C# reference's alias rule is the rule"): an
alias is a schema *name* with a trailing .vN suffix, resolved against the
descriptor's declared name - never against a hash id. C#'s production call
sites (CultNetSelection.cs:438, CultNetSelectionEvaluator.cs:88,340) all use
the descriptor overload of CultNetSchemaAliasMatching.Matches, never the bare
id-vs-id overload.

- Row gains schema_name() (defaults to schema_id() for rows with no separate
  name, e.g. raw wire records); RowSet gains schema_name(schema_id) ->
  Option<String>. Both stand in for CultDocumentDescriptor.SchemaName, which
  this crate has no type for (D7).
- schema_alias::matches/matches_any now take (candidate, schema_id,
  schema_name) and resolve a candidate's inferred name against the declared
  name, exactly as the C# descriptor overload does - not against schema_id's
  own inferred name, which is what the deleted hash-stripping matcher did.
- Every call site (reachable_schemas, the cites.target door check,
  matches_schema_keys_fields's D6 fast path, matches_citation) now resolves
  and passes a schema's name instead of comparing two schema-id strings.
- Deleted: the hash-stripping schema_alias::matches(candidate, schema_id)
  two-string overload. A hash-shaped alias ("<hash>.v1") is not a wire form
  either runtime's production rule ever resolves.

Behaviour verified against a standalone run of the exact C# algorithm
(CultNetSchemaAliasMatching, CultNetDatabase.cs:47-97) covering exact-id
match, bare-name match, .vN alias resolution, MatchesAny's empty-matches-all
convention, ordinal case sensitivity, ".v" with no trailing digits, and
multiple ".v" markers (last one wins) - every case is now a Rust unit test
in schema_alias::tests.

Test fixture (tests/selection.rs) updated: the fixture's hashAlias entries
are now a shared negative check (neither runtime resolves them), and the
nameAlias entries now resolve in Rust too, fixing the confirmed cross-runtime
defect (schemas_by_name_alias). Regenerated
contracts/cultnet/interop/selection-vectors.rs-written.json (15 -> 16
vectors): added refuses_cites_target_by_hash_shaped_alias, renamed
hop_by_role_cites_hash_alias to hop_by_role_cites_name_alias.

cultnet-rs: cargo test 223/223. C# reader (rs-written.json): 14/16 - the two
failures are both the pending unmatched-cites.target door refusal
(CultNetSelection.cs:361-391 has no such check yet), not a Rust defect; the
other Hands' C# door fix covers both.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 11:51:35 +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 Write and enforce the semver policy, per operator ruling on 1.0.60 2026-09-17 22:03:22 +02:00
cultmesh-browser Kill the browser's local reading of "unsigned", and mutate the browser too 2026-09-16 17:39:50 +02:00
cultmesh-kotlin Consolidate CultNet schema contracts into CultLib/contracts/cultnet 2026-09-13 17:27:41 +02:00
cultmesh-py CultNet selection cut1, commit 2 fix batch: R-2, Python refuses v1 selection messages 2026-09-22 06:13:16 +02:00
cultmesh-rs Give every cultcache-rs entry type one home store 2026-09-14 00:38:41 +02:00
cultmesh-ts Stop the realtime decoder handing back a view of its own frame 2026-09-16 20:20:16 +02:00
cultnet-py CultNet selection cut1 fix batch: R-L (contract, Python, mutate-dotnet.ps1) 2026-09-22 09:39:53 +02:00
cultnet-rs CultNet selection: port the C# alias rule into cultnet-rs, delete the hash matcher 2026-09-22 11:51:35 +02:00
cultnet-ts Say what the eleven stricter endpoint spellings actually are 2026-09-16 20:21:42 +02:00