Expose what the consumer forks had to reach for

Surveying the swarm's vendored copies, the divergence is far smaller than the
number of forks suggests. Against CultLib, Epiphany's CultCache holds nothing
unique, CodexConnector's holds nothing, VoidBot's CultCache-TS holds nothing,
and Ghostlight's CultCache-Py holds nothing. What the forks did hold was mostly
reach: things CultLib has but does not expose.

raw_document_record_from_envelope was private here and public in every Rust
consumer fork. It is public now. A first pass called it missing, which was a
visibility difference read as an absence -- a `pub fn` scan cannot tell those
apart.

CultMesh gains get_all_with_keys and soa, thin delegations to CultCache, which
does support both. Those were genuinely absent rather than hidden.

cultmesh-rs also needed the media expiry field on its document transports; it
was not rebuilt when cultnet-rs grew that field because the earlier pass tested
only two of the three Rust packages.

cultcache-rs 53, cultnet-rs 107, cultmesh-rs 7.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-04 04:15:59 +02:00
commit e171eca323
2 changed files with 13 additions and 1 deletions

View file

@ -1,7 +1,9 @@
use anyhow::{Context, Result};
use cultcache_rs::CultCache;
use cultcache_rs::CultCacheEnvelope;
use cultcache_rs::CultSoaTable;
use cultcache_rs::DatabaseEntry;
use cultcache_rs::SoaDocument;
use cultcache_rs::SingleFileMessagePackBackingStore;
use cultnet_rs::CultNetDocumentPutOptions;
use cultnet_rs::CultNetDocumentRegistry;
@ -637,6 +639,14 @@ impl CultMeshNode {
self.cache.get_required::<T>(key)
}
pub fn get_all_with_keys<T: DatabaseEntry>(&self) -> Result<Vec<(String, T)>> {
self.cache.get_all_with_keys::<T>()
}
pub fn soa<T: SoaDocument>(&self) -> Result<CultSoaTable<T>> {
self.cache.soa::<T>()
}
pub fn put<T: DatabaseEntry>(&mut self, key: impl Into<String>, value: &T) -> Result<T> {
self.cache.put(key, value)
}
@ -762,6 +772,7 @@ fn request_raw_snapshot_from_rudp_catalog(
socket.set_read_timeout(Some(options.poll_interval))?;
let mut client =
CultNetRudpSocketTransportConnection::new(CultNetRudpSocketTransportOptions {
media_reliable_expire_after_ms: None,
runtime_id: options.runtime_id.clone(),
socket,
mode: cultnet_rs::CultNetRudpSocketMode::Client,
@ -860,6 +871,7 @@ pub fn publish_cultnet_messages_to_rudp_catalog(
socket.set_read_timeout(Some(options.poll_interval))?;
let mut client =
CultNetRudpSocketTransportConnection::new(CultNetRudpSocketTransportOptions {
media_reliable_expire_after_ms: None,
runtime_id: options.runtime_id.clone(),
socket,
mode: cultnet_rs::CultNetRudpSocketMode::Client,

View file

@ -540,7 +540,7 @@ impl CultNetDocumentRegistry {
})
}
fn raw_document_record_from_envelope(
pub fn raw_document_record_from_envelope(
&self,
envelope: &CultCacheEnvelope,
) -> Result<CultNetRawDocumentRecord> {