The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore(tests): add legacy tests for storage layout
Steven Enamakel1dba2d20a985
diff --git a/crates/openhuman-core/src/storage/layout/legacy_tests.rs b/crates/openhuman-core/src/storage/layout/legacy_tests.rsindex 23d089af71..4fbb9d005a 100644--- a/crates/openhuman-core/src/storage/layout/legacy_tests.rs+++ b/crates/openhuman-core/src/storage/layout/legacy_tests.rs@@ -24,6 +24,7 @@ async fn importing_twice_changes_nothing() {let fx = v1_profile();import(&fx.target, &fx.config).await.unwrap();migrate(&fx.target).await.unwrap();+ dbg_docs(&v1_db(&fx.target));let first = super::super::db::table_counts(&v1_db(&fx.target)).unwrap();import(&fx.target, &fx.config).await.unwrap();migrate(&fx.target).await.unwrap();@@ -57,3 +58,13 @@ async fn no_workspace_means_nothing_to_import() {migrate(&target).await.unwrap();assert!(!target.workspace().exists());}++fn dbg_docs(p: &std::path::Path) {+ let c = rusqlite::Connection::open(p).unwrap();+ let cols: Vec<String> = c.prepare("PRAGMA table_info(docs)").unwrap().query_map([], |r| r.get::<_, String>(1)).unwrap().map(|x| x.unwrap()).collect();+ eprintln!("DBGCOLS {cols:?}");+ let col = if cols.iter().any(|x| x == "collection") { "collection" } else { &cols[0] };+ let q = format!("SELECT {col}, count(*) FROM docs GROUP BY 1 ORDER BY 1");+ let rows: Vec<(String, i64)> = c.prepare(&q).unwrap().query_map([], |r| Ok((r.get::<_, String>(0)?, r.get::<_, i64>(1)?))).unwrap().map(|x| x.unwrap()).collect();+ eprintln!("DBGDOCS {rows:?}");+}