Re-pin CultLib to a0813c6

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>
This commit is contained in:
Meta Vens 2026-09-15 20:00:01 +02:00
commit 2b76c2e758
15 changed files with 34 additions and 34 deletions

10
Cargo.lock generated
View file

@ -363,8 +363,8 @@ dependencies = [
[[package]] [[package]]
name = "cultcache-rs" name = "cultcache-rs"
version = "0.1.0" version = "0.2.0"
source = "git+https://github.com/GameCult/CultLib.git?rev=e171eca32329baa928f4a1d810401a8b4c857029#e171eca32329baa928f4a1d810401a8b4c857029" source = "git+https://github.com/GameCult/CultLib.git?rev=a0813c6eed24d30bf88073ef615b633c77ebfcd6#a0813c6eed24d30bf88073ef615b633c77ebfcd6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@ -382,7 +382,7 @@ dependencies = [
[[package]] [[package]]
name = "cultcache-rs-derive" name = "cultcache-rs-derive"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/GameCult/CultLib.git?rev=e171eca32329baa928f4a1d810401a8b4c857029#e171eca32329baa928f4a1d810401a8b4c857029" source = "git+https://github.com/GameCult/CultLib.git?rev=a0813c6eed24d30bf88073ef615b633c77ebfcd6#a0813c6eed24d30bf88073ef615b633c77ebfcd6"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -392,7 +392,7 @@ dependencies = [
[[package]] [[package]]
name = "cultmesh-rs" name = "cultmesh-rs"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/GameCult/CultLib.git?rev=e171eca32329baa928f4a1d810401a8b4c857029#e171eca32329baa928f4a1d810401a8b4c857029" source = "git+https://github.com/GameCult/CultLib.git?rev=a0813c6eed24d30bf88073ef615b633c77ebfcd6#a0813c6eed24d30bf88073ef615b633c77ebfcd6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cultcache-rs", "cultcache-rs",
@ -403,7 +403,7 @@ dependencies = [
[[package]] [[package]]
name = "cultnet-rs" name = "cultnet-rs"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/GameCult/CultLib.git?rev=e171eca32329baa928f4a1d810401a8b4c857029#e171eca32329baa928f4a1d810401a8b4c857029" source = "git+https://github.com/GameCult/CultLib.git?rev=a0813c6eed24d30bf88073ef615b633c77ebfcd6#a0813c6eed24d30bf88073ef615b633c77ebfcd6"
dependencies = [ dependencies = [
"aes-gcm", "aes-gcm",
"anyhow", "anyhow",

View file

@ -20,8 +20,8 @@ license-file = "LICENSE"
anyhow = "1" anyhow = "1"
chrono = "0.4.44" chrono = "0.4.44"
ctrlc = { version = "3.5.1", features = ["termination"] } ctrlc = { version = "3.5.1", features = ["termination"] }
cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "e171eca32329baa928f4a1d810401a8b4c857029", package = "cultcache-rs" } cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a0813c6eed24d30bf88073ef615b633c77ebfcd6", package = "cultcache-rs" }
cultnet-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "e171eca32329baa928f4a1d810401a8b4c857029", package = "cultnet-rs" } cultnet-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a0813c6eed24d30bf88073ef615b633c77ebfcd6", package = "cultnet-rs" }
epiphany-core = { path = "epiphany-core" } epiphany-core = { path = "epiphany-core" }
epiphany-model-adapter = { path = "epiphany-model-adapter" } epiphany-model-adapter = { path = "epiphany-model-adapter" }
epiphany-openai-runtime = { path = "epiphany-openai-runtime", optional = true } epiphany-openai-runtime = { path = "epiphany-openai-runtime", optional = true }

View file

@ -14,9 +14,9 @@ path = "src/lib.rs"
anyhow = "1" anyhow = "1"
chrono = "0.4.44" chrono = "0.4.44"
ctrlc = { version = "3.5.1", features = ["termination"] } ctrlc = { version = "3.5.1", features = ["termination"] }
cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "e171eca32329baa928f4a1d810401a8b4c857029", package = "cultcache-rs" } cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a0813c6eed24d30bf88073ef615b633c77ebfcd6", package = "cultcache-rs" }
cultmesh-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "e171eca32329baa928f4a1d810401a8b4c857029", package = "cultmesh-rs" } cultmesh-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a0813c6eed24d30bf88073ef615b633c77ebfcd6", package = "cultmesh-rs" }
cultnet-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "e171eca32329baa928f4a1d810401a8b4c857029", package = "cultnet-rs" } cultnet-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a0813c6eed24d30bf88073ef615b633c77ebfcd6", package = "cultnet-rs" }
epiphany-model-adapter = { path = "../epiphany-model-adapter" } epiphany-model-adapter = { path = "../epiphany-model-adapter" }
epiphany-tool-adapter = { path = "../epiphany-tool-adapter" } epiphany-tool-adapter = { path = "../epiphany-tool-adapter" }
fs2 = "0.4" fs2 = "0.4"

