Stabilize OpenSim agent runtime and Mentra integration
Some checks failed
CI / rust-skia (Rust only) (push) Has been cancelled
CI / required (push) Has been cancelled

This commit is contained in:
2026-08-22 10:44:09 +02:00
parent 2f5f03ac6f
commit 0dd2ca5824
28 changed files with 1765 additions and 2308 deletions

View File

@@ -102,26 +102,22 @@ async fn golden_scene_is_deterministic_depth_ordered_and_privacy_marked() {
.capture("two", 7, CancellationToken::default())
.await
.unwrap();
assert_eq!(first.png, second.png);
assert_eq!(first.jpeg, second.jpeg);
assert_eq!(first.image_sha256, second.image_sha256);
assert_eq!(
first.image_sha256,
"e943b14142da05fcc1471ee0b639ffc1c11c74bfde83432ad3a26f994e4e665a"
"b53d23f57ba0d6fb79856afde111ad6dc25559e810dcc028a5f107090914821d"
);
assert!(first.summary.contains("privacy-marked residents"));
assert!(!first.summary.contains("Private Resident"));
assert!(first.summary.contains("textures_missing=1"));
assert!(first.data_url.starts_with("data:image/png;base64,"));
let decoder = png::Decoder::new(first.png.as_slice());
let mut reader = decoder.read_info().unwrap();
assert_eq!(
reader.info().srgb,
Some(png::SrgbRenderingIntent::Perceptual)
);
let mut pixels = vec![0; reader.output_buffer_size()];
let info = reader.next_frame(&mut pixels).unwrap();
let center = ((info.height as usize / 2) * info.width as usize + info.width as usize / 2) * 4;
assert_eq!(&pixels[center..center + 4], &[0, 255, 0, 255]);
assert!(first.data_url.starts_with("data:image/jpeg;base64,"));
let mut decoder = jpeg_decoder::Decoder::new(first.jpeg.as_slice());
let pixels = decoder.decode().unwrap();
let info = decoder.info().unwrap();
assert_eq!((info.width, info.height), (64, 64));
let center = ((info.height as usize / 2) * info.width as usize + info.width as usize / 2) * 3;
assert!(pixels[center + 1] > 180 && pixels[center] < 80 && pixels[center + 2] < 80);
}
#[tokio::test]
@@ -166,7 +162,7 @@ async fn invalid_camera_huge_scene_stale_generation_and_size_limit_fail_closed()
VisionLimits {
width: 64,
height: 64,
max_png_bytes: 4096,
max_jpeg_bytes: 4096,
minimum_interval: std::time::Duration::ZERO,
..VisionLimits::default()
},