fix(dev): dev.py ab measures again on main: the trace in diagnostics/logs, HOS_CONTROL not compared, the menu after the warm-up (supersedes #2186, #2443) #2797

Merged
HumanBean merged 11 commits from llun/Longshot:fix/dev-tools-organized-logs into main 2026-11-29 19:28:17 +00:00
Member

Summary

dev.py ab (mise run dev -- ab) can't measure on current main, for three reasons, all met in one A/B. This pull request fixes all three, and supersedes #2186 and #2443, whose authors found and fixed two of them first. Their work is here as they wrote it:

  • dyst, #2186 (opened 2026-11-22): the HOS_CONTROL fix. Its commit is here unchanged, with dyst as its author.
  • Cal, #2443 (opened 2026-11-24): the menu read after the warm-up and the unready "Load an area" rows (#2349). Its test and fix commits are here with Cal as their author, and the measured-window fix built on them carries Co-authored-by: Cal.

I had written the same two fixes myself before I found theirs. My versions were close to theirs (the same RUN_ONLY change; the same move of the menu read to after the warm-up), and theirs went further (the check that HOS_CONTROL_MEM is still compared; the unready rows), so theirs are what this pull request carries. The only edits to their commits are the conflicts with current main: an adjacent line in RUN_ONLY, and a mock of packs.runtime_romfs, which main no longer has. Mine on top: the trace path, update --logs, the measured window starting at the menu read on the trace's own clock, and HOS_CONTROL compared as on or off (from the reviews).

  1. No frame trace (this pull request's own). Since #2708 a game folder longshot-builder organized (its data/image.bin) writes its logs and traces in diagnostics/logs/ and its crash records in diagnostics/bug-reports/ (gpu/vk/vk_paths.h log_path, game/game_layout.c).
    • ab still read the frame trace from logs/: every timing run warmed up for the whole 120 s, measured nothing, and failed no frame trace at …\logs\longshot_frames.csv (RX_VK_FRAME_TRACE) while the trace sat in diagnostics/logs/.
    • dev.py update --logs zipped neither folder. It now takes both places, since a folder built flat before a later build organized it keeps its older records at the top level. What it takes from them is main's rule unchanged: the logs folder with the frame log, never local-only/ or a profile-* folder.
    • common.organized_game and common.game_diagnostics follow the game's own rule.
  2. No write-up: HOS_CONTROL, dyst's fix from #2186. The control bridge's socket has a new name every run, and ab compared it as a setting. dyst's commit left HOS_CONTROL out of the comparison (RUN_ONLY); after futondestroyer's review it is compared as on or off (ON_OR_OFF), so a run with the bridge and one without still differ, and its name doesn't count. HOS_CONTROL_MEM and HOS_CONTROL_PEER_SID are compared as they are.
  3. No write-up: the menu read too early, Cal's fix from #2443 (#2349).
    • The simulated-turf rows said "Load an area" in some runs and their values in others.
    • The status and the menu are read after the warm-up.
    • A per-area row still locked as "Load an area" no longer makes runs differ.
    • On top of it (reviews here, which apply to #2443 too): the trace is written every 60 frames, each frame stamped before it is written, so frames from before the menu read can come into the file after it. The measured window starts at the read itself, on the trace's own clock: at_ns is hos_now_ns (QueryPerformanceCounter on Windows, CLOCK_MONOTONIC elsewhere), which time.perf_counter_ns reads too. It waits for a frame from after the read, takes none from before it however late it was written, and refuses a trace on another clock.

The help of perf.py ab and profiling/ab.py names both trace locations.

Fixes #2349.

To see it on main: mise run dev -- ab --scene kokiri-forest with any switch. Every run fails "no frame trace"; with the trace there, the write-up is refused for HOS_CONTROL and, in some runs, for the turf rows.

Read first: game_diagnostics in scripts/devtools/common.py, then run_one, what_ran, differences, RUN_ONLY and ON_OR_OFF in scripts/devtools/ab.py, and gather_logs in scripts/devtools/update.py.

Testing

Tested: Windows 11 (build 26300), RTX 5080 (NVIDIA 621.40). A switch A/B (mise run dev -- ab --env RX_VK_EARLY_FRAGMENT_TESTS=0) for #2796 in four scenes, 6 timing runs each.

  • On main's ab: all 6 Kokiri Forest runs failed "no frame trace".
  • With this fix: all 24 runs measured, each with its line (for example A1: 9521 frames in 60 s, 158.7 fps, median 6.20 ms, p99 7.95 ms, 1% low 125.8 fps, 0 cold frames). The write-up was then refused for HOS_CONTROL and the turf rows, which the commits from #2186 and #2443 here fix.

Checks (mise run test -- --exact tests/test_dev_ab.py tests/test_dev_update.py):

  • test_run_reads_the_trace_where_the_game_writes_it, test_logs_organized, test_logs_both_layouts, test_run_measures_from_after_the_menu_read (now with a late batch of frames from before the read) and test_run_refuses_a_trace_on_another_clock each fail without their fix and pass here, as do #2186's test_run_only_switches_not_compared (now also: a run without the bridge differs) and #2443's test_unready_area_rows_not_compared with theirs.
  • Python's time.perf_counter_ns() reads the game's clock on this PC: a QueryPerformanceCounter read between two of its calls fell between them (10 MHz, Python 3.12.15).
  • On Linux (Ubuntu 24.04, WSL 2, Python 3.12.3): tests/test_dev_ab.py passes; tests/test_dev_update.py fails only test_build_command, as on main.
  • Two cases fail on this PC on main as here, and pass in CI: test_in_run_report_keeps_hitch_rates (the Windows console's cp1252 can't print "Δ") and test_build_command (this PC's own dev settings).
  • mise run test-changed on this branch on main @ f14a5664d (it is now on 01539efd2, one commit, #2790, the profiler's stack walk, later): 12 passed, 5 failed, the same 5 failing the same way on main (test_dev_ab.py and test_dev_update.py for the two above, test_dev_migrate.py, test_job_queue.py and test_hos_ab.py, all Windows-only here); none is new.
  • mise run lint passes.
  • mise run test (llvm-mingw on PATH, CC=clang, CXX=clang++): 625 passed, 224 failed, 46 skipped, the same 224 as on main @ 01d6878b3 (tools this PC lacks: gcc, glslang, spirv-val and others); none new. (Run on the first version of this branch; the commits since change only scripts/devtools/ab.py, update.py and their two checks, all run above.)

Still to test:

  • Linux: mise run dev -- ab --env RX_VK_X=0 --scene market --dry-run, then a short real run (--runs 2 --seconds 20), expecting every run to measure (its frames, fps, median, p99 and 1% low line); and a write-up with Measurements at the end (by hand).

Measurements

Nothing to measure: a development tool. It is what makes the measurements of the fence pull request possible.

Risks

  • A runtime that is not organized (no data/image.bin) is read as before.
  • The menu is read once the warm-up ends, and the window starts at that read once the trace holds a frame from after it (10 s at most). A trace not on this PC's clock is refused rather than measured.
  • A revert is enough.
  • Nothing a player has changes.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • 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.
  • A check under tests/ that reads changed source is updated, not weakened.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary `dev.py ab` (`mise run dev -- ab`) can't measure on current `main`, for three reasons, all met in one A/B. This pull request fixes all three, and **supersedes #2186 and #2443**, whose authors found and fixed two of them first. Their work is here as they wrote it: - **dyst**, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2186 (opened 2026-11-22): the `HOS_CONTROL` fix. Its commit is here unchanged, with dyst as its author. - **Cal**, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2443 (opened 2026-11-24): the menu read after the warm-up and the unready "Load an area" rows (#2349). Its test and fix commits are here with Cal as their author, and the measured-window fix built on them carries `Co-authored-by: Cal`. I had written the same two fixes myself before I found theirs. My versions were close to theirs (the same `RUN_ONLY` change; the same move of the menu read to after the warm-up), and theirs went further (the check that `HOS_CONTROL_MEM` is still compared; the unready rows), so theirs are what this pull request carries. The only edits to their commits are the conflicts with current `main`: an adjacent line in `RUN_ONLY`, and a mock of `packs.runtime_romfs`, which `main` no longer has. Mine on top: the trace path, `update --logs`, the measured window starting at the menu read on the trace's own clock, and `HOS_CONTROL` compared as on or off (from the reviews). 1. **No frame trace** (this pull request's own). Since #2708 a game folder longshot-builder organized (its `data/image.bin`) writes its logs and traces in `diagnostics/logs/` and its crash records in `diagnostics/bug-reports/` (`gpu/vk/vk_paths.h` `log_path`, `game/game_layout.c`). - `ab` still read the frame trace from `logs/`: every timing run warmed up for the whole 120 s, measured nothing, and failed `no frame trace at …\logs\longshot_frames.csv (RX_VK_FRAME_TRACE)` while the trace sat in `diagnostics/logs/`. - `dev.py update --logs` zipped neither folder. It now takes both places, since a folder built flat before a later build organized it keeps its older records at the top level. What it takes from them is `main`'s rule unchanged: the logs folder with the frame log, never `local-only/` or a `profile-*` folder. - `common.organized_game` and `common.game_diagnostics` follow the game's own rule. 2. **No write-up: `HOS_CONTROL`**, dyst's fix from **#2186**. The control bridge's socket has a new name every run, and `ab` compared it as a setting. dyst's commit left `HOS_CONTROL` out of the comparison (`RUN_ONLY`); after futondestroyer's review it is compared as on or off (`ON_OR_OFF`), so a run with the bridge and one without still differ, and its name doesn't count. `HOS_CONTROL_MEM` and `HOS_CONTROL_PEER_SID` are compared as they are. 3. **No write-up: the menu read too early**, Cal's fix from **#2443** (#2349). - The simulated-turf rows said "Load an area" in some runs and their values in others. - The status and the menu are read after the warm-up. - A per-area row still locked as "Load an area" no longer makes runs differ. - On top of it (reviews here, which apply to #2443 too): the trace is written every 60 frames, each frame stamped before it is written, so frames from before the menu read can come into the file after it. The measured window starts at the read itself, on the trace's own clock: `at_ns` is `hos_now_ns` (`QueryPerformanceCounter` on Windows, `CLOCK_MONOTONIC` elsewhere), which `time.perf_counter_ns` reads too. It waits for a frame from after the read, takes none from before it however late it was written, and refuses a trace on another clock. The help of `perf.py ab` and `profiling/ab.py` names both trace locations. Fixes #2349. To see it on `main`: `mise run dev -- ab --scene kokiri-forest` with any switch. Every run fails "no frame trace"; with the trace there, the write-up is refused for `HOS_CONTROL` and, in some runs, for the turf rows. Read first: `game_diagnostics` in `scripts/devtools/common.py`, then `run_one`, `what_ran`, `differences`, `RUN_ONLY` and `ON_OR_OFF` in `scripts/devtools/ab.py`, and `gather_logs` in `scripts/devtools/update.py`. ## Testing **Tested:** Windows 11 (build 26300), RTX 5080 (NVIDIA 621.40). A switch A/B (`mise run dev -- ab --env RX_VK_EARLY_FRAGMENT_TESTS=0`) for #2796 in four scenes, 6 timing runs each. - **On `main`'s `ab`:** all 6 Kokiri Forest runs failed "no frame trace". - **With this fix:** all 24 runs measured, each with its line (for example `A1: 9521 frames in 60 s, 158.7 fps, median 6.20 ms, p99 7.95 ms, 1% low 125.8 fps, 0 cold frames`). The write-up was then refused for `HOS_CONTROL` and the turf rows, which the commits from #2186 and #2443 here fix. Checks (`mise run test -- --exact tests/test_dev_ab.py tests/test_dev_update.py`): - `test_run_reads_the_trace_where_the_game_writes_it`, `test_logs_organized`, `test_logs_both_layouts`, `test_run_measures_from_after_the_menu_read` (now with a late batch of frames from before the read) and `test_run_refuses_a_trace_on_another_clock` each fail without their fix and pass here, as do #2186's `test_run_only_switches_not_compared` (now also: a run without the bridge differs) and #2443's `test_unready_area_rows_not_compared` with theirs. - Python's `time.perf_counter_ns()` reads the game's clock on this PC: a `QueryPerformanceCounter` read between two of its calls fell between them (10 MHz, Python 3.12.15). - On Linux (Ubuntu 24.04, WSL 2, Python 3.12.3): `tests/test_dev_ab.py` passes; `tests/test_dev_update.py` fails only `test_build_command`, as on `main`. - Two cases fail on this PC on `main` as here, and pass in CI: `test_in_run_report_keeps_hitch_rates` (the Windows console's cp1252 can't print "Δ") and `test_build_command` (this PC's own dev settings). - `mise run test-changed` on this branch on `main` @ `f14a5664d` (it is now on `01539efd2`, one commit, #2790, the profiler's stack walk, later): 12 passed, 5 failed, the same 5 failing the same way on `main` (`test_dev_ab.py` and `test_dev_update.py` for the two above, `test_dev_migrate.py`, `test_job_queue.py` and `test_hos_ab.py`, all Windows-only here); none is new. - `mise run lint` passes. - `mise run test` (llvm-mingw on PATH, `CC=clang`, `CXX=clang++`): 625 passed, 224 failed, 46 skipped, the same 224 as on `main` @ `01d6878b3` (tools this PC lacks: gcc, glslang, spirv-val and others); none new. (Run on the first version of this branch; the commits since change only `scripts/devtools/ab.py`, `update.py` and their two checks, all run above.) **Still to test:** - Linux: `mise run dev -- ab --env RX_VK_X=0 --scene market --dry-run`, then a short real run (`--runs 2 --seconds 20`), expecting every run to measure (its frames, fps, median, p99 and 1% low line); and a write-up with Measurements at the end (by hand). ## Measurements Nothing to measure: a development tool. It is what makes the measurements of the fence pull request possible. ## Risks - A runtime that is not organized (no `data/image.bin`) is read as before. - The menu is read once the warm-up ends, and the window starts at that read once the trace holds a frame from after it (10 s at most). A trace not on this PC's clock is refused rather than measured. - A revert is enough. - Nothing a player has changes. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [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. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Since #2708 a game folder longshot-builder organized (data/image.bin) has its logs
and traces in diagnostics/logs/ and its crash records in diagnostics/bug-reports/
(gpu/vk/vk_paths.h log_path, game/game_layout.c). dev.py ab still reads the frame
trace from logs/, so every timing run of such a runtime fails "no frame trace", and
update --logs zips neither folder. The checks run ab's run_one on an organized
runtime and on one that is not, and --logs on an organized folder. Both fail on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Since #2708 a game folder longshot-builder organized (data/image.bin) writes its logs
and traces in diagnostics/logs/ and its crash records in diagnostics/bug-reports/.
dev.py ab still read the frame trace from logs/: every timing run of such a runtime
warmed up for its whole 120 s, measured nothing and failed "no frame trace", so no
A/B could be measured. update --logs zipped neither folder.

common.organized_game and common.game_diagnostics follow the game's own rule
(gpu/vk/vk_paths.h log_path); ab reads the trace through them, and --logs takes logs
and bug-reports from diagnostics/ in an organized folder. perf.py ab's and
profiling/ab.py's help name both places.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The control bridge names a new channel for every session (HOS_CONTROL), and the
game lists it in its "switches set" line, so dev.py ab found every run different
from the first and wrote no Measurements. The run-only check now gives each run
its own HOS_CONTROL, as a real A/B has them. It fails on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The control bridge names a new channel for every session (HOS_CONTROL), and the game
lists it in its "switches set" line. dev.py ab compared it as a setting: every run
differed from the first, and no A/B on main wrote its verdict or Measurements.
HOS_CONTROL joins the build's name and the queue's job switches in RUN_ONLY.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
dev.py ab read the menu's rows right after the teleport. The simulated-turf rows
then said "Load an area" in some runs and their values in others, in any scene,
and ab found the runs different and wrote no Measurements (seen in Kokiri Forest,
Hyrule Field and Inside the Deku Tree). The check runs run_one and asks that the
rows are read after the warm-up's first look at the trace. It fails on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(dev): dev.py ab reads the menu's rows after the warm-up, so the runs of an A/B compare as they were measured
Some checks failed
CI / What the change needs (pull_request) Successful in 10s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 15s
PR description / Title and description (pull_request_target) Successful in 9s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 19s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m15s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m8s
CI / Website build and checks (pull_request) Failing after 1m36s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
9132d5b2f7
Right after the teleport the simulated-turf rows (density, fade start, far power,
minimum blades) said "Load an area" in some runs and their values in others,
whatever the scene, and dev.py ab refused to write Measurements for runs that
differed only in when the menu was asked. The status and the menu are read once
the warm-up ends, as the area is while it is measured.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11 (build 26300), RTX 5080, NVIDIA 621.40: mise run dev -- ab --env RX_VK_EARLY_FRAGMENT_TESTS=0 for #2796 in Kokiri Forest, Hyrule Field, Inside the Deku Tree and the Market, 6 timing runs each through the job queue. On main's ab all 6 Kokiri Forest runs failed 'no frame trace'; with the trace fix all 24 runs measured, each with its frames, fps, median, p99 and 1% low line. The write-up was then refused for HOS_CONTROL and the turf rows read before the area loaded, which the other two fixes address (checked by the game-free checks).

Tested in game: Windows 11 (build 26300), RTX 5080, NVIDIA 621.40: mise run dev -- ab --env RX_VK_EARLY_FRAGMENT_TESTS=0 for #2796 in Kokiri Forest, Hyrule Field, Inside the Deku Tree and the Market, 6 timing runs each through the job queue. On main's ab all 6 Kokiri Forest runs failed 'no frame trace'; with the trace fix all 24 runs measured, each with its frames, fps, median, p99 and 1% low line. The write-up was then refused for HOS_CONTROL and the turf rows read before the area loaded, which the other two fixes address (checked by the game-free checks).
llun changed title from WIP: fix(dev): dev.py ab measures again on main: the frame trace in diagnostics/logs, HOS_CONTROL not compared, the menu read after the warm-up to fix(dev): dev.py ab measures again on main: the frame trace in diagnostics/logs, HOS_CONTROL not compared, the menu read after the warm-up 2026-11-29 11:51:51 +00:00
Member

Possibly related, for context:

  • PR #2186 WIP: fix(dev): dev.py ab writes its results up again: the control bridge's socket is no setting of the run — Overlapping HOS_CONTROL A/B comparison fix
  • PR #2443 fix(ab): read options after warm-up and ignore unready area rows (#2349) — Same warm-up menu sampling fix; overlaps issue #2349
Possibly related, for context: - PR #2186 WIP: fix(dev): dev.py ab writes its results up again: the control bridge's socket is no setting of the run — Overlapping HOS_CONTROL A/B comparison fix - PR #2443 fix(ab): read options after warm-up and ignore unready area rows (#2349) — Same warm-up menu sampling fix; overlaps issue #2349
Author
Member
@review
BeanBot requested changes 2026-11-29 11:57:24 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The later menu query can fall inside the frame window reported as the measurement, and log collection can omit records left in the old layout after an upgrade.

The change finds traces and diagnostics in organized game folders, excludes the bridge’s per-session channel from comparisons, and reads menu values later. Those fixes make the A/B tool more useful, but the measurement boundary and mixed-layout log collection need correction.

Blocking (2): must change before merging.

  1. L1 scripts/devtools/ab.py:706: The menu query now occurs immediately before selecting the last visible trace row as the measurement start, but the trace is buffered. (more on the line) Do: After reading the menu, wait for a trace boundary known to be later than the query before selecting the measurement start; cover the buffered-trace case in the test.
  2. L3: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 15s.

Should fix (1): not blocking, but worth doing before merging.

  • L2 scripts/devtools/update.py:391: An organized folder is searched only under diagnostics, so records remaining in the old top-level folders are omitted. (more on the line) Do: Collect eligible files from both locations when they exist, retaining the exclusions and limits, and test a folder containing both layouts.

@fix can do L1, L2 and L3.

Checks: Still running: 4 checks.

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

Does it help: Yes, partially: the author reports that all 6 Kokiri Forest runs failed to find a trace on main, while 24 runs across four scenes measured with the trace fix. The complete write-up has not yet been demonstrated in a real run after the other two fixes.

Other systems: The changes affect developer A/B runs and diagnostic archives on Windows and Linux, not game runtime code. Windows supplied the reported game runs; the described Linux run and a complete A/B write-up remain outstanding.

Switches: No switches added, changed, or removed. HOS_CONTROL is excluded from A/B setting comparisons because its endpoint changes each session.

Reviewed: 9132d5b2f7 against 01d6878b3f: Read the repository rules, PR template, diff, commit messages, changed helper and relevant A/B and log-collection paths, renderer trace writer, game layout, bridge and menu callers. Skimmed the remaining portions of the larger changed files and tests; the sibling Tooling AGENTS.md and docs/review-checklist.md were absent.; nothing run (a code review).

Checked and fine:

  • The organized-folder marker matches the builder’s data/image.bin rule.
  • The archive walk continues to exclude local-only crash dumps and profile directories.
  • Each commit records AI assistance in a trailer; no generated files, game files, API definitions or switch-table entries are changed.

Testing: No commands from the project or tests were run, as requested. The author reports game-free checks for the fixes and Windows trace runs; Linux and a complete real A/B write-up remain to be tested.

Overlaps and merge order: Not checked; network access was unavailable.


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

**Recommendation: Request changes.** The later menu query can fall inside the frame window reported as the measurement, and log collection can omit records left in the old layout after an upgrade. The change finds traces and diagnostics in organized game folders, excludes the bridge’s per-session channel from comparisons, and reads menu values later. Those fixes make the A/B tool more useful, but the measurement boundary and mixed-layout log collection need correction. **Blocking (2)**: must change before merging. 1. **L1** `scripts/devtools/ab.py:706`: The menu query now occurs immediately before selecting the last visible trace row as the measurement start, but the trace is buffered. (more on the line) **Do:** After reading the menu, wait for a trace boundary known to be later than the query before selecting the measurement start; cover the buffered-trace case in the test. 2. **L3**: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 15s. **Should fix (1)**: not blocking, but worth doing before merging. - **L2** `scripts/devtools/update.py:391`: An organized folder is searched only under diagnostics, so records remaining in the old top-level folders are omitted. (more on the line) **Do:** Collect eligible files from both locations when they exist, retaining the exclusions and limits, and test a folder containing both layouts. `@fix` can do L1, L2 and L3. **Checks:** Still running: 4 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes, partially: the author reports that all 6 Kokiri Forest runs failed to find a trace on main, while 24 runs across four scenes measured with the trace fix. The complete write-up has not yet been demonstrated in a real run after the other two fixes. **Other systems:** The changes affect developer A/B runs and diagnostic archives on Windows and Linux, not game runtime code. Windows supplied the reported game runs; the described Linux run and a complete A/B write-up remain outstanding. **Switches:** No switches added, changed, or removed. HOS_CONTROL is excluded from A/B setting comparisons because its endpoint changes each session. **Reviewed:** 9132d5b2f7fe against 01d6878b3f14: Read the repository rules, PR template, diff, commit messages, changed helper and relevant A/B and log-collection paths, renderer trace writer, game layout, bridge and menu callers. Skimmed the remaining portions of the larger changed files and tests; the sibling Tooling AGENTS.md and docs/review-checklist.md were absent.; nothing run (a code review). **Checked and fine:** - The organized-folder marker matches the builder’s data/image.bin rule. - The archive walk continues to exclude local-only crash dumps and profile directories. - Each commit records AI assistance in a trailer; no generated files, game files, API definitions or switch-table entries are changed. **Testing:** No commands from the project or tests were run, as requested. The author reports game-free checks for the fixes and Windows trace runs; Linux and a complete real A/B write-up remain to be tested. **Overlaps and merge order:** Not checked; network access was unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -703,1 +703,4 @@
break
# (what ran, as the menu has it now, the area loaded: right after the teleport the simulated-turf rows still said
# "Load an area" in some runs and not in others)
status = g.must("status")
Member

L1 (blocking): The menu query now occurs immediately before selecting the last visible trace row as the measurement start, but the trace is buffered. The selected row can predate the query.

When: When option_get runs after the latest flushed trace row, frames produced during the query are subsequently included in the measured window. The query enumerates menu settings under the menu lock, so its work or contention can appear as a frame-time outlier in the reported A/B results.

Do: After reading the menu, wait for a trace boundary known to be later than the query before selecting the measurement start; cover the buffered-trace case in the test.

**L1** (blocking): The menu query now occurs immediately before selecting the last visible trace row as the measurement start, but the trace is buffered. The selected row can predate the query. *When:* When option_get runs after the latest flushed trace row, frames produced during the query are subsequently included in the measured window. The query enumerates menu settings under the menu lock, so its work or contention can appear as a frame-time outlier in the reported A/B results. **Do:** After reading the menu, wait for a trace boundary known to be later than the query before selecting the measurement start; cover the buffered-trace case in the test.
@ -388,2 +389,3 @@
for rel, newest, max_mb in LOG_PARTS:
p = os.path.join(game, *rel.split("/"))
# (the logs and crash records: in diagnostics/ in a folder longshot-builder organized)
p = common.game_diagnostics(game, rel) if rel in DIAGNOSTICS else os.path.join(game, *rel.split("/"))
Member

L2 (should fix): An organized folder is searched only under diagnostics, so records remaining in the old top-level folders are omitted.

When: After a flat game folder with logs or crash records is rebuilt into the organized layout, data/image.bin selects diagnostics even if older records remain in logs/ or bug-reports/. The archive no longer includes those records, although the previous collector did.

Do: Collect eligible files from both locations when they exist, retaining the exclusions and limits, and test a folder containing both layouts.

**L2** (should fix): An organized folder is searched only under diagnostics, so records remaining in the old top-level folders are omitted. *When:* After a flat game folder with logs or crash records is rebuilt into the organized layout, data/image.bin selects diagnostics even if older records remain in logs/ or bug-reports/. The archive no longer includes those records, although the previous collector did. **Do:** Collect eligible files from both locations when they exist, retaining the exclusions and limits, and test a folder containing both layouts.
llun force-pushed fix/dev-tools-organized-logs from 9132d5b2f7
Some checks failed
CI / What the change needs (pull_request) Successful in 10s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 15s
PR description / Title and description (pull_request_target) Successful in 9s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 19s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m15s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m8s
CI / Website build and checks (pull_request) Failing after 1m36s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
to 072be5e230
Some checks failed
CI / What the change needs (pull_request) Successful in 10s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 15s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 18s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m11s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m7s
CI / Website build and checks (pull_request) Failing after 1m21s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
2026-11-29 12:01:59 +00:00
Compare
llun changed title from fix(dev): dev.py ab measures again on main: the frame trace in diagnostics/logs, HOS_CONTROL not compared, the menu read after the warm-up to fix(dev): dev.py ab and update --logs find the game's logs in diagnostics/, as an organized game folder writes them 2026-11-29 12:03:39 +00:00
Author
Member

Thanks, and for the overlaps: #2186 already fixes HOS_CONTROL and #2443 the menu read, so this pull request no longer does either. The branch is cut back to the trace path and update --logs (force-pushed), and the description points to both.

  • L1 (menu read inside the measured window): it was about the menu-read fix, which is gone from here. It applies to #2443, which reads the menu at the same place.
  • L2 (old records after an upgrade): done. --logs takes logs/ and bug-reports/ at the top level and in diagnostics/, each with its own limits, the minidumps and profiles still left out. test_logs_both_layouts fails without it and passes with it.
  • L3 (third-party and guide screenshots): main's, since #2785; #2793 fixes it. check_guide_screenshots.py --review-sources fails on main @ 01d6878b3 exactly as here.
Thanks, and for the overlaps: #2186 already fixes `HOS_CONTROL` and #2443 the menu read, so this pull request no longer does either. The branch is cut back to the trace path and `update --logs` (force-pushed), and the description points to both. - **L1 (menu read inside the measured window):** it was about the menu-read fix, which is gone from here. It applies to #2443, which reads the menu at the same place. - **L2 (old records after an upgrade):** done. `--logs` takes `logs/` and `bug-reports/` at the top level and in `diagnostics/`, each with its own limits, the minidumps and profiles still left out. `test_logs_both_layouts` fails without it and passes with it. - **L3 (third-party and guide screenshots):** `main`'s, since #2785; #2793 fixes it. `check_guide_screenshots.py --review-sources` fails on `main` @ `01d6878b3` exactly as here.
Each game run of dev.py ab starts the control bridge's supervisor, which sets HOS_CONTROL to a socket name of its own
(longshot-control-<random>). The comparison of what each run had set took that name for a switch the runs differ in,
so every series ended "no write-up: switches HOS_CONTROL: A2 has ..., A1 ...", the numbers left in the log. HOS_CONTROL
joins RUN_ONLY, the names the queue and the build set for each run; HOS_CONTROL_MEM and HOS_CONTROL_PEER_SID, which change
what a run can do, are still compared (tests/test_dev_ab.py).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assisted-by: Antigravity (Gemini)
Assisted-by: Antigravity (Gemini)
The frame trace is written every 60 frames, so right after the warm-up's menu read
its last row can be older than the read, and the frames of the read itself (the menu
gone through under its lock) were measured. The check gives a trace that is written
after the read in two steps and expects the window to start at the first row written
after it. It fails on the branch as it was (review of #2797, L1).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(dev): dev.py ab measures from the first trace row written after the menu read
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 14s
PR description / Title and description (pull_request_target) Successful in 5s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
f67aa2604c
The frame trace is written every 60 frames, so the last row there right after the
warm-up's menu read can be older than the read, and the read's own frames (the menu
gone through under its lock) were counted in the measured window. run_one now waits
for a row written after the read (10 s at most, TRACE_AFTER_S) and starts the window
there. test_run_does_not_read_live_log gives its trace that row too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
llun changed title from fix(dev): dev.py ab and update --logs find the game's logs in diagnostics/, as an organized game folder writes them to fix(dev): dev.py ab measures again on main: the trace in diagnostics/logs, HOS_CONTROL not compared, the menu after the warm-up (supersedes #2186, #2443) 2026-11-29 12:14:13 +00:00
Author
Member

Updated: this pull request now supersedes #2186 and #2443, at the request of the person I work for. Their commits are here as their authors wrote them, under their names: dyst's HOS_CONTROL fix (#2186) and Cal's test and fix for the menu read and the unready turf rows (#2443, #2349). Only the conflicts with current main were resolved: an adjacent line in RUN_ONLY, and a mock of packs.runtime_romfs that main no longer has.

  • L1 (the menu read inside the measured window): done on top, as a test and a fix. The window now starts at the first trace row written after the menu read, 10 s at most. test_run_measures_from_after_the_menu_read fails without it.
  • L2 (old records after an upgrade): done before. --logs takes logs/ and bug-reports/ at the top level and in diagnostics/.
  • L3 (third-party and guide screenshots): main's, since #2785; #2793 fixes it.
Updated: this pull request now supersedes #2186 and #2443, at the request of the person I work for. Their commits are here as their authors wrote them, under their names: dyst's `HOS_CONTROL` fix (#2186) and Cal's test and fix for the menu read and the unready turf rows (#2443, #2349). Only the conflicts with current `main` were resolved: an adjacent line in `RUN_ONLY`, and a mock of `packs.runtime_romfs` that `main` no longer has. - **L1 (the menu read inside the measured window):** done on top, as a test and a fix. The window now starts at the first trace row written after the menu read, 10 s at most. `test_run_measures_from_after_the_menu_read` fails without it. - **L2 (old records after an upgrade):** done before. `--logs` takes `logs/` and `bug-reports/` at the top level and in `diagnostics/`. - **L3 (third-party and guide screenshots):** `main`'s, since #2785; #2793 fixes it.
llun force-pushed fix/dev-tools-organized-logs from f67aa2604c
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 14s
PR description / Title and description (pull_request_target) Successful in 5s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 179b7570da
Some checks failed
CI / What the change needs (pull_request) Successful in 8s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 13s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 15s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m5s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m52s
CI / Website build and checks (pull_request) Failing after 1m22s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 22m9s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 35m32s
2026-11-29 12:17:52 +00:00
Compare
Author
Member
@review
BeanBot requested changes 2026-11-29 12:33:01 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The two ledger fixes are present, but the reported checks include three failures on this head and two game-free checks still running. The complete A/B write-up also still needs the stated Linux run. (It stands on L3: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 15s.)

The change restores frame-trace discovery in organized game folders, includes older logs in update archives, and avoids comparing per-run control sockets and unready menu rows. It also moves the measurement window past the menu read, at the cost of waiting for another trace flush.

Blocking (3): must change before merging.

  1. L3: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 15s.
  2. L4: The check CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) fails on this head and passes on the base branch: Failing after 3m52s.
  3. L5: The check CI / Website build and checks (pull_request) fails on this head and passes on the base branch: Failing after 1m22s.

@fix can do L3, L4 and L5.

Since the last review (on 9132d5b2f7)
Resolved: L1 (The menu query now occurs immediately before selecting the last visible trace row as the m…); L2 (An organized folder is searched only under diagnostics, so records remaining in the old to…)
Still open: L3 (The check CI / Third-party parts and guide screenshots (pull_request) fails on this head…)
New: L4 (The check CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) fails on th…); L5 (The check CI / Website build and checks (pull_request) fails on this head and passes on…)

Checks: Still running: CI / Game-free checks (run_all.py, part 1/2) (pull_request), CI / Game-free checks (run_all.py, part 2/2) (pull_request).

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

Does it help: Yes for trace discovery: the author reports that all 6 Kokiri Forest runs failed on main and all 24 runs across four scenes measured with the trace fix on Windows. A complete write-up with all fixes and a Linux run remain unverified.

Other systems: The changed tools run on Windows and Linux and handle both flat and organized game folders. The reported in-game evidence is Windows-only; Linux behavior remains to be checked.

Switches: No switches added, changed, or removed. HOS_CONTROL is excluded from run comparisons; HOS_CONTROL_MEM and HOS_CONTROL_PEER_SID remain compared.

Reviewed: 179b7570da against 01d6878b3f: Read AGENTS.md and CONTRIBUTING.md, the changed implementation and test diffs, and the relevant measurement and log collection paths. The combined full-file output was truncated, so not every changed file was read in full; the pull request template and referenced developer standards were not read. The adjacent Tooling rules and docs/review-checklist.md were unavailable.; nothing run (a code review).

Checked and fine:

  • The comparison still checks HOS_CONTROL_MEM while excluding the per-run HOS_CONTROL socket.
  • Log collection retains the exclusions for profile directories and local-only crash records.

Testing: No commands from the project or tests were run. The supplied CI reports three failures on this head and two checks still running; the author reports Windows game-free checks and timing runs.

Overlaps and merge order: Supersedes #2186 and #2443, whose fixes are included; those pull requests should not also be merged independently.


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

**Recommendation: Request changes.** The two ledger fixes are present, but the reported checks include three failures on this head and two game-free checks still running. The complete A/B write-up also still needs the stated Linux run. (It stands on L3: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 15s.) The change restores frame-trace discovery in organized game folders, includes older logs in update archives, and avoids comparing per-run control sockets and unready menu rows. It also moves the measurement window past the menu read, at the cost of waiting for another trace flush. **Blocking (3)**: must change before merging. 1. **L3**: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 15s. 2. **L4**: The check `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)` fails on this head and passes on the base branch: Failing after 3m52s. 3. **L5**: The check `CI / Website build and checks (pull_request)` fails on this head and passes on the base branch: Failing after 1m22s. `@fix` can do L3, L4 and L5. **Since the last review** (on 9132d5b2f7fe) Resolved: L1 (The menu query now occurs immediately before selecting the last visible trace row as the m…); L2 (An organized folder is searched only under diagnostics, so records remaining in the old to…) Still open: L3 (The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head…) New: L4 (The check `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)` fails on th…); L5 (The check `CI / Website build and checks (pull_request)` fails on this head and passes on…) **Checks:** Still running: `CI / Game-free checks (run_all.py, part 1/2) (pull_request)`, `CI / Game-free checks (run_all.py, part 2/2) (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for trace discovery: the author reports that all 6 Kokiri Forest runs failed on main and all 24 runs across four scenes measured with the trace fix on Windows. A complete write-up with all fixes and a Linux run remain unverified. **Other systems:** The changed tools run on Windows and Linux and handle both flat and organized game folders. The reported in-game evidence is Windows-only; Linux behavior remains to be checked. **Switches:** No switches added, changed, or removed. HOS_CONTROL is excluded from run comparisons; HOS_CONTROL_MEM and HOS_CONTROL_PEER_SID remain compared. **Reviewed:** 179b7570daa1 against 01d6878b3f14: Read AGENTS.md and CONTRIBUTING.md, the changed implementation and test diffs, and the relevant measurement and log collection paths. The combined full-file output was truncated, so not every changed file was read in full; the pull request template and referenced developer standards were not read. The adjacent Tooling rules and docs/review-checklist.md were unavailable.; nothing run (a code review). **Checked and fine:** - The comparison still checks HOS_CONTROL_MEM while excluding the per-run HOS_CONTROL socket. - Log collection retains the exclusions for profile directories and local-only crash records. **Testing:** No commands from the project or tests were run. The supplied CI reports three failures on this head and two checks still running; the author reports Windows game-free checks and timing runs. **Overlaps and merge order:** Supersedes #2186 and #2443, whose fixes are included; those pull requests should not also be merged independently. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
Author
Member

The three failing jobs are main's, from the jobs' logs on this head (the same on #2796, #2797 and #2799):

  • Third-party and guide screenshots: REVIEW REQUIRED: settings-graphics.png: game/oot_cheat_items.h changed since reviewed revision 3c74597e, since #2785; #2793 fixes it.
  • Rust: two steps.
    • rustfmt: Diff in …/builder/crates/build-compile/src/host_sources_tests.rs:110.
    • The synthetic game end to end: the game folder has no image.bin (end_to_end.rs:396), a test that predates the organized game folder.
    • #2799 fixes both. On #2799's head, rustfmt, clippy and cargo test already pass.
  • Website: /settings/: game branding remains in published text, from #2779's Debug-tab paragraph in docs/user/graphics-and-controls.md; #2799 rewords it, and scripts/website_check.sh passes with it locally.

This pull request changes none of those files. Once #2793 and #2799 merge, I'll rebase it so its checks run on the fixed main.

The three failing jobs are `main`'s, from the jobs' logs on this head (the same on #2796, #2797 and #2799): - **Third-party and guide screenshots:** `REVIEW REQUIRED: settings-graphics.png: game/oot_cheat_items.h changed since reviewed revision 3c74597e`, since #2785; #2793 fixes it. - **Rust:** two steps. - `rustfmt`: `Diff in …/builder/crates/build-compile/src/host_sources_tests.rs:110`. - The synthetic game end to end: `the game folder has no image.bin` (`end_to_end.rs:396`), a test that predates the organized game folder. - #2799 fixes both. On #2799's head, rustfmt, clippy and `cargo test` already pass. - **Website:** `/settings/: game branding remains in published text`, from #2779's Debug-tab paragraph in `docs/user/graphics-and-controls.md`; #2799 rewords it, and `scripts/website_check.sh` passes with it locally. This pull request changes none of those files. Once #2793 and #2799 merge, I'll rebase it so its checks run on the fixed `main`.
futondestroyer left a comment

Recommendation: Request changes. The arranged trace path restores frame analysis on the tested Windows setup. The measurement boundary and the support archive still need fixes.

  • At scripts/devtools/ab.py:732, a newly visible CSV row can still have been sampled before option_get finished. For example, a pre-query frame batch delayed before its flush appears only on the second read and satisfies the loop. The renderer timestamps each frame before writing it, and window() excludes only the selected row itself. Use the host monotonic clock after the option reply and wait for a trace endpoint at or after it. Extend the fixture to publish a new batch of pre-boundary timestamps before a post-boundary frame.
  • At scripts/devtools/update.py:404, the added organized logs source now takes the raw diagnostics/logs/longshot_frames.csv in the support ZIP. The regression test requires that trace to be included, and --logs describes the archive as something a user may share after checking paths. Keep the raw CSV local, either by excluding it from the support archive or by clearly separating a local-only artifact. Apply the same rule to flat and organized traces.

The prior #2186 point also carries forward. what_ran() strips the entire HOS_CONTROL fact, so the comparison helper cannot distinguish an absent switch from a socket value. Every successful live ab run currently connects to the bridge, so I found no reachable connected-vs-disabled pair through this path. Normalize the endpoint if preserving the logged on/off distinction is intended. HOS_CONTROL_MEM and HOS_CONTROL_PEER_SID remain compared.

Author evidence shows all six Kokiri runs on main could not find a trace, while all 24 Windows runs across four scenes measured with the path fix. The exact head passes test_dev_ab.py in CI. The test_dev_update.py failure is the older test_build_command case, also present on the same-base #2802 run without these scripts changed. The Guide, Rust and Website failures have prior base attribution. A successful complete write-up after all fixes and the Linux short real run remain open. Windows evidence · CI

Reviewed the full change at 179b7570daa1a5d0a2143b7c0a98d4188f1d40e7 against 01d6878b3f148e68d7a9080133d193e1fb7c2973. No tests run in this review. The fixes from #2186 and #2443 are incorporated. Keep the existing handoff that the originals may be retired after the replacement merges.

**Recommendation: Request changes.** The arranged trace path restores frame analysis on the tested Windows setup. The measurement boundary and the support archive still need fixes. - At `scripts/devtools/ab.py:732`, a newly visible CSV row can still have been sampled before `option_get` finished. For example, a pre-query frame batch delayed before its flush appears only on the second read and satisfies the loop. The renderer timestamps each frame before writing it, and `window()` excludes only the selected row itself. Use the host monotonic clock after the option reply and wait for a trace endpoint at or after it. Extend the fixture to publish a new batch of pre-boundary timestamps before a post-boundary frame. - At `scripts/devtools/update.py:404`, the added organized logs source now takes the raw `diagnostics/logs/longshot_frames.csv` in the support ZIP. The regression test requires that trace to be included, and `--logs` describes the archive as something a user may share after checking paths. Keep the raw CSV local, either by excluding it from the support archive or by clearly separating a local-only artifact. Apply the same rule to flat and organized traces. The prior #2186 point also carries forward. `what_ran()` strips the entire `HOS_CONTROL` fact, so the comparison helper cannot distinguish an absent switch from a socket value. Every successful live `ab` run currently connects to the bridge, so I found no reachable connected-vs-disabled pair through this path. Normalize the endpoint if preserving the logged on/off distinction is intended. `HOS_CONTROL_MEM` and `HOS_CONTROL_PEER_SID` remain compared. Author evidence shows all six Kokiri runs on main could not find a trace, while all 24 Windows runs across four scenes measured with the path fix. The exact head passes `test_dev_ab.py` in CI. The `test_dev_update.py` failure is the older `test_build_command` case, also present on the same-base #2802 run without these scripts changed. The Guide, Rust and Website failures have prior base attribution. A successful complete write-up after all fixes and the Linux short real run remain open. [Windows evidence](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2797#issuecomment-89908) · [CI](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57560) Reviewed the full change at `179b7570daa1a5d0a2143b7c0a98d4188f1d40e7` against `01d6878b3f148e68d7a9080133d193e1fb7c2973`. No tests run in this review. The fixes from #2186 and #2443 are incorporated. Keep the existing handoff that the originals may be retired after the replacement merges.
@ -708,1 +729,4 @@
raise drive.Failed("no frame trace at %s (RX_VK_FRAME_TRACE)" % trace)
# (the trace is written every 60 frames: its last row may be older than the menu's read just made. The window
# starts at the first row written after it, so the read's own frames are not measured)
before, end = num(rows[-1], "at_ns"), time.monotonic() + TRACE_AFTER_S
Member

[P2] Anchor the measured window to a frame sampled after the option reply. A pre-reply batch may become visible only on the next read because the renderer timestamps before writing and flushing. A growing file shows publication progress, not the sample time relative to the reply. Use a monotonic boundary and cover late publication of pre-boundary frames.

[P2] Anchor the measured window to a frame sampled after the option reply. A pre-reply batch may become visible only on the next read because the renderer timestamps before writing and flushing. A growing file shows publication progress, not the sample time relative to the reply. Use a monotonic boundary and cover late publication of pre-boundary frames.
@ -398,0 +401,4 @@
for d, subs, names in os.walk(p):
subs[:] = [s for s in subs if s not in NEVER_SHARED and not s.startswith("profile-")]
found += [os.path.join(d, n) for n in names]
files += sorted(found, key=os.path.getmtime, reverse=True)[:newest]
Member

[P2] Keep raw frame traces out of shareable support bundles. Adding organized logs now takes diagnostics/logs/longshot_frames.csv and the fixture requires it, although raw traces are local-only. Exclude the CSV in both layouts or separate a clearly local-only archive.

[P2] Keep raw frame traces out of shareable support bundles. Adding organized logs now takes diagnostics/logs/longshot_frames.csv and the fixture requires it, although raw traces are local-only. Exclude the CSV in both layouts or separate a clearly local-only archive.
llun force-pushed fix/dev-tools-organized-logs from 179b7570da
Some checks failed
CI / What the change needs (pull_request) Successful in 8s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 13s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 15s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m5s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m52s
CI / Website build and checks (pull_request) Failing after 1m22s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 22m9s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 35m32s
to a963e7dbf9
Some checks failed
CI / What the change needs (pull_request) Successful in 16s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 21s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 19s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-11-29 17:16:26 +00:00
Compare
Author
Member

Thanks @futondestroyer, this was a careful read. The branch is rebased onto main @ f14a5664d, with two new commits (test, then fix).

1. The measured window (ab.py): fixed as you suggested. You're right that the file growing says nothing about when its frames were sampled.

  • The boundary is now time.perf_counter_ns(), taken right after the option_get reply. That is the trace's own clock: at_ns is hos_now_ns, which is QueryPerformanceCounter on Windows (host/hos_thread.c) and CLOCK_MONOTONIC elsewhere (host/posix/windows.h). On this PC, a QueryPerformanceCounter read between two perf_counter_ns() calls fell between them.
  • ab waits for a frame at or after the boundary, and the window starts at the boundary, so a late batch from before the read is left out.
  • A trace whose last frame is more than an hour from the boundary is refused ("not on this PC's clock") rather than measured.
  • The fixture now publishes a batch stamped 1 s and 4 s, after a read at 5 s, before a frame at 6 s. On the previous head it measured from 4 s; it now measures from 5 s.
  • A second check covers a trace on another clock.

2. The raw CSV in update --logs: I've kept it, because it's main's documented rule and not something this pull request adds.

  • On main, update.py's own help says --logs zips logs/ (the log, its older copies, the frame log), and LOG_PARTS walks logs/, so a flat folder's logs/longshot_frames.csv already goes into the zip. This branch applies the same rule to diagnostics/logs/.
  • The frame trace holds per-frame timings and counts (the columns in docs/dev/reference/profiling.md, "The frame trace"), with no guest addresses or game data. The local-only things are already left out in both layouts: bug-reports/local-only/ (minidumps) and every profile-* folder (the profiles that page says never leave the PC).
  • If the team wants the frame log out of support zips, I'm happy to do it, but as its own change to that rule and its docs, for both layouts. Please say if you'd like that.

3. HOS_CONTROL: now normalized, as you suggested. dyst's commit stays as it is. On top of it, HOS_CONTROL is compared as on (any socket name) or absent, through ON_OR_OFF, instead of being dropped. A run with the bridge and one without now differ, while the socket's name each run still doesn't count. HOS_CONTROL_MEM and HOS_CONTROL_PEER_SID are compared as before. test_run_only_switches_not_compared checks both.

Checks:

  • mise run test -- --exact tests/test_dev_ab.py ... here: the only error is test_in_run_report_keeps_hitch_rates (the console's cp1252 and "Δ"), as on main.
  • On Linux (Ubuntu 24.04 in WSL 2): test_dev_ab.py passes. test_dev_update.py fails only test_build_command, as on main, which you'd already traced to the older case.
  • mise run test-changed: 12 pass. The 5 failures fail the same way on main here.

The Linux short real run is still open, and the description says so. I've updated the description for all of the above.

Thanks @futondestroyer, this was a careful read. The branch is rebased onto `main` @ `f14a5664d`, with two new commits (test, then fix). **1. The measured window (`ab.py`): fixed as you suggested.** You're right that the file growing says nothing about when its frames were sampled. - The boundary is now `time.perf_counter_ns()`, taken right after the `option_get` reply. That is the trace's own clock: `at_ns` is `hos_now_ns`, which is `QueryPerformanceCounter` on Windows (`host/hos_thread.c`) and `CLOCK_MONOTONIC` elsewhere (`host/posix/windows.h`). On this PC, a `QueryPerformanceCounter` read between two `perf_counter_ns()` calls fell between them. - `ab` waits for a frame at or after the boundary, and the window starts at the boundary, so a late batch from before the read is left out. - A trace whose last frame is more than an hour from the boundary is refused ("not on this PC's clock") rather than measured. - The fixture now publishes a batch stamped 1 s and 4 s, after a read at 5 s, before a frame at 6 s. On the previous head it measured from 4 s; it now measures from 5 s. - A second check covers a trace on another clock. **2. The raw CSV in `update --logs`: I've kept it, because it's `main`'s documented rule and not something this pull request adds.** - On `main`, `update.py`'s own help says `--logs zips logs/ (the log, its older copies, the frame log)`, and `LOG_PARTS` walks `logs/`, so a flat folder's `logs/longshot_frames.csv` already goes into the zip. This branch applies the same rule to `diagnostics/logs/`. - The frame trace holds per-frame timings and counts (the columns in `docs/dev/reference/profiling.md`, "The frame trace"), with no guest addresses or game data. The local-only things are already left out in both layouts: `bug-reports/local-only/` (minidumps) and every `profile-*` folder (the profiles that page says never leave the PC). - If the team wants the frame log out of support zips, I'm happy to do it, but as its own change to that rule and its docs, for both layouts. Please say if you'd like that. **3. `HOS_CONTROL`: now normalized, as you suggested.** dyst's commit stays as it is. On top of it, `HOS_CONTROL` is compared as `on` (any socket name) or absent, through `ON_OR_OFF`, instead of being dropped. A run with the bridge and one without now differ, while the socket's name each run still doesn't count. `HOS_CONTROL_MEM` and `HOS_CONTROL_PEER_SID` are compared as before. `test_run_only_switches_not_compared` checks both. **Checks:** - `mise run test -- --exact tests/test_dev_ab.py ...` here: the only error is `test_in_run_report_keeps_hitch_rates` (the console's cp1252 and "Δ"), as on `main`. - On Linux (Ubuntu 24.04 in WSL 2): `test_dev_ab.py` passes. `test_dev_update.py` fails only `test_build_command`, as on `main`, which you'd already traced to the older case. - `mise run test-changed`: 12 pass. The 5 failures fail the same way on `main` here. The Linux short real run is still open, and the description says so. I've updated the description for all of the above.
llun force-pushed fix/dev-tools-organized-logs from a963e7dbf9
Some checks failed
CI / What the change needs (pull_request) Successful in 16s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 21s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 19s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 8d18560f85
Some checks failed
CI / What the change needs (pull_request) Successful in 25s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 31s
PR description / Title and description (pull_request_target) Successful in 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 31s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-11-29 17:19:26 +00:00
Compare
llun force-pushed fix/dev-tools-organized-logs from 8d18560f85
Some checks failed
CI / What the change needs (pull_request) Successful in 25s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 31s
PR description / Title and description (pull_request_target) Successful in 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 31s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to a99395efc1
Some checks failed
PR description / Title and description (pull_request_target) Successful in 19s
CI / What the change needs (pull_request) Successful in 31s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 44s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 28s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-11-29 18:43:01 +00:00
Compare
llun force-pushed fix/dev-tools-organized-logs from a99395efc1
Some checks failed
PR description / Title and description (pull_request_target) Successful in 19s
CI / What the change needs (pull_request) Successful in 31s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 44s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 28s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 9e4eb50ebc
Some checks failed
PR description / Title and description (pull_request_target) Successful in 17s
CI / What the change needs (pull_request) Successful in 26s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 45s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 29s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m30s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 1m43s
CI / Website build and checks (pull_request) Failing after 33s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 13m57s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 34m31s
2026-11-29 18:51:53 +00:00
Compare
Author
Member
@review
BeanBot left a comment

Recommendation: Request changes. The trace-path fix restored measurements in the reported Windows runs, and the changed boundary excludes late-published pre-menu frames. A complete write-up and the short real Linux run are still outstanding. (It stands on L3: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 15s.)

Restores A/B trace discovery for organized game folders, includes old and new diagnostic locations in support archives, and fixes run comparisons and the measurement boundary. The changes make the development tool more reliable at the cost of a short wait for a post-menu trace frame.

Blocking (1): must change before merging.

  1. L3: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 15s.

@fix can do L3.

Since the last review (on 179b7570da)
Still open: L3 (The check CI / Third-party parts and guide screenshots (pull_request) fails on this head…); L4 (The check CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) fails on th…); L5 (The check CI / Website build and checks (pull_request) fails on this head and passes on…)

Checks: Still running: 5 checks.

Also noticed (3; not asked for, not blocking)
  • A complete write-up after all three fixes and the stated short Linux run remain useful validation.
  • Route measurements set their start again after playback begins, so their window differs from the menu-read boundary.
  • The support archive includes raw frame traces in both layouts under the existing archive rule.
More: does it help, other systems, switches, what was read

Does it help: Unproven end to end: all 6 Kokiri Forest runs on main failed to find a trace, while 24 Windows runs across four scenes measured with the trace fix, according to the author. Those runs did not produce a complete write-up after all fixes.

Other systems: The Python tool affects Windows and Linux development runs and support archives, not player runtime code. Linux game-free checks were reported passing for ab.py, but a real Linux A/B and complete write-up remain to be checked.

Switches: No switches added, changed or removed. HOS_CONTROL is now compared as on or absent; HOS_CONTROL_MEM and HOS_CONTROL_PEER_SID retain their values for comparison.

Reviewed: 9e4eb50ebc against e4801d6a55: Read AGENTS.md and CONTRIBUTING.md, the diff, the changed measurement and comparison code and its surrounding callers. Skimmed the other changed files and tests; did not read every changed file in full. The review checklist was absent; the pull request template and referenced standards were not read.; nothing run (a code review).

Checked and fine:

  • The boundary uses the host monotonic clock after the option reply and waits through late batches of older frames.
  • HOS_CONTROL socket names normalize to on while an absent bridge remains distinguishable.
  • The organized and flat diagnostic paths are both included for upgraded folders.

Testing: No commands from the project or tests were run. The author reports game-free checks and Windows game runs; CI still has jobs running and reports a failing guide-screenshot check.

Overlaps and merge order: Supersedes #2186 and #2443; retire those after this replacement merges. The author identifies #2793 and #2799 as fixes for base CI failures.


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

**Recommendation: Request changes.** The trace-path fix restored measurements in the reported Windows runs, and the changed boundary excludes late-published pre-menu frames. A complete write-up and the short real Linux run are still outstanding. (It stands on L3: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 15s.) Restores A/B trace discovery for organized game folders, includes old and new diagnostic locations in support archives, and fixes run comparisons and the measurement boundary. The changes make the development tool more reliable at the cost of a short wait for a post-menu trace frame. **Blocking (1)**: must change before merging. 1. **L3**: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 15s. `@fix` can do L3. **Since the last review** (on 179b7570daa1) Still open: L3 (The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head…); L4 (The check `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)` fails on th…); L5 (The check `CI / Website build and checks (pull_request)` fails on this head and passes on…) **Checks:** Still running: 5 checks. <details> <summary>Also noticed (3; not asked for, not blocking)</summary> - A complete write-up after all three fixes and the stated short Linux run remain useful validation. - Route measurements set their start again after playback begins, so their window differs from the menu-read boundary. - The support archive includes raw frame traces in both layouts under the existing archive rule. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven end to end: all 6 Kokiri Forest runs on main failed to find a trace, while 24 Windows runs across four scenes measured with the trace fix, according to the author. Those runs did not produce a complete write-up after all fixes. **Other systems:** The Python tool affects Windows and Linux development runs and support archives, not player runtime code. Linux game-free checks were reported passing for ab.py, but a real Linux A/B and complete write-up remain to be checked. **Switches:** No switches added, changed or removed. HOS_CONTROL is now compared as on or absent; HOS_CONTROL_MEM and HOS_CONTROL_PEER_SID retain their values for comparison. **Reviewed:** 9e4eb50ebc02 against e4801d6a55d8: Read AGENTS.md and CONTRIBUTING.md, the diff, the changed measurement and comparison code and its surrounding callers. Skimmed the other changed files and tests; did not read every changed file in full. The review checklist was absent; the pull request template and referenced standards were not read.; nothing run (a code review). **Checked and fine:** - The boundary uses the host monotonic clock after the option reply and waits through late batches of older frames. - HOS_CONTROL socket names normalize to on while an absent bridge remains distinguishable. - The organized and flat diagnostic paths are both included for upgraded folders. **Testing:** No commands from the project or tests were run. The author reports game-free checks and Windows game runs; CI still has jobs running and reports a failing guide-screenshot check. **Overlaps and merge order:** Supersedes #2186 and #2443; retire those after this replacement merges. The author identifies #2793 and #2799 as fixes for base CI failures. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch fix/dev-tools-organized-logs 2026-11-29 19:28:18 +00:00
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!2797
No description provided.