Cut 2 of the Eureka pipeline state campaign, behaviour-preserving.
commit_authorized_mind_mutation stays the only code that builds receipts,
replays and runs batch CAS, but no longer hard-codes the Mind store:
- TypedCommitStore { store_id, open_cache, validate_write } is its first
argument.
- MIND_COMMIT_STORE = { "epiphany-mind", runtime_spine_cache,
validate_mind_write_envelope }, passed by all six wrappers.
- Deleted from the owner: runtime_spine_cache(store_path),
validate_mind_write_envelope(write), and the two "epiphany-mind"
literals on receipt versions.
The backing store for CAS stays runtime_spine_backing_store(store_path).
Tests:
- typed_commit_store_profile_owns_open_validate_and_store_id: a test
profile with a two-type registry and a key-refusing validator; a
refused write leaves the store byte-identical, and receipt versions
carry the profile's store id.
- mind_commit_store_profile_keeps_mind_validation_receipts_replay_and_conflicts:
through a Mind wrapper, Mind semantic-identity validation refuses
without writing, receipt versions carry "epiphany-mind", the receipt id
equals a pinned digest, exact replay returns the stored receipt, and a
stale strong read maps to Conflict naming it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Soul's Cut 1 finding F2: the two read pins only proved the seeded store
file's mtime was unchanged, so a store attached at a shadow path (every
read writing path.with_extension("shadow.cc")) survived all 156 tests.
state_cache_reads_without_writing_the_store and
persona_social_cache_reads_without_writing_the_store now snapshot every
directory entry (name, length, mtime) before and after the read, require
exactly the store and its lock file, and require the snapshot unchanged.
cultcache-rs at a0813c6 exposes no backing-store count on CultCache, so
the directory is the observable layer.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The re-pin swapped load_envelope for put_envelope on the claim that each
site's cache has no store attached, so put_envelope stays memory-only.
No existing test observed that: attaching the store in state_cache left
every resident_self test passing, because re-pushing the envelope just
read rewrites identical bytes.
Each test seeds its store, sets the file's modified time to a fixed past
instant, reopens the cache and requires the time to be unchanged. Any
push replaces the file through a staged rename, so attaching a store to
state_cache or persona_social_cache now fails the matching test. The
retirement-receipt site takes a snapshot slice with no path, so it cannot
acquire a store without a signature change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Cut 1 of the Eureka pipeline state campaign. Moves every CultLib
dependency from e171eca3 to main a0813c6.
- load_envelope was deleted upstream (CultLib 4ed9871). The 12 sites in
persona_conversation, persona_social_state and resident_self now call
put_envelope. Each site feeds a cache built with CultCache::new() in
the same function with no backing store attached, so home_index
returns None and put_envelope only inserts into memory, exactly as
load_envelope did. validate_envelope is byte-identical across the pins.
- add_generic_backing_store now returns Result; the three production
sites and five test sites propagate it with ?.
No ownership change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The worktree had been sitting on a partial `cargo fmt` run: 15 files reflowed,
mostly multi-line derive attributes collapsed onto one line, with no semantic
change anywhere in the diff. It was never finished -- `cargo fmt --check` still
flagged resident_readiness.rs, which the pass had not reached.
Completed rather than reverted, since the formatting is what rustfmt produces
and leaving it half-applied is the only bad option. 16 test binaries pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>