fix(anatomy): V1-2.2 owner arbitrations on SVG references and bytes
Refuse local references to ids a drawing does not define, scope canvas ids per view, upload every drawing in one stored form checked by the verdict and the preview, keep strict numeric rgb() colours, and commit real Inkscape 1.4.3 exports with their generator.
This commit is contained in:
1 parent
17d919971e
commit
e823655f09
31 files changed
+1362
-110
No files matched your search
@@ -436,3 +436,33 @@ fn a_replaced_asset_releases_its_parse_and_a_pi_drawing_shows_rejected() {
|
||||
Some("processing_instruction")
|
||||
);
|
||||
}
|
||||
|
||||
/// Owner decision 2026-10-29: a stored drawing outside the stored form shows rejected
|
||||
/// (`not_canonical`), as the verdict refuses it; the equine drawing is in that form.
|
||||
#[test]
|
||||
fn a_drawing_outside_the_stored_form_shows_rejected() {
|
||||
let asset = "33333333-0000-4000-8000-000000000002";
|
||||
let mut doc = parse_json(&document_text()).unwrap();
|
||||
doc["views"][0]["svg_asset_id"] = json!(asset);
|
||||
let horse_text = String::from_utf8(horse()).unwrap();
|
||||
let loose = horse_text.split_once('\n').unwrap().1.as_bytes().to_vec();
|
||||
let preview = PreviewSheet::load(
|
||||
input(PreviewStatus::Draft, doc.to_string(), None),
|
||||
vec![PreviewDrawing {
|
||||
asset_id: asset.into(),
|
||||
sha256: faunosteo_core::domain::sheet::verdict::sha256_hex(&loose),
|
||||
bytes: loose,
|
||||
}],
|
||||
)
|
||||
.unwrap();
|
||||
let state = state(&preview);
|
||||
assert_eq!(state.drawings[0].state, PreviewDrawingStatus::Rejected);
|
||||
assert_eq!(state.drawings[0].detail.as_deref(), Some("not_canonical"));
|
||||
let input = json!({ "viewId": "main" }).to_string();
|
||||
let refused = canvas(call_with_preview(&preview, "view.canvas", &input));
|
||||
assert_eq!(refused["detail"], json!("not_canonical"));
|
||||
assert_eq!(
|
||||
self::state(&published()).drawings[0].state,
|
||||
PreviewDrawingStatus::Ok
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user