Scripts: add a developer launcher with saved presets #1500

Open
github-bot wants to merge 2 commits from github-bot/gh-1500 into main AGit
Owner

@⁠S33G on GitHub · 2026-11-24 16:59 UTC · original
S33G:codex/developer-launcher → main · +495 −0 · 7 files · 2 commits · open

The Windows developer launcher makes debug runs repeatable. Choose an XCL build and an unpacked title on first launch, then reuse those paths and named presets. The launcher runs the existing xcl run command with the selected options.

What is in it

  • Searchable runtime options, Debugging and 60-second smoke presets, and custom presets you can create, replace, or delete.
  • Remembered paths and values, with direct launch via -Launch -Preset Debugging -Options @{ XCL_THREAD_DUMP_AT = '15,45' }.
  • A launcher guide for users, contributors, and agents.

XCL developer launcher with the Debugging preset applied

Tested

  • Head 2fb898d on Ryzen 9 7900X3D, GeForce RTX 3090, NVIDIA 610.88, Windows 11 build 26100.9974, Rust 1.100.0 MSVC.
  • cargo build --workspace --release --locked --offline --target-dir <fresh directory> succeeded. The resulting executable reported xcl 0.1.0.
  • cargo build --workspace --locked --offline succeeded. cargo test --workspace --locked --offline -- --test-threads=4 --nocapture reported 770 passed, 0 failed, and 41 ignored. The passed count includes two explicit skips for lack of wave64 hardware, gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.
  • Windows PowerShell 5.1 ran scripts/test-launcher.ps1 successfully. It checked quoted paths, child-only options, clearing an option, remembered locations, and custom preset loading. The form loaded 70 runtime options. Its first-launch state, search, and Debugging preset application were checked in Windows PowerShell 5.1.
  • Exercised all three browse handlers with blank first-launch fields and stand-in modal dialogs. Each reached its dialog without a path binding error. Rendered the real WinForms controls for the guide screenshot.

Not tested

  • Retail title launch through the new form and other Windows/GPU configurations.

AI use

Vibe coded with love.

  • Codex (gpt-6.2-sol) adapted the local prototype into repository tooling, added its regression check, and ran the verification above. The earlier local WinForms prototype and option catalog were produced in Codex (gpt-6.2-astra).