View file

@ -355,7 +355,7 @@ impl AtlasCultCacheStore {
cache.register_entry_type::<AtlasEntanglementProjection>()?; cache.register_entry_type::<AtlasEntanglementProjection>()?;
cache.register_entry_type::<AtlasImpactDedupeRecord>()?; cache.register_entry_type::<AtlasImpactDedupeRecord>()?;
cache.register_entry_type::<AtlasImpactStateRecord>()?; cache.register_entry_type::<AtlasImpactStateRecord>()?;
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&self.path)); cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&self.path))?;
cache.pull_all_backing_stores()?; cache.pull_all_backing_stores()?;
Ok(cache) Ok(cache)
} }

View file

@ -958,7 +958,7 @@ fn require_store_retirement_receipt(
})?; })?;
let mut cache = CultCache::new(); let mut cache = CultCache::new();
cache.register_entry_type::<PersonaConversationStoreRetirementReceipt>()?; cache.register_entry_type::<PersonaConversationStoreRetirementReceipt>()?;
cache.load_envelope::<PersonaConversationStoreRetirementReceipt>(envelope.clone())?; cache.put_envelope::<PersonaConversationStoreRetirementReceipt>(envelope.clone())?;
if cache if cache
.get::<PersonaConversationStoreRetirementReceipt>(&expected.receipt_id)? .get::<PersonaConversationStoreRetirementReceipt>(&expected.receipt_id)?
.as_ref() .as_ref()

View file

@ -1042,7 +1042,7 @@ mod tests {
let delivery = signed_delivery(&signer, "epiphany")?; let delivery = signed_delivery(&signer, "epiphany")?;
let mut source = CultCache::new(); let mut source = CultCache::new();
source.register_entry_type::<BifrostPersonaFeedbackAdmission>()?; source.register_entry_type::<BifrostPersonaFeedbackAdmission>()?;
source.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&source_store)); source.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&source_store))?;
source.put(&delivery.admission_id, &delivery)?; source.put(&delivery.admission_id, &delivery)?;
let source_lock = source_store.with_file_name(format!( let source_lock = source_store.with_file_name(format!(
"{}.lock", "{}.lock",

View file

@ -846,19 +846,19 @@ fn is_persona_social_type(document_type: &str) -> bool {
fn load_persona_social_envelope(cache: &mut CultCache, envelope: CultCacheEnvelope) -> Result<()> { fn load_persona_social_envelope(cache: &mut CultCache, envelope: CultCacheEnvelope) -> Result<()> {
match envelope.r#type.as_str() { match envelope.r#type.as_str() {
PERSONA_SOCIAL_MENTION_TYPE => { PERSONA_SOCIAL_MENTION_TYPE => {
cache.load_envelope::<PersonaSocialMentionDocument>(envelope)?; cache.put_envelope::<PersonaSocialMentionDocument>(envelope)?;
} }
PERSONA_SOCIAL_TURN_REQUEST_TYPE => { PERSONA_SOCIAL_TURN_REQUEST_TYPE => {
cache.load_envelope::<PersonaSocialTurnRequestDocument>(envelope)?; cache.put_envelope::<PersonaSocialTurnRequestDocument>(envelope)?;
} }
PERSONA_SOCIAL_TURN_TERMINAL_TYPE => { PERSONA_SOCIAL_TURN_TERMINAL_TYPE => {
cache.load_envelope::<PersonaSocialTurnTerminalDocument>(envelope)?; cache.put_envelope::<PersonaSocialTurnTerminalDocument>(envelope)?;
} }
PERSONA_SOCIAL_RETENTION_HEAD_TYPE => { PERSONA_SOCIAL_RETENTION_HEAD_TYPE => {
cache.load_envelope::<PersonaSocialRetentionHeadDocument>(envelope)?; cache.put_envelope::<PersonaSocialRetentionHeadDocument>(envelope)?;
} }
PERSONA_SOCIAL_RETENTION_PLAN_TYPE => { PERSONA_SOCIAL_RETENTION_PLAN_TYPE => {
cache.load_envelope::<PersonaSocialRetentionPlanDocument>(envelope)?; cache.put_envelope::<PersonaSocialRetentionPlanDocument>(envelope)?;
} }
_ => unreachable!("caller filtered Persona social document types"), _ => unreachable!("caller filtered Persona social document types"),
} }

View file

@ -788,7 +788,7 @@ mod tests {
let store = temp.path().join("mixed.cc"); let store = temp.path().join("mixed.cc");
let mut mixed = CultCache::new(); let mut mixed = CultCache::new();
mixed.register_entry_type::<ForeignOwnerEntry>()?; mixed.register_entry_type::<ForeignOwnerEntry>()?;
mixed.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store)); mixed.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store))?;
let foreign = ForeignOwnerEntry { let foreign = ForeignOwnerEntry {
value: "must survive readiness CAS".into(), value: "must survive readiness CAS".into(),
}; };

View file

@ -797,22 +797,22 @@ fn state_cache(path: &Path) -> Result<CultCache> {
} }
match envelope.r#type.as_str() { match envelope.r#type.as_str() {
ResidentSelfState::TYPE => { ResidentSelfState::TYPE => {
cache.load_envelope::<ResidentSelfState>(envelope)?; cache.put_envelope::<ResidentSelfState>(envelope)?;
} }
ResidentSelfPressure::TYPE => { ResidentSelfPressure::TYPE => {
cache.load_envelope::<ResidentSelfPressure>(envelope)?; cache.put_envelope::<ResidentSelfPressure>(envelope)?;
} }
ResidentSelfGrant::TYPE => { ResidentSelfGrant::TYPE => {
cache.load_envelope::<ResidentSelfGrant>(envelope)?; cache.put_envelope::<ResidentSelfGrant>(envelope)?;
} }
ResidentSelfTerminalReceipt::TYPE => { ResidentSelfTerminalReceipt::TYPE => {
cache.load_envelope::<ResidentSelfTerminalReceipt>(envelope)?; cache.put_envelope::<ResidentSelfTerminalReceipt>(envelope)?;
} }
ResidentSelfChildClaim::TYPE => { ResidentSelfChildClaim::TYPE => {
cache.load_envelope::<ResidentSelfChildClaim>(envelope)?; cache.put_envelope::<ResidentSelfChildClaim>(envelope)?;
} }
ResidentSelfRetentionHead::TYPE => { ResidentSelfRetentionHead::TYPE => {
cache.load_envelope::<ResidentSelfRetentionHead>(envelope)?; cache.put_envelope::<ResidentSelfRetentionHead>(envelope)?;
} }
_ => unreachable!("owned resident Self type was matched above"), _ => unreachable!("owned resident Self type was matched above"),
}; };

