From 456e5b7fa571f6816bbffcfc6f152e812a733a60 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Fri, 30 Oct 2026 19:36:28 -0400 Subject: [PATCH] Tests: the io crate's hand-built saved models list their rounds, as format 7 records do Model cache format 7 (f3cf0c4f3) records a `rounds` list in every saved model, and reading one without it is refused ("saved model: rounds"), as is a model without any of its other lists: the states, the preview and the thinned model all came back empty. The io tests' saved_model and timeline_model wrote format-6 records, so six tests (the round trip, the repeated part stored once, and the four too-big-for-the-file cases) read nothing. Their bodies are none made by rounds: the list is empty, and every expectation stays as it was. Co-Authored-By: Claude Opus 5.5 --- crates/io/src/design.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/io/src/design.rs b/crates/io/src/design.rs index a91ef4e90a..9e72e896ea 100644 --- a/crates/io/src/design.rs +++ b/crates/io/src/design.rs @@ -968,8 +968,8 @@ mod tests { assert!(result.is_err_and(|e| e.to_string().contains("not a regular file"))); } - /// A saved model of one state holding `bodies` (no document evaluated it: enough for the - /// container, which stores whatever model it is given). + /// A saved model of one state holding `bodies`, none made by rounds (no document evaluated + /// it: enough for the container, which stores whatever model it is given). fn saved_model(bodies: Vec) -> solidcraft_doc::SavedModel { let records: Vec = (0..bodies.len()) .map(|i| json!({"name": format!("Body{i}"), "feature": 1, "component": 0, "key": "0000000000000001", "names": 0, "body": i})) @@ -982,6 +982,7 @@ mod tests { records: json!({ "features": [{"id": 1, "fingerprint": "0000000000000000", "ms": 0.0, "skipped": false, "state": 0}], "states": [state], "model_bodies": records, "names": [{"faces": [], "info": []}], "sketches": [], "sheets": [], + "rounds": [], }), bodies, } @@ -1089,7 +1090,7 @@ mod tests { solidcraft_doc::SavedModel { records: json!({ "features": features, "states": states, "model_bodies": records, "names": [{"faces": [], "info": []}], "sketches": [], - "sheets": [], "validation": "each_feature", + "sheets": [], "validation": "each_feature", "rounds": [], }), bodies, }