fix(qa): conftest root-venv ignore + calibration doc honesty + deterministic player-lost test (final-wave 22/23/24; F1-F4 pass, F5 [~])
ci / Linux C++ core (cmake + ctest) (push) Canceled after 0s
ci / Python root tests (pytest, no tracker deps) (push) Canceled after 0s
ci / Python tracker (pytest, tracker/.venv) (push) Canceled after 0s

This commit is contained in:
kinect-bot committed 2026-11-25 06:25:25 -05:00
1 parent 39876fa97b
commit b4397e6151
4 files changed
+76 -32

No files matched your search

+13 -5
View File
@@ -317,17 +317,25 @@ Your next move: run the default-on high-accuracy review (in progress), then exec
Closes: fidelity defect found in todo 10 integration. Closes: fidelity defect found in todo 10 integration.
Recommended task executor category: deep-low Recommended task executor category: deep-low
- [x] 22. Add test_robustness.py to conftest ignore (F3 regression fixed; root pytest 72 passed no collection error)
Recommended task executor category: quick
- [x] 23. Correct calibration doc overclaim (gate NOTE; docs/calibration.md now states not-yet-wired + Z0=2.5 default)
Recommended task executor category: writing
- [x] 24. Make flaky player-lost robustness test deterministic (drives state seam directly; 20/20 loop + full suite 88)
Recommended task executor category: deep-low
## Final verification wave ## Final verification wave
> Runs in parallel after ALL todos. ALL must APPROVE. Surface results and wait for the user's explicit okay before declaring complete. > Runs in parallel after ALL todos. ALL must APPROVE. Surface results and wait for the user's explicit okay before declaring complete.
- [ ] F1. Plan compliance audit - every todo delivered as specified; scope boundaries (Must NOT) respected; spike findings actually drove the device-vs-fallback decisions. - [x] F1. Plan compliance audit - every todo delivered as specified; scope boundaries (Must NOT) respected; spike findings actually drove the device-vs-fallback decisions.
Recommended task executor category: unspecified-high Recommended task executor category: unspecified-high
- [ ] F2. Code quality review - clean-room discipline (no GPLv3 vendored source), frozen contract intact (static_asserts), no fixed sleeps/blind retries, pure-math modules test-covered. - [x] F2. Code quality review - clean-room discipline (no GPLv3 vendored source), frozen contract intact (static_asserts), no fixed sleeps/blind retries, pure-math modules test-covered.
Recommended task executor category: unspecified-high Recommended task executor category: unspecified-high
- [ ] F3. Real QA (Linux, agent-run) - the full recorded-video -> virtual Kinect -> real OpenNI2 chain yields correct depth/player-index enumeration (and a tracked skeleton IF NiTE2 is user-supplied); record/replay reproduces; robustness faults handled. The authoritative skeleton/gameplay proof is F5 (Windows). - [x] F3. Real QA (Linux, agent-run) - the full recorded-video -> virtual Kinect -> real OpenNI2 chain yields correct depth/player-index enumeration (and a tracked skeleton IF NiTE2 is user-supplied); record/replay reproduces; robustness faults handled. The authoritative skeleton/gameplay proof is F5 (Windows).
Recommended task executor category: deep-low Recommended task executor category: deep-low
- [ ] F4. Ideal-state fidelity - delivered behavior vs every IS row 1:1; any shortfall becomes new `- [ ] N.` rows, never a note. - [x] F4. Ideal-state fidelity - delivered behavior vs every IS row 1:1; any shortfall becomes new `- [ ] N.` rows, never a note.
Recommended task executor category: unspecified-high Recommended task executor category: unspecified-high
- [ ] F5. DanceEvolution playability proof (Windows, human-assisted) - DEA launches via the webcam virtual Kinect, shows the player, tracks moves, and scores directionally-correctly, captured as a gameplay recording; mirror-bit + z-sign checks pass. - [~] F5. DanceEvolution playability proof
BLOCKED: requires the user's Windows box + DEA + webcam + a person dancing. Both Windows paths are built (shim Kinect10.dll export-verified x86+x64; device-level runbook). The synthetic-depth skeletonization KILL-GATE on the real MS NUI runtime is UNPROVEN here (no Windows/NiTE2). This is the one acceptance step that needs your Windows machine. (Windows, human-assisted) - DEA launches via the webcam virtual Kinect, shows the player, tracks moves, and scores directionally-correctly, captured as a gameplay recording; mirror-bit + z-sign checks pass.
Recommended task executor category: deep-high Recommended task executor category: deep-high
## Commit strategy ## Commit strategy
+10 -9
View File
@@ -1,13 +1,14 @@
"""Root pytest config (plan follow-up todo 19: CI test-path split). """Root pytest config (plan follow-up todo 19: CI test-path split).
tests/test_tracker.py imports numpy/cv2/mediapipe, which live only in tests/test_tracker.py and tests/test_robustness.py import numpy/cv2/mediapipe,
tracker/.venv, not the root .venv used for the C-contract mirror tests which live only in tracker/.venv, not the root .venv used for the C-contract
(test_contract_py.py, test_record_replay.py, test_smoke.py). Running bare mirror tests (test_contract_py.py, test_record_replay.py, test_smoke.py).
pytest from the repo root with the root venv must not collection-error on Running bare pytest from the repo root with the root venv must not
that import, so skip collecting test_tracker.py whenever the tracker's CV collection-error on those imports, so skip collecting any tracker-dependent
stack isn't importable. Under tracker/.venv the imports succeed and the full test module whenever the tracker's CV stack isn't importable. Under
test set (including test_tracker.py) is collected and run normally -- see tracker/.venv the imports succeed and the full test set (including those
.github/workflows/ci.yml for the two separate CI steps. two modules) is collected and run normally -- see .github/workflows/ci.yml
for the two separate CI steps.
""" """
try: try:
@@ -17,4 +18,4 @@ try:
collect_ignore = [] collect_ignore = []
except ImportError: except ImportError:
collect_ignore = ["tests/test_tracker.py"] collect_ignore = ["tests/test_tracker.py", "tests/test_robustness.py"]
+17 -9
View File
@@ -2,8 +2,16 @@
The virtual Kinect needs a one-time calibration so the player-space scale, the depth placement, The virtual Kinect needs a one-time calibration so the player-space scale, the depth placement,
and the mirror orientation match your room and camera mount. The logic lives in and the mirror orientation match your room and camera mount. The logic lives in
`core/calibration/` (`calibration.h` / `calibration.cpp`) and is reused by every surface (the `core/calibration/` (`calibration.h` / `calibration.cpp`), which computes, persists, and
OpenNI2 driver, the USB emitter, and the Windows shim), so you calibrate once and all paths agree. reload-tests a `CalibrationConfig`.
> **Current limitation: not yet wired into runtime.** `core/calibration/` produces and reloads a
> config file, and that round-trip is unit-tested, but no runtime surface reads it back yet.
> Today the tracker places depth using a hard-coded default origin, `DEFAULT_Z0_METERS = 2.5`
> (`tracker/joint_mapping.py`), regardless of what you calibrate. Running the steps below exercises
> and validates the calibration math and writes a real config file, but it does not yet change what
> the running tracker, OpenNI2 driver, USB emitter, or Windows shim do at runtime. Wiring the saved
> config into those startup paths is a known pending step.
Calibration is two short poses: a **mirror-confirm** (raise one arm) and a **T-pose** (arms out). Calibration is two short poses: a **mirror-confirm** (raise one arm) and a **T-pose** (arms out).
Both are read from the live tracker's pose output; no extra tool is needed beyond the running Both are read from the live tracker's pose output; no extra tool is needed beyond the running
@@ -53,14 +61,14 @@ rather than writing a bad config.
## Step 3: save and reuse ## Step 3: save and reuse
`save_config()` writes the calibration to a plain-text key/value file; `load_config()` reads it `save_config()` writes the calibration to a plain-text key/value file; `load_config()` reads it
back. Save it once and every surface loads the same file: back, and this save/reload round-trip is covered by tests. **No runtime surface loads this file
yet** - the tracker, the OpenNI2 SynthKinect driver, the USB emitter (`core/protocol`), and the
`Kinect10.dll` shim do not call `load_config()` on startup today; the tracker instead uses the
hard-coded `DEFAULT_Z0_METERS = 2.5` for every session. Once that wiring lands, all of those
surfaces are expected to consume the same saved file so you calibrate once and every path agrees.
- the OpenNI2 SynthKinect driver (Linux), Recalibrate when you move the camera, change your playing distance, or switch rooms (once wired
- the USB emitter (`core/protocol`, both OSes), into runtime, below). The mirror step is worth repeating any time left/right feels wrong in a game.
- the `Kinect10.dll` shim (Windows).
Recalibrate when you move the camera, change your playing distance, or switch rooms. The mirror
step is worth repeating any time left/right feels wrong in a game.
## Tips ## Tips
+36 -9
View File
@@ -123,18 +123,45 @@ def test_subject_exits_then_returns_holds_then_recovers(publisher):
def test_player_lost_hold_eventually_falls_through_to_no_body(publisher): def test_player_lost_hold_eventually_falls_through_to_no_body(publisher):
"""If the subject stays gone longer than the hold window, the tracker must """If the subject stays gone longer than the hold window, the tracker must
fall through to a genuine no-body frame (never hold forever).""" fall through to a genuine no-body frame (never hold forever).
Drives `Tracker._resolve_publish_frame` directly (the same deterministic
seam `test_subject_exits_then_returns_holds_then_recovers` above uses)
instead of racing `tracker.run()`'s background inference thread against
its own wall-clock-paced publish loop: in that threaded form, whether the
hold has finished counting down to a no-body frame by the time the loop's
tick/time budget runs out depends on how far the background thread got
scheduling real time, which is exactly the timing-luck race test
discipline forbids. Advancing the hold counter by an exact tick count
removes the race.
"""
present = make_fake_pose(frame_index=0, image_width=80, image_height=60) present = make_fake_pose(frame_index=0, image_width=80, image_height=60)
script = [present] + [None] * 40 source = FakeFrameSource(n_frames=1, width=80, height=60)
source = FakeFrameSource(n_frames=len(script), width=80, height=60) provider = ScriptedPoseProvider([present])
provider = ScriptedPoseProvider(script) hold_frames = 3
tracker = Tracker(source, provider, publisher, target_fps=200.0, player_lost_hold_frames=3) tracker = Tracker(source, provider, publisher, target_fps=200.0, player_lost_hold_frames=hold_frames)
try: try:
tracker.run(max_frames=len(script) + 5, max_seconds=5.0) tracker._latest_pose = present
frame = publisher.read_latest_frame() tracker._update_count += 1
assert frame.skeleton.skeleton_tracking_id == 0 pose, _ = tracker._resolve_publish_frame()
assert pose is present
for _ in range(hold_frames): # still within the hold window
tracker._latest_pose = None
tracker._update_count += 1
pose, _ = tracker._resolve_publish_frame()
assert pose is present, "must keep holding while the hold window has not elapsed"
tracker._latest_pose = None # one tick past the hold window: must fall through
tracker._update_count += 1
pose, frame = tracker._resolve_publish_frame()
assert pose is None, "hold window exceeded must fall through to no-body, never hold forever"
publisher.publish(pose, frame)
published_frame = publisher.read_latest_frame()
assert published_frame.skeleton.skeleton_tracking_id == 0
for j in range(c.JOINT_COUNT): for j in range(c.JOINT_COUNT):
joint = frame.skeleton.joints[j] joint = published_frame.skeleton.joints[j]
assert joint.tracking_state == c.JointTrackingState.NOT_TRACKED assert joint.tracking_state == c.JointTrackingState.NOT_TRACKED
finally: finally:
source.release() source.release()