test(input): the pads-after-menu check follows Sprint's SPRINT_L3, in its constants and its bitmask #2215

Open
dazemc wants to merge 3 commits from dazemc/Longshot:fix/pads-after-menu-sprint-l3 into main
Contributor

Summary

tests/test_pads_after_menu.py cuts read_input's pad block and pad_sprint_down() out of host/nn_hid.c, with its own stand-ins. Its prelude carried a hand-copied enum { SPRINT_PAD = 2 }. #2038 made the left stick's press a Sprint input of its own, SPRINT_L3, and pad_sprint_down() now uses it, so the check has not compiled since: SPRINT_L3 undeclared.

What changed: the check cuts nn_hid.c's own enum (SPRINT_KEY, SPRINT_PAD, SPRINT_L3) the way it already cuts the HOS_* enums from vk_api.h, and the hand-copied SPRINT_PAD is gone. The next Sprint constant cannot drift from the check. It asserts the same behaviour as before; no assertion is removed.

No product change: the branch is a2dc5385 plus two test commits (the constants, then the bitmask the first run caught), and differs from main only in tests/test_pads_after_menu.py.

Testing

Tested: the full suite, --jobs 5 in a 12 GiB memory scope with the pinned headers: here 912 passed, 22 failed, 18 skipped in 399 s against main @ a2dc5385's 911 / 23 / 18. The 22 failing names are exactly a2dc5385's 23 less tests/test_pads_after_menu.py, which this updates; no name here is absent from the baseline and none is new.

The first run, at 298986e4 (--jobs 3, 8 GiB), was 911 / 23 / 18 with test_pads_after_menu.py still red at FAIL:342 game(s) == 0 && sprint_now == SPRINT_PAD: the constants fix had let the check compile for the first time since #2038, which exposed a second stale expectation — the left stick's press returns SPRINT_PAD | SPRINT_L3 (#2038's pad_sprint_down()). 3d7704eb expects both bits, which is why the fix is two commits.

Still to test: None.

Measurements

Verdict: the check compiles and passes again: test_pads_after_menu.py goes from a compile error to a pass, the suite is 912 / 22 / 18 against the baseline's 911 / 23 / 18, and no other failing name moves.

Before: main @ a2dc5385 After: this PR @ 3d7704eb
test_pads_after_menu.py FAIL: SPRINT_L3 undeclared (compile) pass
full suite (passed / failed, 18 skipped) 911 / 23 912 / 22

Risks

A test-only change: nothing the game runs changes. If the enum gains a constant, the check takes it with no edit; if pad_sprint_down() starts reading something the prelude lacks, the compile says which line.

#152 (WIP) edits this same file, in a different hunk: it adds state = "static volatile LONG pad_count_now;\n" + state near line 156, while this change removes the hand-copied enum from the prelude (line 87) and adds the cut enum to code (near line 168). The two do not overlap.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit. (the branch is a2dc5385 plus two test commits, same topic)
  • Tested on my own PC, in the game for a change the game runs, as Testing says. (test-only: the game runs nothing new; the check ran on this PC at 3d7704eb)
  • mise run test passes (any failure that also fails on main is named). (--jobs 5, 12 GiB scope, pinned headers: 912 / 22 / 18 in 399 s against main's 911 / 23 / 18; the 22 are the baseline's 23 less tests/test_pads_after_menu.py, with no new name. The first run, at 298986e4, is in Testing.)
  • Measured against main, or Measurements says why there is nothing to measure. (both runs are in Measurements)
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened. (the constants are cut from nn_hid.c; no assertion removed)
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers. The head adds
    Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go) in an empty commit (message-only: no file changed); its tree
    6280eceac7db695ff772a99326d6062393499bc4 is the same object as 3d7704eb's, so the runs and checks above describe the head's tree.

