xcl run: report log write failures once #2634

Open
github-bot wants to merge 1 commit from github-bot/gh-2634 into main AGit
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 03:34 UTC · original
luckyteagirl:codex/log-write-failure → main · +108 −6 · 2 files · 1 commits · open

Follow-up to #2286, which reports log-open and report.json write failures. If an xcl.log write or flush fails after the file opens, the logger currently drops the error and later diagnostics disappear silently. This reports the first mid-run failure once on stderr and continues the run. Part of #2277.

What is in it

  • crates/xcl/src/log.rs: report the first write_all or flush failure once per process; injected failing writers cover write and flush failures and verify the logger continues trying to flush.
  • README.md: document the once-only stderr report and continued execution.

Tested

  • Windows 11 Home build 26200, AMD Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), x86_64-pc-windows-msvc, Rust 1.99.0; debug builds. The workspace run selected no GPU (XCL_ADAPTER=nomatch); the title smoke selected the RX 6800M.
  • cargo test --locked -p xcl --lib log::tests -- --test-threads=1 --show-output: 3 passed, 0 failed, 0 ignored, 1335 filtered out.
  • cargo build --locked --workspace -j 2: passed (3 existing warnings: 2 deprecated atomic fetch_update calls and 1 dead-code field).
  • XCL_ADAPTER=nomatch cargo test --locked --workspace --no-fail-fast -j 1 -- --test-threads=1 --show-output: 37 target summaries, 1437 passed, 0 failed, 47 ignored. It printed 138 SKIPPED notices: 120 no GPU notices across 2 tests, 15 no GPU with 32-lane waves, 1 no wave32 GPU, 1 no wave64, and 1 unsupported reserved-cube capability. These notices are not GPU coverage.
  • Independent RTX 3060 report on this exact clean head: cargo test --workspace --no-fail-fast -- --test-threads=4 completed with 1,437 passed, 0 failed, 47 ignored, and 25 explicit GPU skips (native wave64 and refused per-lane forms). Both targeted write/flush error tests passed 30 of 30 repeated runs; the three log:: tests passed 30 of 30 runs at eight test threads. These are the independent reporter's results, not our RX 6800M workspace run.

Regression run

  • Main (b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7):
    xcl-smoke v1
    commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
    gpu: AMD Radeon RX 6800M
    title: 2ef5fd64
    seconds: 30
    exit: 0x0
    frames shown: 385 (PresentX 385)
    presents per 2 s (last 3): 51 53 51
    device removals: 0
    crashes: 0
    peak commit: 8284 MB
    
  • This PR (e897ce3032fa482c0f7bd903db0f17cf71e957dd, clean):
    xcl-smoke v1
    commit: e897ce3032fa482c0f7bd903db0f17cf71e957dd
    gpu: AMD Radeon RX 6800M
    title: 2ef5fd64
    seconds: 30
    exit: 0x0
    frames shown: 443 (PresentX 443)
    presents per 2 s (last 3): 56 49 60
    device removals: 0
    crashes: 0
    peak commit: 8304 MB
    

Not tested

  • Full GPU workspace coverage on our RX 6800M; the independent RTX 3060 suite skipped 25 GPU tests. Retail-title behavior when the disk fills or an external process locks/removes the log remains untested; the smoke run did not induce either condition. Focused tests inject write_all and flush errors.

AI use

  • OpenAI Codex (GPT-6; exact serving variant unavailable), with a Luna subagent, implemented the change and tests, ran the stated checks, and prepared this description. I reviewed the code and evidence before publication.
  • OpenAI Codex (GPT-6.2 Astra) verified the independent exact-head report and added its linked results to this description.
