fix(queue): the RAM file system rule is checked on a made-up mount table on Windows too #1915

Merged
HumanBean merged 1 commit from siantm/Longshot:fix/queue-ram-check-windows into main 2026-11-21 00:05:47 +00:00
Contributor

Summary

tests/test_job_queue.py fails on Windows on main: its test_ram_file_system hands on_ram a made-up mount table
(/ on btrfs, /tmp on tmpfs, /tmp/disk on ext4) and expects /tmp/x to be on a RAM file system, but on Windows
on_ram answers "no" before it looks at the table, and would resolve the test's path against the drive. The failure
has been named as "also fails on main" in several pull requests (#1100, #1816).

With a table given, on_ram now applies the longest-mount rule to the path as it is, on any OS. With none (every
caller but the test: dev.py's builds, the queue's TMPDIR move, dev.py migrate) it is as before: "no" on Windows,
/proc/mounts and the real path elsewhere.

To see it on main: python -I -B tests/test_job_queue.py on Windows.

Read first: on_ram in scripts/devtools/common.py (the whole change, 4 lines).

Testing

Tested: Windows 11, Python 3.14.7 (the Builder's): python -I -B tests/test_job_queue.py -v on main @ 8859673e and
on this branch @ ff798113, each in a hidden console of its own, in one build job of the PC's job queue:

  • main: 21 tests, 18 passed, 2 failed (test_ram_file_system, WindowsPlayersReal.test_a_build_outside_the_queue), 1 skipped.
  • this branch: 21 tests, 19 passed, 1 failed (WindowsPlayersReal.test_a_build_outside_the_queue, which fails on
    main the same way: heavy_procs returned no process for the test's stand-in build), 1 skipped.

No game run: the change is in a developer tool's test path, and on Windows nothing that calls on_ram without a table
changes its answer.

Still to test:

  • Windows 11, this PC: the whole suite (tests/run_all.py --strict) here and on main @ 8859673e, expecting no failure
    here that main does not have (by hand, queued)
  • Linux: python3 -I -B tests/test_job_queue.py, expecting it to pass as on main (the real path is still used
    when no table is given) (by hand: the Test Farm runs game scenarios only, not a game-free test)

Measurements

Verdict: the check that failed on Windows passes; no other result of the file changes.

Setup: Windows 11, i7-9700, Python 3.14.7; python -I -B tests/test_job_queue.py -v, one run each side, through the
PC's job queue

Before: main @ 8859673e After: this PR @ ff798113
tests/test_job_queue.py (21 tests) 18 passed, 2 failed, 1 skipped 19 passed, 1 failed, 1 skipped
Environment.test_ram_file_system FAIL (AssertionError: False is not true) ok
WindowsPlayersReal.test_a_build_outside_the_queue FAIL FAIL (as on main)
main:  test_ram_file_system (__main__.Environment.test_ram_file_system) ... FAIL
main:  FAILED (failures=2, skipped=1)
PR:    test_ram_file_system (__main__.Environment.test_ram_file_system) ... ok
PR:    FAILED (failures=1, skipped=1)

Risks

None for players: scripts/devtools/ is not part of the game or its build. A revert is enough. A caller that passed a
table on Linux now has its path taken as it is (not resolved through symlinks); only the test passes one.

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). (the whole suite is queued: Still to test)
  • 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.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • 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.
## Summary `tests/test_job_queue.py` fails on Windows on `main`: its `test_ram_file_system` hands `on_ram` a made-up mount table (`/` on btrfs, `/tmp` on tmpfs, `/tmp/disk` on ext4) and expects `/tmp/x` to be on a RAM file system, but on Windows `on_ram` answers "no" before it looks at the table, and would resolve the test's path against the drive. The failure has been named as "also fails on main" in several pull requests (#1100, #1816). With a table given, `on_ram` now applies the longest-mount rule to the path as it is, on any OS. With none (every caller but the test: `dev.py`'s builds, the queue's `TMPDIR` move, `dev.py migrate`) it is as before: "no" on Windows, `/proc/mounts` and the real path elsewhere. To see it on `main`: `python -I -B tests/test_job_queue.py` on Windows. Read first: `on_ram` in `scripts/devtools/common.py` (the whole change, 4 lines). ## Testing **Tested:** Windows 11, Python 3.14.7 (the Builder's): `python -I -B tests/test_job_queue.py -v` on `main` @ 8859673e and on this branch @ ff798113, each in a hidden console of its own, in one build job of the PC's job queue: - `main`: 21 tests, 18 passed, 2 failed (`test_ram_file_system`, `WindowsPlayersReal.test_a_build_outside_the_queue`), 1 skipped. - this branch: 21 tests, 19 passed, 1 failed (`WindowsPlayersReal.test_a_build_outside_the_queue`, which fails on `main` the same way: `heavy_procs` returned no process for the test's stand-in build), 1 skipped. No game run: the change is in a developer tool's test path, and on Windows nothing that calls `on_ram` without a table changes its answer. **Still to test:** - Windows 11, this PC: the whole suite (`tests/run_all.py --strict`) here and on `main` @ 8859673e, expecting no failure here that `main` does not have (by hand, queued) - Linux: `python3 -I -B tests/test_job_queue.py`, expecting it to pass as on `main` (the real path is still used when no table is given) (by hand: the Test Farm runs game scenarios only, not a game-free test) ## Measurements **Verdict:** the check that failed on Windows passes; no other result of the file changes. Setup: Windows 11, i7-9700, Python 3.14.7; `python -I -B tests/test_job_queue.py -v`, one run each side, through the PC's job queue | | Before: main @ 8859673e | After: this PR @ ff798113 | |---|---|---| | `tests/test_job_queue.py` (21 tests) | 18 passed, 2 failed, 1 skipped | 19 passed, 1 failed, 1 skipped | | `Environment.test_ram_file_system` | FAIL (`AssertionError: False is not true`) | ok | | `WindowsPlayersReal.test_a_build_outside_the_queue` | FAIL | FAIL (as on `main`) | ``` main: test_ram_file_system (__main__.Environment.test_ram_file_system) ... FAIL main: FAILED (failures=2, skipped=1) PR: test_ram_file_system (__main__.Environment.test_ram_file_system) ... ok PR: FAILED (failures=1, skipped=1) ``` ## Risks None for players: `scripts/devtools/` is not part of the game or its build. A revert is enough. A caller that passed a table on Linux now has its path taken as it is (not resolved through symlinks); only the test passes one. ## 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. - [ ] `mise run test` passes (any failure that also fails on `main` is named). (the whole suite is queued: Still to test) - [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] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] 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.
fix(queue): the RAM file system rule is checked on a made-up mount table on Windows too
Some checks failed
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Failing after 10s
beanstalk/approval not approved yet
ff7981136f
tests/test_job_queue.py test_ram_file_system fails on Windows on main: on_ram answers no there before it looks at the
mount table the test hands it, and it resolved the test's path against the drive.

With a table given, on_ram applies the longest-mount rule to the path as it is, whatever the OS; with none (every
caller but the test) it is as before: no on Windows, /proc/mounts and the real path elsewhere.

Assisted-by: Claude Code
BeanBot left a comment

Recommendation: Wait. The existing Windows test now passes, and the production callers retain their previous behavior. The planned Linux and full-suite runs and passing CI are still needed before merge.

This lets the RAM filesystem test apply its synthetic mount table on Windows, at the cost of treating paths supplied with a table as literal paths on Linux too. The only in-tree caller supplying a table is the test, so no production behavior change was found.

Does it help: Yes. The PR reports that test_ram_file_system failed on base 8859673e and passed on ff798113 on the same Windows 11 PC; the separate WindowsPlayersReal failure occurred on both. This is a correctness fix, not a performance change.
Other systems: Windows production calls still return false without a table. Linux build checks, queue temporary-directory handling, and migration still resolve real paths and read the real mount table; the planned Linux test remains outstanding. GPU vendors, game runtime, saves, audio and input do not use this path.
Switches: None.

Reviewed: ff7981136f against 8859673e4b: Read scripts/devtools/common.py, AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md and the PR template in full; read the complete diff and commit and the relevant test and caller sections. Skimmed the reported runs. Other portions of the test and caller files were not read in full. docs/review-checklist.md and the sibling Tooling AGENTS.md were absent; the network was unavailable.; nothing run (a code review).
Checked and fine:

  • The existing game-free test exercises the longest mount and path boundary behavior and reportedly fails for the stated reason on Windows base.
  • All in-tree production calls omit the synthetic table, preserving their existing platform behavior.
  • The change is one topic, adds no dependencies or generated files, and records AI assistance.

Testing: Read-only review; no tests or project scripts were run. Await the stated Linux test, full suite comparison and passing CI on the head; the existing unrelated Windows failure is named in the PR.
Overlaps and merge order: No overlapping pull requests were supplied; the closed network prevented checking.


Automated code review by BeanBot (gpt-6.1-terra), on the pull request's opening. Nothing was run; a maintainer decides.

**Recommendation: Wait.** The existing Windows test now passes, and the production callers retain their previous behavior. The planned Linux and full-suite runs and passing CI are still needed before merge. This lets the RAM filesystem test apply its synthetic mount table on Windows, at the cost of treating paths supplied with a table as literal paths on Linux too. The only in-tree caller supplying a table is the test, so no production behavior change was found. **Does it help:** Yes. The PR reports that test_ram_file_system failed on base 8859673e and passed on ff798113 on the same Windows 11 PC; the separate WindowsPlayersReal failure occurred on both. This is a correctness fix, not a performance change. **Other systems:** Windows production calls still return false without a table. Linux build checks, queue temporary-directory handling, and migration still resolve real paths and read the real mount table; the planned Linux test remains outstanding. GPU vendors, game runtime, saves, audio and input do not use this path. **Switches:** None. **Reviewed:** ff7981136fa7 against 8859673e4bf5: Read scripts/devtools/common.py, AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md and the PR template in full; read the complete diff and commit and the relevant test and caller sections. Skimmed the reported runs. Other portions of the test and caller files were not read in full. docs/review-checklist.md and the sibling Tooling AGENTS.md were absent; the network was unavailable.; nothing run (a code review). **Checked and fine:** - The existing game-free test exercises the longest mount and path boundary behavior and reportedly fails for the stated reason on Windows base. - All in-tree production calls omit the synthetic table, preserving their existing platform behavior. - The change is one topic, adds no dependencies or generated files, and records AI assistance. **Testing:** Read-only review; no tests or project scripts were run. Await the stated Linux test, full suite comparison and passing CI on the head; the existing unrelated Windows failure is named in the PR. **Overlaps and merge order:** No overlapping pull requests were supplied; the closed network prevented checking. --- <sub>Automated code review by BeanBot (gpt-6.1-terra), on the pull request's opening. Nothing was run; a maintainer decides.</sub>
Author
Contributor

Still to test: the items for hardware this PC lacks go to the Test Farm (@Beanstalk form).

Still to test: the items for hardware this PC lacks go to the Test Farm (@Beanstalk form).
Member

@siantm only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@siantm only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
Author
Contributor

The Test Farm request in my previous comment was not meant: the farm plays game scenarios and times builds, comparing this PR's game against main's, and this change is in a developer tool that the game does not run (no plan of the farm's runs a test file or the job queue). The Linux and other-GPU items in Still to test are back to by hand. Nothing for a BigBean to approve here.

The Test Farm request in my previous comment was not meant: the farm plays game scenarios and times builds, comparing this PR's game against main's, and this change is in a developer tool that the game does not run (no plan of the farm's runs a test file or the job queue). The Linux and other-GPU items in Still to test are back to by hand. Nothing for a BigBean to approve here.
HumanBean changed title from WIP: fix(queue): the RAM file system rule is checked on a made-up mount table on Windows too to fix(queue): the RAM file system rule is checked on a made-up mount table on Windows too 2026-11-21 00:05:35 +00:00
HumanBean deleted branch fix/queue-ram-check-windows 2026-11-21 00:05:49 +00:00
Some checks failed
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Failing after 10s
beanstalk/approval not approved yet
Some workflows are waiting to be reviewed.
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!1915
No description provided.