From ca4b956dcf4719a2145528884df8846f1d2a1f14 Mon Sep 17 00:00:00 2001 From: M3gA-Mind Date: Sat, 24 Oct 2026 02:27:35 +0530 Subject: [PATCH] test(storage_import): give the tinybox fixture the registry's real index shape The jail registry's index.json keys its records under "records" (tinybox-jail `Index { records }`), and `tinybox_bus::storage::jail_index:: to_body` converts the seconds fields of exactly those records to the body's millisecond fields. The fixture used a "jails" key, so to_body had no records to convert and the stored body kept created_at_unix and updated_at_unix while the assertion expected created_ms and updated_ms. The importer is correct; the fixture is not. --- .../src/modules/storage_import_tinybox_tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/openhuman-core/src/modules/storage_import_tinybox_tests.rs b/crates/openhuman-core/src/modules/storage_import_tinybox_tests.rs index c18f92982da..19d6fb6b952 100644 --- a/crates/openhuman-core/src/modules/storage_import_tinybox_tests.rs +++ b/crates/openhuman-core/src/modules/storage_import_tinybox_tests.rs @@ -8,7 +8,7 @@ fn scoped() -> Storage { memory_storage(&Scope::new("module:tinybox@local").unwrap()) } -const INDEX: &str = r#"{"jails":{"j1":{"id":"j1","label":"build","dir":"/w/jails/j1","backend_at_create":"landlock","created_at_unix":10,"updated_at_unix":20,"notes":"keep"}}}"#; +const INDEX: &str = r#"{"records":{"j1":{"id":"j1","label":"build","dir":"/w/jails/j1","backend_at_create":"landlock","created_at_unix":10,"updated_at_unix":20,"notes":"keep"}}}"#; fn legacy_workspace() -> tempfile::TempDir { let dir = tempfile::tempdir().unwrap(); @@ -34,7 +34,7 @@ async fn the_jail_index_moves_into_one_document_with_the_same_shape() { .unwrap(); assert_eq!( stored.doc, - json!({"jails": {"j1": { + json!({"records": {"j1": { "id": "j1", "label": "build", "dir": "/w/jails/j1",