feat(vk): bug reports and the log say where Link stands, with a "!pos X Y Z" to paste #1408
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
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1408
Loading…
Reference in a new issue
No description provided.
Delete branch "mooki/Longshot:bug-report-place"
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: feat · Risk: low · Tested on: Linux (Arch, kernel 7.2.15), RTX 4090 (NVIDIA 615.78.08) · Needs: Windows, any GPU
TL;DR
A bug report named the map and nothing else, so nobody could go to the spot where the player was. The Insert menu's Bug report and the game's log now say where Link stood as one line: the map, his age, the time of day, which way he faces, where the camera looks, and last
!pos X Y Zwith his position, which pastes into the live input file's!poscommand (#1351). Facing and camera are there for a tester to look that way by hand; the command only sets the position. Checked with game-free tests and in the game on a merge with that pull request: the pasted!pospart put Link where the report said.Breakdown
map:line is written on a change only, so a log from a crash did not say where in the map the game was.place: <line>when it is worth a line; the Bug report prints it as the first line of "Where in the game" (also the link'swherefield). The line is the map, the age, the game's clock,facing,camera(yaw, pitch) and last!pos X Y Z. The control bridge'sstatus.gamegainscamera_pitch. The renderer API gains one callback,MkwVkHost.place(API 34: the number renumbers at merge if another pull request lands one first).map:log line; no switch, menu row or option is added; the line holds a position and nothing personal (no name, no path, nothing of a save); the Bug report carries the line as text and never parses it; the!poscommand (a separate pull request) takes the three position numbers and nothing else, sofacingandcameraare for the person reading, who looks that way by hand. This pull request works without it: a build without the command ignores the pasted line.!pospart was pasted back through the command and verified.Why
A bug report names the map and nothing else, so nobody can go to the spot: "Kokiri Forest" is a whole area. The Insert menu's Bug report (Gameplay tab) and the game's log now say where the player stood, exactly, as one line a person can paste:
KokiriForest_Child (child), 13:20, facing 90, camera 45 12, !pos -52.5 149.9 180.2(made-up numbers)It is the map as the game spells it, the age, the game's clock, which way Link faces (whole degrees, -180 to 179, 0 toward +z, 90 toward +x), where the gameplay camera looks (its yaw in the same degrees, then its pitch: 0 level, positive looking down), and last Link's position (metres, one decimal). The numbers are the control bridge's
facing,camera,camera_pitchandpos. The!pospart is last and is the live input file's!pos X Y Zcommand of #1351 (a separate pull request; this one works without it): cut the line from!posto its end and append it to the live input file of a build that has the command, and Link is put at the spot in the map he is in (go to the map first, with the Debug tab's Teleport). The command takes exactly three numbers, which is why the facing and the camera are before it; they are printed for the tester to look that way by hand. The automated test player and bug hunter of #1198 get findings that name where they happened. A game that crashes leaves its last place in the log, so a report built from the log has it too.What changed
The host reads the place twice a second while the game updates Link, with the state tap's readers (works with
HOS_CONTROLoff, which is how players run), keeps it as text for the renderer, and writesplace: <line>into the log when it is worth a line. The Bug report asks the host for it when its key is pressed and prints it as the first line of "Where in the game" (also the link'swherefield); the second line says where it came from. Two commits: the host's part (runtime) and the menu's (vk).Changed after the review: the line first read
KokiriForest_Child (child), x -52.5 y 149.9 z 180.2, facing 90, 13:20, which does not paste into!pos. Nothing was released with that form. It is now as above, with the position last in the command's own form.host/oot_place.c,host/oot_place.h(new): the line's format. Every part after the age may be missing, in this order:, HH:MM,, facing F,, camera YAW PITCH,, !pos X Y Z. x y z have one decimal; the facing and the yaw are whole degrees from -180 to 179; the pitch is rounded to a whole degree and not wrapped; no number is ever written-0. A part that cannot be read is left out with its comma (the camera needs its yaw and its pitch both;!posneeds the position), no map means no line, a number that is not finite or is absurd (coordinates past 1e8, angles of 1e6 or more) counts as not read. The widest line is 166 bytes of the 176 the buffer takes. Also the log rule, the live snapshot (a lock, no torn lines) andhos_place_loaded(back at the title the place is forgotten).map:line is unchanged.host/oot_state_tap.c:hos_oot_place_read(the map, age, position, facing, the camera and the game's clock read asdocs/oot/environment.md"The clock" says).state_cameranow gives the camera's pitch as well as its yaw (from the line between the view's eye and target), and the control bridge'sstatus.gamegainscamera_pitch(docs/control.md,tests/test_oot_state_tap.py).host/hos_main.c: a few lines in Link's update and in the inventory refresh.host/rx_backend.c,gpu/vk/vk_api.h:MkwVkHost.place, API 34, appended afternfc_scan_name, the last callback main has. The host function ishos_oot_place_line.gpu/vk/vk_menu.cpp,gpu/vk/vk_bug_report.cpp/.h: the press asks the host; "Where in the game" says: read from the game now / N s before (the game's pause menu and loading screens do not update Link) / the lastplace:line of this run's log / the lastmap:line / not known. "The run before was last at ..." names where a crashed run ended.docs/images/guide/manifest.json: the Graphics illustration's reviewed hashes ofvk_api.handvk_bug_report.hadvance (scripts/check_guide_screenshots.py --review-sourcesasks for it because this change touches them; the files differ from the reviewed ones by the API number, one appended callback no menu row uses, a field and comments: no Graphics row, label, help text or navigation changes; the menu fixture was not rerun on this head).vk_menu.cppis one of seven reviewed files that already differ from their reviewed hashes on main, so its hash is left to the review of those changes.docs/development.md"Where Link is" (the line, the grammar, the rules, how the end pastes, the API),docs/control.md, README,docs/common-issues.md, the game problem form's Where field.mapfrom themap:line; sending the place with it is a follow-up.Measurements
Nothing to time: one clock read per Link update and, twice a second, a few bounded guest reads (the camera's view adds about nine small ones, the reads the control bridge makes for its
camera); the log grows by under 0.1 MB an hour of continuous running. What was checked is that it is right, in Testing.Flags and settings
None. (
gpu/vk/vk_menu.cppchanges only what the Bug report's key press asks the host for: no menu row, label, ini key or switch is added or changed. No switch is read from the environment:gpu/vk/switches.defandtests/test_switch_table.pyare untouched and pass.)Testing
Tested: Linux (Arch, kernel 7.2.15), RTX 4090 (NVIDIA 615.78.08), i9-13900K, 93 GB, gcc 16.2.1 and clang 23.1.3, 2026-11-17; main @
347aa6e82, this PR @f08b5eece. The PC was shared and busy (load average 40 to 60), so steps 1 to 10 are game-free and none of it is a timing; step 11 is the game runs of earlier heads and step 12 the game run of this head on a merge with #1351's. Step by step, in the order it was done:The series. Two commits (runtime, then the renderer), rebased onto main @
347aa6e82from main @6112edb61(git range-diff: the first commit!only where it takes main's new neighbours, the second!for the manifest hashes and the API number). Three files conflicted with main's newest callbacks (the rumble test, API 32, and the NFC calls, API 33):gpu/vk/vk_api.h(the version line and the end ofMkwVkHost: kept main's two callbacks and appended this one afternfc_scan_name, version 34),host/rx_backend.c(the declaration and the table: kept main's, appendedhos_oot_place_linelast) andtests/test_audio_output_devices.py(main's contiguous check kept;placeis no longer next toperf_tracking, so it has its own check that it is the last slot, and itsoffsetofassert followsnfc_scan_name).tests/test_oot_place.py's wiring check and the API paragraph indocs/development.mdfollow the new number and slot.Tests first, red. The tests for the final form were written before the code, and run with the workbench's game-free test runner (https://github.com/mooki000/ls-workbench/tree/main/harness: it runs one game-free test with core dumps off) and the project's pinned Python:
python -I -B tests/test_oot_place.py --cc gccandpython -I -B tests/test_bug_report.py --cxx g++.tests/test_oot_place.pystops atdocs/development.md: 'KokiriForest_Child (child), 13:20, !pos -52.5 149.9 180.2 90 45 12' is not a line of the grammar with its facing, camera and position, andtests/test_bug_report.pyat the same line in.forgejo/ISSUE_TEMPLATE/1-game-problem.yml. That proves the grammar the tests read the docs with is the new one.tests/test_oot_place.pystops atfull: wrote 'KokiriForest_Child (child), 13:20, !pos -52.5 149.9 180.2 90 45 12' (66), wanted 'KokiriForest_Child (child), 13:20, facing 90, camera 45 12, !pos -52.5 149.9 180.2'. That proves the format cases fail on the old format.tests/test_bug_report.pypasses at this stage (it carries the line as text: it was red at the first stage only).257c54911(copied into a temporary detached worktree of it):tests/test_oot_place.py:Link's update does not take the place under its lock, after the state tap (due -1, read -1, note -1);tests/test_bug_report.py:bug_report_save does not ask the host for the place (MkwVkHost::place) when the report is made;tests/test_oot_state_tap.py:AssertionError: camera_pitch is None, not 35.3;tests/test_audio_output_devices.py:Append the Bug report place after the performance tracking callback without shifting earlier callbacks.Then the code, and green.
host/oot_place.cwritten to the final form,HOS_PLACE_LINE160 to 176 (the widest line is 166 bytes: the 63-byte map,age not known, the clock,facing -180,camera -180 -1000000(a pitch of -999999.5 is read and rounds to that) and three coordinates of -1e8).tests/test_oot_place.py --cc gccand--cc clangboth printoot place: ok (the line and its grammar, the log's rule, the live read, the reader, the wiring). What it holds: 58 format cases (every part left out in turn, the facing without a position, a camera without a facing, no position so no!pos, negative zero in x, y, z, yaw and pitch, the rounding and wrap of facing and yaw, the pitch rounded and not wrapped, a number that is not finite or absurd in each of x, y, z, facing, yaw and pitch, the unprintable byte of a map name, the widest line in a buffer of its size and in one byte less, short buffers cut inside the facing, the camera and a number of!pos); 36 rule cases (the log rule, the arrival's second line with a camera that moved or tilted or was read late, a clock that moved and does not count); 10 walks through the log (a run writes 13 lines in 60 s, a crawl 11, standing 10 minutes one, a map change 3, an age change 2, the newest place, four arrivals), the title and the sampling cadence; the live read and a thread reading it while another writes 400,000 samples (no torn line); the reader over bounded synthetic guest memory built the waytests/test_oot_state_tap.pybuilds it, with the camera manager's chain and a view (a readable camera at 45 degrees looking down 35, looking up, toward -x and toward -z, an unreadable view, an eye or target that is not finite, looking straight down, no camera in the manager, no manager); the wiring (Link's update, the table slot, the API number); and that the examples in the docs, the issue form and the headers are lines of the grammar.The paste. The same test hands every line the code makes, cut from
, !posto its end, to a copy of PR 1351's own parser (is_pos_commandandparse_posof itshost/nn_hid.c, compared with the source on that branch by a script: identical but for comments) compiled in the test: it accepts all of them and returns the same x y z the line shows. It also refuses seven lines it must refuse (a facing after the numbers, the earlier six-number form, two numbers,nan,inf, a part after the numbers, a line with no position) and accepts one plain!pos 1.0 2.0 3.0, so the check has teeth: the earlier form of this branch fails it.Breaking the code on purpose. A throwaway script copies the files the test reads into a temporary folder, makes one one-line break, runs
tests/test_oot_place.py --cc gccand records how it ended (a break that only fails to compile does not count): 23 breaks (camera before facing, facing not wrapped, pitch not checked for a number, facing and camera after the numbers, a 160-byte buffer, negative zero, pitch wrapped, yaw truncated,!posneeding a facing, the clock after!pos, the clock counting for the arrival's second line, facing or camera printed unread, a comma missing, the command misspelled, one coordinate not checked, a tenth truncated, the pitch's sign, the yaw's axis, the eye's height not checked, the old form in the docs and in the header, the widest line not said): all 23 caught, each by the line that should catch it. Two survived the first version of the test (the clock counting for the arrival's second line; one coordinate not checked for a number): cases were added and both are caught.The other checks of the same files, all with the same game-free runner and all passing:
tests/test_bug_report.py(bug report: ok (report.txt as the issue form, both logs redacted, the picture, the long log, the terminal start, switch values, NUL bytes, the folder's reason): the live place, a stale one, the log's last place, a log with only a map, the run before's place, the link within 2000 characters with 98 switches, a place after a NUL byte and past 10 MB; now with the final form, and the form's and the header's examples as lines of the grammar),tests/test_oot_state_tap.pywith gcc and clang (camera_pitchin the socket sample, null with the camera),tests/test_audio_output_devices.py(layout offsets, table slots and the version 34: updated, not weakened),tests/test_microphone_test_gain.py,tests/test_menu_text_field.py,tests/test_fps_stats.py(the other readers of the API number: unchanged, pass),tests/test_doc_anchors.py(12, each resolves),tests/test_menu_sections.py(OK (7 headings; Graphics in 6 sections)),tests/test_guide_screenshots.py(14 tests, OK),tests/test_switch_table.py(this change adds no switch; on the new head it fails withRX_VK_INVALIDATE_QUICK is read (gpu/vk/vk_replay.cpp:4167) and has no row in gpu/vk/switches.defandRX_VK_INVALIDATE_WAIT was removed (GONE) and is still read: both are in a file of main's own #1150 that this change does not touch; I did not run it on a plain main checkout. On the earlier base it passed:ok: 678 switches), and 14 more tests that read the changed files: the control client (test_longshot_ctl), the crash dialog, the description checker, the log redaction, the device-lost exit, the menu hit test, the renderer's new-handler test, UTF-8 paths, log levels, the pipeline tour, the preparation stall, the host's allocation wait, the opening skip and the SDL desktop size.The guide check.
python -I -B scripts/check_guide_screenshots.py --review-sources: on main @347aa6e82it prints 11REVIEW REQUIREDlines (main's own:device_policy.h,fallback_size_policy.h,menu_i18n.h,vk_api.h,vk_draw.h,vk_internal.h,vk_menu.cpp,vk_menu.h,vk_temporal.h,vk_texture.hand a missingvk_vendor.h). This branch advances the reviewed hashes of the two files it changes,vk_api.handvk_bug_report.h(one appended callback and comments: nothing the Graphics view shows), by the repository's formula (SHA-256 of the sortedfile=hashlines), and prints 10: main's own, none of this PR's.tests/test_guide_screenshots.pypasses.Together with #1351. A throwaway merge of this branch with #1351's head on main @
347aa6e82merged without a conflict and was built and run (step 12); the two share the parser: step 4's copy of #1351'sparse_posis in step with its source.Windows, compiled, not run. The Windows-target syntax check (llvm-mingw 20261104, the workbench's fixture checker in https://github.com/mooki000/ls-workbench/tree/main/skills/ls-pr-evidence/scripts, through the idle gate): on the head before the last rebase (7719cfa53, on main @
257c54911)tests/test_oot_place.pyPASS (2 translation units: its driver andhost/oot_place.c),tests/test_bug_report.pyPASS (its driver andgpu/vk/vk_bug_report.cpp) andtests/test_oot_state_tap.pyPASS (both fixtures);tests/test_audio_output_devices.pyFAIL on-Werror=deprecated-declarationsformemmoveinhost/audio_output_devices.handtmpfilein the test's own parser, files this change does not touch for those lines (it failed the same way on main when checked earlier). The checker stops before running the drivers, sotests/test_oot_place.py's reader fixture (the camera code cut out ofhost/oot_state_tap.c, and the copy of the!posparser) was compiled by hand with the checker's flags for the Windows target: no output, exit 0. The same two checks on the last head (158381db3, on main @6112edb61) both printPASS: 2 captured translation units, 0 failures, 0 unjudged drivers/files; Windows execution NOT TESTED, and the reader fixture compiled by hand again passes (exit 0); none of this is Windows execution.The whole suite,
tests/run_all.py --jobs 6 --strictin a fresh home through the idle gate, from clean detached checkouts beside the Tooling checkout, on this PR @f08b5eeceand on main @347aa6e82: this PR 705 passed, 44 failed, 17 skipped; main 704 passed, 44 failed, 17 skipped. The same 44 names fail on both (test_bug_report_defaults, test_compute_warm_apart, test_cpu_report, test_crt_options, test_damage_debug_menu, test_dev_packs, test_display_startup_failure, test_dlss_feature_size, test_draw_stream_visibility, test_failed_compile_keeps_objects, test_framegen_preset, test_fsr_image_retirement, test_fsr_uniform_ownership, test_guest_imported, test_hud_layout_row, test_import_reach, test_invalidate_quick, test_invalidate_vcore, test_linux_preflight, test_linux_pressure, test_linux_update, test_log_open_failure, test_mirror_budget, test_missing_nup, test_mods_size_table, test_nonuniform_image_arrays, test_parallel_init_order, test_pending_guest_import, test_pipeline_play_cache, test_present_thread, test_profiling_mode, test_readback_timeout_source, test_replay_write_order, test_rumble_menu, test_run_all_changed, test_slow_frames, test_staging_burst, test_switch_table, test_target_image_pool, test_upscaler_round_trip, test_upscaler_rows, test_vcore_escape, test_vk_occlusion_queries, test_walk_key), so no test fails only because of this PR. Outputs:reports/PosCommand-files/suites-r3/.In the game, earlier heads, earlier forms of the line. Both runs below were windowless on the RTX 4090 and compared the code's numbers with the control bridge's; they ran the code that reads the map, the position, the facing and the clock, and the log rule, but not this head's camera, order or
!posform. Hold 1 (a full build of the branch at 220ffa599, on17394b711; 333 s, 21,564 frames,fatal=0 crash=0 devlost=0 kernel=0 nvrm=0): the Insert menu's keys pressed Bug report four times while the driver teleported Kokiri Forest -> Hyrule Field -> a 6 s walk -> Kokiri Forest; all fourreport.txtfirst lines had the right map, and Link's position, facing and the game's clock agreed with the bridge'sstatussample taken at the same moment and the clock read through the bridge's memory read (0.045 to 0.064 m, facing exact, clock equal). It found that theplace:line at a map change had the previous map's facing and Link 0.7 m short of where he then stood: fixed by the arrival's second line. Hold 2 (a full build at 03233d094 with #1351's first commit, whose command was then called!place; 378 s, 24,488 frames,fatal=0 crash=0 devlost=0 nocore=0 kernel=0 nvrm=0): five reports; after each of two walks the driver sent!placewith the numbers of an earlier report, and Link stood 0.01 m and 0.04 m from them 0.3 s later; the report made at Kokiri Forest afterwards was character for character the earlier one. The camera's pitch was read in the game by #1351's earlier build (the samecamera_pitchcode): 4.0 to 43.2 degrees, plausible values and no more than that (the same build's!pos X Y Zput Link at the asked position: 13 lines, 13 returns, 7 warps verified at 0.0 m; that is #1351's evidence). That build also showed why this line only prints the facing and the camera: asked to turn Link and the camera, the game recomputed Link's heading on his next update and the camera object the hook gets had no readable view, so #1351 puts Link at the position only.Not testable by hand: the Windows runtime: this PC runs Linux only. What stands in for it is the Windows-target syntax check of the changed test programs (step 9) and the Test Farm item under Must be tested.
39edc4dc9: #1351's head 2182b216b and #1408's headf08b5eeceon main @347aa6e82; they merged without a conflict; #1351's final head differs from 2182b216b only in two lines at the top oftests/test_pos_handoff.py, added afterwards for the Windows-target check), because both pull requests change the host and the Bug report line needs #1351's command. Linux (Arch, kernel 7.2.15), RTX 4090 (NVIDIA 615.78.08), windowless, from a copied save with onlyHOS_CONTROLandHOS_INPUT_LIVE(guest memory off, noHOS_OOT_CHEATS), in the side lane withRX_VK_VRAM_MB=9000(the GPU gate held the game back about 70 s before it started: another game had the card). A prepare stage took 107.4 s (@@done shaders), then the game 177.4 s: exit 0,fatal=0 crash=0 devlost=0 nocore=0 kernel=0 nvrm=0, no kernel driver lines (journal complete), 11,766 frames headless with the PC busy, so the rate says nothing. (A, #1351) Link was walked 15.3 m with the control bridge's stick, then!pos X Y Z(four decimals) sent back to the first position and on to the second: the bridge read him within 0.25 m of each for 2 s (last distance 0.00 m both times), each with itshid: live command ... !posline and itscheats: returned toline. Then two!poslines in one write, read in the same poll, the first the second position and the second the first position: both were logged as live commands, exactly onecheats: returned toline followed, it was the whole tuple of the last line (not a mix of the two), and the bridge read Link there (0.00 m). Then five lines the command must not act on,!pos 1 2,!poswith four numbers, with six numbers,!pos nan 1 2and the old!place 1 2 3: all five logged as live commands,hid: !pos takes exactly X Y Z (three finite numbers, metres): line ignoredfor the four!poslines, noreturned toline, Link moved 0.00 m. (B, #1408) The Insert menu's Bug report was pressed twice (timed menu keys, Gameplay tab). Report 1's line isHyruleField_Child (child), 14:50, facing 0, camera 0 6, !pos X Y Z(the numbers are not shown here): its position was 0.00 m from the bridge's reading at the press, its facing 0.0 degrees and its camera 0.0 and 0.4 degrees from the bridge's. The text from!posto the end of the line is three numbers and nothing else (checked by a copy of #1351's parser). Link was walked 17.6 m away, that text was appended to the live file exactly as it is, and the bridge read him back at it (0.00 m, one live line, onereturned toline). Report 2, made after, has the same!pospart character for character. Pictures looked at: the two reports' own pictures and two shots around the warps (reports/PosCommand-files/run5/panels-run5.jpg): Link stands in the same field spot in both reports. This is a feature proof, not a timing. Receipts:run5/. A first try of this hold (run 4) did not play: the gate held the game back longer than the script waited for the bridge, so the game started after the script had given up; nothing from it is used.Not tested: this head on its own without #1351 (the game run was on the merge of the two); Windows (nothing of this ran there). The two pull requests merged on main. AMD and Intel. Adult Link and maps other than Kokiri Forest and Hyrule Field. A place inside a dungeon (no room exists). The camera in a cutscene or a dungeon (it is read as the bridge reads it, from the gameplay camera's view). A real crash (the crash path is tested on a log, not on a crash). A real window (the runs were windowless).
Must be tested:
report.txt, expecting the first line of "Where in the game" to be the map, the age, the time of day,facing,cameraand!poswith x y z, and the second line "read from the game just now" (Test Farm:@Beanstalk windows, Bug report in Kokiri Forest, the first line of Where in the game).Risks
What could break: the host table and
MkwVkHostgrow by one slot (API 34): host and renderer are built together, as always; whoever lands second of the pull requests that bump the API renumbers (main is at 33 now; other pull requests in the queue also claim the next numbers). The host adds a few guest reads twice a second in Link's update, under the lock the state tap already takes; the camera's read is the one the control bridge does, now also withHOS_CONTROLoff. A very chatty log can push the lastplace:line out of the last 200 lines the crash window shows; it takes facts from the whole log. A wrong camera pitch or yaw would mislead a tester who looks that way by hand; the command does not take them. Overlap with #1351: its changes (host/nn_hid.c,host/hos_main.c, one docs row, its tests) merge with these without a conflict and both pull requests' tests pass on the merge; the line's end is only useful with that command, and a build without it ignores a pasted!posline.Turning it off: revert the commits; there is no switch (the line is small and a position is not personal).
Compatibility: nothing for saves,
longshot_options.inior caches; a new log lineplace:(its text changed within this pull request; no release had the earlier form); reports gain a line; the bridge'sstatus.gamegainscamera_pitch, which a client that does not know the field ignores; the renderer API is 34, and a host and renderer from different builds already refuse each other.Issues
See #1198.
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.
in Risks.
main(347aa6e82).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.MKWVK_API_VERSIONbumped (gpu/vk/vk_api.h'sMkwVkHostchanged).mainand passing here.tests/that reads changed source updated in this PR, not weakened.Link's update reads where he is twice a second (the map, his age, x y z, facing, the game's clock: the state tap's readers, host/oot_state_tap.c hos_oot_place_read, with HOS_CONTROL on or off) and keeps it as one line (host/oot_place.c): KokiriForest_Child (child), x -52.5 y 149.9 z 180.2, facing 90, 13:20 The log gets "place: <line>" when the map or the age changed, else only after 5 s and 3 units of movement: standing still writes nothing, running one line every 5 s at most. A load reads Link where it put him and with the facing of the map before (his entry moves him a little and turns him in the next second), so a line at the change is followed 2 s later by one more when it would then say something else. The map: line is as it was. MkwVkHost.place (API 29 -> 30, appended after monitor_select) gives the renderer the newest place and its age in ms, for the Bug report. Rooms are not included: the game has no room number to read. tests/test_oot_place.py: the line and its grammar, the log's rule (the arrival's second line included), the live read (and a thread reading it while another writes), the reader out of bounded synthetic guest memory, the wiring. tests/test_audio_output_devices.py names the API version and the host table's last slot: they read 30 and place. docs/development.md: "Where Link is". Assisted-by: Claude Sonnet 5.5 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>The Insert menu's Bug report asks the host for the place when its key is pressed (MkwVkHost.place) and writes it as the first line of "Where in the game", which is also the link's where field: KokiriForest_Child (child), x -52.5 y 149.9 z 180.2, facing 90, 13:20 The second line says where it comes from: read from the game just now; read from the game but N s before (Link is not updated in the game's own pause menu, a loading screen or the title); when the host has read none (a start), the last place: line of this run's log, then its last map: line, then "Not known". "The run before was last at ..." gives the place the run before ended at: where the game crashed, when it did. vk_bug_report.cpp takes the place: line out of the logs as it takes the map: line (a log over 10 MB and a log with NUL bytes included). tests/test_bug_report.py: the live place, a stale one, the log's last place, a log with only a map, the run before's place, the link within 2000 characters with 98 switches, and the wiring of the press. README.md, docs/common-issues.md and the game problem form's Where field say what the report now carries. docs/images/guide/manifest.json: the Graphics illustration's reviewed source hashes (vk_api.h, vk_bug_report.h, vk_menu.cpp, which this change touches) advance after a comparison, as scripts/check_guide_screenshots.py --review-sources (the guide-screenshots workflow) asks: the game-free menu fixture's Graphics view on main and on this branch differs in the version label's " dev" suffix only. No new rendering is claimed. Assisted-by: Claude Sonnet 5.5 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>WIP: feat(vk): bug reports and the log say where Link stands (map, x y z, facing, age, time of day)to feat(vk): bug reports and the log say where Link stands (map, x y z, facing, age, time of day)Possibly related, for context:
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).
Verdict: Request changes. The live report is a useful, bounded improvement, but the ABI extension must be rebased onto current main: its version and new host slot have already been allocated to different interfaces.
Players get a reproducible map/age/position/facing/time line in bug reports, and crash-log readers get occasional position breadcrumbs. The callback copies text safely across threads and adds no network sending. The net gain is worthwhile once current-main integration is resolved.
Reviewed:
6dc899a586f8127996bdcf213273601dd014d62fagainst merge-base544229a260c5f5008f241b9cf48ae6b01c1602b9; compared relevant current-main code ate332a52439a45a2b30d2a357001f1089de6991bf. Read every changed code hunk ingpu/vk/vk_api.h,vk_bug_report.cpp/.h,vk_menu.cpp,host/hos_main.c,oot_place.c/.h,oot_state_tap.c,rx_backend.c, and all three changed test files, including the new test in full. Read the state-tap bounded readers, player validation and cheats-lock call path, inventory refresh caller, world-clock setter, report copying/redaction/worker ownership and URL construction. Read changed docs/form and skimmed screenshot provenance hashes. Nothing run: no tests, builds, generators or game launches.Fixed in this review: nothing.
Checked and fine: guest reads are bounded and occur from the validated player update under cheats_lock; place sampling works independently of HOS_CONTROL; the renderer receives owned text and age copied under an acquire/release lock, without retaining guest pointers; the worker owns its Inputs; formatting avoids locale-dependent floating decimal output and negative zero, bounds strings and omits invalid fields; clock lookup matches the existing world-manager holder and setter; load filtering, partial fields, adult age, facing wrap, log cadence, whole-log facts extraction beyond the copied middle, legacy map-only fallback and report URL fallback are covered by read tests. No new camera casts are introduced, so the telemetry camera/cutscene type issue does not apply to this reader. API 29->30 and positional initializer agree on this PR's own base.
Blocking
gpu/vk/vk_api.h:17: current main already uses API 30 for the changed perf_info signature and appended perf_tracking callback, and API 31 for nvn_invalidate_quick. This branch still declares 30 and puts place immediately after monitor_select, occupying main's perf_tracking position. Rebase onto current main, preserve its signatures/callbacks, append place after the existing host tail, allocate the next ABI version, and update positional tests and ABI documentation accordingly. This is a semantic integration point, not a choice between keeping either side of a textual conflict. Forge metadata says not mergeable. No private jj repair was attempted because jj is unavailable, and a behavior/ABI decision is for the author rather than a review nit.Suggestions
host/oot_place.c:140: consider including the first sample after startup/save reload in settling.lastis NULL both initially and afterhos_place_loaded(0)clears have_logged, so arrival is false. A first sample at x 0/facing 0 followed by the entry adjustment to x 0.7/facing 90 is logged only at its original pose; the normal rule never repairs it if Link then stands still because movement is below 3 units and facing alone does not count. A later crash/log-based report therefore gives the pre-entry spot indefinitely, precisely the case the two-second correction addresses on subsequent map transitions. Treat the first valid place as an arrival as well, and add end-to-end note/log cases for initial load and title->reload with a sub-3-unit adjustment or facing-only change. Existing arrive scenarios start with a previous map; the title scenario reloads an unchanged pose.This is an optional refinement: the log deliberately records a sparse pose, and the live report remains current. It is not a demonstrated player regression or a merge blocker.
Testing: The author reports gcc/clang game-free format/rule/concurrency/synthetic-memory tests; extended bug-report fixtures; main 664 passed/40 failed/17 skipped versus branch 665/40/17 with the same failure names; and two Linux/RTX4090 headless in-game holds. The second hold used
03233d094plus the companion place-command commit (same code tree as the reviewed head apart from guide manifest): five reports, coordinate/clock/facing comparisons, two return-to-coordinate checks, 378 seconds/24,488 frames and no listed crash/device-loss/kernel faults. Windows changed fixtures were syntax checked and host sources compiled/renderer DLL linked; no Windows executable/game run occurred. This is meaningful evidence; initial-load settling is not modeled, and the combined companion build also contains that PR's independently reviewed risk. Windows manual report generation remains a useful follow-up, not an independent GPU-specific blocker for this copied-text path. Adult/dungeon/real-crash/real-window cases remain unrun as the author states. The current snapshot lists pending title/description CI checks, not a passing CI result. Rebased code needs its normal checks and an in-game report/log smoke run; no such execution was performed in this review.Overlaps and merge order: #1351 consumes these coordinates; neither feature requires the other, and its live-command payload race must be handled independently (the combined test is not approval of that PR). #1358 extends the same ABI/table and screenshot-source manifest, so serialize its ABI allocation/rebase with this one. #1372 and #1383 are related performance pose/telemetry work; current main already has the opt-in perf_tracking/pose path. Preserve that opt-in behavior: this local report/log feature must not turn exact pose telemetry on. The local report is not an obsolete duplicate of performance telemetry.
@ -15,3 +15,3 @@#endif#define MKWVK_API_VERSION 29#define MKWVK_API_VERSION 30[P1] Rebase this ABI extension onto current main. Main already has API30 perf_info/perf_tracking and API31 nvn_invalidate_quick; perf_tracking occupies the host slot where this branch appends place. Preserve those callbacks/signatures, append place after the existing host tail, allocate the next version, and update the positional tests/docs. Keeping 30 or replacing the current tail would give incompatible host/renderer layouts.
feat(vk): bug reports and the log say where Link stands (map, x y z, facing, age, time of day)to feat(vk): bug reports and the log say where Link stands, with a "!pos X Y Z" to paste6dc899a586f08b5eece4I pushed a change after the review. The place line now ends in a
!pos X Y Zpart that pastes straight into #1351's command, and the facing and the camera come before it:KokiriForest_Child (child), 13:20, facing 90, camera 45 12, !pos -52.5 149.9 180.2(made-up numbers)Cut the line from
!posto its end and you have exactly what #1351 takes: three numbers and nothing else. A test hands every line the code makes, cut that way, to a copy of that command's own parser, and it also checks that the parser refuses the form I had before (the numbers followed by the facing and the camera).The facing and the camera are printed for a tester to look that way by hand. The command does not set them: I tried that in #1351 and dropped it. In the real game the facing did not hold (the game works out Link's heading again on his next update) and the camera's view could not be read from where the hook runs. So #1351 puts Link at the position, and this line gives the rest to read.
camera_pitch(0 level, positive looking down) is new in the control bridge'sstatus.game, because the line prints it.The renderer API is 34 here (main is at 33 now, with the rumble test at 32 and the NFC calls at 33;
placeis appended after them): it renumbers at merge if another pull request lands first.What I ran, all game-free:
tests/test_oot_place.pywith gcc and clang (58 line cases, 36 log-rule cases, the reader over made-up guest memory with a camera, and the paste check above),tests/test_bug_report.py,tests/test_oot_state_tap.py,tests/test_audio_output_devices.py, the doc anchors, the menu sections, the switch table, and the Windows-target syntax check of the changed test programs. The new tests failed before the change, and 23 deliberate one-line breaks of the code are each caught by them. A trial merge with #1351 (on the previous main) has no conflict and the tests of both pass on it.I ran this head in the game merged with #1351's: the report's line was read back from
report.txt(position 0.02 m, facing and camera within 0.2 degrees of the control bridge's), its!pospart pasted into #1351's command put Link back where the report said (0.00 m), and a second report gave the same!pospart. What I did not rerun: the game on this PR alone and the Windows cross-build. The two game runs in the description were on earlier forms of the line and the earlier!placename: they showed the position, the facing and the clock agree with the control bridge, and that!placewith a report's numbers put Link 0.01 m and 0.04 m from them. The description says which head each result is from.Update: new head
f08b5eeceon main347aa6e82. Main moved to API 33 (the rumble test and the NFC calls), so three files conflicted (vk_api.h,rx_backend.c,test_audio_output_devices.py): I kept main's callbacks and appendedplaceafter them, so it is API 34 (it renumbers at merge if another pull request lands first), and the audio test now checksplaceas the last slot. I reran the focused tests, the whole suite against main (the same 44 failing names on both) and a short run in the game on a merge with #1351's head: the report's line was read back, its!pospart pasted into the command put Link back where the report said (0.00 m), and a second report gave the same part.Re-rebased again onto main
347aa6e82(it had moved from6112edb61past API 32 and 33): new headf08b5eece(06dfc5e17runtime,f08b5eecevk) from cb85b9aa9's predecessor chain (158381db3 on6112edb61). Conflicts, three files, by hand:gpu/vk/vk_api.h(version line: main 33, this PR 35 -> 34; the end of MkwVkHost: main'srumble_test(32) and the NFC calls (33) kept,placeappended afternfc_scan_name);host/rx_backend.c(the declaration list and the table: main's rumble and NFC functions kept,hos_oot_place_linelast);tests/test_audio_output_devices.py(main's contiguous-run check kept,placetaken out of that dict and checked as the last slot,offsetoffollowsnfc_scan_name,>= 34). Also updated for the number and slot:tests/test_oot_place.pywiring check,docs/development.md(API paragraph and the Where Link is section), the commit message. The guide manifest: restored to main's and the reviewed hashes of vk_api.h and vk_bug_report.h advanced again. Rerun on this head: the whole suite (705 passed / 44 failed / 17 skipped against main's 704 / 44 / 17, the same 44 names); focused: test_oot_place (gcc, clang), test_bug_report, test_audio_output_devices, test_oot_state_tap, test_doc_anchors, test_menu_sections, test_guide_screenshots; the guide check (10 REVIEW REQUIRED lines, all main's, none of this PR's); Windows-target syntax of test_oot_place and test_bug_report PASS (compile only). Game: a short side-lane run of the combined build 39edc4dc9 (1351's head 2182b216b + this head): the report's line read back against the bridge, the!pospart pasted into the command (0.00 m), a second report with the same part (run5/).git range-diff 347aa6e82..cb85b9aa9 347aa6e82..f08b5eece: the runtime commit=, the vk commit!only in the manifest hashes.Re-rebased again onto main
321a22b18(fetched 2026-11-17 17:10): new head aea71c2eb (7825de165 -> 3d5a31561 runtime, 158381db3 -> aea71c2eb vk) from6112edb61;git range-diff 6112edb61..158381db3 321a22b18..aea71c2ebshows two=(identical changed lines). Rerun on the new head: the whole suite,tests/run_all.py --jobs 6 --strict, fresh home, idle gate: 699 passed / 44 failed / 17 skipped against main 321a22b18's 697 / 45 / 17: the same 44 names fail on both (suite-names-final.txt);tests/test_longshot_ctl.pyfails only on main in that run. This supersedes the 'Carried' suite line below.Rebased 624e78128 (three commits on main
dcb7b47c2) onto main6112edb61; new head 158381db3 (two commits: 7825de165 runtime, 158381db3 vk). Two steps: first onto257c54911(head 7719cfa53), then, when main moved ten pull requests on, onto6112edb61.Patch: the pure rebase first:
git range-diff dcb7b47c2..624e78128 257c54911..e124fd1d8(the three commits as rebased) is two identical (=) and one!that differs only in a context line of an unrelated hunk ofgpu/vk/vk_bug_report.cpp(main's own change next to it); no conflict, nothing resolved by hand. Then the place line's last form (the reviewer's request: the!pos X Y Zpart last, ready to paste into #1351's command):..., facing 90, camera 45 12, !pos -52.5 149.9 180.2in place of..., !pos x y z facing yaw pitch, widest line 166 bytes (HOS_PLACE_LINE160 -> 176), API number 35 (main's is 30; 31 to 34 are taken by others), the stale comment abouthost/mouse_native.cdropped fromstate_camera, and the three commits folded into two (runtime, vk) with the manifest hashes ofvk_api.handvk_bug_report.hadvanced as docs/images/guide/README.md asks.git range-diff dcb7b47c2..624e78128 257c54911..7719cfa53shows the first two (!) as rewritten and the third (<) as folded into them, as expected. The second rebase (git range-diff 257c54911..7719cfa53 6112edb61..158381db3) shows both commits changed (!) by three hand-resolved conflicts and nothing else:MKWVK_API_VERSION(main is 31 with its renderer callbacknvn_invalidate_quick; this slot stays 35, written as 35 and renumbering at merge if another pull request lands first),tests/test_audio_output_devices.py(main relaxed its version assert to>= 30: kept, with one for 35 beside it) anddocs/images/guide/manifest.json(main's hashes taken,vk_api.handvk_bug_report.hadvanced again on top of them).Carried: the whole suite on the earlier head b68687f94 (665 passed / 40 failed / 17 skipped, the same 40 names as main
544229a26, none only on the branch), not rerun and not on this head (Main runs it). The two game runs of this branch on earlier forms of the line (hold 1 on 220ffa599; hold 2 on 03233d094 with #1351's first commit, then!place) and the position path of!posin the game on #1351's earlier head (hold 187817, build 9f88d7fb1, 13 lines, 13 returns, 7 warps verified at 0.0 m;camera_pitchread 4.0 to 43.2 degrees there): carried with their own heads, not rerun.Rerun: all game-free, on this head (158381db3):
tests/test_oot_place.py(gcc and clang),tests/test_bug_report.py,tests/test_oot_state_tap.py(gcc and clang),tests/test_audio_output_devices.py,tests/test_microphone_test_gain.py,tests/test_menu_text_field.py,tests/test_fps_stats.py,tests/test_doc_anchors.py,tests/test_menu_sections.py,tests/test_guide_screenshots.py: all pass.tests/test_switch_table.pyFAILS on this head, and not because of this change:RX_VK_INVALIDATE_QUICK is read (gpu/vk/vk_replay.cpp:4167) and has no row in gpu/vk/switches.def,RX_VK_INVALIDATE_WAIT was removed (GONE) and is still read(main's #1150, a file this change does not touch; not run on a plain main checkout); it passed on the previous base.scripts/check_guide_screenshots.py --review-sources: 8 REVIEW REQUIRED (device_policy.h,fallback_size_policy.h,menu_i18n.h,vk_draw.h,vk_internal.h,vk_menu.cpp,vk_menu.h,vk_texture.h), the nine main's manifest leaves minusvk_api.h; the two this change adds,vk_api.handvk_bug_report.h, are cleared. The new tests were red before the code (docs/development.md: ... is not a line of the grammar with its facing, camera and position, thenfull: wrote '..., !pos -52.5 149.9 180.2 90 45 12' (66), wanted '..., facing 90, camera 45 12, !pos -52.5 149.9 180.2') and fail on plain main (4 of 4); 23 one-line breaks of the code are all caught; the end of every line cut from!posis accepted by a copy of #1351's parser; a trial merge with #1351 (1b8a7aa99) has no conflict and the tests of both pass.Windows: Windows-target syntax check (llvm-mingw 20261104) on the previous head 7719cfa53:
tests/test_oot_place.pyPASS,tests/test_bug_report.pyPASS,tests/test_oot_state_tap.pyPASS (stops before running),tests/test_audio_output_devices.pyFAIL on-Werror=deprecated-declarationsformemmoveinhost/audio_output_devices.handtmpfilein its own parser (the same as on main, checked on an earlier head); the reader fixture oftests/test_oot_place.pycompiled by hand with the checker's flags: PASS. On the new head 158381db3 (main6112edb61):tests/test_oot_place.pyPASS andtests/test_bug_report.pyPASS (eachPASS: 2 captured translation units, 0 failures, 0 unjudged drivers/files; Windows execution NOT TESTED;PosCommand-files/winsyntax-1408-6112edb61/), the reader fixture compiled by hand again PASS;tests/test_oot_state_tap.pyandtests/test_audio_output_devices.pynot rechecked there. No Windows execution, no cross-build on this head.Game: this head was run in the game merged with #1351's head (throwaway build d14fc7712 on main
321a22b18, side lane, hold run3; the body's step 12): the line read back from report.txt against the bridge, its!pospart pasted into the command and verified at 0.00 m, a second report with the same!pospart; not run alone. The position path was proven in the real game on an earlier head (hold 187817, build 9f88d7fb1) and the earlier runs of this branch are on earlier forms of the line (see Carried); the final form of the line and the cut-and-paste round trip with #1351 were then run in the game on the merge (see Game).Thank you for the review. The blocking point is fixed in this push: the branch is rebased onto current main, which is at API 33 now (32 the rumble test, 33 the NFC calls, after 30's
perf_info/perf_trackingand 31'snvn_invalidate_quick). Main's callbacks and signatures are kept as they are,placeis appended after the host's current tail (nfc_scan_name), and this takes API 34. The positional check intests/test_audio_output_devices.py, the wiring check intests/test_oot_place.pyand the API paragraph indocs/development.mdfollow it. If another pull request takes 34 first, this renumbers at merge.The place line does not touch the opt-in performance pose path: it never turns
perf_trackingon, and the only mention of it in this diff is the documentation's list of earlier API versions.Your suggestion about the first sample after a start or a reload is right as you describe it: with
lastempty, the first valid place is not treated as an arrival, so a small entry adjustment just after a load is not repaired in the log. I have not changed it in this push; I would like to take it as its own small commit with the end-to-end cases you name (the first load, and the title to a reload with an adjustment under three units), in this pull request if you would rather have it here.What ran on this head is in the push comment above: the focused tests with gcc and clang, the whole suite against main by failing name, the Windows-target syntax check, and a run in the game together with #1351 (the line read back at 0.00 m from the bridge and pasted back through
!pos).Data only, for whoever picks it up:
test_switch_tablefails on main @310e7c9d(Windows and Linux) with:RX_VK_INVALIDATE_WAITininvalidate_quick()(gpu/vk/vk_replay.cpp:4244, also named in its log line at 4247 and its comment at 4238).tests/test_invalidate_quick.pysets it as one of its cases.GONE(RX_VK_INVALIDATE_WAIT, "2026-11-16", "it does nothing: ...")ingpu/vk/switches.def:739.Two ways out:
SW(RX_VK_INVALIDATE_WAIT, ...)row.invalidate_quick()(and its log and comment text) and its case intest_invalidate_quick.py, keeping the GONE line.@HumanBean (#1309) and @dyst (#1150): which one do you want? No PR from me; this is just the diagnosis.
Thank you for the data. That red
test_switch_tableon main is fixed by #1527, which I opened for exactly this failure: it takes your second way out (the read ofRX_VK_INVALIDATE_WAITleavesinvalidate_quick(), its log and comment text and its case intests/test_invalidate_quick.py, and the GONE row stays) and it adds the 8 rows the same check found missing. Nothing in this pull request changes for it: once #1527 merges the check passes here too.I ran this head (
f08b5eece) in the game on its own, built from this branch alone on main347aa6e82(without #1351's command in it). Linux, RTX 4090, windowless; the game exited 0 withfatal=0 crash=0 devlost=0 nocore=0 kernel=0 nvrm=0and no kernel driver lines.The Insert menu's Bug report was pressed twice. Report 1's line was
HyruleField_Child (child), 14:53, facing 0, camera 0 6, !pos X Y Z(numbers not shown here): its position was 0.00 m from the control bridge's reading at the press, its facing 0.0 degrees and its camera 0.0 and 0.4 degrees from the bridge's. The text from!posto the end of the line is three numbers and nothing else. Report 2 has the same!pospart character for character. The game's ownplace:log line is a line of the grammar. Pictures: the two reports' own pictures and two menu shots; Link stands in the field and the menu shows the saved-folder text.The paste-back into #1351's command needs that command in the build, so it was not run on this head alone; it was run on the merge of the two heads (see the description). Windows is still open. This branch still merges cleanly onto main
430eef4f2.On your suggestion about the first place after a start or a reload: I have not changed it (you called it optional, and the log stays a sparse pose); the live report is current either way.
@Beanstalk
@mooki approval of
f08b5eerecorded. This diff touches sensitive paths, so a second member ofBigBeansmust approve it too.Beanstalk test farm
Commit
f08b5ee· tier untrusted · approved by mooki · dashboardThis diff touches sensitive paths, so it needs two members of
BigBeans:.forgejo/ISSUE_TEMPLATE/1-game-problem.ymlA member of
BigBeanscan review this commit and comment@Beanstalkto test it.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.