Fix the calibrator's corner gate, and log what a corner walk looked like #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "log-calibration-runs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two commits. The rationale lives in the commit messages; this is the summary.
The bug:
_records quadrant gate compared a BODY measurement against the corners SCREEN fraction. The view is mirrored, so screen-left is body-right — for every corner the gate rejected the hand actually reaching it and accepted a hand reaching the opposite one. Any derived calibration came from the wrong corner, and completed normally while doing it.The confirmation guard is unaffected (it tests screen distance), so what is deployed plays correctly today; only the calibration measurement is wrong.
Why no test caught it: the round-trip held the UI corner then stretched to the play-rect corner, so the first hold completed the corner and the second was recorded against the next slot — and the mirror makes a neighbouring corner numerically what this one wanted. Two bugs cancelled to exactly 0.8000 at every value of
detect. The gate was genuinely uncovered, not under-tested: both mutations produced zero failures before the new test existed.The logging answers the three timings (
TOUCH_PX,TOUCH_SEC,CORNER_TIMEOUT_SEC) that were chosen by reasoning rather than measurement, and recordsdemonstratedper corner so a limiting corner is distinguishable from a small room. Cancelled runs log too.All four flake checks green.
Daniel: "we can have a setting to allow camera to either be stretch, contain, or cover?" These are not a picture preference. The play rect IS the mapping — every pose coordinate becomes a screen position through it — so each mode trades something real: * CONTAIN letterboxes. Nothing the camera sees is hidden, which is what you want when the question is "can it see me", so it is the default. Costs bars and a play area smaller than the screen. * COVER fills the window and pushes the rest of the frame off-screen. Bigger picture, and reaching is EASIER because the window's corners correspond to positions further inside the frame — but a hand out at the edge of what the camera sees has nowhere on screen to be. * STRETCH fills it by distorting. Nothing hidden, nothing letterboxed, circles become ovals — and a hand's speed differs by axis, because the two scale factors do. The game's thresholds assume one scale, so a punch lands more easily in one direction than the other. Offered anyway: "fill my screen and show everything" is a reasonable thing to want, and the distortion is visible enough to judge yourself. # The part that is not obvious Cover makes the play rect LARGER than the window, and controls are laid out inside the play rect — so a button in the overhanging part is not merely awkward, it is not on the screen at all. `ui_rect` now takes the viewport and intersects first. Reachable and visible are two conditions and that function is where they meet. Implemented as a float with `labels` rather than a third setting kind. A new kind would have to be taught to step_value, clamp_value, the CLI parser, the config writer and the menu's row drawing — five places, for something that behaves exactly like a stepper with a short range. The only genuinely different thing is how the value reads. # Testing `_each_camera_fit_does_what_its_name_says` checks each mode by the property that distinguishes it, on windows deliberately far from 16:9 in BOTH directions — contain and cover are the same two candidate sizes with the opposite choice, so implementing one backwards looks plausible on a window whose aspect is near the camera's. `_cover_never_lays_a_control_off_the_screen` covers the clipping. Confirmed by removing the intersection: 3 failures. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CtnYWFX9eMBH7oK3gmcMMs