"""Keep the shipped Finger compute assets aligned with the verified Studio calibration.""" import hashlib from pathlib import Path import numpy as np from orisys.calibration_context import domain_fingerprint from orisys.finger.runtime import resolve_finger_geometry def test_shipped_finger_assets_match_the_verified_calibration_geometry(): root = Path(__file__).resolve().parents[1] / "sensors" / "finger" assets = root / "assets" / "30fps-0703" # Recorded by the 2026-10-17 calibration run; changing this bundle requires revalidation. expected = { "mesh.npz": "fc47c438c745ada2c27775a0437fcbe8bfe8fbab354abdae390a07f7a26b78ac", "camera_intrinsics.npz": "c8e2b1fbd89c1cf514186dd69b10f38ee73d0de1d41f0d1b40018e2650f939e3", "world_to_cam.npy": "f8cb4109b5a1585833da0845c3644a9554eea55cc38854bf2e6b196e011a5506", "unroll_map_uv_s0.42.npz": "397fada8a584b03327ec62eebc179f7b6406b7f9cc35248e8f3d0a068873f0c8", } for name, digest in expected.items(): assert hashlib.sha256((assets / name).read_bytes()).hexdigest() == digest, name with np.load(assets / "unroll_map_uv_s0.42.npz", allow_pickle=False) as archive: domain = {key: archive[key] for key in archive.files} assert domain_fingerprint(domain) == "2a76d8e797c7400f734d141b21fec5d9e65a02db418e0acacc36faf7c5ac8dbc" geometry = resolve_finger_geometry(export_dir=assets, config=str(root / "sensor.json")) assert geometry.source_scale == .42 assert (geometry.out_width, geometry.out_height) == (280, 300)