- 1402
serde_json::json!({"title": "Custom", "status": "ready", "artifact_path": "a.html"}); - 1403
let digest = identity_digest("ui.preview", &payload); - 1404
assert!(digest.contains("Custom"), "{digest}"); - 1405
assert!(digest.contains("status"), "{digest}"); - 1406
assert!(digest.contains("artifact_path"), "{digest}"); - 1407
} - 1408
- 1409
#[test] - 1410
fn presentation_info_rebuilds_a_validated_call_into_a_ledger_ready_record() { - 1411
let skills = vak_delivery::built_in_skill_registry(); - 1412
let args = serde_json::json!({ - 1413
"semantic_type": "chart", - 1414
"payload": { - 1415
"title": "Revenue", - 1416
"chart_type": "line", - 1417
"accessible_summary": "flat", - 1418
"series": [{"name": "s1", "points": [{"x": 1, "y": 2.0}]}] - 1419
} - 1420
}); - 1421
let info = presentation_info("emit_chart_card", &args, &skills) - 1422
.expect("a valid call must rebuild"); - 1423
assert_eq!(info.semantic_type, "chart"); - 1424
assert_eq!(info.title, "Revenue"); - 1425
assert!( - 1426
info.identity_digest.contains("s1(1)"), - 1427
"{}", - 1428
info.identity_digest - 1429
); - 1430
assert!(info.schema_version > 0); - 1431
assert!(!info.skill_id.is_empty()); - 1432
} - 1433
- 1434
#[test] - 1435
fn presentation_info_is_none_for_an_invalid_call() { - 1436
let skills = vak_delivery::built_in_skill_registry(); - 1437
let args = serde_json::json!({"semantic_type": "chart", "payload": {"series": []}}); - 1438
assert!(presentation_info("emit_chart_card", &args, &skills).is_none()); - 1439
} - 1440
} - 1441
Indexing the workspace…
Vakyartha documentation is discovering safe artifacts, anchors, and source references.