feat(port): adopt the measured held-direction repeat rate (F1) #27
Reference in New Issue
Block a user
Delete Branch "feat/f1-held-repeat"
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?
Adopts the rate the Decoder measured in #1, and adds the coverage that was missing.
REPEAT_DELAY = 0.402,REPEAT_INTERVAL = 0.134— 12 and 4 frames at the run's achieved 29.87 fps, converted to seconds because this port does not run at the guest's rate and it is the cadence that was measured. Cited at the constants:docs/re/f1-repeat-measured-via-driver-patch.md.The two numbers are not equally well evidenced, and the code says so
No physical controller exists in the Decoder's container, so the measurement patched Canary's
--hid=filedriver to emit KeystrokeREPEATat the SDL driver's own 400/100 ms constants.One run. The corpus's two-run minimum is not met and the finding says so itself.
📌 The instruction this was waiting on is vindicated awkwardly: the draft this port refused to ship had 0.40 / 0.20 — the guessed delay nearly right, the guessed interval off by 50 %. The half that was wrong would have been protected by the half that was right.
🔴 The predicted regression did not happen, and that was worse
Both
gamepad.gdandheld-direction-repeat.mdsaid adopting a rate would turnverify-input's "a held stick is ONE step, not six" red, and warned it would read as the jitter bug returning.Run on adoption day: it stayed green.
steps()feeds axis values through the latch and never advances a clock, so it had never calledrepeat_due()at all. The prediction was reasoned, not run — and what it hid is that the rate was about to ship into a harness with no coverage of this feature, where that green row would have been read as coverage of it.So
verify-inputgains arepeatsubject — five rows, each asserting these numbers rather than the shape, because a shape-only check would have passed on 0.40 / 0.20:--controlinverts every controllable row (it removes the premise — a held direction — since the rate is aconst).check-citations: 129/129 resolve.⚠️ The first-repeat row measures from the arming tick, not
t = 0.repeat_due()'s first call only latches the direction; in the port that call is the frame the press is handled, which is the origin the finding measures its 12 frames from. From zero it read 0.433 vs 0.402 — and the tolerance would have had to be widened to hide a units mismatch.What only you can settle
0.134 s is ~7.5 steps a second. The play-test that opened this asked for "slow enough to see which item is selected". If it reads as too fast, the 100 ms constant is Xenia's and not the game's — and no capture in that container would have revealed it.
Closes #2
Found it, and it was not the rate.
07d83c42.held_direction()'s own comment says "Polled at the DEVICE, never throughInput.is_action_pressed". It was not. The d-pad and keyboard branches polled; the stick branch read_latched— a reconstruction of the stick's position from the event history.That reconstruction is only as good as the last event that arrived. A stick held perfectly still sends nothing, so any single event reading below
RELEASE— a spring settling, a deadzone-shaped value, a driver emitting a zero on focus change — clears it with nothing afterwards to set it back. From then on the port believes the stick is centred while the player is holding it.That is exactly "it moves one item and stops".
Now polls
Input.get_joy_axis()against the game's own 0.61, which is what that paragraph always meant. The latch stays as a fallback for injected events so the harness keeps testing something.🔴 Why nothing here caught it
Every instrument in this repo supplies the input it then measures:
verify-input's newrepeatrowsrepeat_due()directly, latch set throughaccepts()--script=up,down,acceptInputEventAction— bypasses the input map entirely--script=hold:down:2.0InputEventJoypadMotionAll three agreed with each other; none of them read a device. This is the same shape as the 2026-09-01 report that opened
gamepad.gd— a synthetic-input test asserts the code after the input map, never the input map itself — one level deeper, with the lesson already written at the top of the file it broke.I claimed this branch was verified on the strength of those instruments. It was not, and the report is the correction.
The two instruments that would have caught it, added
⚠️ The fix is not verified. It is a defect that matches the symptom exactly, found by reading. Only a hand on a stick can confirm it — so please run it again, and if it still does not repeat,
--input-probeprints the answer:If
Yreads below 0.61 while you hold it, the threshold is wrong for your pad rather than the poll.✅ Verified by hand: "Works now and speed is good."
That is the only instrument that could settle either half, and it settles both — the stick now repeats, and 0.134 s reads as the "medium pace" of the play-test that opened F1.
⚠️ Worth keeping straight: it is the interval that a human can judge. The delay is still Canary's SDL constant fed back to us, and no hand can tell 0.402 from 0.38. Both caveats are at the constants and in
docs/port/held-direction-repeat.md.CI is queued; the branch is mergeable.
Closes #2, and #1 is closed with the confirmation recorded.