xcl run: coordinate worker claims via OS locks and recover incomplete builds #2712

Open
github-bot wants to merge 1 commit from github-bot/gh-2712 into nvidia-dev AGit
Owner

@⁠ZekkJJ on GitHub · 2026-11-26 07:59 UTC · original
ZekkJJ:fix/safe-claim-ownership → nvidia-dev · +728 −122 · 1 files · 1 commits · draft

Hardens multi-worker offline compute pipeline preparation (crates/xcl/src/shaders.rs) against missing cache directories, corrupt cached blobs, timeout claim theft, orphaned .claim deadlocks, and silent incomplete worker termination.

Part of #2688 (Workstream 7). Based on nvidia-dev (af2cecc4).

What is in it

  • crates/xcl/src/shaders.rs:
    • Ensure cache directories exist before .claim acquisition and separate lock contention (HeldElsewhere) from filesystem errors (Unavailable).
    • Coordinate both missing and rejected/corrupt cached blobs (try_cached_pso + Claim::acquire + post-claim cache reload recheck), holding ID3DBlob alive across atomic driver_cache::write replacement and warning/counting failed writes.
    • Enforce exclusive .claim ownership with Windows share_mode(0) | FILE_FLAG_DELETE_ON_CLOSE (with DELETE access and bounded ERROR_ACCESS_DENIED retry for transient STATUS_DELETE_PENDING) so active builds are never stolen after 30 minutes, crashed/killed workers release locks immediately, and unlocked orphaned .claim files from older builds are adopted and deleted on drop.
    • Guard intra-process builds with PipelineCacheIdentity and panic-safe InflightGuard/RunningPermit drop guards.
    • Emit structured compute pipelines: worker summaries on stderr under XCL_PRECOMPILE_PARENT, run automatic single-worker recovery on worker failure/missing summary, and return Err whenever incomplete pipelines remain.

Tested

  • Hardware: Windows 11, AMD Ryzen 7 8845HS, NVIDIA GeForce RTX 4060 Laptop GPU (driver 32.0.16.1656), rustc 1.98.1 (48a229cea).
  • cargo test --locked -j 2 -p xcl --lib shaders:: -- --test-threads=1: 25 passed; 0 failed; 0 ignored (1.09s; SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required) and retail_pack_sample skipped without XCL_SAMPLE_RPF). Covers OS subprocess tests for TerminateProcess claim release, 4-worker simultaneous races over missing and corrupt blobs, orphaned .claim adoption, >2h active claim preservation, failed writes, InflightGuard panic unwinding, and worker recovery policy.
  • cargo test --locked -j 2 -p xcl --test e2e -- --test-threads=1: 4 passed; 0 failed; 0 ignored (18.85s).
  • cargo build --locked --release -j 2 -p xcl: passed (0 errors).
  • Matched release CLI multi-worker verification (8b113eeb release binary, isolated caches, captured compute shader corpus with 69 pipeline entries / 43 unique native driver blobs):
    • fresh_w4: 4/4 workers exited 0 in 72,195.44 ms (65 made, 22 from_disk, 4 elsewhere, 0 errors, 0 write_errors, 43/43 blobs present, 0 leftover .claim/.tmp, peak aggregate commit 1,516.23 MiB); warm 1-worker verification hit 69/69 from_disk in 5,340.57 ms.
    • corrupt_w4 (pre-corrupted driver blobs): 4/4 workers exited 0 in 76,181.68 ms (66 made, 23 from_disk, 3 elsewhere, 0 leftover corrupt blobs/claims/tmps, 43/43 valid); warm verification hit 69/69 from_disk in 4,325.83 ms.
    • orphan_claims_w4 (pre-seeded unlocked .claim files): 4/4 workers exited 0 in 61,108.44 ms (65 made, 22 from_disk, 4 elsewhere, 43/43 blobs, 0 leftover .claim files).
    • kill_recovery_w2: terminating 1 of 2 workers (exit -1, 0) left 10 missing blobs and 0 orphaned .claim locks; single-worker recovery finished exit 0 in 104,600.68 ms (69 made, 59 from_disk, 43/43 blobs, 0 claims/tmps); warm verification hit 69/69 from_disk in 5,103.05 ms.
  • Clean nvidia-dev (af2cecc4) baseline comparison on this host (--test-threads=1): shaders::tests 11 passed, 0 failed, e2e 4 passed, 0 failed; pre-existing baseline failures on unmodified af2cecc4 in texture_upload::tests (6 passed, 2 failed), d3d12_mesh_stream (2 passed, 1 failed), gpu_compute_e2e (6 passed, 1 failed), and gpu_two_pass_cache_e2e (0 passed, 1 failed).

