Implement native AIS inventory reconciliation (#63)
All checks were successful
Native code generation / deterministic (push) Successful in 13m18s
Imaging and meshing gate / native (push) Successful in 4m12s
Native Rust workspace compile / compile (push) Successful in 4m12s

This commit is contained in:
2026-08-10 06:41:29 +00:00
parent 61d6721287
commit d5c318d280
16 changed files with 1896 additions and 161 deletions

View File

@@ -1215,6 +1215,30 @@ impl InventoryManager {
read(&self.inner.store).clone()
}
pub(crate) fn native_reconcile_ais(
&self,
folders: Vec<InventoryFolder>,
items: Vec<InventoryItem>,
meta: &crate::inventory_ais::AISResponseMeta,
) -> Result<(), Error> {
let Some(store) = self.store_clone() else {
return Ok(());
};
store.native_apply_ais_batch(
folders,
items,
&meta.items_removed(),
&meta.categories_removed(),
&meta.broken_links_removed(),
&meta.category_version_updates(),
)
}
#[cfg(test)]
pub(crate) fn native_set_store_for_tests(&self, store: Inventory) {
*write(&self.inner.store) = Some(store);
}
fn cache_server_item(&self, item: &InventoryItem) -> Result<(), Error> {
if item.base.uuid() == UUID::zero() || item.inventory_type() == InventoryType::FOLDER {
return Err(Error::Argument);