ci: build the startup stand-ins and run their checks in CI #1142

Open
opened 2026-11-24 01:45:39 +00:00 by denn0x · 13 comments
denn0x commented 2026-11-24 01:45:39 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T01:45:39Z.


Proposal

  • Run ctest -R '^startup_stubs$' in the Windows job; it needs no GPU and no game files.
  • Run a Python syntax/lint pass over tools/startup/.
  • Make pe_package_import_closure skip (77) when the symlink privilege is missing (WinError 1314) instead of failing.
  • Add labels for startup areas (startup-runtime, shader-translation, directstorage, xg-layout) so these issues can be filtered.
  • Keep a small corpus of source-built gfx1013 fixtures for every translator feature added for startup (SDWA, 3D images, inline samplers), so
    translator changes are checked without executables.

Done when

The CI job runs the checks above on every pull request.

Context: docs/startup-runtime.md (#1135). Do not attach game files, dumps or logs that contain addresses or names from an executable; describe results in terms of the component tested.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6572715082 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149). Originally posted by [denn0x](https://github.com/denn0x) on 2026-11-24T01:45:39Z. --- ## Proposal - Run `ctest -R '^startup_stubs$'` in the Windows job; it needs no GPU and no game files. - Run a Python syntax/lint pass over `tools/startup/`. - Make `pe_package_import_closure` skip (77) when the symlink privilege is missing (WinError 1314) instead of failing. - Add labels for startup areas (`startup-runtime`, `shader-translation`, `directstorage`, `xg-layout`) so these issues can be filtered. - Keep a small corpus of source-built gfx1013 fixtures for every translator feature added for startup (SDWA, 3D images, inline samplers), so translator changes are checked without executables. ## Done when The CI job runs the checks above on every pull request. Context: `docs/startup-runtime.md` (#1135). Do not attach game files, dumps or logs that contain addresses or names from an executable; describe results in terms of the component tested. AI-assisted (Claude Code).
R0Y00 commented 2026-11-24 06:50:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T02:01:11Z.


The two Windows jobs on #1135 first found startup_stubs but could not run it on a fresh configure because the Python path was empty at registration. The branch now registers the test after initializing the path and uses the existing Python availability check. A fresh Release configure with the default Python path passed locally on 5691fe81. Both Windows workflows already run the relevant CTests, so please check the new job logs before adding a separate CI command. #1126 handles the symlink case separately. A targeted Python check or a new translator fixture can be reviewed independently if it fills a gap.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7119674941 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7119674941). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T02:01:11Z. --- The two Windows jobs on #1135 first found startup_stubs but could not run it on a fresh configure because the Python path was empty at registration. The branch now registers the test after initializing the path and uses the existing Python availability check. A fresh Release configure with the default Python path passed locally on 5691fe81. Both Windows workflows already run the relevant CTests, so please check the new job logs before adding a separate CI command. #1126 handles the symlink case separately. A targeted Python check or a new translator fixture can be reviewed independently if it fills a gap.
R0Y00 commented 2026-11-24 06:50:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T03:39:45Z.


Verified on the merged #1135 head da5884af. Both hosted Windows jobs executed startup_stubs and passed it: Debug and /O2. The full main and manual workflows remain the place to check this test under the fast PR policy. For follow-ups, please identify a specific untested launcher or translator behavior and the source-built control that would cover it.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7121303961 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7121303961). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T03:39:45Z. --- Verified on the merged #1135 head da5884af. Both hosted Windows jobs executed startup_stubs and passed it: [Debug](https://github.com/R0Y00/Xbox2Windows/actions/runs/45317074326/job/138186367323) and [/O2](https://github.com/R0Y00/Xbox2Windows/actions/runs/45317074326/job/138186367319). The full main and manual workflows remain the place to check this test under the fast PR policy. For follow-ups, please identify a specific untested launcher or translator behavior and the source-built control that would cover it.
Jess-Doit commented 2026-11-24 06:50:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-24T04:58:54Z.


Following R0Y00's note above: two gfx2hlsl.py behaviours that are translated today but have no source-built check. I'll take both, as one small PR each, in the style of tests/startup_sampler_heap_check.py. Each has gfx1013 assembly plus recorded words, an llvm-mc reassembly mode for the gfx1013 job, and a desktop draw.

  1. 3D image sampling (dim:SQ_RSRC_IMG_3D → Texture3D<float4> with a float3 coordinate). A 2×2×2 texture has different values in its two depth slices. The draw samples each slice and reads back the values on a GTX 1060 and in-box WARP, with DXC ps_6_0 and FXC ps_5_1. Control: the translated shader with the z coordinate fixed to the other slice must fail.
  2. Inline samplers built with s_bfm_b32 (constant-folded sampler words → smp manifest line). This checks that the folded words equal the masks the assembly builds, and that a non-constant operand stays a run-time expression and isn't folded. The draw check of the decoded sampler waits for #1237, which moves the stand-in's sampler decoder into a shared header.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7122513543 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7122513543). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-24T04:58:54Z. --- Following R0Y00's note above: two `gfx2hlsl.py` behaviours that are translated today but have no source-built check. I'll take both, as one small PR each, in the style of `tests/startup_sampler_heap_check.py`. Each has gfx1013 assembly plus recorded words, an `llvm-mc` reassembly mode for the gfx1013 job, and a desktop draw. 1. **3D image sampling** (`dim:SQ_RSRC_IMG_3D` → `Texture3D<float4>` with a `float3` coordinate). A 2×2×2 texture has different values in its two depth slices. The draw samples each slice and reads back the values on a GTX 1060 and in-box WARP, with DXC `ps_6_0` and FXC `ps_5_1`. Control: the translated shader with the z coordinate fixed to the other slice must fail. 2. **Inline samplers built with `s_bfm_b32`** (constant-folded sampler words → `smp` manifest line). This checks that the folded words equal the masks the assembly builds, and that a non-constant operand stays a run-time expression and isn't folded. The draw check of the decoded sampler waits for #1237, which moves the stand-in's sampler decoder into a shared header. AI-assisted (Claude Code).