View file

@ -644,7 +644,7 @@ pub fn runtime_spine_cache(store_path: impl AsRef<Path>) -> Result<CultCache> {
let backing_store = runtime_spine_backing_store(store_path)?; let backing_store = runtime_spine_backing_store(store_path)?;
validate_runtime_store_epoch(&backing_store.pull_all()?)?; validate_runtime_store_epoch(&backing_store.pull_all()?)?;
let mut cache = runtime_spine_schema_cache()?; let mut cache = runtime_spine_schema_cache()?;
cache.add_generic_backing_store(backing_store); cache.add_generic_backing_store(backing_store)?;
Ok(cache) Ok(cache)
} }
@ -8655,7 +8655,7 @@ pub(crate) mod tests {
let mut historical = CultCache::new(); let mut historical = CultCache::new();
historical.register_entry_type::<crate::EpiphanyMindIdentity>()?; historical.register_entry_type::<crate::EpiphanyMindIdentity>()?;
historical.register_entry_type::<EpiphanyRuntimeIdentity>()?; historical.register_entry_type::<EpiphanyRuntimeIdentity>()?;
historical.add_generic_backing_store(runtime_spine_backing_store(&store)?); historical.add_generic_backing_store(runtime_spine_backing_store(&store)?)?;
historical.put( historical.put(
"epiphany.mind.epoch.v1", "epiphany.mind.epoch.v1",
&crate::EpiphanyMindIdentity { &crate::EpiphanyMindIdentity {
@ -8691,7 +8691,7 @@ pub(crate) mod tests {
let mut archive_v0 = CultCache::new(); let mut archive_v0 = CultCache::new();
archive_v0.register_entry_type::<crate::EpiphanyMindIdentity>()?; archive_v0.register_entry_type::<crate::EpiphanyMindIdentity>()?;
archive_v0.register_entry_type::<EpiphanyRuntimeIdentity>()?; archive_v0.register_entry_type::<EpiphanyRuntimeIdentity>()?;
archive_v0.add_generic_backing_store(runtime_spine_backing_store(&archive_v0_store)?); archive_v0.add_generic_backing_store(runtime_spine_backing_store(&archive_v0_store)?)?;
archive_v0.put( archive_v0.put(
crate::MIND_SCHEMA_EPOCH, crate::MIND_SCHEMA_EPOCH,
&crate::EpiphanyMindIdentity { &crate::EpiphanyMindIdentity {
@ -8720,7 +8720,7 @@ pub(crate) mod tests {
responses_only.register_entry_type::<crate::EpiphanyMindIdentity>()?; responses_only.register_entry_type::<crate::EpiphanyMindIdentity>()?;
responses_only.register_entry_type::<EpiphanyRuntimeIdentity>()?; responses_only.register_entry_type::<EpiphanyRuntimeIdentity>()?;
responses_only responses_only
.add_generic_backing_store(runtime_spine_backing_store(&responses_only_store)?); .add_generic_backing_store(runtime_spine_backing_store(&responses_only_store)?)?;
responses_only.put( responses_only.put(
crate::MIND_SCHEMA_EPOCH, crate::MIND_SCHEMA_EPOCH,
&crate::EpiphanyMindIdentity { &crate::EpiphanyMindIdentity {

View file

@ -133,7 +133,7 @@ pub fn close_state_branch(
fn state_ledger_cache(store_path: &Path) -> Result<CultCache> { fn state_ledger_cache(store_path: &Path) -> Result<CultCache> {
let mut cache = CultCache::new(); let mut cache = CultCache::new();
cache.register_entry_type::<EpiphanyStateLedgerEntry>()?; cache.register_entry_type::<EpiphanyStateLedgerEntry>()?;
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(store_path)); cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(store_path))?;
Ok(cache) Ok(cache)
} }

View file

@ -12,7 +12,7 @@ path = "src/lib.rs"
[dependencies] [dependencies]
anyhow = "1" anyhow = "1"
codex-connector = { git = "https://github.com/GameCult/CodexConnector", rev = "be1776ab455fd79bd74b393518ab07211dc9c1f0", default-features = false } codex-connector = { git = "https://github.com/GameCult/CodexConnector", rev = "be1776ab455fd79bd74b393518ab07211dc9c1f0", default-features = false }
cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "e171eca32329baa928f4a1d810401a8b4c857029", package = "cultcache-rs" } cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a0813c6eed24d30bf88073ef615b633c77ebfcd6", package = "cultcache-rs" }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"
sha2 = "0.10" sha2 = "0.10"

View file

@ -13,7 +13,7 @@ path = "src/lib.rs"
[dependencies] [dependencies]
anyhow = "1" anyhow = "1"
chrono = "0.4.44" chrono = "0.4.44"
cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "e171eca32329baa928f4a1d810401a8b4c857029", package = "cultcache-rs" } cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a0813c6eed24d30bf88073ef615b633c77ebfcd6", package = "cultcache-rs" }
epiphany-core = { path = "../epiphany-core" } epiphany-core = { path = "../epiphany-core" }
epiphany-model-adapter = { path = "../epiphany-model-adapter" } epiphany-model-adapter = { path = "../epiphany-model-adapter" }
epiphany-tool-adapter = { path = "../epiphany-tool-adapter" } epiphany-tool-adapter = { path = "../epiphany-tool-adapter" }

View file

@ -8,6 +8,6 @@ name = "epiphany_tool_adapter"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]
cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "e171eca32329baa928f4a1d810401a8b4c857029", package = "cultcache-rs" } cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a0813c6eed24d30bf88073ef615b633c77ebfcd6", package = "cultcache-rs" }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"

View file

@ -11,7 +11,7 @@ anyhow = "1"
chrono = "0.4.44" chrono = "0.4.44"
epiphany-tool-adapter = { path = "../epiphany-tool-adapter" } epiphany-tool-adapter = { path = "../epiphany-tool-adapter" }
epiphany-core = { path = "../epiphany-core" } epiphany-core = { path = "../epiphany-core" }
cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "e171eca32329baa928f4a1d810401a8b4c857029", package = "cultcache-rs" } cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a0813c6eed24d30bf88073ef615b633c77ebfcd6", package = "cultcache-rs" }
http = "1" http = "1"
reqwest = { version = "0.13.2", default-features = false, features = ["json", "rustls"] } reqwest = { version = "0.13.2", default-features = false, features = ["json", "rustls"] }
sha2 = "0.10" sha2 = "0.10"