Regression run

  • Draft PR pending paired scripts/smoke.ps1 execution on an unpacked retail build before marking ready for review.

Not tested

  • Full cargo test --workspace after the final commit (unmodified af2cecc4 baseline already fails in texture_upload::tests, d3d12_mesh_stream, gpu_compute_e2e, and gpu_two_pass_cache_e2e), paired scripts/smoke.ps1 (no retail title directory on this machine), AMD / Intel GPUs, Linux / Wine.

AI use

  • Google Antigravity (Gemini); assisted with implementation, subprocess/unit/GPU tests, multi-worker release verification, and PR preparation under author direction.
**@⁠ZekkJJ** on GitHub · 2026-11-26 07:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/2712) `ZekkJJ:fix/safe-claim-ownership` → `nvidia-dev` · +728 −122 · 1 files · 1 commits · draft Hardens multi-worker offline compute pipeline preparation (`crates/xcl/src/shaders.rs`) against missing cache directories, corrupt cached blobs, timeout claim theft, orphaned `.claim` deadlocks, and silent incomplete worker termination. Part of #2688 (Workstream 7). Based on `nvidia-dev` (`af2cecc4`). **What is in it** - `crates/xcl/src/shaders.rs`: - Ensure cache directories exist before `.claim` acquisition and separate lock contention (`HeldElsewhere`) from filesystem errors (`Unavailable`). - Coordinate both missing and rejected/corrupt cached blobs (`try_cached_pso` + `Claim::acquire` + post-claim cache reload recheck), holding `ID3DBlob` alive across atomic `driver_cache::write` replacement and warning/counting failed writes. - Enforce exclusive `.claim` ownership with Windows `share_mode(0) | FILE_FLAG_DELETE_ON_CLOSE` (with `DELETE` access and bounded `ERROR_ACCESS_DENIED` retry for transient `STATUS_DELETE_PENDING`) so active builds are never stolen after 30 minutes, crashed/killed workers release locks immediately, and unlocked orphaned `.claim` files from older builds are adopted and deleted on drop. - Guard intra-process builds with `PipelineCacheIdentity` and panic-safe `InflightGuard`/`RunningPermit` drop guards. - Emit structured `compute pipelines:` worker summaries on stderr under `XCL_PRECOMPILE_PARENT`, run automatic single-worker recovery on worker failure/missing summary, and return `Err` whenever incomplete pipelines remain. **Tested** - Hardware: Windows 11, AMD Ryzen 7 8845HS, NVIDIA GeForce RTX 4060 Laptop GPU (driver `32.0.16.1656`), `rustc 1.98.1` (`48a229cea`). - `cargo test --locked -j 2 -p xcl --lib shaders:: -- --test-threads=1`: `25 passed; 0 failed; 0 ignored` (`1.09s`; `SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required)` and `retail_pack_sample` skipped without `XCL_SAMPLE_RPF`). Covers OS subprocess tests for `TerminateProcess` claim release, 4-worker simultaneous races over missing and corrupt blobs, orphaned `.claim` adoption, `>2h` active claim preservation, failed writes, `InflightGuard` panic unwinding, and worker recovery policy. - `cargo test --locked -j 2 -p xcl --test e2e -- --test-threads=1`: `4 passed; 0 failed; 0 ignored` (`18.85s`). - `cargo build --locked --release -j 2 -p xcl`: passed (`0` errors). - Matched release CLI multi-worker verification (`8b113eeb` release binary, isolated caches, captured compute shader corpus with 69 pipeline entries / 43 unique native driver blobs): - `fresh_w4`: 4/4 workers exited `0` in `72,195.44 ms` (`65 made, 22 from_disk, 4 elsewhere, 0 errors, 0 write_errors`, `43/43` blobs present, `0` leftover `.claim`/`.tmp`, peak aggregate commit `1,516.23 MiB`); warm 1-worker verification hit `69/69 from_disk` in `5,340.57 ms`. - `corrupt_w4` (pre-corrupted driver blobs): 4/4 workers exited `0` in `76,181.68 ms` (`66 made, 23 from_disk, 3 elsewhere`, `0` leftover corrupt blobs/claims/tmps, `43/43` valid); warm verification hit `69/69 from_disk` in `4,325.83 ms`. - `orphan_claims_w4` (pre-seeded unlocked `.claim` files): 4/4 workers exited `0` in `61,108.44 ms` (`65 made, 22 from_disk, 4 elsewhere`, `43/43` blobs, `0` leftover `.claim` files). - `kill_recovery_w2`: terminating 1 of 2 workers (`exit -1, 0`) left `10` missing blobs and `0` orphaned `.claim` locks; single-worker recovery finished `exit 0` in `104,600.68 ms` (`69 made, 59 from_disk`, `43/43` blobs, `0` claims/tmps); warm verification hit `69/69 from_disk` in `5,103.05 ms`. - Clean `nvidia-dev` (`af2cecc4`) baseline comparison on this host (`--test-threads=1`): `shaders::tests` `11 passed, 0 failed`, `e2e` `4 passed, 0 failed`; pre-existing baseline failures on unmodified `af2cecc4` in `texture_upload::tests` (`6 passed, 2 failed`), `d3d12_mesh_stream` (`2 passed, 1 failed`), `gpu_compute_e2e` (`6 passed, 1 failed`), and `gpu_two_pass_cache_e2e` (`0 passed, 1 failed`). **Regression run** - Draft PR pending paired `scripts/smoke.ps1` execution on an unpacked retail build before marking ready for review. **Not tested** - Full `cargo test --workspace` after the final commit (unmodified `af2cecc4` baseline already fails in `texture_upload::tests`, `d3d12_mesh_stream`, `gpu_compute_e2e`, and `gpu_two_pass_cache_e2e`), paired `scripts/smoke.ps1` (no retail title directory on this machine), AMD / Intel GPUs, Linux / Wine. **AI use** - Google Antigravity (`Gemini`); assisted with implementation, subprocess/unit/GPU tests, multi-worker release verification, and PR preparation under author direction.
Ensure cache directories exist before claiming, coordinate both missing and rejected/corrupt cached blobs, use Windows share_mode(0) + FILE_FLAG_DELETE_ON_CLOSE so active builds are never stolen by timeout while dead worker claims release immediately, recheck cache validity after acquiring ownership, adopt unlocked orphaned .claim files left by older builds, and run single-worker recovery / fail closed if compute pipelines remain incomplete.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:03:37 +00:00
Author
Owner

