fix(dev): the queue names no NVIDIA cache folder for a game the Windows sandbox confines #2751

Merged
HumanBean merged 2 commits from ChloeNow/Longshot:fix/sandbox-nv-cache-dir into mod-api 2026-11-29 17:13:16 +00:00
Contributor

fix(dev): the queue names no NVIDIA cache folder for a game the Windows sandbox confines

Summary

On Windows every sandboxed game run through the development queue (dev.py game-tests, dev.py queue run) compiled
every pipeline again at its start: 15 to 25 minutes of "preparing shaders" on an RTX 4060 after any change of the
translator, and the same again on the next run.

The queue names an NVIDIA shader cache folder for every job (__GL_SHADER_DISK_CACHE_PATH, its nvcache), and
NVIDIA's Windows driver keeps its cache there. The sandboxed game's AppContainer cannot open that folder, and the driver
keeps no cache at all in a folder it cannot open. So a confined queue run kept nothing.

This changes the queue, not the sandbox: the game gets no new grant. On Windows a game run (a mode with a GPU share)
gets no queue folder unless HOS_SANDBOX is 0. The confined driver then keeps its cache in the container's own
folder (%LOCALAPPDATA%\Packages\longshot.game\AC\NVIDIA\GLCache), which it can always write. Builds, whose shader
preparation runs unconfined, a folder the caller set, and Linux all keep the folder as before. Players were never
affected: a normal start sets no such folder.

  • scripts/devtools/jobqueue.py job_env: the rule above.
  • docs/dev/developing.md: the queue's NVIDIA cache section says so.

An earlier version of this pull request granted the queue's folder to the container instead. That widened the
sandbox, against the plan for longshot-builder to broker between the game and the system, so this version replaces it.

On mod-api, to see it: Windows, sandboxed (the default). Two dev.py game-tests runs in a row both spend their
start compiling ("noted pipelines: N of ~38000"), and nothing writes the container's NVIDIA cache.

Read first: job_env in scripts/devtools/jobqueue.py.

How it was found

All on one build, sandboxed, with the container's NVIDIA cache moved aside so the driver had to compile:

  • A start through longshot_ctl.py launch made the container's cache (6.5 MB in two minutes).
  • The same start through the queue's wrapper made no cache folder at all.
  • An unsandboxed queue run had written the queue's nvcache (1.9 GB): the Windows driver does read the variable.

Testing