triggered02 commented 2026-11-24 06:50:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T05:53:16Z.


Taking the remaining "checks over tools/startup/" slice as a specific untested launcher behavior, per the note above: tools/startup/launch.py has no source-built control for what it claims to guarantee (kill-on-close job, timeout, commit cap, captured stdout/stderr/trap log). I will not touch gfx2hlsl.py or debug_launch.py.

Plan: a small source-built fixture EXE plus a Python check registered as a ctest, so the Windows jobs run it without a separate CI command. Cases, each with its control:

  1. a fixture that exits 7, writes known bytes to stdout/stderr and to X2W_TRAP_LOG: the launcher reports exit code 0x00000007 and the three captured files hold those bytes;
  2. the same fixture in sleep mode with --timeout 1: the launcher reports the timeout, terminates the job (0xdead0001) and returns within the timeout;
  3. a commit-cap case (the fixture asks for more than --memory-gib allows and the allocation fails, then succeeds under a larger cap);
  4. the missing-EXE error path (CreateProcess failed, launcher exit code 2);
  5. if the job enforces it, --max-processes blocking a grandchild, with the larger limit as the control.

Verification is the ctest run itself plus the pre-fix control: each assertion names the launcher line it reads, and case 4 fails today only because no check reads it. I will report the measured output.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7123368373 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7123368373). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T05:53:16Z. --- Taking the remaining "checks over `tools/startup/`" slice as a specific untested launcher behavior, per the note above: `tools/startup/launch.py` has no source-built control for what it claims to guarantee (kill-on-close job, timeout, commit cap, captured stdout/stderr/trap log). I will not touch `gfx2hlsl.py` or `debug_launch.py`. Plan: a small source-built fixture EXE plus a Python check registered as a ctest, so the Windows jobs run it without a separate CI command. Cases, each with its control: 1. a fixture that exits 7, writes known bytes to stdout/stderr and to `X2W_TRAP_LOG`: the launcher reports `exit code 0x00000007` and the three captured files hold those bytes; 2. the same fixture in sleep mode with `--timeout 1`: the launcher reports the timeout, terminates the job (`0xdead0001`) and returns within the timeout; 3. a commit-cap case (the fixture asks for more than `--memory-gib` allows and the allocation fails, then succeeds under a larger cap); 4. the missing-EXE error path (`CreateProcess failed`, launcher exit code 2); 5. if the job enforces it, `--max-processes` blocking a grandchild, with the larger limit as the control. Verification is the ctest run itself plus the pre-fix control: each assertion names the launcher line it reads, and case 4 fails today only because no check reads it. I will report the measured output. AI-assisted (Claude Code).
triggered02 commented 2026-11-24 06:50:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T05:57:01Z.