@⁠gsucristo on GitHub · 2026-11-26 08:10 UTC · original · reviewed

Nice hardening overall — replacing the timeout-based .claim heuristic with share_mode(0) | FILE_FLAG_DELETE_ON_CLOSE + DELETE access is the right primitive on Windows (and maps cleanly to wineserver handle teardown on Wine/Proton), ID3DBlob stays alive across driver_cache::write, the InflightGuard / RunningPermit / DescGuard drop guards have clean lock ordering (inflight before running) and panic safety, and the OS subprocess tests cover the tricky failure modes well.

A few concrete issues and nits I noticed while reading through crates/xcl/src/shaders.rs:

1. Deterministic worker failures trigger a redundant recovery pass and lose the error breakdown

In precompile, a worker running under XCL_PRECOMPILE_PARENT prints the compute pipelines: ... summary to stderr and then returns Err(...) whenever failed + refused + capped + write_failures > 0, causing the worker process to exit non-zero (worker_failures > 0).

In evaluate_compute_workers, worker_failures > 0 is checked before inspecting totals:

if worker_failures > 0 || parsed < workers {
    return ComputeWorkersOutcome::NeedsRecovery(...);
}
let [_, refused, _, _, capped, record_errors, write_errors] = totals;
if refused + capped + record_errors + write_errors > 0 {
    return ComputeWorkersOutcome::Incomplete(...);
}