Ready to merge

  • Everything in Still to test has run, its results in Tested. (Still to test is None; both runs are in Tested — ticked at merge)
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). (a test-only change affects no hardware)
  • Approved in review, every comment answered. (no review yet)
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold. (CI has not run on this head)
## Summary `tests/test_pads_after_menu.py` cuts `read_input`'s pad block and `pad_sprint_down()` out of `host/nn_hid.c`, with its own stand-ins. Its prelude carried a hand-copied `enum { SPRINT_PAD = 2 }`. #2038 made the left stick's press a Sprint input of its own, `SPRINT_L3`, and `pad_sprint_down()` now uses it, so the check has not compiled since: `SPRINT_L3 undeclared`. What changed: the check cuts `nn_hid.c`'s own enum (`SPRINT_KEY`, `SPRINT_PAD`, `SPRINT_L3`) the way it already cuts the `HOS_*` enums from `vk_api.h`, and the hand-copied `SPRINT_PAD` is gone. The next Sprint constant cannot drift from the check. It asserts the same behaviour as before; no assertion is removed. No product change: the branch is `a2dc5385` plus two test commits (the constants, then the bitmask the first run caught), and differs from `main` only in `tests/test_pads_after_menu.py`. ## Testing **Tested:** the full suite, `--jobs 5` in a 12 GiB memory scope with the pinned headers: here **912 passed, 22 failed, 18 skipped in 399 s** against `main @ a2dc5385`'s **911 / 23 / 18**. The 22 failing names are exactly `a2dc5385`'s 23 less `tests/test_pads_after_menu.py`, which this updates; no name here is absent from the baseline and none is new. The first run, at `298986e4` (`--jobs 3`, 8 GiB), was `911 / 23 / 18` with `test_pads_after_menu.py` still red at `FAIL:342 game(s) == 0 && sprint_now == SPRINT_PAD`: the constants fix had let the check compile for the first time since #2038, which exposed a second stale expectation — the left stick's press returns `SPRINT_PAD | SPRINT_L3` (#2038's `pad_sprint_down()`). `3d7704eb` expects both bits, which is why the fix is two commits. **Still to test:** None. ## Measurements **Verdict:** the check compiles and passes again: `test_pads_after_menu.py` goes from a compile error to a pass, the suite is `912 / 22 / 18` against the baseline's `911 / 23 / 18`, and no other failing name moves. | | Before: main @ a2dc5385 | After: this PR @ 3d7704eb | |---|---|---| | `test_pads_after_menu.py` | FAIL: `SPRINT_L3 undeclared` (compile) | pass | | full suite (passed / failed, 18 skipped) | 911 / 23 | 912 / 22 | ## Risks A test-only change: nothing the game runs changes. If the enum gains a constant, the check takes it with no edit; if `pad_sprint_down()` starts reading something the prelude lacks, the compile says which line. `#152` (WIP) edits this same file, in a different hunk: it adds `state = "static volatile LONG pad_count_now;\n" + state` near line 156, while this change removes the hand-copied enum from the prelude (line 87) and adds the cut enum to `code` (near line 168). The two do not overlap. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. (the branch is `a2dc5385` plus two test commits, same topic) - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. (test-only: the game runs nothing new; the check ran on this PC at `3d7704eb`) - [x] `mise run test` passes (any failure that also fails on `main` is named). (`--jobs 5`, 12 GiB scope, pinned headers: 912 / 22 / 18 in 399 s against main's 911 / 23 / 18; the 22 are the baseline's 23 less `tests/test_pads_after_menu.py`, with no new name. The first run, at `298986e4`, is in Testing.) - [x] Measured against `main`, or Measurements says why there is nothing to measure. (both runs are in Measurements) - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. (the constants are cut from `nn_hid.c`; no assertion removed) - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. The head adds `Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go)` in an empty commit (message-only: no file changed); its tree `6280eceac7db695ff772a99326d6062393499bc4` is the same object as `3d7704eb`'s, so the runs and checks above describe the head's tree. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. (Still to test is None; both runs are in Tested — ticked at merge) - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). (a test-only change affects no hardware) - [ ] Approved in review, every comment answered. (no review yet) - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. (CI has not run on this head)
#2038 made the left stick's press a Sprint input of its own (SPRINT_L3) and did not update this
check, whose prelude carried a hand-copied "enum { SPRINT_PAD = 2 }". The cut pad_sprint_down uses
SPRINT_L3, so the check has not compiled since: "SPRINT_L3 undeclared".

It now cuts nn_hid.c's enum (SPRINT_KEY, SPRINT_PAD, SPRINT_L3) the way the HOS_ enums are cut
from vk_api.h, so the next Sprint constant cannot drift from the check. No source change.
test(input): the pads-after-menu check expects the left stick's Sprint to set SPRINT_L3 too
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 9s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
3d7704eb82
#2038 made pad_sprint_down() return SPRINT_PAD | SPRINT_L3 for the left stick's press, so the L3
sprint is told from another pad button. This check binds Sprint to HOS_PAD_LSTICK and still
expected SPRINT_PAD alone.

The first fix here (the constants cut from nn_hid.c) let the check compile for the first time
since #2038, and the run then caught this: FAIL:342 game(s) == 0 && sprint_now == SPRINT_PAD.
The assertion now expects both bits, as pad_sprint_down() returns them; no assertion is removed.

Test-only: no source change.
Member
@review
BeanBot left a comment

Recommendation: Approve. The change restores the check without changing player code, and the reported run shows it passing against a failing baseline. CI is still running. Nothing blocking is left. Recommend approval; not approved on the forge.

The test now takes Sprint constants from the host source and expects both bits for a left-stick press. This restores coverage of pad input after the menu without changing the game.

@fix will do (1)

  1. L1 (minor): The checklist says baseline failures are named, but the description gives only their count and says the same 22 names remain. List the failing checks on the base and head so the stated comparison can be checked against the repository's test rule.

