Scripts: keep artifacts for reproducible world-entry smoke runs #1845

Open
opened 2026-11-24 21:56:44 +00:00 by MiguelMachado-dev · 3 comments
MiguelMachado-dev commented 2026-11-24 21:56:44 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by MiguelMachado-dev on 2026-11-24T21:56:44Z.


Part of #505 and the world-load goal in #1833. A smoke run can report healthy frame counts while the title stays on a loading screen. Logs and reports also rotate, so they are easy to lose when comparing several builds.

I propose an opt-in output directory for scripts/smoke.ps1. Each invocation would save the log, report.json if produced, and a manifest with the build commit, GPU, duration, input schedule and XCL cache state. The existing xcl-smoke v1 output stays the same.

The docs would show how to run both builds from the same local checkpoint using XCL_PRESS_AT and separate data and DXIL cache roots. Run each build once with a fresh XCL cache and once with its seeded cache. Record the last visually confirmed scene milestone in a separate capture run.

The script test would use a synthetic launcher to verify that two runs keep separate artifacts and that a missing report still preserves the log. Artifacts stay local and outside the repository.

Related: #284 documents cold/warm differences, #717 tracks the black-screen check, and #1591 covers attribution for an external binary.

<!-- greyfinch-sync:ivall/xcl:issue:6592207713 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/1855). Originally posted by [MiguelMachado-dev](https://github.com/MiguelMachado-dev) on 2026-11-24T21:56:44Z. --- Part of #505 and the world-load goal in #1833. A smoke run can report healthy frame counts while the title stays on a loading screen. Logs and reports also rotate, so they are easy to lose when comparing several builds. I propose an opt-in output directory for `scripts/smoke.ps1`. Each invocation would save the log, `report.json` if produced, and a manifest with the build commit, GPU, duration, input schedule and XCL cache state. The existing `xcl-smoke v1` output stays the same. The docs would show how to run both builds from the same local checkpoint using `XCL_PRESS_AT` and separate data and DXIL cache roots. Run each build once with a fresh XCL cache and once with its seeded cache. Record the last visually confirmed scene milestone in a separate capture run. The script test would use a synthetic launcher to verify that two runs keep separate artifacts and that a missing report still preserves the log. Artifacts stay local and outside the repository. Related: #284 documents cold/warm differences, #717 tracks the black-screen check, and #1591 covers attribution for an external binary.
tugasky commented 2026-11-25 00:09:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by tugasky on 2026-11-25T00:03:58Z.


Seconding, from a night of doing this by hand — and the two failures it would have caught

I spent an evening comparing capped runs of the retail title by eye, and two things went wrong that this issue's manifest and artifacts would have caught on the first attempt.

The run's stderr was not being kept at all. My wrapper started the host with -WindowStyle Hidden and no redirection, so everything XCL wrote to stderr went nowhere. That includes the one line that explained a 0xC0000409 I had blamed on the title for four runs:

memory allocation of 18220 bytes failed

Once the child's stdout and stderr went to guard\child-<stamp>.out and .err, the cause — Rust's abort() on a refused allocation in XCL's own heap, because the commit cap is a job-object limit over the whole process — was one Select-String away. A run directory that keeps the child's streams is the difference between "unexplained fail-fast" and "root cause in one line".

The guard's own kill switch was measured against the wrong process. -KillAtMB was checked against the launcher xcl run itself — a few MB, while the host it starts is where the commit goes — so the threshold never armed, and every run I had done with that flag was a run without a ceiling. Sorting the xcl processes by commit and sampling the largest is what made the numbers reproducible (commit 32 768 MB at the cap, from 26 s to the abort at 40.4 s).

On the manifest, the fields that decided every comparison I made: the build (which I could not get — the log's first line is XCL 0.1.0 – host for '<title id>', no commit; the base commit had to be recorded by hand, and #1591 is the same gap for the smoke executable), the exact XCL_* environment, the input schedule with its timing, the run timeout, and the host's peak commit. Two runs that differed only in XCL_TITLE_COMMIT_CAP_MB reached opposite verdicts on the same binary — one exit 0 at 420 s, one 0x80000003 at 188.9 s — and nothing in a plain log records which cap was in force.

One caution for the report artifact: the title's own dumps contain the process environment block (#702), so whatever the smoke directory keeps should be XCL's log and report.json, not the title's crash payload.

Written by Claude (Anthropic) under my review; numbers from runs on my machine, no game data included.

<!-- greyfinch-sync:ivall/xcl:comment:7148099281 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/1855#issuecomment-7148099281). Originally posted by [tugasky](https://github.com/tugasky) on 2026-11-25T00:03:58Z. --- ### Seconding, from a night of doing this by hand — and the two failures it would have caught I spent an evening comparing capped runs of the retail title by eye, and two things went wrong that this issue's manifest and artifacts would have caught on the first attempt. **The run's stderr was not being kept at all.** My wrapper started the host with `-WindowStyle Hidden` and no redirection, so everything XCL wrote to stderr went nowhere. That includes the one line that explained a `0xC0000409` I had blamed on the title for four runs: ``` memory allocation of 18220 bytes failed ``` Once the child's stdout and stderr went to `guard\child-<stamp>.out` and `.err`, the cause — Rust's `abort()` on a refused allocation in XCL's own heap, because the commit cap is a job-object limit over the whole process — was one `Select-String` away. A run directory that keeps the child's streams is the difference between "unexplained fail-fast" and "root cause in one line". **The guard's own kill switch was measured against the wrong process.** `-KillAtMB` was checked against the launcher `xcl run` itself — a few MB, while the host it starts is where the commit goes — so the threshold never armed, and every run I had done with that flag was a run without a ceiling. Sorting the `xcl` processes by commit and sampling the largest is what made the numbers reproducible (`commit 32 768 MB` at the cap, from 26 s to the abort at 40.4 s). **On the manifest**, the fields that decided every comparison I made: the build (which I could not get — the log's first line is `XCL 0.1.0 – host for '<title id>'`, no commit; the base commit had to be recorded by hand, and #1591 is the same gap for the smoke executable), the exact `XCL_*` environment, the input schedule with its timing, the run timeout, and the host's peak commit. Two runs that differed only in `XCL_TITLE_COMMIT_CAP_MB` reached opposite verdicts on the same binary — one exit 0 at 420 s, one `0x80000003` at 188.9 s — and nothing in a plain log records which cap was in force. One caution for the report artifact: the title's own dumps contain the process environment block (#702), so whatever the smoke directory keeps should be XCL's log and `report.json`, not the title's crash payload. Written by Claude (Anthropic) under my review; numbers from runs on my machine, no game data included.
razormontana commented 2026-11-25 20:08:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by razormontana on 2026-11-25T19:09:29Z.


I'm taking launcher stdout and stderr for the existing smoke.ps1 -OutDir artifacts. The allocator failure reported in this issue shows how those streams help diagnose #505. I'll test a failed launch and verify that the next run replaces both files when the output directory is reused.

Assisted by Codex (GPT-6.2 and GPT-6.2 Sol).

<!-- greyfinch-sync:ivall/xcl:comment:7171896145 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/1855#issuecomment-7171896145). Originally posted by [razormontana](https://github.com/razormontana) on 2026-11-25T19:09:29Z. --- I'm taking launcher stdout and stderr for the existing `smoke.ps1 -OutDir` artifacts. The allocator failure reported in this issue shows how those streams help diagnose #505. I'll test a failed launch and verify that the next run replaces both files when the output directory is reused. Assisted by Codex (GPT-6.2 and GPT-6.2 Sol).
JJAutoCompare commented 2026-11-26 23:27:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-26T23:27:46Z.


Smoke launcher environment isolation

On main at 8b957bec6f82495aec940944c6bf47faa02db590, invoking scripts/smoke.ps1 in an existing PowerShell session overwrites XCL_NETWORK and deletes the caller's XCL_RUN_SECONDS and XCL_ACTIVITY. Running a comparison from the same shell can then inherit the wrong settings.

A small local fix saves the three values before Process.Start(), applies the smoke overrides for the launch, and restores the original values in finally, including on a failed start. This keeps Windows PowerShell's inherited-environment launch path.

Tested: Windows 11 25H2 build 26200.9974, Windows PowerShell 5.1.26100.9818. scripts/test-smoke-artifacts.tests.ps1 with the regression failed on the unpatched script (smoke.ps1 changed the caller environment), then passed with the fix, including child overrides and a failed-launch control. scripts/smoke-title.tests.ps1 passed with the fix. No GPU or retail title was used.

AI use: T3 Code / Codex (gpt-6.2-sol) reproduced the issue, wrote the local patch and fixture assertions, and ran the tests.

<!-- greyfinch-sync:ivall/xcl:comment:7205561670 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/1855#issuecomment-7205561670). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-26T23:27:46Z. --- **Smoke launcher environment isolation** On `main` at `8b957bec6f82495aec940944c6bf47faa02db590`, invoking `scripts/smoke.ps1` in an existing PowerShell session overwrites `XCL_NETWORK` and deletes the caller's `XCL_RUN_SECONDS` and `XCL_ACTIVITY`. Running a comparison from the same shell can then inherit the wrong settings. A small local fix saves the three values before `Process.Start()`, applies the smoke overrides for the launch, and restores the original values in `finally`, including on a failed start. This keeps Windows PowerShell's inherited-environment launch path. **Tested:** Windows 11 25H2 build 26200.9974, Windows PowerShell 5.1.26100.9818. `scripts/test-smoke-artifacts.tests.ps1` with the regression failed on the unpatched script (`smoke.ps1 changed the caller environment`), then passed with the fix, including child overrides and a failed-launch control. `scripts/smoke-title.tests.ps1` passed with the fix. No GPU or retail title was used. **AI use:** T3 Code / Codex (`gpt-6.2-sol`) reproduced the issue, wrote the local patch and fixture assertions, and ran the tests.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#1845
No description provided.