test(vk): the texture staging check declares LogLevel and logf_at again, failing on main since #177 #202

Merged
HumanBean merged 1 commit from dyst/Longshot:fix/staging-check-log-levels into main 2026-11-13 16:38:41 +00:00
Member

Why

tests/test_texture_staging_publication.py has failed on main since #177, on Windows and Linux: the cut of staging() it compiles now calls logf_at(log_debug, ...), which its fixture doesn't declare. A check that fails on main hides any real regression in texture staging, and it is one of the sanitizer lane's checks (#29).

What changed

  • tests: tests/texture_staging_publication_test.cpp declares LogLevel and stubs logf_at beside its logf stub, as gpu/vk/vk_internal.h declares them. Nothing else in the check changes.

Flags and settings

None

Measurements

main: 0c74253d (2026-11-13)
this PR: fix/staging-check-log-levels @ 74d9a96c
Hardware: Ryzen 9 3900X, 64 GB, Windows 11; Linux in Docker (python:3.12, g++)
Scene: none: game-free. The texture staging check, compiled and run
Method: python -I -B tests/run_all.py texture_staging_publication twice on each, Windows (the Builder's clang++, its Vulkan headers); on Linux the check run directly, plain and with --sanitize, with the pinned Vulkan headers through scripts/fetch_commit.sh
How to reproduce: python -I -B tests/run_all.py texture_staging_publication on each

main @ 0c74253d this PR @ 74d9a96c
the check's runs passing, Windows 0 of 2 2 of 2
on Linux, plain and sanitized - 2 of 2
main: fixture.cpp:146:51: error: use of undeclared identifier 'log_debug'
      if (ms > 5 && slow_logged++ < 24) logf_at(log_debug, "vk: a staging arena of %llu MB took %.1f ms to make", ...
this PR, Windows: 1 passed, 0 failed (twice)
this PR, Linux: plain: pass; --sanitize: pass

Testing

Tested: the runs above; tests/run_all.py, the whole suite, on this branch and on main 0c74253d, Windows (483 passed and 6 failed on main, 484 passed and 5 failed here: this check is the one fixed; test_check_third_party, test_display_pointer, test_fpx_sticky, test_release and test_spawn_emit fail on main too).

Not tested: in the game (a test fixture only).

Needs other testers: None

Screenshots

Nothing on screen.

Risk and rollback

None for the game: only the check's fixture changes. Reverting the commit brings the failure back.

Reviewer notes

#177's own run was on Linux without the Vulkan headers, where this check skips, so the break didn't show there. tests/test_log_levels.py (from #177) covers the real logf_at; this fixture only needs it to exist.

Issues

None

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above).
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

If applicable

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A check under tests/ that reads changed source updated in this PR, not weakened.

🤖 Generated with Claude Code

## Why `tests/test_texture_staging_publication.py` has failed on main since #177, on Windows and Linux: the cut of `staging()` it compiles now calls `logf_at(log_debug, ...)`, which its fixture doesn't declare. A check that fails on main hides any real regression in texture staging, and it is one of the sanitizer lane's checks (#29). ## What changed - tests: `tests/texture_staging_publication_test.cpp` declares `LogLevel` and stubs `logf_at` beside its `logf` stub, as `gpu/vk/vk_internal.h` declares them. Nothing else in the check changes. ## Flags and settings None ## Measurements main: 0c74253d (2026-11-13) this PR: fix/staging-check-log-levels @ 74d9a96c Hardware: Ryzen 9 3900X, 64 GB, Windows 11; Linux in Docker (python:3.12, g++) Scene: none: game-free. The texture staging check, compiled and run Method: `python -I -B tests/run_all.py texture_staging_publication` twice on each, Windows (the Builder's clang++, its Vulkan headers); on Linux the check run directly, plain and with `--sanitize`, with the pinned Vulkan headers through `scripts/fetch_commit.sh` How to reproduce: `python -I -B tests/run_all.py texture_staging_publication` on each | | main @ 0c74253d | this PR @ 74d9a96c | |---|---|---| | the check's runs passing, Windows | 0 of 2 | 2 of 2 | | on Linux, plain and sanitized | - | 2 of 2 | ``` main: fixture.cpp:146:51: error: use of undeclared identifier 'log_debug' if (ms > 5 && slow_logged++ < 24) logf_at(log_debug, "vk: a staging arena of %llu MB took %.1f ms to make", ... this PR, Windows: 1 passed, 0 failed (twice) this PR, Linux: plain: pass; --sanitize: pass ``` ## Testing **Tested:** the runs above; `tests/run_all.py`, the whole suite, on this branch and on main 0c74253d, Windows (483 passed and 6 failed on main, 484 passed and 5 failed here: this check is the one fixed; test_check_third_party, test_display_pointer, test_fpx_sticky, test_release and test_spawn_emit fail on main too). **Not tested:** in the game (a test fixture only). **Needs other testers:** None ## Screenshots Nothing on screen. ## Risk and rollback None for the game: only the check's fixture changes. Reverting the commit brings the failure back. ## Reviewer notes #177's own run was on Linux without the Vulkan headers, where this check skips, so the break didn't show there. `tests/test_log_levels.py` (from #177) covers the real `logf_at`; this fixture only needs it to exist. ## Issues None ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### If applicable - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
test(vk): the texture staging check's fixture declares LogLevel and logf_at, which staging's cut now calls
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
74d9a96c35
Since #177 staging()'s slow-arena line is logf_at(log_debug, ...); the fixture stubbed logf only, so the cut no longer
compiled ("use of undeclared identifier 'log_debug'") and test_texture_staging_publication failed on main, Windows and
Linux. The stubs as gpu/vk/vk_internal.h declares them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
dyst changed title from WIP: test(vk): the texture staging check declares LogLevel and logf_at again, failing on main since #177 to test(vk): the texture staging check declares LogLevel and logf_at again, failing on main since #177 2026-11-13 13:55:29 +00:00
HumanBean approved these changes 2026-11-13 16:17:39 +00:00
HumanBean left a comment

Approve. This is the one to keep of the three duplicates (this PR, #195 and #215). All three make the same two-line change.

What's good

  • enum LogLevel : int { log_error, log_warn, log_info, log_debug, log_trace }; and void logf_at(LogLevel, const char*, ...) are exactly what gpu/vk/vk_internal.h:36-37 declares on main: same underlying type, same enumerator order, same signature. The real definition is in gpu/vk/vk_main.cpp:125.
  • It is needed: staging() in gpu/vk/vk_texture.cpp:506 calls logf_at(log_debug, ...) (the slow-arena line), and the check cuts that function. The source comment names that call correctly. flush_mapped_range in vk_vma.cpp, the other function cut from that file, doesn't log at a level.
  • Of the three, it has the most thorough testing (Windows twice, Linux plain and --sanitize), and the description is accurate. The fixture line it touches is unchanged on main@origin, so it applies cleanly.

Must change

  • None.

Should change

  • None.
Approve. This is the one to keep of the three duplicates (this PR, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/195 and https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/215). All three make the same two-line change. **What's good** - `enum LogLevel : int { log_error, log_warn, log_info, log_debug, log_trace };` and `void logf_at(LogLevel, const char*, ...)` are exactly what `gpu/vk/vk_internal.h:36-37` declares on main: same underlying type, same enumerator order, same signature. The real definition is in `gpu/vk/vk_main.cpp:125`. - It is needed: `staging()` in `gpu/vk/vk_texture.cpp:506` calls `logf_at(log_debug, ...)` (the slow-arena line), and the check cuts that function. The source comment names that call correctly. `flush_mapped_range` in `vk_vma.cpp`, the other function cut from that file, doesn't log at a level. - Of the three, it has the most thorough testing (Windows twice, Linux plain and `--sanitize`), and the description is accurate. The fixture line it touches is unchanged on main@origin, so it applies cleanly. **Must change** - None. **Should change** - None.
HumanBean added this to the v3.0.0 milestone 2026-11-13 16:38:23 +00:00
HumanBean deleted branch fix/staging-check-log-levels 2026-11-13 16:38:48 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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!202
No description provided.