Repository navigation
feat(hands): get up on the referee's count: a visible beat, a verdict for every press, fair over a slow link - #299
Merged
Merged
Conversation
…rdict for every press and timing that holds over a slow link
…n a tick, the press clock after the link changes, an exact end-to-end check
…nel while paused, a press kept through a guard frame, a press clock that never steps back
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The get-up mini-game a knocked-down player plays under the referee's count was ambiguous and close to unplayable over a real connection. This rebuilds it. Engine, protocol (version 7), CPU, client panel, input, sound, haptics and the end-to-end script all change.
What was wrong
The rules now
get_up_next_promptlets the next side show a full count ahead at any latency.Also: a beat cue by sound and haptic on the downed player's own device (obeying volume and haptics settings), a pair of large pads on touch (the wanted one lit) in place of the fight controls, a short screen-reader announcement of only what changed, a Controls line, and the CPU pressing on the beat with a per-level timing error. All numbers live in
combat-manifest.json.Measured
Monte Carlo over the real engine (
scripts/hands_get_up.py, 1000 trials a cell; heavy = 1200 head trauma):CPU get-up rates stay within about 5 points of main for contender and champion; the rookie at typical first-knockdown trauma is 7 points higher.
End to end through the real client and server on a GPU-backed Chromium, pressing when the client's own ring says now:
getupat 0 ms: 60 presses, 60 judged, all PERFECT.getupat 150 ms each way + 40 ms jitter (about 350 ms measured input latency): 60 presses, 60 judged, all PERFECT, on each of three runs.mash: 67 presses while down, nothing scored, counted out.ko,finish,cpu,touch(real taps on the pads): pass, no client or server errors.Checks
ruff check,ruff format --check,mypy src/,pytest tests/(2436),hands_replay.py --check,hands_parity_fixtures.py --check(now also writes the engine's 104 get-up verdicts, which the client's judgement test runs from),check_hands_wheel.py,npm run typecheck,npm run test:run(1757),npm run buildwith the committed bundle,npm run scan:build,npm run audit:high.audit:highneeded one reviewed entry: picomatch GHSA-fc5q-39xc-vjpf was published against every release including the latest (4.0.7). It is build and test tooling (vite, vitest, tinyglobby, fdir) and is not in the shipped bundle.Review
An independent review of the first commit found no blockers, five defects worth fixing and nine nits, fixed in the second commit: the press clock ran on while a bout was paused; the server judged the last press in a tick where the rule says the first; the ring ran ahead for seconds after the link slowed or the server dropped ticks; the end-to-end check ignored presses with no verdict; the screen-reader text rewrote a long sentence several times a count.
A second pass over those fixes confirmed twelve, found two only partly done (the live region stayed silent when the same news came twice; the spent last pad stayed lit for a moment) and four new small things: a frozen panel during a pause, a guard frame deleting a queued press, the press clock stepping back and replaying a beat, and safe-area insets going stale after a half turn. All six are fixed in the last commit, which was read but not independently reviewed a third time.
Known limits
touchtaps come from Playwright, not a phone.Deploy
The engine and protocol change, so the bot must be restarted after the pull. A tab still on the old bundle is refused with
client_outdatedand told to reload.