**@⁠luckyteagirl** on GitHub · 2026-11-26 03:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/2634) `luckyteagirl:codex/log-write-failure` → `main` · +108 −6 · 2 files · 1 commits · open Follow-up to #2286, which reports log-open and `report.json` write failures. If an `xcl.log` write or flush fails after the file opens, the logger currently drops the error and later diagnostics disappear silently. This reports the first mid-run failure once on stderr and continues the run. Part of #2277. **What is in it** - `crates/xcl/src/log.rs`: report the first `write_all` or flush failure once per process; injected failing writers cover write and flush failures and verify the logger continues trying to flush. - `README.md`: document the once-only stderr report and continued execution. **Tested** - Windows 11 Home build 26200, AMD Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), `x86_64-pc-windows-msvc`, Rust 1.99.0; debug builds. The workspace run selected no GPU (`XCL_ADAPTER=nomatch`); the title smoke selected the RX 6800M. - `cargo test --locked -p xcl --lib log::tests -- --test-threads=1 --show-output`: 3 passed, 0 failed, 0 ignored, 1335 filtered out. - `cargo build --locked --workspace -j 2`: passed (3 existing warnings: 2 deprecated atomic `fetch_update` calls and 1 dead-code field). - `XCL_ADAPTER=nomatch cargo test --locked --workspace --no-fail-fast -j 1 -- --test-threads=1 --show-output`: 37 target summaries, 1437 passed, 0 failed, 47 ignored. It printed 138 `SKIPPED` notices: 120 `no GPU` notices across 2 tests, 15 `no GPU with 32-lane waves`, 1 `no wave32 GPU`, 1 `no wave64`, and 1 unsupported reserved-cube capability. These notices are not GPU coverage. - Independent [RTX 3060 report on this exact clean head](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2634): `cargo test --workspace --no-fail-fast -- --test-threads=4` completed with **1,437 passed, 0 failed, 47 ignored**, and 25 explicit GPU skips (native wave64 and refused per-lane forms). Both targeted write/flush error tests passed 30 of 30 repeated runs; the three `log::` tests passed 30 of 30 runs at eight test threads. These are the independent reporter's results, not our RX 6800M workspace run. **Regression run** - Main (`b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`): ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 30 exit: 0x0 frames shown: 385 (PresentX 385) presents per 2 s (last 3): 51 53 51 device removals: 0 crashes: 0 peak commit: 8284 MB ``` - This PR (`e897ce3032fa482c0f7bd903db0f17cf71e957dd`, clean): ``` xcl-smoke v1 commit: e897ce3032fa482c0f7bd903db0f17cf71e957dd gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 30 exit: 0x0 frames shown: 443 (PresentX 443) presents per 2 s (last 3): 56 49 60 device removals: 0 crashes: 0 peak commit: 8304 MB ``` **Not tested** - Full GPU workspace coverage on our RX 6800M; the independent RTX 3060 suite skipped 25 GPU tests. Retail-title behavior when the disk fills or an external process locks/removes the log remains untested; the smoke run did not induce either condition. Focused tests inject `write_all` and `flush` errors. **AI use** - OpenAI Codex (GPT-6; exact serving variant unavailable), with a Luna subagent, implemented the change and tests, ran the stated checks, and prepared this description. I reviewed the code and evidence before publication. - OpenAI Codex (GPT-6.2 Astra) verified the independent exact-head report and added its linked results to this description.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:35:21 +00:00
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-26 04:37 UTC · original

Whole suite with the GPU paths (listed under Not tested): passes on NVIDIA.

Tested: e897ce3 (its base is current main b49be18, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1437 passed, 0 failed, 47 ignored; 25 SKIPPED lines (no wave64, refused per-lane forms)
log_write_failures_are_reported_once and a_log_flush_failure_is_reported, alone, 30 runs each; log:: (3 tests) at --test-threads=8, 30 runs 30 of 30 each; 30 of 30

Not tested: a full disk or a locked log in a title run, a release build, AMD.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

**@⁠fromthemoonx** on GitHub · 2026-11-26 04:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/2634#issuecomment-7182756588) **Whole suite with the GPU paths (listed under Not tested): passes on NVIDIA.** **Tested:** `e897ce3` (its base is current `main` `b49be18`, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` | 1437 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines (`no wave64`, refused per-lane forms) | | `log_write_failures_are_reported_once` and `a_log_flush_failure_is_reported`, alone, 30 runs each; `log::` (3 tests) at `--test-threads=8`, 30 runs | 30 of 30 each; 30 of 30 | **Not tested:** a full disk or a locked log in a title run, a release build, AMD. **AI use:** Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
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/2634/head:github-bot/gh-2634'
git switch 'github-bot/gh-2634'

Merge

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