WIP: fix(input): stop automatic title presses after manual takeover #659
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!659
Loading…
Reference in a new issue
No description provided.
Delete branch "NitnekLeBorgne/Longshot-contributions:fix/autoload-physical-takeover-20261115"
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?
Type: fix · Risk: medium · Tested on: Windows native standalone build; Linux host objects and full source-only runner · Needs: native in-game automatic-cancel/manual-continue evidence; complete Linux executable link
Why
With Skip title screen On, automatic A can arrive after manual navigation or win the scheduling-poll race through the shared tap queue. This addresses manual takeover in #587, not startup acceleration or earlier game readiness.
How to reproduce
Seen on: Linux real-source C fixtures with synthetic devices/save marker, not a human save/game.
Settings and switches: existing Skip title screen On.
Steps: accepted physical input at 15 seconds, release then poll beyond 20 seconds; also exercise the exact scheduling poll and an already-held automatic pulse.
Expected: manual takeover cancels only automatic title input for the session.
Actual: original source still delivers automatic A. No new in-game reproduction or timing measurement.
What changed
Give automatic title presses their own cancellable channel. Preserve script/bridge/host input and existing routing safeguards.
host/oot_autoload.c/.h: separate automatic presses from shared tap queue; cancellation/query/reset behavior.host/nn_hid.c: accepted physical input cancels before final merge; ignored/background/exclusive routing stays authoritative.tests/test_skip_title.py, newtests/test_autoload_takeover_587.py: takeover/channel and option/no-save/player/menu/timeout controls.tests/test_walk_key.py: new helper stand-ins at the existing Walk-only extraction boundary; assertions and product Walk logic unchanged.Timing unchanged: 20,000 ms first delay, 2,000 ms repeat, 200 ms hold, 120,000 ms give-up. Reset rearms; ordinary polling does not rearm a cancelled session.
Measurements
Verdict: No new regression: the takeover check passes and Walk improves from FAIL to PASS; 13 persistent failure signatures remain unchanged.
Hardware: recorded Linux x86-64 host, 6 logical CPUs, 8074 MiB RAM, GCC 13.3; no GPU/driver used.
Scene: game-free public fixtures, isolated HOME/XDG/TMP; no game or human saves.
Method: one full normal default runner per exact commit, comparing check identities/statuses, skips and failure signatures; not timing, repeated runs or a performance median.
How to reproduce:
python -I -B tests/run_all.py --jobs 3on the pinned parent and head in the table with the same recorded environment and public prerequisites; the omitted instruction file is addressed by the source-only supplement below.bbe6fdf231b45ba4f8a4Both full-runner exits are 1, not a fully green suite or hosted-CI result. The original union-of-failures comparison remains false because the Walk failure disappeared, not because a new failure appeared.
Existing main failures:
tests/test_appimage_player_build.py,tests/test_bake_portability.py,tests/test_crash_dialog.py,tests/test_env_on.py,tests/test_lift_cleanup_error.py,tests/test_make_game_cache.py,tests/test_missing_nup.py,tests/test_mods_size_table.py,tests/test_options_budget_once.py,tests/test_pipeline_tour.py,tests/test_readback_late.py,tests/test_vk_occlusion_queries.py,tests/test_vk_pgo.py. Baseline also failstests/test_walk_key.py, which passes on the candidate (14 → 13 failures).AGENTS.mdwas never materialized. Its public blob was supplied read-only in memory for two unchangedSwitchesRemovedmethods, passing on each commit. This is full-runner source-only qualification with that declared omission, not literal exact-tree/checkout or CI equivalence. The receipts retain complete stdout/stderr, unchanged source bytes/modes and empty owned process groups. None of these product checks was rerun for this description cleanup.Historical focused regression evidence
Historical baseline
6c9edffe5da1f5b5383977aeab3f544c0de25d4c→ original candidate97e53e1b6f889cc466174cc5c2bffe5646bb38ed, not extra full-runner executions on the new parent. Real-source synthetic fixtures reproduce unwanted automatic A on original source; corrected channel passes early/same-poll/active-hold controls.Retained coverage by family, not a summed test total: 27 takeover/channel cases; 21 existing input-routing cases; one aggregate Skip title check; two keys/source-contract methods; two Walk methods with four native scenarios. A broken-Walk control compiles then fails the retained speed/diagonal assertions. Old missing scheduler stand-ins and new mock-dependency link failures are fixture issues, not gameplay REDs. Commands, source/test snapshots, hashes and native streams/exits are retained; no FPS/loading-time/real-device benefit is measured.
Flags and settings
None. No new setting/schema/default; existing Skip title screen behavior changes as described above.
Testing
Tested: the full exact published-head/parent Linux runner above: 507 → 509 passes, 14 → 13 failures, 85 skips on each side, both exits 1. New takeover check and repaired Walk fixture pass; persistent signatures match. Historical focused fixture coverage is separated above.
Windows native standalone build completed: exact public head
b45ba4f8a48c91a38b4829b5ee7272f87c7ec6bd, using legitimate private game inputs in an isolated UTF-8 workspace.python -X utf8 -I -B nx2/build.py --standalone --jobs 4completed with native build and controller exits 0. The complete 487-object compile plan has 487 successful file receipts and zero failed receipts, including resumed work; this is not a claim that all objects were rebuilt in the last invocation. Bothlongshot.exeandlongshot_vk.dlllinked and were verified as AMD64 PE outputs. Source verification covers 2,478 public source files with no mismatches; generated game inputs stayed private. No game files, generated output or binaries are attached or uploaded.Build context: private Python 3.14.7 with all ten required package pins matching, installed llvm-mingw Clang 23.1.5 and private CPM dependencies. Optional dav1d was absent; the source-selected Windows Media Foundation fallback was used. This is an actual complete Windows build, not the older host-object-only result, but it is not original tool-archive or hosted-CI parity. The initial post-build collector exit 1 is retained: an optional image-name query failed after process exit. A separate corrected readback verified the successful native exits, outputs, exact source and preservation checks; it does not rewrite that original collector exit. Six short-lived-process metadata gaps remain disclosed, so complete transient-process identity capture is not claimed.
Historical native host object evidence: all 53 Windows and 54 Linux real translation units selected by
nx2/build.py, Release-O2, UTF-8 source/output paths, on this exact head. Windows llvm-mingw Clang 23.1.5; Linux Clang 18.1.3 in a private prefix. Vendor libraries, renderer and lifted game units were excluded from those older runs. Initial missing-public-header failures were preserved; official public generation resolved them and failed units recompiled successfully. Source/modes unchanged except declared.batcheckout CRLF conversion;AGENTS.mdomitted. The new Windows full build supersedes that Windows compile-only limitation; Linux evidence still stops at host objects, not a complete executable link.Not tested: native game/runtime automatic cancellation and manual continuation, real physical-device gameplay, complete Linux standalone linkage, combined open input/restart branches, or later main. Successful Windows compilation/linkage alone does not establish gameplay behavior. A subsequent native interactive preflight stopped before any game launch: the input timestamp changed during passive stabilization after an ordinary dismissal of the unsecured screensaver. Its origin was not determined. No key was injected and no game behavior was observed. The temporary controller/task were closed and protected data/source preservation was verified; this is a safety refusal, not a product/gameplay failure.
Must be tested:
b45ba4f8a48c91a38b4829b5ee7272f87c7ec6bdusing their own legitimate game copy and UTF-8 paths, expecting a successfully linked executable, not merely host objects.Integration and attribution
The pre-existing empty
hos_oot_autoload_input()fixture stand-in belongs to #497 and is also carried by #537, not a new fix/contribution here. Preserve that work. This patch adds the newly requiredhos_hid_autoload_cancel/autoload_mergestand-ins for the same Walk-only boundary; Walk behavior/assertions stay unchanged. Other open control changes are not qualified in combination.#61 also changes scheduler/HID restart continuation. Its forced-continuation input isolation must not inherit ordinary Skip title cancellation blindly. Inspected neighboring head
2d90704de1410e9bae7e3bf99fd191231088bb61; its API-reported current-main base is distinct from actual Git merge-base1be60eae813865b0845fb8bb05b1d7cb9b39e51f. No combined build, conflict resolution or gameplay evidence.Alimjan's faster-A question was answered; Alimjan accepted keeping it separate. No duplicate reply or new acceleration claim.
Risks
What could break: accepted physical input intentionally cancels automation for the session; not concurrency-stress qualification or an earlier-ready detector.
Turning it off: disable Skip title screen or revert.
Compatibility: no save contents, ini schema, shader/pipeline caches or renderer ABI changes; private host autoload interface and extraction fixtures only.
Issues
See #587.
Readiness provenance
Still WIP / PENDING runtime: the complete Windows native executable build/link is now verified. The native in-game automatic-cancel/manual-continue evidence required by
docs/agent-pull-requests.mdis still missing, and complete Linux linkage remains unqualified. Neither Windows build success nor historical host objects discharge those remaining gates; normalpr readywas not invoked or forced.Head
b45ba4f8a48c91a38b4829b5ee7272f87c7ec6bd; actual pinned parent/basebbe6fdf23170310117c714958248e60ec0686a62. The later input-snapshot main30cedbc5203bf5c6f79fbb58394d8d5634881e8fis distinct and is not qualified by these older receipts. This description update adopts the separately completed Windows build only; it performs no new rebase, product test rerun or source change. The Linux runner table remains pinned to its original baseline/head; no unrelated newer-baseline results are substituted.Rebase credit: HumanBean: "No tests were run here; the test boxes stay yours." Rebase and subsequent author test evidence are separate. The rebase box records the main used then; a ticked full-runner box uses the template's named-baseline-failure allowance, not an all-green claim.
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why. Not ticked yet: Testing's Tested names only the Windows build and game-free checks, and says the in-game takeover behavior was not run.
in Risks.
main. Pinned maintainer rebase only; actual parent and later unqualified main are distinguished under Readiness provenance.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.@NitnekLeBorgne Thanks for your attention to my issue this is a great commit that removes user confusion.
May I ask is there any technical blocker to implementing a fast “A” press to enter the title screen quickly, followed by an auto-click to start faster?
Thanks! The current autoload is timer-driven: it starts A presses 20 seconds after the first controller read, retries every 2 seconds, and stops when the player is running or after 120 seconds. It does not detect when the title screen/file list is ready for each press.
A reliable faster sequence would need earlier timings or screen-readiness detection to be validated, rather than assuming the fixed delays can simply be reduced. I have not tested shorter timings, so I cannot claim either that reducing those delays is safe or that there is a fundamental blocker. This PR deliberately only fixes manual takeover/cancellation; a fast-start change should stay separate and preserve that cancellation behavior.
97e53e1b6fb45ba4f8a4@NitnekLeBorgne Thanks for the reply! You're right — other implementations are out of scope here, and keeping this PR focused makes sense. Still, I'd love it if you could revisit the direct-loading vs. auto-click approach down the road; it would make a real difference for the gaming experience. Thanks again!
Rebased onto
main@bbe6fdf: no conflicts. No tests were run here; the test boxes stay yours.Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).
**Not testable by hand:**line saying why and what stands in for it. Then tick it.mooki referenced this pull request2026-11-17 21:19:39 +00:00
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.