Rust cache: one record per key, foreign carry, key-identity vector walked #123

Merged
libby merged 13 commits from hands/variants-leaf-key-identity-rs into main 2026-11-12 01:05:47 +00:00
Member

Rust leaf of variants:follow_up:leaf-key-identity-parity: the cache holds one record per key (a second type at a held key, or at a key a store carries foreign, is refused with SchemaConflictError, memory-only included), a store's unregistered records load as foreign and are carried byte for byte through writes, a key in two stores refuses the pull; walks the key-identity vector merged as 6d1684e1 (12 rows).

Breaking for leaf consumers (not the managed API: src/ is untouched, so apicompat has nothing to check); the CHANGELOG Unreleased "Breaking" entry states it, and per docs/semver-policy.md the next release is a major bump (Rust is consumed by pinned revision).

Known open, stated in the CHANGELOG and docs/write-ownership-map.md: at a key only the store holds, ownership still follows the envelope's claimed id for ids the cache does not register (Soul cut-leaf-key-identity-rs.s3, deferred to variants:follow_up:lki-rs-declared-ids; it predates this change). redb still keys by (type, key).

Soul passes s1 to s4; s4 held (docs delta over s3 code held with the deferred blocker).

🤖 Generated with Claude Code

Rust leaf of `variants:follow_up:leaf-key-identity-parity`: the cache holds one record per key (a second type at a held key, or at a key a store carries foreign, is refused with `SchemaConflictError`, memory-only included), a store's unregistered records load as foreign and are carried byte for byte through writes, a key in two stores refuses the pull; walks the key-identity vector merged as 6d1684e1 (12 rows). Breaking for leaf consumers (not the managed API: `src/` is untouched, so apicompat has nothing to check); the `CHANGELOG` Unreleased "Breaking" entry states it, and per docs/semver-policy.md the next release is a major bump (Rust is consumed by pinned revision). Known open, stated in the CHANGELOG and `docs/write-ownership-map.md`: at a key only the store holds, ownership still follows the envelope's claimed id for ids the cache does not register (Soul `cut-leaf-key-identity-rs.s3`, deferred to `variants:follow_up:lki-rs-declared-ids`; it predates this change). redb still keys by (type, key). Soul passes s1 to s4; s4 held (docs delta over s3 code held with the deferred blocker). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adds the foreign list and foreign_records() accessor, unpopulated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One judge, refuse_retype, runs at put, put_envelope, put_raw_envelope, batch, pull and load_soa.
The pull's unresolved-type refusal is gone; put_prepared_batch lays foreign records back.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The judge compared the envelopes' claimed schema ids, so a Beta envelope stamped with Alpha's id landed beside Alpha.
Ownership is the written type's own id (C# WrittenOwns); here that is its entry type, with no compatible ids.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
put_envelope, put_raw_envelope, put_prepared_batch and load_soa ask the pull's own lookup (resolve_registered_type):
an id resolving to another registered type is refused whether or not this cache holds the key, so a stale cache or a
fresh key can no longer store a Note every reload serves as Settings. Ids naming no registered type still pass. The
type-compare test moves to two envelopes sharing one such id, where refuse_retype alone decides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rust leaf: changelog and ownership map scope the admission refusal to ids this cache registers and state the unregistered-id consequence
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 19m30s
293ce32a6b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
libby force-pushed hands/variants-leaf-key-identity-rs from 293ce32a6b
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 19m30s
to 8b8d6c15e0
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 19m34s
2026-11-12 00:45:53 +00:00
Compare
libby merged commit c371832736 into main 2026-11-12 01:05:47 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/CultLib!123
No description provided.