Tested: Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU, driver 621.24.

  • tests/test_job_queue.py, test_no_queue_nvidia_cache_for_a_game_the_windows_sandbox_confines (new):
    • With common.WINDOWS on, game modes get no folder, with HOS_SANDBOX unset or strict.
    • With HOS_SANDBOX=0 they get one, and a build and a folder of the caller's own keep theirs.
    • Linux is unchanged.
    • On mod-api it fails with "'__GL_SHADER_DISK_CACHE_PATH' unexpectedly found ... : shared". Here it passes, and
      with the rule undone it fails again.
  • test_no_lift_key_variables checks Linux's rule, so its folder checks now run with common.WINDOWS off.
  • The rest of tests/test_job_queue.py: 47 tests, one failure. test_a_pid_used_again_or_another_namespace_is_not_it
    fails the same way on mod-api.
  • In the game: a sandboxed start through the queue's wrapper (this branch's dev.py queue run), the container's
    NVIDIA cache moved aside, quit after 150 s.
    • Before (mod-api's queue): no cache folder made.
    • After: GLCache\...\b4217564bad97491.bin made in the container's folder, 42.9 MB written while it compiled
      (noted pipelines: 346 of 37935 ... in 10 s).

Still to test:

  • Linux: unchanged; CI.

Measurements

The fix's effect is the driver's cache kept from one sandboxed queue run to the next: the "Before" and "After" above
(a cache made, against none). The time a run saves depends on how many of its pipelines are new; with none kept, every
start compiled all of them (about 38,000 here, 15 to 25 minutes).

Risks

  • A sandboxed dev run now shares the container's NVIDIA cache with the sandboxed game played on the same PC: dev
    builds' pipelines go into the cache the player's game reads. NVIDIA's shader cache size is the player's setting
    (no limit on this PC); with a limit, dev runs could evict the played game's entries.
  • A run started unsandboxed with HOS_SANDBOX=0 passed only to the game (not in the queue's environment) uses the
    player's own %LOCALAPPDATA%\NVIDIA\GLCache, not the queue's.
  • A revert is enough.

Not here

The renderer measures the driver's cache on Windows at %LOCALAPPDATA%\NVIDIA\GLCache alone
(gpu/vk/pcache_load.h nvidia_cache_windows), and its note says the Windows driver reads no variable for its folder.
For a confined run that is now the right folder. For an unconfined queue run with the variable set it is not: a renderer
change, for a pull request of its own.

Checklist

Ready for review

  • One topic, on current mod-api; 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.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.
  • 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.

🤖 Generated with Claude Code

fix(dev): the queue names no NVIDIA cache folder for a game the Windows sandbox confines ## Summary On Windows every sandboxed game run through the development queue (`dev.py game-tests`, `dev.py queue run`) compiled every pipeline again at its start: 15 to 25 minutes of "preparing shaders" on an RTX 4060 after any change of the translator, and the same again on the next run. The queue names an NVIDIA shader cache folder for every job (`__GL_SHADER_DISK_CACHE_PATH`, its `nvcache`), and NVIDIA's Windows driver keeps its cache there. The sandboxed game's AppContainer cannot open that folder, and the driver keeps no cache at all in a folder it cannot open. So a confined queue run kept nothing. This changes the queue, not the sandbox: the game gets no new grant. On Windows a game run (a mode with a GPU share) gets no queue folder unless `HOS_SANDBOX` is `0`. The confined driver then keeps its cache in the container's own folder (`%LOCALAPPDATA%\Packages\longshot.game\AC\NVIDIA\GLCache`), which it can always write. Builds, whose shader preparation runs unconfined, a folder the caller set, and Linux all keep the folder as before. Players were never affected: a normal start sets no such folder. - **`scripts/devtools/jobqueue.py`** `job_env`: the rule above. - **`docs/dev/developing.md`**: the queue's NVIDIA cache section says so. An earlier version of this pull request granted the queue's folder to the container instead. That widened the sandbox, against the plan for longshot-builder to broker between the game and the system, so this version replaces it. **On mod-api, to see it:** Windows, sandboxed (the default). Two `dev.py game-tests` runs in a row both spend their start compiling ("noted pipelines: N of ~38000"), and nothing writes the container's NVIDIA cache. Read first: `job_env` in `scripts/devtools/jobqueue.py`. ## How it was found All on one build, sandboxed, with the container's NVIDIA cache moved aside so the driver had to compile: - A start through `longshot_ctl.py launch` made the container's cache (6.5 MB in two minutes). - The same start through the queue's wrapper made no cache folder at all. - An unsandboxed queue run had written the queue's `nvcache` (1.9 GB): the Windows driver does read the variable. ## Testing **Tested:** Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU, driver 621.24. - `tests/test_job_queue.py`, `test_no_queue_nvidia_cache_for_a_game_the_windows_sandbox_confines` (new): - With `common.WINDOWS` on, game modes get no folder, with `HOS_SANDBOX` unset or `strict`. - With `HOS_SANDBOX=0` they get one, and a build and a folder of the caller's own keep theirs. - Linux is unchanged. - On mod-api it fails with "'__GL_SHADER_DISK_CACHE_PATH' unexpectedly found ... : shared". Here it passes, and with the rule undone it fails again. - `test_no_lift_key_variables` checks Linux's rule, so its folder checks now run with `common.WINDOWS` off. - The rest of `tests/test_job_queue.py`: 47 tests, one failure. `test_a_pid_used_again_or_another_namespace_is_not_it` fails the same way on mod-api. - **In the game:** a sandboxed start through the queue's wrapper (this branch's `dev.py queue run`), the container's NVIDIA cache moved aside, quit after 150 s. - Before (mod-api's queue): no cache folder made. - After: `GLCache\...\b4217564bad97491.bin` made in the container's folder, 42.9 MB written while it compiled (`noted pipelines: 346 of 37935 ... in 10 s`). **Still to test:** - Linux: unchanged; CI. ## Measurements The fix's effect is the driver's cache kept from one sandboxed queue run to the next: the "Before" and "After" above (a cache made, against none). The time a run saves depends on how many of its pipelines are new; with none kept, every start compiled all of them (about 38,000 here, 15 to 25 minutes). ## Risks - **A sandboxed dev run now shares the container's NVIDIA cache with the sandboxed game played on the same PC**: dev builds' pipelines go into the cache the player's game reads. NVIDIA's shader cache size is the player's setting (no limit on this PC); with a limit, dev runs could evict the played game's entries. - **A run started unsandboxed with `HOS_SANDBOX=0` passed only to the game** (not in the queue's environment) uses the player's own `%LOCALAPPDATA%\NVIDIA\GLCache`, not the queue's. - A revert is enough. ## Not here The renderer measures the driver's cache on Windows at `%LOCALAPPDATA%\NVIDIA\GLCache` alone (`gpu/vk/pcache_load.h` `nvidia_cache_windows`), and its note says the Windows driver reads no variable for its folder. For a confined run that is now the right folder. For an unconfined queue run with the variable set it is not: a renderer change, for a pull request of its own. ## Checklist ### Ready for review - [x] One topic, on current `mod-api`; 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). <!-- Windows: test_job_queue.py; Linux: CI --> - [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. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. <!-- no host code changed --> - [x] Docs updated. - [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. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The dev queue (scripts/devtools/jobqueue.py) sets __GL_SHADER_DISK_CACHE_PATH for every job, and
NVIDIA's Windows driver keeps its cache there. The Windows plan never grants that folder, so a
confined game's driver keeps no cache at all and every sandboxed queue run (dev.py game-tests,
queue run) compiles every pipeline again. Linux's plan grants it (sandbox_plan.h). Fails on
mod-api: "the Windows plan takes no folder for NVIDIA's shader cache that
__GL_SHADER_DISK_CACHE_PATH names".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(sandbox): Windows grants the folder __GL_SHADER_DISK_CACHE_PATH names, NVIDIA's shader cache
All checks were successful
PR description / Title and description (pull_request_target) Successful in 8s
2fd3155d47
NVIDIA's Windows driver keeps its shader cache in the folder __GL_SHADER_DISK_CACHE_PATH names,
and keeps none at all in one it cannot open. The development queue names one for every job
(scripts/devtools/jobqueue.py), and the Windows plan never granted it, so a confined game run
through the queue (dev.py game-tests, queue run) kept no driver cache and compiled every
pipeline again at each start. The plan grants it now, written by ACL as the drivers' own
caches are (the driver opens it itself), made first; a folder at or above the player's is
refused as any grant is. Linux's plan grants it already.

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

Tested in game: Windows 11, RTX 4060 Laptop, sandboxed starts through the dev queue's wrapper on this head (with #2726 and #2742 merged locally): the queue's nvcache folder is granted and the confined NVIDIA driver writes it; on mod-api the same start kept no driver cache at all.

Tested in game: Windows 11, RTX 4060 Laptop, sandboxed starts through the dev queue's wrapper on this head (with #2726 and #2742 merged locally): the queue's nvcache folder is granted and the confined NVIDIA driver writes it; on mod-api the same start kept no driver cache at all.
Member

Possibly related, for context:

  • issue #2527 Game: Pipeline loading repeats on every launch on NVIDIA RTX 5070 — Related recurring NVIDIA cache symptom, though this PR is specific to dev-queue sandbox runs
Possibly related, for context: - issue #2527 Game: Pipeline loading repeats on every launch on NVIDIA RTX 5070 — Related recurring NVIDIA cache symptom, though this PR is specific to dev-queue sandbox runs
Owner
@review
BeanBot left a comment

Recommendation: Request changes. The cache grant can make the game’s protected files writable by the confined process, and an unusable optional cache folder can prevent the game from starting. The reported run shows cache writes, but the claimed reduction in repeated startup time remains unmeasured.

The change grants the Windows AppContainer write access to the NVIDIA cache folder named by the environment, allowing development queue runs to retain driver cache data. It reuses the existing ACL planner, but expands its writable surface and makes an optional cache grant affect launch success.

Blocking (1): must change before merging.

  1. L1 host/sandbox_win_plan.h:321: The cache path can grant direct write access to files that the sandbox otherwise protects through the broker. (more on the line) Do: Reject cache grants that overlap protected game, profile, save, mod or other brokered roots, and test those overlaps.

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

  • L2 host/sandbox_win_plan.h:321: Failure to grant this optional cache folder can prevent a sandboxed game from starting. (more on the line) Do: Treat failure to grant the optional NVIDIA cache as nonfatal, log that caching is unavailable, and cover an existing but ungrantable cache folder.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L3: The claimed improvement to repeated shader preparation has not yet been measured. When: The reported runs show that bytes are written, but end after three minutes and do not show whether a subsequent complete queue run avoids the reported 15–25 minute preparation. Do: Measure completed cold and warm queue starts on the base and this head on the same Windows NVIDIA setup, with interleaved repeated runs and cache sizes.

@fix can do L1 and L2.

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

Does it help: Unproven: on Windows 11 with an RTX 4060 Laptop GPU, the author reports that two three-minute confined runs wrote a shared cache that grew to 1.889 GB, whereas the base wrote no queue cache. There are no comparable completed cold and warm startup timings for the base and this change.

Other systems: The new Windows grant is planned regardless of GPU vendor and can affect any sandboxed launch that inherits the variable. Linux is unchanged. The Windows renderer still measures the default NVIDIA cache instead of the named folder, as the description notes; no timing comparison establishes the effect of that policy on these queue runs.

Switches: __GL_SHADER_DISK_CACHE_PATH is an existing environment variable, unset by default for normal starts and set by the development queue when absent. The change makes Windows grant its named folder write access; the current unrestricted choice of folder is unsafe for protected game data.

Reviewed: 2fd3155d47 against 5c1cd9f5b1: Read the diff, both commit messages, repository rules, pull request template, Windows ACL planner and relevant Windows launch and grant paths, queue environment setup, changed tests, and renderer cache selection. Skimmed the sandbox reference and standards; docs/review-checklist.md and the adjacent Tooling checkout are absent. Large files were reviewed around the changed paths and their dependencies rather than in full.; nothing run (a code review).

Checked and fine:

  • Both commits record AI assistance.
  • The added plan checks exercise the grant and refusal at LOCALAPPDATA; removing the grant makes the positive check fail.
  • No game-derived files, generated outputs or third-party files are added.

Testing: No code or tests were run, as requested. The author reports Windows sandbox plan checks and two short in-game runs with sibling changes merged locally; complete startup measurements and Linux checks remain outstanding.

Overlaps and merge order: The description identifies adjacent changes in #2726 and a local test dependency on #2742; their current merge status was not available offline.


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

**Recommendation: Request changes.** The cache grant can make the game’s protected files writable by the confined process, and an unusable optional cache folder can prevent the game from starting. The reported run shows cache writes, but the claimed reduction in repeated startup time remains unmeasured. The change grants the Windows AppContainer write access to the NVIDIA cache folder named by the environment, allowing development queue runs to retain driver cache data. It reuses the existing ACL planner, but expands its writable surface and makes an optional cache grant affect launch success. **Blocking (1)**: must change before merging. 1. **L1** `host/sandbox_win_plan.h:321`: The cache path can grant direct write access to files that the sandbox otherwise protects through the broker. (more on the line) **Do:** Reject cache grants that overlap protected game, profile, save, mod or other brokered roots, and test those overlaps. **Should fix (1)**: not blocking, but worth doing before merging. - **L2** `host/sandbox_win_plan.h:321`: Failure to grant this optional cache folder can prevent a sandboxed game from starting. (more on the line) **Do:** Treat failure to grant the optional NVIDIA cache as nonfatal, log that caching is unavailable, and cover an existing but ungrantable cache folder. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L3**: The claimed improvement to repeated shader preparation has not yet been measured. *When:* The reported runs show that bytes are written, but end after three minutes and do not show whether a subsequent complete queue run avoids the reported 15–25 minute preparation. **Do:** Measure completed cold and warm queue starts on the base and this head on the same Windows NVIDIA setup, with interleaved repeated runs and cache sizes. `@fix` can do L1 and L2. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: on Windows 11 with an RTX 4060 Laptop GPU, the author reports that two three-minute confined runs wrote a shared cache that grew to 1.889 GB, whereas the base wrote no queue cache. There are no comparable completed cold and warm startup timings for the base and this change. **Other systems:** The new Windows grant is planned regardless of GPU vendor and can affect any sandboxed launch that inherits the variable. Linux is unchanged. The Windows renderer still measures the default NVIDIA cache instead of the named folder, as the description notes; no timing comparison establishes the effect of that policy on these queue runs. **Switches:** __GL_SHADER_DISK_CACHE_PATH is an existing environment variable, unset by default for normal starts and set by the development queue when absent. The change makes Windows grant its named folder write access; the current unrestricted choice of folder is unsafe for protected game data. **Reviewed:** 2fd3155d47c2 against 5c1cd9f5b1ac: Read the diff, both commit messages, repository rules, pull request template, Windows ACL planner and relevant Windows launch and grant paths, queue environment setup, changed tests, and renderer cache selection. Skimmed the sandbox reference and standards; docs/review-checklist.md and the adjacent Tooling checkout are absent. Large files were reviewed around the changed paths and their dependencies rather than in full.; nothing run (a code review). **Checked and fine:** - Both commits record AI assistance. - The added plan checks exercise the grant and refusal at LOCALAPPDATA; removing the grant makes the positive check fail. - No game-derived files, generated outputs or third-party files are added. **Testing:** No code or tests were run, as requested. The author reports Windows sandbox plan checks and two short in-game runs with sibling changes merged locally; complete startup measurements and Linux checks remain outstanding. **Overlaps and merge order:** The description identifies adjacent changes in #2726 and a local test dependency on #2742; their current merge status was not available offline. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -316,1 +318,4 @@
sbxw_add(p, in, in->shader_store, SBXW_WRITE, 1, "the renderer's shader store");
/* (NVIDIA's Windows driver files its cache in the folder __GL_SHADER_DISK_CACHE_PATH names, and keeps none at all in one it
cannot open: by ACL, as the drivers' own caches above, since the driver opens it itself) */
sbxw_add(p, in, in->nv_cache_dir, SBXW_WRITE, 1, "NVIDIA's shader cache (__GL_SHADER_DISK_CACHE_PATH)");
Member

L1 (blocking): The cache path can grant direct write access to files that the sandbox otherwise protects through the broker.

When: If __GL_SHADER_DISK_CACHE_PATH names the game folder, or a folder containing a profile's mods or saves, and that path is below the protected top-level folders, sbxw_add accepts it as an inherited write ACL. The confined process can then modify those files directly, bypassing the broker's read-only and restricted-write roots.

Do: Reject cache grants that overlap protected game, profile, save, mod or other brokered roots, and test those overlaps.

**L1** (blocking): The cache path can grant direct write access to files that the sandbox otherwise protects through the broker. *When:* If __GL_SHADER_DISK_CACHE_PATH names the game folder, or a folder containing a profile's mods or saves, and that path is below the protected top-level folders, sbxw_add accepts it as an inherited write ACL. The confined process can then modify those files directly, bypassing the broker's read-only and restricted-write roots. **Do:** Reject cache grants that overlap protected game, profile, save, mod or other brokered roots, and test those overlaps.
Member

L2 (should fix): Failure to grant this optional cache folder can prevent a sandboxed game from starting.

When: If the inherited variable names an existing directory the user can read but cannot change permissions on, grant fails and sbxw_grant_failed treats the existing writable-folder grant as fatal. This happens even on a non-NVIDIA GPU, although the game could run without this cache.

Do: Treat failure to grant the optional NVIDIA cache as nonfatal, log that caching is unavailable, and cover an existing but ungrantable cache folder.

**L2** (should fix): Failure to grant this optional cache folder can prevent a sandboxed game from starting. *When:* If the inherited variable names an existing directory the user can read but cannot change permissions on, grant fails and sbxw_grant_failed treats the existing writable-folder grant as fatal. This happens even on a non-NVIDIA GPU, although the game could run without this cache. **Do:** Treat failure to grant the optional NVIDIA cache as nonfatal, log that caching is unavailable, and cover an existing but ungrantable cache folder.
ChloeNow changed title from WIP: fix(sandbox): Windows grants the folder __GL_SHADER_DISK_CACHE_PATH names, NVIDIA's shader cache to WIP: fix(dev): the queue names no NVIDIA cache folder for a game the Windows sandbox confines 2026-11-28 20:02:16 +00:00
Author
Contributor

Reworked: instead of granting the queue's NVIDIA cache folder to the sandboxed game (a wider sandbox, against the builder-as-broker plan), the queue now names no such folder for a game the Windows sandbox confines, so the confined driver keeps its cache in the container's own folder. Tested in game: a sandboxed start through the queue made and wrote the container's cache (42.9 MB in 150 s), where mod-api's queue made none.

Reworked: instead of granting the queue's NVIDIA cache folder to the sandboxed game (a wider sandbox, against the builder-as-broker plan), the queue now names no such folder for a game the Windows sandbox confines, so the confined driver keeps its cache in the container's own folder. Tested in game: a sandboxed start through the queue made and wrote the container's cache (42.9 MB in 150 s), where mod-api's queue made none.
ChloeNow force-pushed fix/sandbox-nv-cache-dir from 2fd3155d47
All checks were successful
PR description / Title and description (pull_request_target) Successful in 8s
to 2bfb7902cf
Some checks failed
PR description / Title and description (pull_request_target) Failing after 10s
2026-11-28 20:02:18 +00:00
Compare
Owner
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The change removes the proposed sandbox grant and a Windows run shows the container cache being written. The claimed reduction in repeated shader preparation still needs a comparison across repeated starts. Recommend approval; not approved on the forge.

Sandboxed Windows GPU jobs no longer receive the queue's NVIDIA cache path, allowing the driver to use the container cache without widening sandbox access. The tradeoff is that development runs share the player's sandboxed cache and may evict entries under a cache size limit.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L3: The claimed improvement to repeated shader preparation has not yet been measured. When: The reported runs show that bytes are written, but end after three minutes and do not show whether a subsequent complete queue run avoids the reported 15–25 minute preparation. Do: Measure completed cold and warm queue starts on the base and this head on the same Windows NVIDIA setup, with interleaved repeated runs and cache sizes.

Since the last review (on 2fd3155d47)
Resolved: L1 (The cache path can grant direct write access to files that the sandbox otherwise protects…); L2 (Failure to grant this optional cache folder can prevent a sandboxed game from starting.)
Still open: L3 (The claimed improvement to repeated shader preparation has not yet been measured.)

Also noticed (1; not asked for, not blocking)
  • The reported cache-sharing risk can evict a player's cached pipelines when the NVIDIA cache has a size limit.
More: does it help, other systems, switches, what was read

Does it help: Unproven for repeated-start time: on Windows 11 with an RTX 4060 Laptop GPU, the reported run wrote 42.9 MB to the container cache in 150 seconds, versus no cache folder on the base. No repeated-start preparation times are reported.

Other systems: Linux and Windows build jobs retain the existing queue cache policy; caller-provided paths are preserved. The reported game run covers Windows NVIDIA; the Linux queue test and other hardware runs are not reported.

Switches: No switches added, changed or removed. Existing HOS_SANDBOX and NVIDIA cache variables determine the queue's behavior.

Reviewed: 2bfb7902cf against 5c1cd9f5b1: Read the repository rules, pull request template, diff, commits and changed files; traced job_env, its caller, modes and the former sandbox grant. The combined output for the full changed files was truncated; the surrounding sandbox code and tests were skimmed. The Tooling repository and docs/review-checklist.md were absent.; nothing run (a code review).

Checked and fine:

  • The Windows GPU modes omit the queue path with the sandbox enabled and retain it with HOS_SANDBOX=0.
  • The changed test covers the Windows modes, caller-provided path, build mode and Linux policy.

Testing: The author reports a Windows NVIDIA game run and a game-free regression test; repeated-start timing remains outstanding. No tests or project scripts were run during this review.

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


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

**Recommendation: Approve.** The code is ready: only testing is left. The change removes the proposed sandbox grant and a Windows run shows the container cache being written. The claimed reduction in repeated shader preparation still needs a comparison across repeated starts. Recommend approval; not approved on the forge. Sandboxed Windows GPU jobs no longer receive the queue's NVIDIA cache path, allowing the driver to use the container cache without widening sandbox access. The tradeoff is that development runs share the player's sandboxed cache and may evict entries under a cache size limit. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L3**: The claimed improvement to repeated shader preparation has not yet been measured. *When:* The reported runs show that bytes are written, but end after three minutes and do not show whether a subsequent complete queue run avoids the reported 15–25 minute preparation. **Do:** Measure completed cold and warm queue starts on the base and this head on the same Windows NVIDIA setup, with interleaved repeated runs and cache sizes. **Since the last review** (on 2fd3155d47c2) Resolved: L1 (The cache path can grant direct write access to files that the sandbox otherwise protects…); L2 (Failure to grant this optional cache folder can prevent a sandboxed game from starting.) Still open: L3 (The claimed improvement to repeated shader preparation has not yet been measured.) <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - The reported cache-sharing risk can evict a player's cached pipelines when the NVIDIA cache has a size limit. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for repeated-start time: on Windows 11 with an RTX 4060 Laptop GPU, the reported run wrote 42.9 MB to the container cache in 150 seconds, versus no cache folder on the base. No repeated-start preparation times are reported. **Other systems:** Linux and Windows build jobs retain the existing queue cache policy; caller-provided paths are preserved. The reported game run covers Windows NVIDIA; the Linux queue test and other hardware runs are not reported. **Switches:** No switches added, changed or removed. Existing HOS_SANDBOX and NVIDIA cache variables determine the queue's behavior. **Reviewed:** 2bfb7902cf86 against 5c1cd9f5b1ac: Read the repository rules, pull request template, diff, commits and changed files; traced job_env, its caller, modes and the former sandbox grant. The combined output for the full changed files was truncated; the surrounding sandbox code and tests were skimmed. The Tooling repository and docs/review-checklist.md were absent.; nothing run (a code review). **Checked and fine:** - The Windows GPU modes omit the queue path with the sandbox enabled and retain it with HOS_SANDBOX=0. - The changed test covers the Windows modes, caller-provided path, build mode and Linux policy. **Testing:** The author reports a Windows NVIDIA game run and a game-free regression test; repeated-start timing remains outstanding. No tests or project scripts were run during this review. **Overlaps and merge order:** Not checked; network access is unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
HumanBean changed title from WIP: fix(dev): the queue names no NVIDIA cache folder for a game the Windows sandbox confines to fix(dev): the queue names no NVIDIA cache folder for a game the Windows sandbox confines 2026-11-29 17:13:06 +00:00
HumanBean merged commit a7cd1e7335 into mod-api 2026-11-29 17:13:16 +00:00
HumanBean deleted branch fix/sandbox-nv-cache-dir 2026-11-29 17:13:16 +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!2751
No description provided.