fix(domain): V1-2.2 second review round, linear walks, bounds, CSS loaders

Verifier ECARTS(3) and security PASS on 8294d54: one indexed walk per
view chain in sheet.edit, a set for referenced drawings, released
preview parses, xml:base and CSS loaders refused, fail-closed PI scan,
PI drawings rejected by the preview, the builder naming its cap.
This commit is contained in:
bchanot committed 2026-10-29 13:58:32 +01:00
1 parent 8294d5471c
commit ca31b787b6
13 files changed
+201 -36

No files matched your search

+23
View File
@@ -850,3 +850,26 @@ fn is_below(key: &ElementKey, ancestor: &ElementKey) -> bool {
_ => false,
}
}
#[test]
fn an_edit_on_a_long_chain_of_views_stays_linear() {
let mut doc = serde_json::to_value(small()).unwrap();
let views = doc["views"].as_array_mut().unwrap();
for i in 0..2000 {
let parent = if i == 0 {
"main".to_owned()
} else {
format!("c{}", i - 1)
};
views.push(json!({ "id": format!("c{i}"), "kind": "detail", "name": name("C"), "svg_asset_id": null,
"view_box": { "min_x": 0, "min_y": 0, "width": 1, "height": 1 }, "parent_view_id": parent }));
}
let doc: AnatomicalSheetDocument = serde_json::from_value(doc).unwrap();
let started = std::time::Instant::now();
edit(&doc, json!({ "op": "remove", "key": annotation("a1") }));
assert!(
started.elapsed().as_millis() < 1000,
"{:?}",
started.elapsed()
);
}