Because of that ordering:

  • Any deterministic capped, refused, or record_errors count causes evaluate_compute_workers to return NeedsRecovery instead of Incomplete, re-running the entire pack in a single-worker recovery pass.
  • When that recovery worker hits the same failure and exits non-zero, evaluate_compute_workers(1, 1, &rec_summaries) hits NeedsRecovery again and returns "Shader preparation incomplete after worker failure: 1 of 1 workers failed (1/1 reported completion)", hiding the actual refused/capped/record_errors/write_errors counts.
  • (compute_summary_and_worker_policy_enforce_recovery_and_completeness didn't catch this because it passes worker_failures = 0 for the Incomplete cases.)

Checking if parsed == workers && refused + capped + record_errors + write_errors > 0 { return ComputeWorkersOutcome::Incomplete(...); } before the worker_failures > 0 branch (or letting workers exit 0 after emitting their summary and letting the parent fail on totals) would fix both issues.

2. Double driver_cache::load on the hot path

In make_one:

  • let initial_cached = path.as_deref().and_then(driver_cache::load); reads the entire .pso file even when !over_cap, then discards it and reads the file again after acquiring InflightGuard and RunningPermit.
  • Guarding the first read with if over_cap (e.g. if over_cap && path.as_deref().and_then(driver_cache::load).is_none()) avoids doubling file reads/allocations for normal cached pipelines.

3. Windows rename contention when replacing a corrupt blob

Concurrent workers call driver_cache::load(path) before Claim::acquire(path). When the claim owner replaces a corrupt blob via driver_cache::write (std::fs::rename(&tmp, p)), a concurrent reader still inside std::fs::read(path) can transiently cause rename to fail with ERROR_ACCESS_DENIED on Windows (Rust's std::fs::rename does not use FILE_RENAME_FLAG_POSIX_SEMANTICS). Right now that increments write_failures and removes path. A short bounded retry on rename in driver_cache::write (similar to the STATUS_DELETE_PENDING retry in Claim::acquire) would avoid spurious write failures under multi-worker contention on corrupt blobs.

4. Minor nits

  • try_cached_pso leaves a dangling pointer in desc.CachedPSO: When try_cached_pso returns None, desc.CachedPSO.pCachedBlob still points to the dropped bytes slice. Line 1729 currently resets desc.0.CachedPSO = Default::default() before the uncached compile so there is no UB today, but clearing desc.CachedPSO inside try_cached_pso before returning keeps the helper self-contained.
  • XCL_PRECOMPILE_SLICE in recovery: worker_command strips XCL_HOST, XCL_PREPARATION_PARENT, etc., but not XCL_PRECOMPILE_SLICE. Clearing XCL_PRECOMPILE_SLICE in worker_command (or in the recovery pass) ensures an inherited env var can't restrict the single-worker recovery pass to a single slice.
  • Claim::acquire backoff & Unavailable cleanup: 3 × 2ms (6 ms) for transient STATUS_DELETE_PENDING is usually plenty, though under antivirus/filter-driver load on Windows a slightly longer stepped backoff (e.g. 2, 5, 10, 20 ms) is cheap and reduces spurious Unavailable fallbacks. Also, if claim.is_none() (Unavailable), consider skipping std::fs::remove_file(path) on had_corrupt so an uncoordinated worker can't delete a blob another worker just published.
  • Stale comment on over_cap: The comment above if initial_cached.is_none() && over_cap still says "the pass finishes without it, and the runtime builds it when a title needs the pipeline", whereas pipelines_in_workers now fails closed with Err when capped > 0 (matching single-worker precompile). Worth confirming whether capped > 0 should fail multi-worker launch preparation or if the comment should be updated.
**@⁠gsucristo** on GitHub · 2026-11-26 08:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2712#pullrequestreview-6070485575) · **reviewed** Nice hardening overall — replacing the timeout-based `.claim` heuristic with `share_mode(0) | FILE_FLAG_DELETE_ON_CLOSE` + `DELETE` access is the right primitive on Windows (and maps cleanly to `wineserver` handle teardown on Wine/Proton), `ID3DBlob` stays alive across `driver_cache::write`, the `InflightGuard` / `RunningPermit` / `DescGuard` drop guards have clean lock ordering (`inflight` before `running`) and panic safety, and the OS subprocess tests cover the tricky failure modes well. A few concrete issues and nits I noticed while reading through `crates/xcl/src/shaders.rs`: ### 1. Deterministic worker failures trigger a redundant recovery pass and lose the error breakdown In `precompile`, a worker running under `XCL_PRECOMPILE_PARENT` prints the `compute pipelines: ...` summary to stderr and then returns `Err(...)` whenever `failed + refused + capped + write_failures > 0`, causing the worker process to exit non-zero (`worker_failures > 0`). In `evaluate_compute_workers`, `worker_failures > 0` is checked **before** inspecting `totals`: ```rust if worker_failures > 0 || parsed < workers { return ComputeWorkersOutcome::NeedsRecovery(...); } let [_, refused, _, _, capped, record_errors, write_errors] = totals; if refused + capped + record_errors + write_errors > 0 { return ComputeWorkersOutcome::Incomplete(...); } ``` Because of that ordering: - Any deterministic `capped`, `refused`, or `record_errors` count causes `evaluate_compute_workers` to return `NeedsRecovery` instead of `Incomplete`, re-running the entire pack in a single-worker recovery pass. - When that recovery worker hits the same failure and exits non-zero, `evaluate_compute_workers(1, 1, &rec_summaries)` hits `NeedsRecovery` again and returns `"Shader preparation incomplete after worker failure: 1 of 1 workers failed (1/1 reported completion)"`, hiding the actual `refused`/`capped`/`record_errors`/`write_errors` counts. - (`compute_summary_and_worker_policy_enforce_recovery_and_completeness` didn't catch this because it passes `worker_failures = 0` for the `Incomplete` cases.) Checking `if parsed == workers && refused + capped + record_errors + write_errors > 0 { return ComputeWorkersOutcome::Incomplete(...); }` before the `worker_failures > 0` branch (or letting workers exit 0 after emitting their summary and letting the parent fail on `totals`) would fix both issues. ### 2. Double `driver_cache::load` on the hot path In `make_one`: - `let initial_cached = path.as_deref().and_then(driver_cache::load);` reads the entire `.pso` file even when `!over_cap`, then discards it and reads the file again after acquiring `InflightGuard` and `RunningPermit`. - Guarding the first read with `if over_cap` (e.g. `if over_cap && path.as_deref().and_then(driver_cache::load).is_none()`) avoids doubling file reads/allocations for normal cached pipelines. ### 3. Windows `rename` contention when replacing a corrupt blob Concurrent workers call `driver_cache::load(path)` *before* `Claim::acquire(path)`. When the claim owner replaces a corrupt blob via `driver_cache::write` (`std::fs::rename(&tmp, p)`), a concurrent reader still inside `std::fs::read(path)` can transiently cause `rename` to fail with `ERROR_ACCESS_DENIED` on Windows (Rust's `std::fs::rename` does not use `FILE_RENAME_FLAG_POSIX_SEMANTICS`). Right now that increments `write_failures` and removes `path`. A short bounded retry on `rename` in `driver_cache::write` (similar to the `STATUS_DELETE_PENDING` retry in `Claim::acquire`) would avoid spurious write failures under multi-worker contention on corrupt blobs. ### 4. Minor nits - **`try_cached_pso` leaves a dangling pointer in `desc.CachedPSO`**: When `try_cached_pso` returns `None`, `desc.CachedPSO.pCachedBlob` still points to the dropped `bytes` slice. Line 1729 currently resets `desc.0.CachedPSO = Default::default()` before the uncached compile so there is no UB today, but clearing `desc.CachedPSO` inside `try_cached_pso` before returning keeps the helper self-contained. - **`XCL_PRECOMPILE_SLICE` in recovery**: `worker_command` strips `XCL_HOST`, `XCL_PREPARATION_PARENT`, etc., but not `XCL_PRECOMPILE_SLICE`. Clearing `XCL_PRECOMPILE_SLICE` in `worker_command` (or in the recovery pass) ensures an inherited env var can't restrict the single-worker recovery pass to a single slice. - **`Claim::acquire` backoff & `Unavailable` cleanup**: `3 × 2ms` (6 ms) for transient `STATUS_DELETE_PENDING` is usually plenty, though under antivirus/filter-driver load on Windows a slightly longer stepped backoff (e.g. `2, 5, 10, 20 ms`) is cheap and reduces spurious `Unavailable` fallbacks. Also, if `claim.is_none()` (`Unavailable`), consider skipping `std::fs::remove_file(path)` on `had_corrupt` so an uncoordinated worker can't delete a blob another worker just published. - **Stale comment on `over_cap`**: The comment above `if initial_cached.is_none() && over_cap` still says *"the pass finishes without it, and the runtime builds it when a title needs the pipeline"*, whereas `pipelines_in_workers` now fails closed with `Err` when `capped > 0` (matching single-worker `precompile`). Worth confirming whether `capped > 0` should fail multi-worker launch preparation or if the comment should be updated.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 08:12 UTC · original · reviewed

At head 8b113eeb3e306ba85aefcd3d146bbcbb25f07199, the four race_and_publish subprocesses only wait for the go file. The winner holds the .claim for a fixed 40 ms (shaders.rs:2018), then releases it; the parent later requires exactly one OUTCOME=ACQUIRED (shaders.rs:2181). A child delayed by process startup or scheduling for more than 40 ms can first try Claim::acquire after the winner has released it, legitimately acquire a second time, and fail this test despite correct exclusive ownership. Could the winner wait, with a bounded timeout, until the other children acknowledge their acquisition attempts before releasing, or could the assertion test non-overlap without assuming all attempts fit inside 40 ms? This would make the subprocess test robust on loaded CI hosts.

This is a source-derived test-race review of the exact head; I did not run a delayed-child reproduction. AI use: OpenAI Codex (GPT-6.2 Sol) identified the interleaving, and I checked the child role and parent assertion before posting.

**@⁠luckyteagirl** on GitHub · 2026-11-26 08:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/2712#pullrequestreview-6070505620) · **reviewed** At head `8b113eeb3e306ba85aefcd3d146bbcbb25f07199`, the four `race_and_publish` subprocesses only wait for the `go` file. The winner holds the `.claim` for a fixed 40 ms (`shaders.rs:2018`), then releases it; the parent later requires exactly one `OUTCOME=ACQUIRED` (`shaders.rs:2181`). A child delayed by process startup or scheduling for more than 40 ms can first try `Claim::acquire` after the winner has released it, legitimately acquire a second time, and fail this test despite correct exclusive ownership. Could the winner wait, with a bounded timeout, until the other children acknowledge their acquisition attempts before releasing, or could the assertion test non-overlap without assuming all attempts fit inside 40 ms? This would make the subprocess test robust on loaded CI hosts. This is a source-derived test-race review of the exact head; I did not run a delayed-child reproduction. AI use: OpenAI Codex (GPT-6.2 Sol) identified the interleaving, and I checked the child role and parent assertion before posting.
Author
Owner

@⁠KDenKC on GitHub · 2026-11-26 08:12 UTC · original

Source review of 8b113eeb, no run. A refused or capped pipeline seems to take the recovery path instead of Incomplete:

  • A worker runs with XCL_PRECOMPILE_PARENT set, so precompile returns Err when failed + refused + capped + write_failures > 0 (shaders.rs:2847). The worker then exits non-zero, and in_workers counts it in failed (:2449-2451).
  • evaluate_compute_workers checks worker_failures > 0 first (:2316), so the result is NeedsRecovery, never Incomplete. The refused/capped counts from the summaries are not reported.
  • The recovery pass is a whole second compute pass on one worker (:2359). Its worker meets the same refusal, exits non-zero, and the pass ends in Err("… incomplete after worker failure …"). That reaches prepare_for_launch through ? (:1843), and xcl run stops before the title.

So one pipeline the driver refuses, or one over XCL_PIPELINE_MAX_KB, costs a full single-worker pass and then the launch. If Incomplete is meant for that case, the worker could exit 0 after printing its summary when only refusals, caps or write failures occurred (keeping a non-zero exit for crashes and record failures). evaluate_compute_workers would then see the counts.

Not tested: no build or run of this head on our side. We are running nvidia-dev af2cecc4 cold on an RTX 5090 tonight, and will say here if a refusal shows up there.

AI use: Gemini (Antigravity) flagged it in a review; Claude Code (Claude Opus 5.5) traced it through the source at 8b113eeb and wrote this.

**@⁠KDenKC** on GitHub · 2026-11-26 08:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/2712#issuecomment-7186324971) Source review of `8b113eeb`, no run. A refused or capped pipeline seems to take the recovery path instead of `Incomplete`: - A worker runs with `XCL_PRECOMPILE_PARENT` set, so `precompile` returns `Err` when `failed + refused + capped + write_failures > 0` (`shaders.rs:2847`). The worker then exits non-zero, and `in_workers` counts it in `failed` (`:2449-2451`). - `evaluate_compute_workers` checks `worker_failures > 0` first (`:2316`), so the result is `NeedsRecovery`, never `Incomplete`. The refused/capped counts from the summaries are not reported. - The recovery pass is a whole second compute pass on one worker (`:2359`). Its worker meets the same refusal, exits non-zero, and the pass ends in `Err("… incomplete after worker failure …")`. That reaches `prepare_for_launch` through `?` (`:1843`), and `xcl run` stops before the title. So one pipeline the driver refuses, or one over `XCL_PIPELINE_MAX_KB`, costs a full single-worker pass and then the launch. If `Incomplete` is meant for that case, the worker could exit 0 after printing its summary when only refusals, caps or write failures occurred (keeping a non-zero exit for crashes and record failures). `evaluate_compute_workers` would then see the counts. Not tested: no build or run of this head on our side. We are running `nvidia-dev` `af2cecc4` cold on an RTX 5090 tonight, and will say here if a refusal shows up there. AI use: Gemini (Antigravity) flagged it in a review; Claude Code (Claude Opus 5.5) traced it through the source at `8b113eeb` and wrote this.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2712/head:github-bot/gh-2712'
git switch 'github-bot/gh-2712'

Merge

Merge the changes and update on Forgejo.
git switch 'nvidia-dev'
git merge --no-ff 'github-bot/gh-2712'
git switch 'github-bot/gh-2712'
git rebase 'nvidia-dev'
git switch 'nvidia-dev'
git merge --ff-only 'github-bot/gh-2712'
git switch 'github-bot/gh-2712'
git rebase 'nvidia-dev'
git switch 'nvidia-dev'
git merge --no-ff 'github-bot/gh-2712'
git switch 'nvidia-dev'
git merge --squash 'github-bot/gh-2712'
git switch 'nvidia-dev'
git merge --ff-only 'github-bot/gh-2712'
git switch 'nvidia-dev'
git merge 'github-bot/gh-2712'
git push origin 'nvidia-dev'
This discussion has been locked. Commenting is limited to contributors.
No description provided.