Checks: Still running: CI / Conventional Commit title (pull_request), CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request), CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request), CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request), CI / Workflow lint (actionlint) (pull_request), CI / Website build and checks (pull_request), Guide screenshots / Guide images and local UI source review (pull_request), Third-party parts / As their notes say (pull_request), Third-party parts / The same as upstream (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Yes: the author reports that the test changes from a compile failure on base a2dc5385 to a pass on head 3d7704eb; the full suite changes from 911 passed, 23 failed and 18 skipped to 912 passed, 22 failed and 18 skipped.

Other systems: The diff changes only a game-free test. It does not change gameplay, rendering, platform code, saves, audio or input handling.

Switches: None added, changed or removed.

Reviewed: 3d7704eb82 against a2dc538590: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, both commits, the complete changed test and the relevant host input code. Skimmed the Sprint test and test runner. docs/review-checklist.md and ../Tooling/AGENTS.md were unavailable; no generated files, translations or recorded runs were changed.; nothing run (a code review).

Checked and fine:

  • The extracted enum precedes both the stand-in and extracted function, and the revised assertion checks the bits returned for L3.
  • No game-derived output, generated file, API version or switch changes appear in the diff.
  • The change is one topic and matches the pull request description.

Testing: No code or tests were run, as requested. The author's baseline and head results were reviewed; the listed CI checks are still running.

Overlaps and merge order: The description identifies WIP PR #152 as editing a different hunk of the same test; it reports no textual overlap.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The change restores the check without changing player code, and the reported run shows it passing against a failing baseline. CI is still running. Nothing blocking is left. Recommend approval; not approved on the forge. The test now takes Sprint constants from the host source and expects both bits for a left-stick press. This restores coverage of pad input after the menu without changing the game. **`@fix` will do (1)** 1. **L1** (minor): The checklist says baseline failures are named, but the description gives only their count and says the same 22 names remain. List the failing checks on the base and head so the stated comparison can be checked against the repository's test rule. **Checks:** Still running: `CI / Conventional Commit title (pull_request)`, `CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request)`, `CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request)`, `CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request)`, `CI / Workflow lint (actionlint) (pull_request)`, `CI / Website build and checks (pull_request)`, `Guide screenshots / Guide images and local UI source review (pull_request)`, `Third-party parts / As their notes say (pull_request)`, `Third-party parts / The same as upstream (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes: the author reports that the test changes from a compile failure on base a2dc5385 to a pass on head 3d7704eb; the full suite changes from 911 passed, 23 failed and 18 skipped to 912 passed, 22 failed and 18 skipped. **Other systems:** The diff changes only a game-free test. It does not change gameplay, rendering, platform code, saves, audio or input handling. **Switches:** None added, changed or removed. **Reviewed:** 3d7704eb8209 against a2dc53859018: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, both commits, the complete changed test and the relevant host input code. Skimmed the Sprint test and test runner. docs/review-checklist.md and ../Tooling/AGENTS.md were unavailable; no generated files, translations or recorded runs were changed.; nothing run (a code review). **Checked and fine:** - The extracted enum precedes both the stand-in and extracted function, and the revised assertion checks the bits returned for L3. - No game-derived output, generated file, API version or switch changes appear in the diff. - The change is one topic and matches the pull request description. **Testing:** No code or tests were run, as requested. The author's baseline and head results were reviewed; the listed CI checks are still running. **Overlaps and merge order:** The description identifies WIP PR #152 as editing a different hunk of the same test; it reports no textual overlap. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
dazemc left a comment

The When it applies section has no AI assistance recorded box, and neither commit (3d7704eb, 298986e4) has an Assisted-by: trailer. Add them (and the A fix box if the updated check counts).

The `When it applies` section has no `AI assistance recorded` box, and neither commit (`3d7704eb`, `298986e4`) has an `Assisted-by:` trailer. Add them (and the `A fix` box if the updated check counts).
chore: record the Assisted-by trailer
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 6s
663f0e1bcb
Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go)
Author
Contributor

AI-assistance box added with real evidence: head 663f0e1b is an empty, message-only commit carrying Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go); tree 6280eceac7db695ff772a99326d6062393499bc4 is the same object as 3d7704eb's, so the runs still describe the head's tree. Pushed fast-forward, no force.

AI-assistance box added with real evidence: head `663f0e1b` is an empty, message-only commit carrying `Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go)`; tree `6280eceac7db695ff772a99326d6062393499bc4` is the same object as `3d7704eb`'s, so the runs still describe the head's tree. Pushed fast-forward, no force.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 6s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/pads-after-menu-sprint-l3:dazemc-fix/pads-after-menu-sprint-l3'
git switch 'dazemc-fix/pads-after-menu-sprint-l3'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2215
No description provided.