Docs: switches as the code reads them, and an xtask check for dead names (#49) #90

Manually merged
github merged 1 commit from github-bot/gh-90 into main 2026-11-26 08:21:45 +00:00 AGit
Owner

@⁠sharan104 on GitHub · 2026-11-26 02:51 UTC · original
sharan104:fix/49-switch-docs → main · +137 −17 · 5 files · 1 commits · merged 2026-11-26 08:17 UTC

Fixes #49.

I checked every VICTORY_* name in the tracked Markdown (73 names) against the code. The issue and the follow-up comment disagree, and the code settles it:

Name Verdict
VICTORY_LATE_WAIT Live: host.rs late_stage(), accepts 1/2/3, defaults to stage 3 while the relay is on (the comment above it still says "0, 1, or 2")
VICTORY_WIDE_REFRESH Live: host.rs wide_refresh(), unit-tested; the doc line was right
VICTORY_LATE_WAITS A separate frame-tick switch in frame.rs
VICTORY_MERGE_RACE Dead: the counter was taken out of the tree
VICTORY_WALLS_TRACE, VICTORY_CAPTURE_FRAMES Live (left unverified in the issue)
VICTORY_CARD_BUFFERS_MIN_KB Wins over _MIN_MB when above 0, as the issue says

The bigger finding: several switches the docs call "off by default" are on now (VICTORY_RELAY stage 2, VICTORY_LATE_WAIT stage 3 with the relay, VICTORY_WIDE_BACK, VICTORY_CARD_ROOM_FOR_BUFFERS, VICTORY_PAGE_WRITES=guards). That is also why the README's speed line made no difference in #34: three of its assignments are the defaults.

Doc changes (docs/README-fxceless.md, docs/findings.md): the speed line notes which switches are now defaults; VICTORY_PAGE_WRITES and VICTORY_CARD_ROOM_FOR_BUFFERS describe their real defaults; the VICTORY_MERGE_RACE switch is gone but its finding is kept; the "off by default" paragraph now lists what is on and the values each accepts, and that _MIN_KB wins over _MIN_MB.

The check the issue suggested: xtask/src/switches.rs (test-only) fails if a VICTORY_* name in a tracked .md file is not quoted in at least one .rs file outside xtask/. It matches whole names, so VICTORY_LATE_WAITS does not count as VICTORY_LATE_WAIT. It reuses the policy test's file list (policy::list_files is now pub(crate)). A scratch .md naming VICTORY_MERGE_RACE made it fail and name the file.

Tests: cargo test -p xtask --locked (9 passed); cargo clippy -p xtask --all-targets --locked clean.

Left alone on purpose (code, not docs): VICTORY_GPU_TIMING=0 still turns the late wait off; the late_stage comment omits stage 3; VICTORY_LATE_WAIT=0 probably also stops the relay. Please check the new wording suits a file kept as fxceless' historical README.

🤖 Generated with Claude Code

**@⁠sharan104** on GitHub · 2026-11-26 02:51 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/90) `sharan104:fix/49-switch-docs` → `main` · +137 −17 · 5 files · 1 commits · merged 2026-11-26 08:17 UTC Fixes #49. I checked every `VICTORY_*` name in the tracked Markdown (73 names) against the code. The issue and the follow-up comment disagree, and the code settles it: | Name | Verdict | |---|---| | `VICTORY_LATE_WAIT` | **Live**: `host.rs` `late_stage()`, accepts `1`/`2`/`3`, defaults to stage 3 while the relay is on (the comment above it still says "0, 1, or 2") | | `VICTORY_WIDE_REFRESH` | **Live**: `host.rs` `wide_refresh()`, unit-tested; the doc line was right | | `VICTORY_LATE_WAITS` | A separate frame-tick switch in `frame.rs` | | `VICTORY_MERGE_RACE` | **Dead**: the counter was taken out of the tree | | `VICTORY_WALLS_TRACE`, `VICTORY_CAPTURE_FRAMES` | Live (left unverified in the issue) | | `VICTORY_CARD_BUFFERS_MIN_KB` | Wins over `_MIN_MB` when above 0, as the issue says | The bigger finding: several switches the docs call "off by default" are **on** now (`VICTORY_RELAY` stage 2, `VICTORY_LATE_WAIT` stage 3 with the relay, `VICTORY_WIDE_BACK`, `VICTORY_CARD_ROOM_FOR_BUFFERS`, `VICTORY_PAGE_WRITES=guards`). That is also why the README's speed line made no difference in #34: three of its assignments are the defaults. Doc changes (`docs/README-fxceless.md`, `docs/findings.md`): the speed line notes which switches are now defaults; `VICTORY_PAGE_WRITES` and `VICTORY_CARD_ROOM_FOR_BUFFERS` describe their real defaults; the `VICTORY_MERGE_RACE` switch is gone but its finding is kept; the "off by default" paragraph now lists what is on and the values each accepts, and that `_MIN_KB` wins over `_MIN_MB`. The check the issue suggested: `xtask/src/switches.rs` (test-only) fails if a `VICTORY_*` name in a tracked `.md` file is not quoted in at least one `.rs` file outside `xtask/`. It matches whole names, so `VICTORY_LATE_WAITS` does not count as `VICTORY_LATE_WAIT`. It reuses the policy test's file list (`policy::list_files` is now `pub(crate)`). A scratch `.md` naming `VICTORY_MERGE_RACE` made it fail and name the file. Tests: `cargo test -p xtask --locked` (9 passed); `cargo clippy -p xtask --all-targets --locked` clean. Left alone on purpose (code, not docs): `VICTORY_GPU_TIMING=0` still turns the late wait off; the `late_stage` comment omits stage 3; `VICTORY_LATE_WAIT=0` probably also stops the relay. Please check the new wording suits a file kept as fxceless' historical README. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Checked every VICTORY_* name in the Markdown files against the source.
One was dead: VICTORY_MERGE_RACE (its counter was taken out after
8dd30ab); the line keeps the finding and drops the switch.
VICTORY_LATE_WAIT (host.rs late_stage: 1, 2, 3) and VICTORY_WIDE_REFRESH
(host.rs wide_refresh: 0, 1, else on at four or more CPUs) are read, as
documented; VICTORY_LATE_WAITS in frame.rs is a different switch.

What the docs had wrong, by the code:
- VICTORY_RELAY (stage 2), VICTORY_LATE_WAIT (stage 3 with the relay)
  and VICTORY_WIDE_BACK are on by default, not off; the frame-rate line
  says these are now the defaults (#34 copied it and saw no change).
- VICTORY_CARD_ROOM_FOR_BUFFERS is on by default (=0 as before).
- VICTORY_PAGE_WRITES opens the guards by default (=0 counts only).
- VICTORY_CARD_BUFFERS_MIN_KB, when above 0, wins over _MIN_MB: said
  in both places that name them.

xtask: a test that every VICTORY_* name in a tracked Markdown file is
quoted in at least one Rust file outside xtask, as every switch is read.

Fixes #49

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:32:00 +00:00
Author
Owner

@⁠avatarmanz on GitHub · 2026-11-26 07:56 UTC · original

Merged into main in the next push (tests pass); thanks.

**@⁠avatarmanz** on GitHub · 2026-11-26 07:56 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/90#issuecomment-7186004776) Merged into main in the next push (tests pass); thanks.
github manually merged commit 1eed77930c into main 2026-11-26 08:21:45 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.