From e10361c56d8f0be5c1396758158fd8261ae5fab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=27=C3=A9lectron=20rare?= <108685187+electron-rare@users.noreply.github.com> Date: Thu, 2 Jul 2026 11:52:20 +0200 Subject: [PATCH] docs(pose): fix stale swap note, pin mesh rig hand_slots module docstring still claimed inverted chirality (default 1) after the live A/B validated chirality correct (default 0); align it. Pin the MESH_RIG ne0 bool convention (chantier 5 review minor). --- data_only_viz/hand_slots.py | 8 ++++---- data_only_viz/tests/test_config.py | 10 ++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/data_only_viz/hand_slots.py b/data_only_viz/hand_slots.py index 575ece1..c57239c 100644 --- a/data_only_viz/hand_slots.py +++ b/data_only_viz/hand_slots.py @@ -8,10 +8,10 @@ Fallback (chirality absent/misaligned): sort valid hands by screen cx ascending (flipped when mirror=True) and assign leftmost to slot 0, next to slot 1. `swap=True`: inverts the chirality INTERPRETATION only (chir 0 -> right slot, -1 -> left slot). ARBodyTracker's Vision chirality arrives inverted vs the -user's mirrored view (observed live 2026-07-02), so HAND_SWAP_LR defaults to -1 in the consumers; set 0 if a future app build fixes chirality at the -source. The cx fallback is screen-relative and is never swapped. +1 -> left slot). Safety knob for a source delivering flipped chirality; +ARBodyTracker chirality was validated CORRECT live 2026-07-02, so +HAND_SWAP_LR defaults to 0 in the consumers. The cx fallback is +screen-relative and is never swapped. `near_min > 0`: after routing, replace a slot with None when the hand's wrist-to-middle-MCP distance (normalised) is below `near_min`. diff --git a/data_only_viz/tests/test_config.py b/data_only_viz/tests/test_config.py index 2d90e8f..b27f6ba 100644 --- a/data_only_viz/tests/test_config.py +++ b/data_only_viz/tests/test_config.py @@ -351,3 +351,13 @@ def test_iphone_usb_skips_ensure_model(): assert ensure_calls == [], ( f"_ensure_model was called under iphone_usb=True: {ensure_calls}" ) + + +@pytest.mark.parametrize("val,expected", [ + ("0", False), + ("1", True), + ("", True), # ne0: "" != "0" = True (drift to _bool_std would break this) +]) +def test_bool_ne0_mesh_rig(val, expected): + cfg = VizConfig.from_env({"MESH_RIG": val}) + assert cfg.mesh_rig is expected