[pr-fix][startup][shaders] Skip stale legacy host pipeline libraries #192

Manually merged
TrustNo1 merged 0 commits from tyr0nsur/Darner:codex/legacy-library-translator into main 2026-12-04 04:21:18 +00:00
Contributor

Refs #188

Contributor role (optional)

  • Fluxer ID:

What it changes

The translator check on main covers the adapter directory. When that directory has no library, the legacy root still opens an unmarked host-pipelines.next or host-pipelines.bin. The same fallback runs when no adapter scope can be found.

Apply the existing translator check before reading the legacy root. The root files remain available to older executables and saves still target the adapter directory when one is known. DARNER_LIBRARY_KEEP_OLD=1 still allows reads from the root, with the pending save taking precedence.

How it was tested

  • Tested revision: b5719f2c8019190c5cd3d4532c4eb61a499fd69c, based on ad070f073168c893a0afb00e0cd5d2ad35309ae0. The earlier main revision f899d8c ran 29 library tests, including the test that confirms its unmarked root fallback.
  • Commands and results:
    • cargo +1.98.1 test --locked --offline -j 2 -p darner-gpu --lib pipeline::library::tests:: -- --test-threads=1 --nocapture passed 30 tests. Both legacy filenames were tested with absent and mismatched markers, with and without a save scope.
    • cargo +1.98.1 clippy --locked --offline -p darner-gpu --all-targets --all-features -j 2 -- -D warnings passed.
    • cargo +1.98.1 run --locked --offline -j 2 --quiet --package xtask -- policy checked 555 files. The staged variant checked the one changed file. git diff --check origin/main...HEAD passed.
  • Changes a default: the existing translator policy now covers legacy root files.
  • A/B result: on a GeForce RTX 4060 8 GiB (621.40, Windows 11 Pro build 26300), the same 2,320-byte synthetic compute pipeline library opened from the legacy root with the override and started empty under the default policy. The legacy bytes matched after both reads. The hardware/WARP test also reopened each adapter's own library.
  • Gates run on that revision: targeted GPU Clippy and library tests, as listed above. Workspace gates were outside this run.
  • Gameplay and shader wave sizes: synthetic D3D12 compute only.
  • Hardware dependence: the selection code is shared. Native driver validation was on the RTX 4060 and WARP.
  • Coverage gaps: gameplay and preload timing.

Checklist

  • Tested with a standalone synthetic D3D12 pipeline and isolated temporary libraries.
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #46 touches the library for opt-in pipeline diagnostics.
  • Replaces or overlaps: the follow-up to 34b0ba7 in #188 for the separately reported legacy root path.
Refs #188 ## Contributor role (optional) - Fluxer ID: ## What it changes The translator check on main covers the adapter directory. When that directory has no library, the legacy root still opens an unmarked `host-pipelines.next` or `host-pipelines.bin`. The same fallback runs when no adapter scope can be found. Apply the existing translator check before reading the legacy root. The root files remain available to older executables and saves still target the adapter directory when one is known. `DARNER_LIBRARY_KEEP_OLD=1` still allows reads from the root, with the pending save taking precedence. ## How it was tested - Tested revision: `b5719f2c8019190c5cd3d4532c4eb61a499fd69c`, based on `ad070f073168c893a0afb00e0cd5d2ad35309ae0`. The earlier main revision `f899d8c` ran 29 library tests, including the test that confirms its unmarked root fallback. - Commands and results: - `cargo +1.98.1 test --locked --offline -j 2 -p darner-gpu --lib pipeline::library::tests:: -- --test-threads=1 --nocapture` passed 30 tests. Both legacy filenames were tested with absent and mismatched markers, with and without a save scope. - `cargo +1.98.1 clippy --locked --offline -p darner-gpu --all-targets --all-features -j 2 -- -D warnings` passed. - `cargo +1.98.1 run --locked --offline -j 2 --quiet --package xtask -- policy` checked 555 files. The staged variant checked the one changed file. `git diff --check origin/main...HEAD` passed. - Changes a default: the existing translator policy now covers legacy root files. - A/B result: on a GeForce RTX 4060 8 GiB (621.40, Windows 11 Pro build 26300), the same 2,320-byte synthetic compute pipeline library opened from the legacy root with the override and started empty under the default policy. The legacy bytes matched after both reads. The hardware/WARP test also reopened each adapter's own library. - Gates run on that revision: targeted GPU Clippy and library tests, as listed above. Workspace gates were outside this run. - Gameplay and shader wave sizes: synthetic D3D12 compute only. - Hardware dependence: the selection code is shared. Native driver validation was on the RTX 4060 and WARP. - Coverage gaps: gameplay and preload timing. ## Checklist - [x] Tested with a standalone synthetic D3D12 pipeline and isolated temporary libraries. - [x] This PR contains one change based on main. - [x] The diff follows docs/asset-policy.md. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #46 touches the library for opt-in pipeline diagnostics. - Replaces or overlaps: the follow-up to 34b0ba7 in #188 for the separately reported legacy root path.
Contributor

I independently checked the same root guard with a temporary-directory CPU regression on f899d8c. The test-only baseline failed because it selected an unmarked root library. With the local guard, the exact test passed across fresh processes with DARNER_LIBRARY_KEEP_OLD unset, 0, and 1. The fixture also checked pending-file precedence, matching markers, and preservation of the root files.

One compatibility question: when adapter identification fails, rejecting the legacy library starts the run cold without a save destination. Is that the intended default for this case?

I independently checked the same root guard with a temporary-directory CPU regression on f899d8c. The test-only baseline failed because it selected an unmarked root library. With the local guard, the exact test passed across fresh processes with DARNER_LIBRARY_KEEP_OLD unset, 0, and 1. The fixture also checked pending-file precedence, matching markers, and preservation of the root files. One compatibility question: when adapter identification fails, rejecting the legacy library starts the run cold without a save destination. Is that the intended default for this case?
Author
Contributor

Yes, the default is intentionally cold for a legacy root library without a matching translator marker. When the adapter cannot be identified, main already has no save destination.

I checked this on Windows with an RTX 4060 at b5719f2. The test passed None as the adapter scope and opened a 2,320-byte synthetic D3D12 library. The default started with an empty library (warm=false), and the override opened the legacy root library (warm=true). Both saves returned zero bytes with an eligible entry count, and the original root file was byte-identical. With a matching translator marker the default also opened the root library.

The test simulated a missing adapter scope. It did not measure preload timing or exercise an actual adapter identification failure.

Yes, the default is intentionally cold for a legacy root library without a matching translator marker. When the adapter cannot be identified, main already has no save destination. I checked this on Windows with an RTX 4060 at `b5719f2`. The test passed `None` as the adapter scope and opened a 2,320-byte synthetic D3D12 library. The default started with an empty library (`warm=false`), and the override opened the legacy root library (`warm=true`). Both saves returned zero bytes with an eligible entry count, and the original root file was byte-identical. With a matching translator marker the default also opened the root library. The test simulated a missing adapter scope. It did not measure preload timing or exercise an actual adapter identification failure.
TrustNo1 manually merged commit f3840d73d3 into main 2026-12-04 04:21:18 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 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
TrustNo1/Darner!192
No description provided.