Upstream/read map run conf #394

Closed
github-bot wants to merge 3 commits from github-bot/gh-394 into main AGit
Owner

@⁠cerealfordinner on GitHub · 2026-12-03 23:57 UTC · original
cerealfordinner:upstream/read-map-run-conf → main · +736 −16 · 9 files · 3 commits · closed without merging

Two small fixes for #106

Two commits on top of this PR's branch (upstream/read-map-run-conf in
cerealfordinner/victory-xmem-cerealfordinner):

  • run: let run.conf override the read-map paths — run.sh exported
    VICTORY_READ_MAP unconditionally, so an explicit VICTORY_READ_MAP= in
    run.conf was silently overwritten (and the documented way to turn the map
    off did nothing). Use ${VICTORY_READ_MAP-...} so a set value wins,
    including an empty one.
  • panel: fill the read-map fields in the HUD snapshot test — the test
    fixture was missing the new read_map_* fields, so the snapshot test fails
    on this branch. Fill them in, with the usual stress/steady values.

Tested with bash -n run.sh and
cargo check --target x86_64-pc-windows-gnu -p victory-gpu --tests.

Note: the branch sits on this PR's head (f7f0360), not on current main;
it will need the usual rebase before it can merge.

**@⁠cerealfordinner** on GitHub · 2026-12-03 23:57 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/394) `cerealfordinner:upstream/read-map-run-conf` → `main` · +736 −16 · 9 files · 3 commits · closed without merging ## Two small fixes for #106 Two commits on top of this PR's branch (`upstream/read-map-run-conf` in cerealfordinner/victory-xmem-cerealfordinner): - **`run: let run.conf override the read-map paths`** — `run.sh` exported `VICTORY_READ_MAP` unconditionally, so an explicit `VICTORY_READ_MAP=` in `run.conf` was silently overwritten (and the documented way to turn the map off did nothing). Use `${VICTORY_READ_MAP-...}` so a set value wins, including an empty one. - **`panel: fill the read-map fields in the HUD snapshot test`** — the test fixture was missing the new `read_map_*` fields, so the snapshot test fails on this branch. Fill them in, with the usual stress/steady values. Tested with `bash -n run.sh` and `cargo check --target x86_64-pc-windows-gnu -p victory-gpu --tests`. Note: the branch sits on this PR's head (`f7f0360`), not on current `main`; it will need the usual rebase before it can merge.
(cherry picked from commit 1427ddbddbcc4cf8cba109252708809ea209d485)
(cherry picked from commit 0a448cde015d1ea800d3918871ddafaabd41817b)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 00:02:35 +00:00
Author
Owner

@⁠Luxuride on GitHub · 2026-12-04 11:28 UTC · original · edited 2026-12-04 13:00 UTC

Two things before this can be reviewed on its merits.

  1. Building on an unmerged branch is the wrong shape for this, quite apart from the duplication. d676e93 is #106's single head commit and this PR adds e185bfb (run.conf override) and 004e269 (HUD fixture) on top of that same branch, so what a reviewer gets here is the base's diff plus the increment, and what the base gets is nothing.
    A stack is a good approach exactly when the base is alive: rebased on current main, under review, and close enough to merge that the increment can be read against it and will land days later. None of that is true of #106 — it is 247 commits behind, it conflicts, and it has never had a review — so the stack turns one stale branch into two: closing the base strands the head, every change to the base rebases this, and GitHub will only retarget this to main on its own if #106 merges and its branch is deleted.
    The shape that works here is one PR against main: the read-map commit rebased, with these two folded in — they are about thirty lines and a test fixture, and they fix bugs in the commit they sit on, which is another reason they belong in it rather than behind it. If they must stay separate, the order is: land the read-map work first, then rebase this onto main. git merge-tree shows a single mechanical README.md conflict, but dstorage.rs, panel.rs and run.sh have drifted a long way, so the rebase needs its own review pass either way.
  2. The shipped map does not exist. run.sh:34 and read_map.rs:24-27 point at config/read-map.txt "kept in the repo", the PR adds no such file, so load() misses and every player starts empty. VICTORY_READ_MAP_DEFAULT is documented nowhere either.

Then the contradictions that will cost the next reader an hour:

  • read_map.rs:11-12 says "unset turns all of this off", but run.sh:31-34 always exports a default path — unset means "use the default", and only an empty value disables it, as README and get() (:146) actually do. e185bfb is the right fix for the run.conf half of this, but the comment in the module still needs to say what now happens.
  • read_map.rs:56-60 says a short session "adds what it read", but save() has one caller on a 180 s timer (:353) and no exit path, so under three minutes stores nothing.
  • read_map.rs:322-339 labels a field "last minute" while spent is cumulative and never reset (:349, :412).
  • read_map.rs:233-234 counts a piece twice once it is both loaded and re-read, so the HUD "pcs" figure drifts upward.

