Merge pull request 'feat(db): add truth scoring columns migration (#31)' (#43) from feature/truth-migration into main

Merge truth scoring columns migration (#31)
This commit is contained in:
2026-04-04 03:08:58 +00:00
2 changed files with 48 additions and 0 deletions

View File

@@ -30,6 +30,13 @@ pub struct MemoryRecord {
pub metadata: serde_json::Value,
pub created_at: chrono::DateTime<chrono::Utc>,
pub expires_at: Option<chrono::DateTime<chrono::Utc>>,
// Truth scoring fields (populated by background worker)
pub truth_value: Option<f32>,
pub truth_confidence: Option<f32>,
pub truth_category: Option<String>,
pub truth_evaluated_at: Option<chrono::DateTime<chrono::Utc>>,
pub ecan_sti: Option<f32>,
pub ecan_lti: Option<f32>,
}
/// Query result with similarity score
@@ -299,6 +306,13 @@ impl Database {
metadata: row.get("metadata"),
created_at: row.get("created_at"),
expires_at: row.get("expires_at"),
// Truth fields will be populated by issue #39
truth_value: None,
truth_confidence: None,
truth_category: None,
truth_evaluated_at: None,
ecan_sti: None,
ecan_lti: None,
},
similarity: row.get("hybrid_score"),
vector_score: row.get("vector_score"),