Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(flows): add diagnostics when opening draft storage database

Steven Enamakel98164947206e
diff --git a/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs b/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs
index 68c7ea1937..39b54ca90e 100644
--- a/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs
+++ b/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs
@@ -361,9 +361,11 @@ async fn edit_workflow_surfaces_draft_write_back_failure() {
// Updating a draft document aborts; creating, reading and listing do not,
// so the draft loads and only the write-back fails.
- let conn =
- crate::storage::rusqlite::Connection::open(config.workspace_dir.join("storage/storage.db"))
- .unwrap();
+ let database = config.workspace_dir.join("storage/storage.db");
+ let conn = crate::storage::rusqlite::Connection::open(&database).unwrap_or_else(|error| {
+ eprintln!("open {}: {error}; workspace entries: {:?}", database.display(), std::fs::read_dir(&config.workspace_dir).unwrap().map(|entry| entry.unwrap().path()).collect::<Vec<_>>());
+ panic!("open flow draft storage database");
+ });
// Layout 2 keeps every scope's documents in the `docs` table.
let docs_table: String = conn
.query_row(