Smaller: let id = m.names.len() as u16 (:194) wraps past 65535 distinct paths, and that is the persisted format; reading()/read() must stay paired or quiet() never becomes true and prefetch stops for the session (balanced today at dstorage.rs:1480/:1514, but a guard type would be sturdier); and the mode-tag change to "xmem HW-RT"/"xmem SW-RT" (panel.rs:1783-1790) is unrelated to read-ahead — split it out.

What I checked and found correct: the panel is 660x216 -> 660x228, exactly one 12 px row, and the vtable/keys/footer shift by one row each with nothing overlapping.

**@⁠Luxuride** on GitHub · 2026-12-04 11:28 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/394#issuecomment-7410147011) · edited 2026-12-04 13:00 UTC Two things before this can be reviewed on its merits. 1. Building on an unmerged branch is the wrong shape for this, quite apart from the duplication. `d676e93` is #106's single head commit and this PR adds `e185bfb` (run.conf override) and `004e269` (HUD fixture) on top of that same branch, so what a reviewer gets here is the base's diff plus the increment, and what the base gets is nothing. A stack is a good approach exactly when the base is alive: rebased on current `main`, under review, and close enough to merge that the increment can be read against it and will land days later. None of that is true of #106 — it is 247 commits behind, it conflicts, and it has never had a review — so the stack turns one stale branch into two: closing the base strands the head, every change to the base rebases this, and GitHub will only retarget this to `main` on its own if #106 merges and its branch is deleted. The shape that works here is one PR against `main`: the read-map commit rebased, with these two folded in — they are about thirty lines and a test fixture, and they fix bugs in the commit they sit on, which is another reason they belong in it rather than behind it. If they must stay separate, the order is: land the read-map work first, then rebase this onto `main`. `git merge-tree` shows a single mechanical `README.md` conflict, but `dstorage.rs`, `panel.rs` and `run.sh` have drifted a long way, so the rebase needs its own review pass either way. 2. The shipped map does not exist. `run.sh:34` and `read_map.rs:24-27` point at `config/read-map.txt` "kept in the repo", the PR adds no such file, so `load()` misses and every player starts empty. `VICTORY_READ_MAP_DEFAULT` is documented nowhere either. Then the contradictions that will cost the next reader an hour: - `read_map.rs:11-12` says "unset turns all of this off", but `run.sh:31-34` always exports a default path — unset means "use the default", and only an empty value disables it, as README and `get()` (`:146`) actually do. `e185bfb` is the right fix for the `run.conf` half of this, but the comment in the module still needs to say what now happens. - `read_map.rs:56-60` says a short session "adds what it read", but `save()` has one caller on a 180 s timer (`:353`) and no exit path, so under three minutes stores nothing. - `read_map.rs:322-339` labels a field "last minute" while `spent` is cumulative and never reset (`:349`, `:412`). - `read_map.rs:233-234` counts a piece twice once it is both loaded and re-read, so the HUD "pcs" figure drifts upward. Smaller: `let id = m.names.len() as u16` (`:194`) wraps past 65535 distinct paths, and that is the persisted format; `reading()`/`read()` must stay paired or `quiet()` never becomes true and prefetch stops for the session (balanced today at `dstorage.rs:1480`/`:1514`, but a guard type would be sturdier); and the mode-tag change to "xmem HW-RT"/"xmem SW-RT" (`panel.rs:1783-1790`) is unrelated to read-ahead — split it out. What I checked and found correct: the panel is 660x216 -> 660x228, exactly one 12 px row, and the vtable/keys/footer shift by one row each with nothing overlapping.
github-bot closed this pull request 2026-12-04 18:20:16 +00:00
Author
Owner

@⁠cerealfordinner on GitHub · 2026-12-04 18:18 UTC · original

Closing — code changes already in our fork at cerealfordinner/victory-xmem-hw-rt (commits 1427ddbd and 0a448cde are ancestors of main). No need to keep this PR open; the changes were applied directly to our branch.

**@⁠cerealfordinner** on GitHub · 2026-12-04 18:18 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/394#issuecomment-7420215555) Closing — code changes already in our fork at cerealfordinner/victory-xmem-hw-rt (commits 1427ddbd and 0a448cde are ancestors of main). No need to keep this PR open; the changes were applied directly to our branch.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.