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:
parent
f05686c137
commit
2b76c2e758
15 changed files with 34 additions and 34 deletions
|
|
@ -355,7 +355,7 @@ impl AtlasCultCacheStore {
|
|||
cache.register_entry_type::<AtlasEntanglementProjection>()?;
|
||||
cache.register_entry_type::<AtlasImpactDedupeRecord>()?;
|
||||
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()?;
|
||||
Ok(cache)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -958,7 +958,7 @@ fn require_store_retirement_receipt(
|
|||
})?;
|
||||
let mut cache = CultCache::new();
|
||||
cache.register_entry_type::<PersonaConversationStoreRetirementReceipt>()?;
|
||||
cache.load_envelope::<PersonaConversationStoreRetirementReceipt>(envelope.clone())?;
|
||||
cache.put_envelope::<PersonaConversationStoreRetirementReceipt>(envelope.clone())?;
|
||||
if cache
|
||||
.get::<PersonaConversationStoreRetirementReceipt>(&expected.receipt_id)?
|
||||
.as_ref()
|
||||
|
|
|
|||
|
|
@ -1042,7 +1042,7 @@ mod tests {
|
|||
let delivery = signed_delivery(&signer, "epiphany")?;
|
||||
let mut source = CultCache::new();
|
||||
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)?;
|
||||
let source_lock = source_store.with_file_name(format!(
|
||||
"{}.lock",
|
||||
|
|
|
|||
|
|
@ -846,19 +846,19 @@ fn is_persona_social_type(document_type: &str) -> bool {
|
|||
fn load_persona_social_envelope(cache: &mut CultCache, envelope: CultCacheEnvelope) -> Result<()> {
|
||||
match envelope.r#type.as_str() {
|
||||
PERSONA_SOCIAL_MENTION_TYPE => {
|
||||
cache.load_envelope::<PersonaSocialMentionDocument>(envelope)?;
|
||||
cache.put_envelope::<PersonaSocialMentionDocument>(envelope)?;
|
||||
}
|
||||
PERSONA_SOCIAL_TURN_REQUEST_TYPE => {
|
||||
cache.load_envelope::<PersonaSocialTurnRequestDocument>(envelope)?;
|
||||
cache.put_envelope::<PersonaSocialTurnRequestDocument>(envelope)?;
|
||||
}
|
||||
PERSONA_SOCIAL_TURN_TERMINAL_TYPE => {
|
||||
cache.load_envelope::<PersonaSocialTurnTerminalDocument>(envelope)?;
|
||||
cache.put_envelope::<PersonaSocialTurnTerminalDocument>(envelope)?;
|
||||
}
|
||||
PERSONA_SOCIAL_RETENTION_HEAD_TYPE => {
|
||||
cache.load_envelope::<PersonaSocialRetentionHeadDocument>(envelope)?;
|
||||
cache.put_envelope::<PersonaSocialRetentionHeadDocument>(envelope)?;
|
||||
}
|
||||
PERSONA_SOCIAL_RETENTION_PLAN_TYPE => {
|
||||
cache.load_envelope::<PersonaSocialRetentionPlanDocument>(envelope)?;
|
||||
cache.put_envelope::<PersonaSocialRetentionPlanDocument>(envelope)?;
|
||||
}
|
||||
_ => unreachable!("caller filtered Persona social document types"),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -788,7 +788,7 @@ mod tests {
|
|||
let store = temp.path().join("mixed.cc");
|
||||
let mut mixed = CultCache::new();
|
||||
mixed.register_entry_type::<ForeignOwnerEntry>()?;
|
||||
mixed.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store));
|
||||
mixed.add_generic_backing_store(SingleFileMessagePackBackingStore::new(&store))?;
|
||||
let foreign = ForeignOwnerEntry {
|
||||
value: "must survive readiness CAS".into(),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -797,22 +797,22 @@ fn state_cache(path: &Path) -> Result<CultCache> {
|
|||
}
|
||||
match envelope.r#type.as_str() {
|
||||
ResidentSelfState::TYPE => {
|
||||
cache.load_envelope::<ResidentSelfState>(envelope)?;
|
||||
cache.put_envelope::<ResidentSelfState>(envelope)?;
|
||||
}
|
||||
ResidentSelfPressure::TYPE => {
|
||||
cache.load_envelope::<ResidentSelfPressure>(envelope)?;
|
||||
cache.put_envelope::<ResidentSelfPressure>(envelope)?;
|
||||
}
|
||||
ResidentSelfGrant::TYPE => {
|
||||
cache.load_envelope::<ResidentSelfGrant>(envelope)?;
|
||||
cache.put_envelope::<ResidentSelfGrant>(envelope)?;
|
||||
}
|
||||
ResidentSelfTerminalReceipt::TYPE => {
|
||||
cache.load_envelope::<ResidentSelfTerminalReceipt>(envelope)?;
|
||||
cache.put_envelope::<ResidentSelfTerminalReceipt>(envelope)?;
|
||||
}
|
||||
ResidentSelfChildClaim::TYPE => {
|
||||
cache.load_envelope::<ResidentSelfChildClaim>(envelope)?;
|
||||
cache.put_envelope::<ResidentSelfChildClaim>(envelope)?;
|
||||
}
|
||||
ResidentSelfRetentionHead::TYPE => {
|
||||
cache.load_envelope::<ResidentSelfRetentionHead>(envelope)?;
|
||||
cache.put_envelope::<ResidentSelfRetentionHead>(envelope)?;
|
||||
}
|
||||
_ => unreachable!("owned resident Self type was matched above"),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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)?;
|
||||
validate_runtime_store_epoch(&backing_store.pull_all()?)?;
|
||||
let mut cache = runtime_spine_schema_cache()?;
|
||||
cache.add_generic_backing_store(backing_store);
|
||||
cache.add_generic_backing_store(backing_store)?;
|
||||
Ok(cache)
|
||||
}
|
||||
|
||||
|
|
@ -8655,7 +8655,7 @@ pub(crate) mod tests {
|
|||
let mut historical = CultCache::new();
|
||||
historical.register_entry_type::<crate::EpiphanyMindIdentity>()?;
|
||||
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(
|
||||
"epiphany.mind.epoch.v1",
|
||||
&crate::EpiphanyMindIdentity {
|
||||
|
|
@ -8691,7 +8691,7 @@ pub(crate) mod tests {
|
|||
let mut archive_v0 = CultCache::new();
|
||||
archive_v0.register_entry_type::<crate::EpiphanyMindIdentity>()?;
|
||||
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(
|
||||
crate::MIND_SCHEMA_EPOCH,
|
||||
&crate::EpiphanyMindIdentity {
|
||||
|
|
@ -8720,7 +8720,7 @@ pub(crate) mod tests {
|
|||
responses_only.register_entry_type::<crate::EpiphanyMindIdentity>()?;
|
||||
responses_only.register_entry_type::<EpiphanyRuntimeIdentity>()?;
|
||||
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(
|
||||
crate::MIND_SCHEMA_EPOCH,
|
||||
&crate::EpiphanyMindIdentity {
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ pub fn close_state_branch(
|
|||
fn state_ledger_cache(store_path: &Path) -> Result<CultCache> {
|
||||
let mut cache = CultCache::new();
|
||||
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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue