test(domain): R5.7 port the contracts only the TS suites checked

612 leaves and 26 legacy ids (curation_leaves), region inference, R5.1 ledger rows,
generated folder lists, migration-map oracle entry by entry, overlay removal, halo
filter, CHG-000 and dollar-tag refusals; report-v2 fixtures moved to crates/core/tests
(sha256 unchanged).
This commit is contained in:
bchanot committed 2026-10-25 03:59:49 +01:00
1 parent 756b7ef34d
commit 0da7d3ab9f
11 files changed
+634 -11

No files matched your search

+29
View File
@@ -568,3 +568,32 @@ fn the_drawings_projection_bounds_what_is_written() {
draft.baseline["annotations"] = Value::Array(Vec::new());
assert!(review_drawings_bytes(&draft).unwrap() >= written(&draft, &result.anomalies));
}
/// `curation.overlay.test.ts` "reports an annotation dropped by the changeset" (R5.7): an
/// annotation of the baseline that the curated document no longer holds is drawn as removed.
#[test]
fn an_annotation_dropped_by_the_changeset_is_drawn_as_removed() {
let frozen = oracle("review-synthetic.json");
let before = &frozen["baseline"];
let mut after = before.clone();
after["annotations"]
.as_array_mut()
.unwrap()
.retain(|a| a["id"] != "hip");
let drawing = read_cleaned_drawing(frozen["drawing"].as_str().unwrap().as_bytes()).unwrap();
let overlay = render_review_overlay(&OverlayInput {
drawing: &drawing,
before,
after: &after,
view_id: "main",
})
.unwrap();
let tree = roxmltree::Document::parse(&overlay).unwrap();
let status = |id: &str| {
tree.descendants()
.find(|n| n.attribute("data-review-id") == Some(id))
.and_then(|n| n.attribute("data-review-status"))
};
assert_eq!(status("hip"), Some("removed"));
assert_ne!(status("neck"), Some("removed"));
}