**@⁠S33G** on GitHub · 2026-11-24 16:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/1500) `S33G:codex/developer-launcher` → `main` · +495 −0 · 7 files · 2 commits · open The Windows developer launcher makes debug runs repeatable. Choose an XCL build and an unpacked title on first launch, then reuse those paths and named presets. The launcher runs the existing `xcl run` command with the selected options. **What is in it** - Searchable runtime options, **Debugging** and **60-second smoke** presets, and custom presets you can create, replace, or delete. - Remembered paths and values, with direct launch via `-Launch -Preset Debugging -Options @{ XCL_THREAD_DUMP_AT = '15,45' }`. - A [launcher guide for users, contributors, and agents](https://github.com/S33G/xcl/blob/2fb898d1cd5d0dfff65c6401bfcae6af74e3e588/docs/developer-launcher.md). ![XCL developer launcher with the Debugging preset applied](https://raw.githubusercontent.com/S33G/xcl/2fb898d1cd5d0dfff65c6401bfcae6af74e3e588/tests/data/launcher/debugging.png) **Tested** - Head `2fb898d` on Ryzen 9 7900X3D, GeForce RTX 3090, NVIDIA 610.88, Windows 11 build 26100.9974, Rust 1.100.0 MSVC. - `cargo build --workspace --release --locked --offline --target-dir <fresh directory>` succeeded. The resulting executable reported `xcl 0.1.0`. - `cargo build --workspace --locked --offline` succeeded. `cargo test --workspace --locked --offline -- --test-threads=4 --nocapture` reported 770 passed, 0 failed, and 41 ignored. The passed count includes two explicit skips for lack of wave64 hardware, `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. - Windows PowerShell 5.1 ran `scripts/test-launcher.ps1` successfully. It checked quoted paths, child-only options, clearing an option, remembered locations, and custom preset loading. The form loaded 70 runtime options. Its first-launch state, search, and Debugging preset application were checked in Windows PowerShell 5.1. - Exercised all three browse handlers with blank first-launch fields and stand-in modal dialogs. Each reached its dialog without a path binding error. Rendered the real WinForms controls for the guide screenshot. **Not tested** - Retail title launch through the new form and other Windows/GPU configurations. **AI use** Vibe coded with love. - Codex (gpt-6.2-sol) adapted the local prototype into repository tooling, added its regression check, and ran the verification above. The earlier local WinForms prototype and option catalog were produced in Codex (gpt-6.2-astra).
Save launch locations and debug flags per user, with named presets and direct PowerShell launches. Document the workflow and include a screenshot and regression check.

Assisted-by: Codex (gpt-6.2-sol)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:55:46 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 18:53 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 18:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1500#issuecomment-7141300456) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
Author
Owner

@⁠S33G on GitHub · 2026-11-25 23:46 UTC · original

Tested the headless launcher on 2fb898d1cd5d0dfff65c6401bfcae6af74e3e588. Windows 11 build 26100.9711, Core i7-13700, Windows PowerShell 5.1 and PowerShell 7.6.9. All settings were under a temporary LOCALAPPDATA.

I ran scripts/xcl-launcher.ps1 -Launch -Preset 'Short trace' -Options @{ XCL_THREAD_DUMP_AT = ''; XCL_TRACE_FAULTS = '1' } against a small executable. Both shells propagated its exit 37 and the child saw the cleared option and the explicit flag. A subsequent -Launch reused those effective values. Reapplying -Preset 'Short trace' restored the saved 3,6 setting and cleared the flag. Both retries exited 0, the child received the expected path containing brackets and a space, and the caller's variables stayed unchanged.

The test-only follow-up adds the failed launch and preset reapplication to the existing fixture. powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/test-launcher.ps1 passed. In two disposable copies, the new assertions caught a launcher that hard-coded exit 0 and one that modified the saved preset while applying overrides.

Not tested — WinForms, a game launch, the Rust workspace or GPU work. OpenAI Codex (GPT-6) wrote the test and fixtures, ran the checks, and prepared this report.

This is super cool! nice idea

**@⁠S33G** on GitHub · 2026-11-25 23:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/1500#issuecomment-7178033882) > **Tested** the headless launcher on `2fb898d1cd5d0dfff65c6401bfcae6af74e3e588`. Windows 11 build 26100.9711, Core i7-13700, Windows PowerShell 5.1 and PowerShell 7.6.9. All settings were under a temporary `LOCALAPPDATA`. > > I ran `scripts/xcl-launcher.ps1 -Launch -Preset 'Short trace' -Options @{ XCL_THREAD_DUMP_AT = ''; XCL_TRACE_FAULTS = '1' }` against a small executable. Both shells propagated its exit 37 and the child saw the cleared option and the explicit flag. A subsequent `-Launch` reused those effective values. Reapplying `-Preset 'Short trace'` restored the saved `3,6` setting and cleared the flag. Both retries exited 0, the child received the expected path containing brackets and a space, and the caller's variables stayed unchanged. > > The [test-only follow-up](https://github.com/RavenCurseBurg/xcl/commit/c36418f7f22b94d34d59fa95da8869032252e30c) adds the failed launch and preset reapplication to the existing fixture. `powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/test-launcher.ps1` passed. In two disposable copies, the new assertions caught a launcher that hard-coded exit 0 and one that modified the saved preset while applying overrides. > > **Not tested** — WinForms, a game launch, the Rust workspace or GPU work. OpenAI Codex (GPT-6) wrote the test and fixtures, ran the checks, and prepared this report. This is super cool! nice idea
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 21:07 UTC · original · edited 2026-11-26 11:48 UTC

On c5bcd7279efc58c32d2e89bb68212e4b34702406, the launcher, option catalog and upstream test are byte-identical to the versions in my previous run. I reran the earlier test-only follow-up (c36418f) against the current launcher and catalog in Windows PowerShell 5.1. Its headless native fixture passed, including failed-child exit propagation and reapplying the saved preset. WinForms was not exercised. Windows 11, Core i7-13700; OpenAI Codex (GPT-6) ran the check.

Earlier verification

Tested the headless launcher on 2fb898d1cd5d0dfff65c6401bfcae6af74e3e588. Windows 11 build 26100.9711, Core i7-13700, Windows PowerShell 5.1 and PowerShell 7.6.9. All settings were under a temporary LOCALAPPDATA.

I ran scripts/xcl-launcher.ps1 -Launch -Preset 'Short trace' -Options @{ XCL_THREAD_DUMP_AT = ''; XCL_TRACE_FAULTS = '1' } against a small executable. Both shells propagated its exit 37 and the child saw the cleared option and the explicit flag. A subsequent -Launch reused those effective values. Reapplying -Preset 'Short trace' restored the saved 3,6 setting and cleared the flag. Both retries exited 0, the child received the expected path containing brackets and a space, and the caller's variables stayed unchanged.

The test-only follow-up adds the failed launch and preset reapplication to the existing fixture. powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/test-launcher.ps1 passed. In two disposable copies, the new assertions caught a launcher that hard-coded exit 0 and one that modified the saved preset while applying overrides.

Not tested — WinForms, a game launch, the Rust workspace or GPU work. OpenAI Codex (GPT-6) wrote the test and fixtures, ran the checks, and prepared this report.

Follow-up on the data-directory review. I reproduced the mismatch on c5bcd7279efc58c32d2e89bb68212e4b34702406 by putting a directory with the same relative name under both the checkout and the selected executable’s folder. The button callback picked the checkout copy while a native stand-in launched by -Launch resolved the executable-side copy.

Candidate 3c6491308 makes the callback resolve the directory from the selected build. In Windows PowerShell 5.1 and PowerShell 7.6.9, the callback and the native child agreed for ordinary relative paths, a parent segment, rooted and drive-relative paths, absolute paths and the default. A missing or invalid executable produced a diagnostic before opening anything for a relative root. Absolute and default roots still worked without an executable selection.

I ran the actual button script block with Invoke-Item intercepted and exercised the script’s real process launch with a native path probe. There were 19 passing checks per shell on the candidate. powershell.exe -NoProfile -NonInteractive -File scripts/test-launcher.ps1 also passed. Windows 11 build 26100, Core i7-13700. OpenAI Codex (GPT-6) prepared the patch and ran the fixtures. No interactive WinForms session, Explorer window, retail title or GPU test was used.

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 21:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/1500#issuecomment-7174646549) · edited 2026-11-26 11:48 UTC On `c5bcd7279efc58c32d2e89bb68212e4b34702406`, the launcher, option catalog and upstream test are byte-identical to the versions in my previous run. I reran the earlier test-only follow-up (`c36418f`) against the current launcher and catalog in Windows PowerShell 5.1. Its headless native fixture passed, including failed-child exit propagation and reapplying the saved preset. WinForms was not exercised. Windows 11, Core i7-13700; OpenAI Codex (GPT-6) ran the check. <details> <summary>Earlier verification</summary> **Tested** the headless launcher on `2fb898d1cd5d0dfff65c6401bfcae6af74e3e588`. Windows 11 build 26100.9711, Core i7-13700, Windows PowerShell 5.1 and PowerShell 7.6.9. All settings were under a temporary `LOCALAPPDATA`. I ran `scripts/xcl-launcher.ps1 -Launch -Preset 'Short trace' -Options @{ XCL_THREAD_DUMP_AT = ''; XCL_TRACE_FAULTS = '1' }` against a small executable. Both shells propagated its exit 37 and the child saw the cleared option and the explicit flag. A subsequent `-Launch` reused those effective values. Reapplying `-Preset 'Short trace'` restored the saved `3,6` setting and cleared the flag. Both retries exited 0, the child received the expected path containing brackets and a space, and the caller's variables stayed unchanged. The [test-only follow-up](https://github.com/RavenCurseBurg/xcl/commit/c36418f7f22b94d34d59fa95da8869032252e30c) adds the failed launch and preset reapplication to the existing fixture. `powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/test-launcher.ps1` passed. In two disposable copies, the new assertions caught a launcher that hard-coded exit 0 and one that modified the saved preset while applying overrides. **Not tested** — WinForms, a game launch, the Rust workspace or GPU work. OpenAI Codex (GPT-6) wrote the test and fixtures, ran the checks, and prepared this report. </details> Follow-up on [the data-directory review](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1500). I reproduced the mismatch on `c5bcd7279efc58c32d2e89bb68212e4b34702406` by putting a directory with the same relative name under both the checkout and the selected executable’s folder. The button callback picked the checkout copy while a native stand-in launched by `-Launch` resolved the executable-side copy. [Candidate 3c6491308](https://github.com/RavenCurseBurg/xcl/commit/3c64913086de9cc5f4dff097b9b82faea44615f9) makes the callback resolve the directory from the selected build. In Windows PowerShell 5.1 and PowerShell 7.6.9, the callback and the native child agreed for ordinary relative paths, a parent segment, rooted and drive-relative paths, absolute paths and the default. A missing or invalid executable produced a diagnostic before opening anything for a relative root. Absolute and default roots still worked without an executable selection. I ran the actual button script block with `Invoke-Item` intercepted and exercised the script’s real process launch with a native path probe. There were 19 passing checks per shell on the candidate. `powershell.exe -NoProfile -NonInteractive -File scripts/test-launcher.ps1` also passed. Windows 11 build 26100, Core i7-13700. OpenAI Codex (GPT-6) prepared the patch and ran the fixtures. No interactive WinForms session, Explorer window, retail title or GPU test was used.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 05:40 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 05:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/1500#issuecomment-7183700314) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 10:48 UTC · original · reviewed

On c5bcd7279efc58c32d2e89bb68212e4b34702406, a relative XCL_DATA_ROOT makes the new Open XCL data... button look in a different place from the launched XCL process. Start-Title sets ProcessStartInfo.WorkingDirectory to the selected xcl.exe directory with UseShellExecute = $false; XCL's data_root() returns the relative env path unchanged. The button instead passes that same relative value to Test-Path and Invoke-Item in the launcher's PowerShell working directory. For example, when launched from the checkout with xcl.exe under target\release and XCL_DATA_ROOT=relative-state, XCL uses target\release\relative-state but the button checks checkout\relative-state. Could the button resolve relative data roots against the selected executable's directory (and handle an invalid executable selection) before opening them? I checked the exact-head source and path resolution; I did not exercise the WinForms button end to end.

AI use: OpenAI Codex (GPT-6.2 Sol) found the path mismatch; OpenAI Codex (GPT-6.2 Astra) verified it against source and the documented .NET working-directory behavior and wrote this review.

**@⁠luckyteagirl** on GitHub · 2026-11-26 10:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/1500#pullrequestreview-6072764947) · **reviewed** On `c5bcd7279efc58c32d2e89bb68212e4b34702406`, a relative `XCL_DATA_ROOT` makes the new **Open XCL data...** button look in a different place from the launched XCL process. `Start-Title` sets `ProcessStartInfo.WorkingDirectory` to the selected `xcl.exe` directory with `UseShellExecute = $false`; XCL's `data_root()` returns the relative env path unchanged. The button instead passes that same relative value to `Test-Path` and `Invoke-Item` in the launcher's PowerShell working directory. For example, when launched from the checkout with `xcl.exe` under `target\release` and `XCL_DATA_ROOT=relative-state`, XCL uses `target\release\relative-state` but the button checks `checkout\relative-state`. Could the button resolve relative data roots against the selected executable's directory (and handle an invalid executable selection) before opening them? I checked the exact-head source and path resolution; I did not exercise the WinForms button end to end. AI use: OpenAI Codex (GPT-6.2 Sol) found the path mismatch; OpenAI Codex (GPT-6.2 Astra) verified it against source and the documented .NET working-directory behavior and wrote this review.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/1500/head:github-bot/gh-1500'
git switch 'github-bot/gh-1500'

Merge

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