Opened #1261 for the launcher-check slice: a source-built probe plus a ctest that reads back what tools/startup/launch.py claims to guarantee.

  • tests/startup_launch_probe.cpp writes known bytes to stdout/stderr/X2W_TRAP_LOG, reports a known exit code, or asks for more memory, spawns a helper or stays alive.
  • tests/startup_launch_check.py (ctest startup_launch) checks the exit-code report, the three captured files, the --timeout kill, --memory-gib and --max-processes (each with the larger limit as the control) and the missing-EXE path.
  • The pr preset builds the probe and runs the test, so the Windows jobs run it on pull requests; main-branch runs pick it up with the rest of the suite. docs/startup-runtime.md has the command.

Local measured output on a release configuration: 1/1 Test #217: startup_launch ... Passed 1.76 sec, with allocate failed error=1455 vs allocate ok 1024 MiB and spawn failed error=1816 vs spawn ok for the controls. Removing either job limit flag or the trap-log environment from launch.py makes the check fail with a specific assertion, so the cases are not vacuous.

This does not touch gfx2hlsl.py, debug_launch.py or the stand-in device source. I have not added the general Python syntax pass over tools/startup/; I can do that as a second small PR if you would rather have it separate.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7123428230 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7123428230). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T05:57:01Z. --- Opened #1261 for the launcher-check slice: a source-built probe plus a ctest that reads back what `tools/startup/launch.py` claims to guarantee. - `tests/startup_launch_probe.cpp` writes known bytes to stdout/stderr/`X2W_TRAP_LOG`, reports a known exit code, or asks for more memory, spawns a helper or stays alive. - `tests/startup_launch_check.py` (ctest `startup_launch`) checks the exit-code report, the three captured files, the `--timeout` kill, `--memory-gib` and `--max-processes` (each with the larger limit as the control) and the missing-EXE path. - The `pr` preset builds the probe and runs the test, so the Windows jobs run it on pull requests; main-branch runs pick it up with the rest of the suite. `docs/startup-runtime.md` has the command. Local measured output on a release configuration: `1/1 Test #217: startup_launch ... Passed 1.76 sec`, with `allocate failed error=1455` vs `allocate ok 1024 MiB` and `spawn failed error=1816` vs `spawn ok` for the controls. Removing either job limit flag or the trap-log environment from `launch.py` makes the check fail with a specific assertion, so the cases are not vacuous. This does not touch `gfx2hlsl.py`, `debug_launch.py` or the stand-in device source. I have not added the general Python syntax pass over `tools/startup/`; I can do that as a second small PR if you would rather have it separate. AI-assisted (Claude Code).
tedin7 commented 2026-11-24 06:50:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T06:20:32Z.


