Skip to content

Commit ff68898

Browse files
hyperpolymathclaude
andcommitted
chore: update verisim-normalizer lib.rs + storage_regenerator
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ad4d2fd commit ff68898

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

verisimdb/rust-core/verisim-normalizer/src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#![forbid(unsafe_code)]
2121
pub mod conflict;
2222
pub mod regeneration;
23+
pub mod storage_regenerator;
2324

2425
use async_trait::async_trait;
2526
use chrono::{DateTime, Utc};
@@ -46,6 +47,15 @@ pub enum NormalizerError {
4647

4748
#[error("Channel error: {0}")]
4849
ChannelError(String),
50+
51+
#[error("Missing modality: {0}")]
52+
MissingModality(String),
53+
54+
#[error("Storage error: {0}")]
55+
StorageError(String),
56+
57+
#[error("No viable source: {0}")]
58+
NoViableSource(String),
4959
}
5060

5161
/// Result of a normalization operation

verisimdb/rust-core/verisim-normalizer/src/storage_regenerator.rs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,11 @@ impl ModalityRegenerator for StorageRegenerator {
301301
graph.edges.len()
302302
);
303303
let input = OctadInput {
304-
title: Some("[regenerated from graph]".to_string()),
305-
body: Some(body.clone()),
304+
document: Some(OctadDocumentInput {
305+
title: "[regenerated from graph]".to_string(),
306+
body: body.clone(),
307+
fields: HashMap::new(),
308+
}),
306309
..Default::default()
307310
};
308311
self.write_back(octad, input).await?;
@@ -319,7 +322,10 @@ impl ModalityRegenerator for StorageRegenerator {
319322
.ok_or_else(|| NormalizerError::MissingModality("Graph".into()))?;
320323
let types = graph.types.clone();
321324
let input = OctadInput {
322-
types: Some(types.clone()),
325+
semantic: Some(OctadSemanticInput {
326+
types: types.clone(),
327+
properties: HashMap::new(),
328+
}),
323329
..Default::default()
324330
};
325331
self.write_back(octad, input).await?;
@@ -412,7 +418,10 @@ impl ModalityRegenerator for StorageRegenerator {
412418
}
413419

414420
let input = OctadInput {
415-
embedding: Some(merged),
421+
vector: Some(OctadVectorInput {
422+
embedding: merged,
423+
model: Some("fnv1a-trigram-384-merged".to_string()),
424+
}),
416425
..Default::default()
417426
};
418427
self.write_back(octad, input).await?;
@@ -453,7 +462,10 @@ impl ModalityRegenerator for StorageRegenerator {
453462
all_types.dedup();
454463

455464
let input = OctadInput {
456-
types: Some(all_types.clone()),
465+
semantic: Some(OctadSemanticInput {
466+
types: all_types.clone(),
467+
properties: HashMap::new(),
468+
}),
457469
..Default::default()
458470
};
459471
self.write_back(octad, input).await?;

0 commit comments

Comments
 (0)