fix(tests): main's title-card and display-startup checks pass again #2539

Open
dazemc wants to merge 1 commit from dazemc/Longshot:fix/main-green-baseline into main
Contributor

Summary

On main today, no suite can be green: two game-free checks fail every run, and neither id is in CORE or FLAKY. Both fail identically on clean 7eb53d1a0 (the #2536 CI fix touches neither file).

To see the first bug, run python -I -B tests/run_all.py --exact tests/test_title_card_strips.py: the check imports nx2.oot_patches, but #2286 deleted nx2/ wholesale, so it dies with ModuleNotFoundError before asserting anything. Its subject, the text patch that emitted three-strip C into the lifted file, no longer exists: the Rust lift owns that, and the behaviour is already asserted against the live host code by tests/test_title_card_reveal.py plus game/hos_wide_ui.c. This deletes the stale check and ports the assertions only it held — the prepared frame's choice surviving a live option change (and its retained/reset state), and the large frame's full-picture reaches on Screen's edges and Custom — into test_title_card_reveal.py, against game/hos_wide_ui.c. Its oot_patches anchor-pairing warnings are dropped with the dead text matcher; there is no live equivalent to assert.

To see the second, run ... --exact tests/test_display_startup_failure.py: it compiles host/hos_main.c's main, which calls bc_claim() (declared in host/builder_channel.c:62), and the harness had neither a stub nor a declaration, so the generated .inc fails with use of undeclared identifier 'bc_claim'. The harness now has a counter stub with the same signature and requires exactly one claim on every startup path, so the call is still exercised rather than removed.

Files to read first: tests/test_title_card_reveal.py (the ported fixtures and their docstring) and tests/display_startup_failure_test.cpp (the stub and the claims == 1 requirement).

Fixes #2540. See #2532, whose body is the only record of the tests/test_title_card_strips.py breakage this removes. Nothing here runs in the game: tests only.

Rebase status (2026-11-25, current): 4655f3bb7 → e4ff8cae1 onto main @ 8f7300756701b7c9a278e576bb075ac20e622a32. Stable patch-id 04816341324672fa9e33f70fac2f92a388afc169 is unchanged and main's old-base→new-main file intersection with this PR is empty. The evidence already named below (suite, platform, in-game and measurement, as applicable) therefore still stands at the historical heads that produced it. Earlier rebase notes are history; where they say "this head", they mean the evidence commit named beside that run, not e4ff8cae1.

Testing

Tested: on this PC (Linux), game-free checks only (this changes no game code), at 4655f3bb7 on 7eb53d1a0:

Before, both ids failed:

$ python -I -B tests/run_all.py --exact --jobs 1 tests/test_title_card_strips.py
FAIL  tests/test_title_card_strips.py
  ModuleNotFoundError: No module named 'oot_patches'

$ python -I -B tests/run_all.py --exact --jobs 1 tests/test_display_startup_failure.py
FAIL  tests/test_display_startup_failure.py
  display_startup_actual.inc:82:5: error: use of undeclared identifier 'bc_claim'

After, both pass, and so do their neighbours:

$ python -I -B tests/run_all.py --exact --jobs 1 tests/test_title_card_reveal.py
1 passed, 0 failed, 0 skipped

$ python -I -B tests/run_all.py --exact --jobs 1 tests/test_display_startup_failure.py
1 passed, 0 failed, 0 skipped

$ python -I -B tests/run_all.py --exact --jobs 1 \
    tests/test_title_card_reveal.py tests/test_display_startup_failure.py \
    tests/test_hud_layout.py tests/test_wide_ui.py \
    tests/test_builder_channel.py tests/test_windows_display_startup.py
6 passed, 0 failed, 0 skipped in 50 s

Still to test: None.

Measurements

Nothing to measure: two game-free tests changed; no game code, shader, build path or default moved.

Risks

None for players: tests only, nothing the game runs. The deleted check was already dead on main (it failed at import); the behaviour it uniquely covered now runs against the same game/hos_wide_ui.c in test_title_card_reveal.py. The display check keeps its call exercised and now also forbids zero or duplicate claims. A revert brings both failures back.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit. — Rebased head e4ff8cae1 is directly on main @ 8f7300756701b7c9a278e576bb075ac20e622a32; the preserved diff is the single topic described in Summary.
  • Tested on my own PC, in the game for a change the game runs, as Testing says. (nothing here runs in the game: tests only; the checks in Testing ran on this PC)
  • mise run test passes (any failure that also fails on main is named). Suite at 4655f3bb7b489c2b1688307dd918e71f95b8f5ff: 834 passed, 0 failed, 8 skipped in 491 s (linux, 5 at once), 842 checks, exit 0; log prrefresh-logs/suite-2539-4655f3bb.log, sha256 2606fa9a9f025b321c8dbf3b97200a88875b856ad50a86d0b001918956e2bdf6, .head = that sha, .start/.end/.exit and JUnit beside it. Strict gate CLEAR 09:14:58 (queue running: empty, no run_all.py, no mise run test, 3 samples over 30 s), RX_CPM=/home/daze/GitHub/Hookshot/build-linux/deps/cpm, sampler 18 samples with no guard and no foreign load. Zero failing ids: the two base failures (tests/test_display_startup_failure.py, tests/test_title_card_strips.py) that Amendment 2 exempted for heads on be663a08a pass here, so a head rebased past this fix must show zero failures and an Amendment 2 exemption claimed then would be wrong.
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here. (both ids and their outputs are in Testing)
  • A check under tests/ that reads changed source is updated, not weakened. (the stale check is replaced by the same assertions against the live host file, plus the planner's reaches)
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
## Summary On `main` today, no suite can be green: two game-free checks fail every run, and neither id is in CORE or FLAKY. Both fail identically on clean `7eb53d1a0` (the `#2536` CI fix touches neither file). To see the first bug, run `python -I -B tests/run_all.py --exact tests/test_title_card_strips.py`: the check imports `nx2.oot_patches`, but `#2286` deleted `nx2/` wholesale, so it dies with `ModuleNotFoundError` before asserting anything. Its subject, the text patch that emitted three-strip C into the lifted file, no longer exists: the Rust lift owns that, and the behaviour is already asserted against the live host code by `tests/test_title_card_reveal.py` plus `game/hos_wide_ui.c`. This deletes the stale check and ports the assertions only it held — the prepared frame's choice surviving a live option change (and its retained/reset state), and the large frame's full-picture reaches on Screen's edges and Custom — into `test_title_card_reveal.py`, against `game/hos_wide_ui.c`. Its `oot_patches` anchor-pairing warnings are dropped with the dead text matcher; there is no live equivalent to assert. To see the second, run `... --exact tests/test_display_startup_failure.py`: it compiles `host/hos_main.c`'s `main`, which calls `bc_claim()` (declared in `host/builder_channel.c:62`), and the harness had neither a stub nor a declaration, so the generated `.inc` fails with `use of undeclared identifier 'bc_claim'`. The harness now has a counter stub with the same signature and requires exactly one claim on every startup path, so the call is still exercised rather than removed. Files to read first: `tests/test_title_card_reveal.py` (the ported fixtures and their docstring) and `tests/display_startup_failure_test.cpp` (the stub and the `claims == 1` requirement). Fixes #2540. See #2532, whose body is the only record of the `tests/test_title_card_strips.py` breakage this removes. Nothing here runs in the game: tests only. **Rebase status (2026-11-25, current):** `4655f3bb7` → `e4ff8cae1` onto `main @ 8f7300756701b7c9a278e576bb075ac20e622a32`. Stable patch-id `04816341324672fa9e33f70fac2f92a388afc169` is unchanged and main's old-base→new-main file intersection with this PR is **empty**. The evidence already named below (suite, platform, in-game and measurement, as applicable) therefore still stands at the historical heads that produced it. Earlier rebase notes are history; where they say "this head", they mean the evidence commit named beside that run, not `e4ff8cae1`. ## Testing **Tested:** on this PC (Linux), game-free checks only (this changes no game code), at `4655f3bb7` on `7eb53d1a0`: Before, both ids failed: ``` $ python -I -B tests/run_all.py --exact --jobs 1 tests/test_title_card_strips.py FAIL tests/test_title_card_strips.py ModuleNotFoundError: No module named 'oot_patches' $ python -I -B tests/run_all.py --exact --jobs 1 tests/test_display_startup_failure.py FAIL tests/test_display_startup_failure.py display_startup_actual.inc:82:5: error: use of undeclared identifier 'bc_claim' ``` After, both pass, and so do their neighbours: ``` $ python -I -B tests/run_all.py --exact --jobs 1 tests/test_title_card_reveal.py 1 passed, 0 failed, 0 skipped $ python -I -B tests/run_all.py --exact --jobs 1 tests/test_display_startup_failure.py 1 passed, 0 failed, 0 skipped $ python -I -B tests/run_all.py --exact --jobs 1 \ tests/test_title_card_reveal.py tests/test_display_startup_failure.py \ tests/test_hud_layout.py tests/test_wide_ui.py \ tests/test_builder_channel.py tests/test_windows_display_startup.py 6 passed, 0 failed, 0 skipped in 50 s ``` **Still to test:** None. ## Measurements Nothing to measure: two game-free tests changed; no game code, shader, build path or default moved. ## Risks None for players: tests only, nothing the game runs. The deleted check was already dead on main (it failed at import); the behaviour it uniquely covered now runs against the same `game/hos_wide_ui.c` in `test_title_card_reveal.py`. The display check keeps its call exercised and now also forbids zero or duplicate claims. A revert brings both failures back. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. — Rebased head `e4ff8cae1` is directly on `main @ 8f7300756701b7c9a278e576bb075ac20e622a32`; the preserved diff is the single topic described in Summary. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. (nothing here runs in the game: tests only; the checks in Testing ran on this PC) - [x] `mise run test` passes (any failure that also fails on `main` is named). **Suite at `4655f3bb7b489c2b1688307dd918e71f95b8f5ff`: 834 passed, 0 failed, 8 skipped in 491 s (linux, 5 at once), 842 checks, exit 0; log `prrefresh-logs/suite-2539-4655f3bb.log`, sha256 `2606fa9a9f025b321c8dbf3b97200a88875b856ad50a86d0b001918956e2bdf6`, `.head` = that sha, `.start`/`.end`/`.exit` and JUnit beside it. Strict gate CLEAR 09:14:58 (queue `running:` empty, no `run_all.py`, no `mise run test`, 3 samples over 30 s), `RX_CPM=/home/daze/GitHub/Hookshot/build-linux/deps/cpm`, sampler 18 samples with no guard and no foreign load.** Zero failing ids: the two base failures (`tests/test_display_startup_failure.py`, `tests/test_title_card_strips.py`) that Amendment 2 exempted for heads on `be663a08a` pass here, so a head rebased past this fix must show zero failures and an Amendment 2 exemption claimed then would be wrong. - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. (both ids and their outputs are in Testing) - [x] A check under `tests/` that reads changed source is updated, not weakened. (the stale check is replaced by the same assertions against the live host file, plus the planner's reaches) - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers.
fix(tests): main's title-card and display-startup checks pass again
Some checks failed
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 7s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
4655f3bb7b
Two checks in neither CORE nor FLAKY fail identically on clean main, so
every suite on main fails:

- tests/test_title_card_strips.py imports nx2/oot_patches and nx2/oot_wide.
  #2286 deleted nx2/ wholesale and #2411 moved the game's code to game/,
  so the import raises ModuleNotFoundError before any assertion. Its
  subject, the text patch that emitted three-strip C into the lifted file,
  is gone: the Rust lift owns that, and the strip behaviour is asserted
  against the live host code by tests/test_title_card_reveal.py. Delete
  the stale test and port what only it asserted - the prepared frame's
  immutable choice and retained/reset state, and the large frame's
  full-picture reaches - into test_title_card_reveal.py against
  game/hos_wide_ui.c. Its oot_patches anchor warnings are dropped with the
  dead text matcher.

- tests/display_startup_failure.py compiles host/hos_main.c's main, which
  calls bc_claim() (host/builder_channel.c). The harness had neither a
  stub nor a declaration. Add a counter stub with the same signature and
  require exactly one call on every startup path, so the call is still
  exercised rather than removed.

Before (7eb53d1a0):
  tests/test_title_card_strips.py: ModuleNotFoundError: No module named 'oot_patches'
  display_startup_actual.inc:82:5: error: use of undeclared identifier 'bc_claim'

After:
  tests/test_title_card_reveal.py  pass
  tests/test_display_startup_failure.py  pass
  neighbours (hud layout, wide UI, builder channel, Windows display)  6 passed

Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go)
Author
Contributor

Description: Testing names the machine instead of a distribution; no other change.

Description: Testing names the machine instead of a distribution; no other change.
dazemc changed title from WIP: fix(tests): main's title-card and display-startup checks pass again to fix(tests): main's title-card and display-startup checks pass again 2026-11-25 17:23:53 +00:00
dazemc force-pushed fix/main-green-baseline from 4655f3bb7b
Some checks failed
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 7s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to e4ff8cae14
Some checks are pending
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / Lint (pre-commit, ShellCheck) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 4/4) (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 / Conventional Commit title (pull_request) Blocked by required conditions
CI / What the change needs (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Blocked by required conditions
CI / longshot-builder end to end (synthetic game) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (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 10s
2026-11-25 17:54:54 +00:00
Compare
Author
Contributor

Rebased 4655f3bb7 to e4ff8cae1 on main 8f7300756; patch-id unchanged and intersection empty, so the 834/0/8 suite evidence stands. Body records the rebase.

Rebased 4655f3bb7 to e4ff8cae1 on main 8f7300756; patch-id unchanged and intersection empty, so the 834/0/8 suite evidence stands. Body records the rebase.
Some checks are pending
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / Lint (pre-commit, ShellCheck) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 4/4) (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 / Conventional Commit title (pull_request) Blocked by required conditions
CI / What the change needs (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Blocked by required conditions
CI / longshot-builder end to end (synthetic game) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (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 10s
This pull request has changes conflicting with the target branch.
  • tests/test_title_card_strips.py
Some workflows are waiting to be reviewed.
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.
git fetch -u 'fix/main-green-baseline:dazemc-fix/main-green-baseline'
git switch 'dazemc-fix/main-green-baseline'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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!2539
No description provided.