Taking one more untested tool under this issue, per the note above: tools/startup/capture.py, the reader for capture.bin (no test covers it today). I will not touch the launcher check (#1261), gfx2hlsl.py or debug_launch.py.

Plan: tests/startup_capture_check.py registered as ctest startup_capture, with a synthetic capture.bin built byte for byte from the record layouts in src/startup_stubs/d3d12_capture.inl (FRAM, CALL, MEM, PSO, ROOT, RES, HEAP, OBJ, VIEW, TABL, TGTS, PRES):

  • every record kind decodes to the values written, including both D3D12_RESOURCE_DESC blocks of RES;
  • Memory.read returns the bytes captured last at or before a call sequence, and a different one for an earlier sequence;
  • truncated and corrupted streams fail cleanly instead of being half-read.

The writer is not changed. Draft PR to follow.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7123833348 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7123833348). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T06:20:32Z. --- Taking one more untested tool under this issue, per the note above: `tools/startup/capture.py`, the reader for `capture.bin` (no test covers it today). I will not touch the launcher check (#1261), `gfx2hlsl.py` or `debug_launch.py`. Plan: `tests/startup_capture_check.py` registered as ctest `startup_capture`, with a synthetic `capture.bin` built byte for byte from the record layouts in `src/startup_stubs/d3d12_capture.inl` (FRAM, CALL, MEM, PSO, ROOT, RES, HEAP, OBJ, VIEW, TABL, TGTS, PRES): - every record kind decodes to the values written, including both `D3D12_RESOURCE_DESC` blocks of RES; - `Memory.read` returns the bytes captured last at or before a call sequence, and a different one for an earlier sequence; - truncated and corrupted streams fail cleanly instead of being half-read. The writer is not changed. Draft PR to follow.
R0Y00 commented 2026-11-24 06:50:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T06:21:50Z.


#1261 is now on main. The Windows PR smoke job built the source-only probe and ran startup_launch in 1.45 s. It exercised exit-code and stream capture, timeout, commit and child-process limits with their permissive controls, and a missing executable. The broader startup-stand-in CI checklist above is still open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7123855599 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7123855599). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T06:21:50Z. --- #1261 is now on main. The Windows PR smoke job built the source-only probe and ran `startup_launch` in 1.45 s. It exercised exit-code and stream capture, timeout, commit and child-process limits with their permissive controls, and a missing executable. The broader startup-stand-in CI checklist above is still open.
RenzoWit35 commented 2026-11-24 11:03:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-24T10:41:17Z.


Taking one more untested stand-in behavior under this issue: the DirectStorage stand-in's zlib decoder, src/startup_stubs/inflate.h. The existing stub-consumer fixtures only reach stored blocks, a fixed block that repeats one byte at distance 1, and single-byte runs. With the last distance code's extra bits changed from 13 to 12 and the match-distance check removed, startup_stubs and startup_storage_directory_batch still pass. I will not touch xcrdapi.cpp, the BCPack decoder (#1390), debug_launch.py or run.ps1.

Plan: a source-built probe that runs inflate_zlib on one stream into a destination with guard bytes on both sides, plus tests/startup_inflate_check.py (ctest startup_inflate):

  • streams that CPython's zlib encodes from seeded synthetic data (stored, fixed and dynamic blocks, a sparse alphabet that needs the code-length repeat codes, matches up to the 32 KiB window, a sync flush) must decode to the input;
  • controls that must be rejected without writes outside the destination: one byte too little capacity, a truncated stream, and a hand-built match that starts before the output (the same block with distance 1 decodes).

The decoder is not changed. PR to follow.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7129111787 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7129111787). Originally posted by [RenzoWit35](https://github.com/RenzoWit35) on 2026-11-24T10:41:17Z. --- Taking one more untested stand-in behavior under this issue: the DirectStorage stand-in's zlib decoder, `src/startup_stubs/inflate.h`. The existing stub-consumer fixtures only reach stored blocks, a fixed block that repeats one byte at distance 1, and single-byte runs. With the last distance code's extra bits changed from 13 to 12 and the match-distance check removed, `startup_stubs` and `startup_storage_directory_batch` still pass. I will not touch `xcrdapi.cpp`, the BCPack decoder (#1390), `debug_launch.py` or `run.ps1`. Plan: a source-built probe that runs `inflate_zlib` on one stream into a destination with guard bytes on both sides, plus `tests/startup_inflate_check.py` (ctest `startup_inflate`): - streams that CPython's zlib encodes from seeded synthetic data (stored, fixed and dynamic blocks, a sparse alphabet that needs the code-length repeat codes, matches up to the 32 KiB window, a sync flush) must decode to the input; - controls that must be rejected without writes outside the destination: one byte too little capacity, a truncated stream, and a hand-built match that starts before the output (the same block with distance 1 decodes). The decoder is not changed. PR to follow. AI-assisted.
Asimmimx commented 2026-11-24 12:03:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Asimmimx on 2026-11-24T11:47:35Z.


Three more untested stand-in behaviors, one PR each. Each one is a device-free C++ check of a single src/startup_stubs header, found by single-point mutation against the existing CPU and WARP tests. None of the three changes the header or the device code.

  • #1447 derived_blend.h (slot 55 blend-patch scan). The startup_stream_draw tests do not see the returned descriptor offset, the whole-record check or the null check. Three of nine mutants survived those tests.
  • #1450 logical_view_table.h (root table windows and records). startup_logical_view_* skips (77) on WARP and on an RX 6600, and the other draws bind a one-record table at offset 0. Six of six mutants survived.
  • #1452 bc7_4k_s.h (BC7 4 KiB standard sizes, block order and detile). The existing checks use only square tile grids and accepted descriptions. The tile_rows-for-tile_columns tile index, a dropped MipLevels condition and a dropped Alignment condition all survived.

Each PR has its mutation table and the exact commands. Their CMake blocks are separated, so they merge in any order. I am not touching the other slices claimed here.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130556374 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7130556374). Originally posted by [Asimmimx](https://github.com/Asimmimx) on 2026-11-24T11:47:35Z. --- Three more untested stand-in behaviors, one PR each. Each one is a device-free C++ check of a single `src/startup_stubs` header, found by single-point mutation against the existing CPU and WARP tests. None of the three changes the header or the device code. - #1447 `derived_blend.h` (slot 55 blend-patch scan). The `startup_stream_draw` tests do not see the returned descriptor offset, the whole-record check or the null check. Three of nine mutants survived those tests. - #1450 `logical_view_table.h` (root table windows and records). `startup_logical_view_*` skips (77) on WARP and on an RX 6600, and the other draws bind a one-record table at offset 0. Six of six mutants survived. - #1452 `bc7_4k_s.h` (BC7 4 KiB standard sizes, block order and detile). The existing checks use only square tile grids and accepted descriptions. The `tile_rows`-for-`tile_columns` tile index, a dropped `MipLevels` condition and a dropped `Alignment` condition all survived. Each PR has its mutation table and the exact commands. Their CMake blocks are separated, so they merge in any order. I am not touching the other slices claimed here. AI-assisted (Claude Code).
Asimmimx commented 2026-11-24 14:03:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Asimmimx on 2026-11-24T13:17:18Z.


More untested stand-in behaviors, one PR each. Each was found by single-point mutation against the existing CPU and WARP tests. Every PR has its mutation table and exact commands, changes only tests, CMake and docs, and merges in any order with the others.

  • #1480 translated_sampler_bindings.h: sampler word decoding per axis, filters, anisotropy and border, smpheap lines, snapshot counts and equality. 14 of 16 mutants survived.
  • #1482 local_log.h: switch values, kept last error, CRLF, truncation at 1,533 bytes, trap-log append and MAX_PATH. 10 of 12 survived.
  • #1486 slice_footprints.h: re-read rules, supports(), the mip limit, the null-device guard and the last-row span. 10 of 14 survived.
  • #1493 dstorage_file_read.h: reads at offsets above 2 and 4 GiB. Clearing OffsetHigh, shifting by 31 and a 32-bit size all survived.
  • #1497 null_binding_cause.h: the slot and label each cause lands in on the totals line.
  • #1503 placement_publish.h: the exclusive lock and the max_width that binding lookup relies on.
  • #1506 memory_srv_report.h (follow-up to #1420): 2D and array view fields, raw words and 64-bit values in the slot 70 refusal line. 9 of 11 survived.

Outside the stand-ins:

  • #1489: the creation-IID inventory.
  • #1499: the GPU usage total in either adapter order.
  • #1495: startup_stubs no longer leaves an x2w_trap_* folder in %TEMP% on each run.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7132614774 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7132614774). Originally posted by [Asimmimx](https://github.com/Asimmimx) on 2026-11-24T13:17:18Z. --- More untested stand-in behaviors, one PR each. Each was found by single-point mutation against the existing CPU and WARP tests. Every PR has its mutation table and exact commands, changes only tests, CMake and docs, and merges in any order with the others. - #1480 `translated_sampler_bindings.h`: sampler word decoding per axis, filters, anisotropy and border, `smpheap` lines, snapshot counts and equality. 14 of 16 mutants survived. - #1482 `local_log.h`: switch values, kept last error, CRLF, truncation at 1,533 bytes, trap-log append and `MAX_PATH`. 10 of 12 survived. - #1486 `slice_footprints.h`: re-read rules, `supports()`, the mip limit, the null-device guard and the last-row span. 10 of 14 survived. - #1493 `dstorage_file_read.h`: reads at offsets above 2 and 4 GiB. Clearing `OffsetHigh`, shifting by 31 and a 32-bit size all survived. - #1497 `null_binding_cause.h`: the slot and label each cause lands in on the totals line. - #1503 `placement_publish.h`: the exclusive lock and the `max_width` that binding lookup relies on. - #1506 `memory_srv_report.h` (follow-up to #1420): 2D and array view fields, raw words and 64-bit values in the slot 70 refusal line. 9 of 11 survived. Outside the stand-ins: - #1489: the creation-IID inventory. - #1499: the GPU usage total in either adapter order. - #1495: `startup_stubs` no longer leaves an `x2w_trap_*` folder in `%TEMP%` on each run. AI-assisted (Claude Code).
triggered02 commented 2026-11-24 15:02:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T14:33:02Z.


Taking the "Python syntax/lint pass over tools/startup" slice from the checklist, as its own PR, since the other items (labels, the pe_package_import_closure skip, the fixture corpus) are independent.

Approach. A device-free check that compiles every tools/startup/*.py without importing or running it, reporting path:line: message for anything that cannot be parsed. It needs no GPU and no game files, and because the Windows build-and-test job already runs ctest, it lands in CI as soon as the test is registered — no workflow change needed.

Control, so a passing run means something: the check compiles a deliberately broken snippet and requires the rejection, then compiles a valid one and requires acceptance. "0 problems" from a harness that never parsed anything would otherwise be indistinguishable from a clean tree.

Two things I checked while building it:

  • A UTF-8 BOM is read with utf-8-sig, not utf-8. The first version flagged a BOM as a syntax error, which would have failed a file the interpreter happily runs — a false positive, so it now matches Python's own behaviour.
  • Fail-first: with a file containing def broken(: added to tools/startup, the check reports syntax error: ...:1: invalid syntax and exits 1; removing it returns to PASS: 7 files under ... parse.

Scope boundary: this reports parse errors only. It is not a linter in the style sense and says nothing about the tools' behaviour or their imports resolving at run time.

I will not touch the CI workflow, the labels, or pe_package_import_closure in this PR.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7134559504 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7134559504). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T14:33:02Z. --- Taking the "Python syntax/lint pass over `tools/startup`" slice from the checklist, as its own PR, since the other items (labels, the `pe_package_import_closure` skip, the fixture corpus) are independent. **Approach.** A device-free check that compiles every `tools/startup/*.py` without importing or running it, reporting `path:line: message` for anything that cannot be parsed. It needs no GPU and no game files, and because the Windows `build-and-test` job already runs `ctest`, it lands in CI as soon as the test is registered — no workflow change needed. **Control, so a passing run means something:** the check compiles a deliberately broken snippet and requires the rejection, then compiles a valid one and requires acceptance. "0 problems" from a harness that never parsed anything would otherwise be indistinguishable from a clean tree. **Two things I checked while building it:** - A UTF-8 BOM is read with `utf-8-sig`, not `utf-8`. The first version flagged a BOM as a syntax error, which would have failed a file the interpreter happily runs — a false positive, so it now matches Python's own behaviour. - Fail-first: with a file containing `def broken(:` added to `tools/startup`, the check reports `syntax error: ...:1: invalid syntax` and exits 1; removing it returns to `PASS: 7 files under ... parse`. Scope boundary: this reports parse errors only. It is not a linter in the style sense and says nothing about the tools' behaviour or their imports resolving at run time. I will not touch the CI workflow, the labels, or `pe_package_import_closure` in this PR.
RenzoWit35 commented 2026-11-24 15:02:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-24T14:47:52Z.


Taking one more untested launcher behavior under this issue: the exit status of tools/startup/run.ps1 (a separate slice from my inflate.h one, where I left run.ps1 alone). On current main the script exits 0 whatever debug_launch.py returns, including its CreateProcess failed path (2); I reproduced that with a stub debugger under Windows PowerShell 5.1 and PowerShell 7. Plan: run.ps1 exits with the debugger's code, plus tests/startup_run_ps1_check.py (ctest startup_run_ps1) with the stub debugger as the device-free control. I will not touch debug_launch.py, the -MapDrive work (#1251), launch.py or gfx2hlsl.py.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7134962779 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7134962779). Originally posted by [RenzoWit35](https://github.com/RenzoWit35) on 2026-11-24T14:47:52Z. --- Taking one more untested launcher behavior under this issue: the exit status of `tools/startup/run.ps1` (a separate slice from my `inflate.h` one, where I left `run.ps1` alone). On current main the script exits 0 whatever `debug_launch.py` returns, including its `CreateProcess failed` path (2); I reproduced that with a stub debugger under Windows PowerShell 5.1 and PowerShell 7. Plan: `run.ps1` exits with the debugger's code, plus `tests/startup_run_ps1_check.py` (ctest `startup_run_ps1`) with the stub debugger as the device-free control. I will not touch `debug_launch.py`, the `-MapDrive` work (#1251), `launch.py` or `gfx2hlsl.py`. AI-assisted.
ChazY11 commented 2026-11-25 01:01:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T23:33:28Z.


Checklist status, measured on main 0d20c5e2 — two items are done, one is still entirely missing

I came here looking for an unclaimed slice and found the checklist has drifted from the code, so this is a status read rather than a claim. Every line
below is something I ran or counted, not an impression.

1. ctest -R '^startup_stubs$' in the Windows job — done

windows.yml runs three unfiltered invocations, so the filter was never needed:

windows.yml:290  ctest --preset pr --no-tests=error ...
windows.yml:295  ctest --preset dev --no-tests=error -E '_hardware$' ...
windows.yml:390  ctest --preset release --no-tests=error -E '_hardware$' ...

Combined with R0Y00's earlier note on this issue ("Both hosted Windows jobs executed startup_stubs and passed"), this bullet can be ticked. Worth
noting the reason it is covered is the absence of a filter, not a targeted run — so if anyone ever adds -R to speed CI up, this coverage disappears
silently.

2. Python syntax/lint pass over tools/startup/ — claimed (triggered02, "as its own PR")

This one I could test the hard way, because this machine cannot create symlinks at all:

independent probe:  symlink refused: winerror=1314
the check itself:   Ran 14 tests in 0.634s ... OK (skipped=1)   exit 0

tests/pe_package_preflight_check.py:206-210 raises SkipTest("this Windows account cannot create symlinks (WinError 1314)"), and the skip is the
path being exercised here — not a hypothetical branch. That is the difference between "the skip exists" and "the skip is what happens".

Two other symlink sites I checked while looking: tools/pe_package_preflight.py only reads is_symlink() as a refusal, and tools/exe_aot.py does
the same at line 105, so neither creates a link and neither can fail with 1314.

4. Labels for startup areas — not done

startup-runtime        exists=False
shader-translation     exists=False
directstorage          exists=False
xg-layout              exists=False
total repository labels: 12 (bug, accessibility, documentation, duplicate, enhancement,
                              good first issue, help wanted, invalid, question, wontfix,
                              awaiting author, priority: P0)

Four labels named in the proposal, none present. This is the only bullet here that needs nothing but a maintainer's two minutes, and it is the one
blocking the "filter these issues" goal the whole proposal opens with. I cannot create labels, so this is a report rather than a patch.

5. Source-built gfx1013 fixture corpus — in progress

The open Part of #1723 PRs are adding exactly these one at a time (formats, SOP2 forms, class comparisons), so this is running, not stalled.

What I took away

The slice I expected to pick up — the 1314 skip — was already implemented. The remaining actionable item is the label set, which only a maintainer can
do. If a different slice is worth carving out for an outside contributor, the one I would volunteer for is a guard against the -R regression in
item 1
: a CI meta-check that the startup_stubs test is present in the test list and executed, so the coverage cannot quietly vanish.

Notes

  • AI-assisted; measured on Windows 11 build 26300.9974 with an account that has no SeCreateSymbolicLinkPrivilege.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7147534787 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1149#issuecomment-7147534787). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T23:33:28Z. --- ## Checklist status, measured on `main` `0d20c5e2` — two items are done, one is still entirely missing I came here looking for an unclaimed slice and found the checklist has drifted from the code, so this is a status read rather than a claim. Every line below is something I ran or counted, not an impression. ### 1. `ctest -R '^startup_stubs$'` in the Windows job — **done** `windows.yml` runs three unfiltered invocations, so the filter was never needed: ```text windows.yml:290 ctest --preset pr --no-tests=error ... windows.yml:295 ctest --preset dev --no-tests=error -E '_hardware$' ... windows.yml:390 ctest --preset release --no-tests=error -E '_hardware$' ... ``` Combined with R0Y00's earlier note on this issue ("Both hosted Windows jobs executed startup_stubs and passed"), this bullet can be ticked. Worth noting the *reason* it is covered is the absence of a filter, not a targeted run — so if anyone ever adds `-R` to speed CI up, this coverage disappears silently. ### 2. Python syntax/lint pass over `tools/startup/` — **claimed** (triggered02, "as its own PR") ### 3. `pe_package_import_closure` skips (77) without the symlink privilege — **done, and verified on an account that actually lacks it** This one I could test the hard way, because this machine cannot create symlinks at all: ```text independent probe: symlink refused: winerror=1314 the check itself: Ran 14 tests in 0.634s ... OK (skipped=1) exit 0 ``` `tests/pe_package_preflight_check.py:206-210` raises `SkipTest("this Windows account cannot create symlinks (WinError 1314)")`, and the skip is the path being exercised here — not a hypothetical branch. That is the difference between "the skip exists" and "the skip is what happens". Two other symlink sites I checked while looking: `tools/pe_package_preflight.py` only *reads* `is_symlink()` as a refusal, and `tools/exe_aot.py` does the same at line 105, so neither creates a link and neither can fail with 1314. ### 4. Labels for startup areas — **not done** ```text startup-runtime exists=False shader-translation exists=False directstorage exists=False xg-layout exists=False total repository labels: 12 (bug, accessibility, documentation, duplicate, enhancement, good first issue, help wanted, invalid, question, wontfix, awaiting author, priority: P0) ``` Four labels named in the proposal, none present. This is the only bullet here that needs nothing but a maintainer's two minutes, and it is the one blocking the "filter these issues" goal the whole proposal opens with. I cannot create labels, so this is a report rather than a patch. ### 5. Source-built gfx1013 fixture corpus — **in progress** The open `Part of #1723` PRs are adding exactly these one at a time (formats, SOP2 forms, class comparisons), so this is running, not stalled. ## What I took away The slice I expected to pick up — the 1314 skip — was already implemented. The remaining actionable item is the label set, which only a maintainer can do. If a different slice is worth carving out for an outside contributor, the one I would volunteer for is a **guard against the `-R` regression in item 1**: a CI meta-check that the `startup_stubs` test is present in the test list and executed, so the coverage cannot quietly vanish. ## Notes - AI-assisted; measured on Windows 11 build 26300.9974 with an account that has no `SeCreateSymbolicLinkPrivilege`.
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
R0Y00/Xbox2Windows#1142
No description provided.