tools: report static stand-in export coverage in compat_report #3457

Manually merged
github merged 7 commits from github-bot/gh-3455 into main 2026-11-29 14:19:39 +00:00 AGit
Owner

@⁠Leyukaka on GitHub · 2026-11-29 13:11 UTC · original
Leyukaka:tools-compat-import-coverage → main · +547 −54 · 6 files · 7 commits · merged 2026-11-29 14:16 UTC

tools/compat_report.py labelled each import with a candidate module route only, and stub_providers was the constant 0. It now also looks each import up in the repository stand-in sources (new tools/standin_exports.py) and reports whether the stand-in declares that export and how the reviewed body behaves. The lookup reads the .def files, the direct extern "C" __declspec(dllexport) lines of src/startup_stubs/d3d12_xs_device.cpp and of the files it includes with a quoted #include (first level), and the thunk table in src/xgameruntime_shim.cpp. The image is still only read as PE directory data.

New fields

Per import row:

  • export_status: implemented, trap, absent or unmeasured.
    • implemented / trap: the export is declared and its target is in the reviewed table in standin_exports.py (or, for the runtime shim, the state column of its thunk table). A trap body in that table reaches x2w_trap::fire on the default path (no permissive or trap-override variable set); seven of the 21 were re-read on 711f2227.
    • absent: the module has a stand-in export table and the name is not in it. An ordinal is absent only for a module whose .def gives every export an ordinal (xmem and gameinput today).
    • unmeasured: everything else, including declared exports with no reviewed target and modules without a stand-in.
  • standin_module, standin_kind (shim, startup, fixture_only), export_source and behavior_source (path:line, or null).

The reviewed table holds 56 export names per source file (35 implemented, 21 trap), not line numbers. The line in behavior_source is resolved when the catalog is built, from the extern "C" ... name(...) { definition or the X2W_TRAP_EXPORT(n, name) line. A reviewed name with no such line in its file raises ValueError.

Section and summary:

  • export_coverage_version: 1.
  • summary.export_status_counts and summary.imports_resolved_and_implemented (the implemented count).
  • summary.stub_providers is now the number of distinct stand-in modules with at least one trap row.

Markdown: one summary row per status, an Imports resolved and implemented (static) row, and an Export status column in both import tables.

Behaviour changes on existing inputs

  • generated_by.version goes from 1 to 2.
  • The scope text is replaced. It now states that runtime loader resolution, provider selection, ABI compatibility and call success are unchecked.
  • Markdown: the sentence ending in Stub providers: 0. is gone; the scope text follows Resolution: not checked., and the count stays in the existing Stub providers table row.
  • Route, summary and row fields that existed before keep their values in the existing positive test.
  • gdk_shim_coverage.read_def is now a wrapper over the new read_def_exports, which standin_exports.py also uses. It raises ValueError on a malformed or duplicate .def line, and on a missing or empty EXPORTS section, where it used to skip such lines. It also decodes strict UTF-8 (the old errors="replace" is gone). On the checked-in .def files the GDK matrix JSON (--exports [] --repo .) is byte-identical between the base and this branch.
  • pe_inventory.import_tables gains a keyword-only typed_symbols (default off, so other callers are unchanged).

Test

On 711f2227 (the branch includes main c3cae611, merged in db5334bf), dev preset configured with -DX2W_WITH_OPUS=OFF:

ctest --preset dev --no-tests=error -R '^compat_report'

1/1 passed. python -I -B tests/compat_report_check.py exits 0.

check_standin_exports computes each expected path:line instead of holding it: direct_export_source finds the direct-export definition with its own regex, def_export_source reads the .def entry through read_def_exports, and the two behavior_source values come from _reviewed_sources. grep -nE ':[0-9]+' tests/compat_report_check.py matches only buf[0:2] = b"MZ".

Mutations on 711f2227, each restored afterwards:

  • A blank line inserted at the top of src/startup_stubs/d3d12_compute_dispatch.inl moves x2w_d3d12_compute_census from 1232 to 1233: the test still passes.
  • With that blank line in place, the expected value forced back to the literal src/startup_stubs/d3d12_compute_dispatch.inl:1232: the test fails with an AssertionError at the row comparison.

XMemTransferMemory sets ERROR_NOT_SUPPORTED and returns FALSE without firing a trap. It is not in the reviewed table, so it reports unmeasured and xmem.dll does not count toward stub_providers; the fixture imports it and expects that row.

Mutations on 469b8e4a (base 77d1ba4d), each restored afterwards:

  • Source file of GameInputCreate in the reviewed table set to src/startup_stubs/xg_xs.cpp: the test fails with ValueError: src/startup_stubs/xg_xs.cpp: missing reviewed export 'GameInputCreate'.
  • line = 1 forced in _reviewed_sources: the test fails in check_reviewed_sources with AssertionError: ('XMemAlloc', 'src/xmem_shim.cpp:1').

On beb33721 (tests only), ctest --preset dev --no-tests=error -R '^compat_report' passes 1/1. It adds six cases that reach the three raise statements of read_def_exports: two ordinals on one line, a malformed line, a duplicate name, a duplicate ordinal, a missing EXPORTS section and an empty one. Replacing each raise with a skip makes one of its cases fail, and removing the duplicate-name or the duplicate-ordinal check makes that case fail.

On 469b8e4a, where the table still held 57 names, all 57 resolved to their definition line, and none of the 57 resolved lines differed from the value that was hard-coded before that commit.

Measured on the earlier head 7af897ad (line numbers are those of that commit), where conditional_import_paths and pe_compat_report_cli_check also passed:

  • return after the own-file yield from in _direct_exports_with_includes (tools/standin_exports.py:152), so included files are no longer read: the test fails at tests/compat_report_check.py:318, in check_standin_exports, on export_status_counts.
  • if attached: replaced by if False: in read_def_exports (tools/gdk_shim_coverage.py:77), so Name@N is no longer split: the test fails at tests/compat_report_check.py:353, in check_def_exports, on Foo@4.

Not covered

  • implemented, trap and unmeasured are a static reading of the sources. Nothing is loaded or called, and the row's resolution stays not_checked.
  • check_reviewed_sources checks that each reviewed name appears on its cited line, not that the line is a definition. Definition-only matching rests on the two regexes in standin_exports.py.
  • The two expected behavior_source values in check_standin_exports come from the tool's own _reviewed_sources; check_reviewed_sources is the only independent check on them.
  • A new export stays unmeasured until it is added to the reviewed table. A stub that refuses without firing a trap (XMemTransferMemory) has no label of its own and stays unmeasured.
  • d3d12_xs_device.cpp includes five files that hold direct exports. Only one export, from d3d12_compute_dispatch.inl, is tested end to end; the other four rest on reading the include lines. Second-level includes are not followed; nothing needs them today.
  • Exports found this way are always unmeasured.
  • tools/gdk_knowledge_report.py has its own EXPORTS handling, which is not changed here.
  • The empty EXPORTS case shares its raise with the missing-section case and was not isolated by a mutation.
  • The other conditions of the malformed-entry check in read_def_exports (reserved name, repeated flag, NONAME without an ordinal, ordinal outside 1..65535, text before EXPORTS) and the strict UTF-8 decoding have no error case.
**@⁠Leyukaka** on GitHub · 2026-11-29 13:11 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3455) `Leyukaka:tools-compat-import-coverage` → `main` · +547 −54 · 6 files · 7 commits · merged 2026-11-29 14:16 UTC `tools/compat_report.py` labelled each import with a candidate module route only, and `stub_providers` was the constant 0. It now also looks each import up in the repository stand-in sources (new `tools/standin_exports.py`) and reports whether the stand-in declares that export and how the reviewed body behaves. The lookup reads the `.def` files, the direct `extern "C" __declspec(dllexport)` lines of `src/startup_stubs/d3d12_xs_device.cpp` and of the files it includes with a quoted `#include` (first level), and the thunk table in `src/xgameruntime_shim.cpp`. The image is still only read as PE directory data. ## New fields Per import row: - `export_status`: `implemented`, `trap`, `absent` or `unmeasured`. - `implemented` / `trap`: the export is declared and its target is in the reviewed table in `standin_exports.py` (or, for the runtime shim, the state column of its thunk table). A `trap` body in that table reaches `x2w_trap::fire` on the default path (no permissive or trap-override variable set); seven of the 21 were re-read on 711f2227. - `absent`: the module has a stand-in export table and the name is not in it. An ordinal is `absent` only for a module whose `.def` gives every export an ordinal (xmem and gameinput today). - `unmeasured`: everything else, including declared exports with no reviewed target and modules without a stand-in. - `standin_module`, `standin_kind` (`shim`, `startup`, `fixture_only`), `export_source` and `behavior_source` (`path:line`, or null). The reviewed table holds 56 export names per source file (35 `implemented`, 21 `trap`), not line numbers. The line in `behavior_source` is resolved when the catalog is built, from the `extern "C" ... name(...) {` definition or the `X2W_TRAP_EXPORT(n, name)` line. A reviewed name with no such line in its file raises `ValueError`. Section and summary: - `export_coverage_version`: 1. - `summary.export_status_counts` and `summary.imports_resolved_and_implemented` (the `implemented` count). - `summary.stub_providers` is now the number of distinct stand-in modules with at least one `trap` row. Markdown: one summary row per status, an `Imports resolved and implemented (static)` row, and an `Export status` column in both import tables. ## Behaviour changes on existing inputs - `generated_by.version` goes from 1 to 2. - The `scope` text is replaced. It now states that runtime loader resolution, provider selection, ABI compatibility and call success are unchecked. - Markdown: the sentence ending in `Stub providers: 0.` is gone; the scope text follows `Resolution: not checked.`, and the count stays in the existing `Stub providers` table row. - Route, summary and row fields that existed before keep their values in the existing positive test. - `gdk_shim_coverage.read_def` is now a wrapper over the new `read_def_exports`, which `standin_exports.py` also uses. It raises `ValueError` on a malformed or duplicate `.def` line, and on a missing or empty `EXPORTS` section, where it used to skip such lines. It also decodes strict UTF-8 (the old `errors="replace"` is gone). On the checked-in `.def` files the GDK matrix JSON (`--exports [] --repo .`) is byte-identical between the base and this branch. - `pe_inventory.import_tables` gains a keyword-only `typed_symbols` (default off, so other callers are unchanged). ## Test On 711f2227 (the branch includes `main` c3cae611, merged in db5334bf), `dev` preset configured with `-DX2W_WITH_OPUS=OFF`: ``` ctest --preset dev --no-tests=error -R '^compat_report' ``` 1/1 passed. `python -I -B tests/compat_report_check.py` exits 0. `check_standin_exports` computes each expected `path:line` instead of holding it: `direct_export_source` finds the direct-export definition with its own regex, `def_export_source` reads the `.def` entry through `read_def_exports`, and the two `behavior_source` values come from `_reviewed_sources`. `grep -nE ':[0-9]+' tests/compat_report_check.py` matches only `buf[0:2] = b"MZ"`. Mutations on 711f2227, each restored afterwards: - A blank line inserted at the top of `src/startup_stubs/d3d12_compute_dispatch.inl` moves `x2w_d3d12_compute_census` from 1232 to 1233: the test still passes. - With that blank line in place, the expected value forced back to the literal `src/startup_stubs/d3d12_compute_dispatch.inl:1232`: the test fails with an `AssertionError` at the row comparison. `XMemTransferMemory` sets `ERROR_NOT_SUPPORTED` and returns `FALSE` without firing a trap. It is not in the reviewed table, so it reports `unmeasured` and `xmem.dll` does not count toward `stub_providers`; the fixture imports it and expects that row. Mutations on 469b8e4a (base 77d1ba4d), each restored afterwards: - Source file of `GameInputCreate` in the reviewed table set to `src/startup_stubs/xg_xs.cpp`: the test fails with `ValueError: src/startup_stubs/xg_xs.cpp: missing reviewed export 'GameInputCreate'`. - `line = 1` forced in `_reviewed_sources`: the test fails in `check_reviewed_sources` with `AssertionError: ('XMemAlloc', 'src/xmem_shim.cpp:1')`. On beb33721 (tests only), `ctest --preset dev --no-tests=error -R '^compat_report'` passes 1/1. It adds six cases that reach the three `raise` statements of `read_def_exports`: two ordinals on one line, a malformed line, a duplicate name, a duplicate ordinal, a missing `EXPORTS` section and an empty one. Replacing each `raise` with a skip makes one of its cases fail, and removing the duplicate-name or the duplicate-ordinal check makes that case fail. On 469b8e4a, where the table still held 57 names, all 57 resolved to their definition line, and none of the 57 resolved lines differed from the value that was hard-coded before that commit. Measured on the earlier head 7af897ad (line numbers are those of that commit), where `conditional_import_paths` and `pe_compat_report_cli_check` also passed: - `return` after the own-file `yield from` in `_direct_exports_with_includes` (`tools/standin_exports.py:152`), so included files are no longer read: the test fails at `tests/compat_report_check.py:318`, in `check_standin_exports`, on `export_status_counts`. - `if attached:` replaced by `if False:` in `read_def_exports` (`tools/gdk_shim_coverage.py:77`), so `Name@N` is no longer split: the test fails at `tests/compat_report_check.py:353`, in `check_def_exports`, on `Foo@4`. ## Not covered - `implemented`, `trap` and `unmeasured` are a static reading of the sources. Nothing is loaded or called, and the row's `resolution` stays `not_checked`. - `check_reviewed_sources` checks that each reviewed name appears on its cited line, not that the line is a definition. Definition-only matching rests on the two regexes in `standin_exports.py`. - The two expected `behavior_source` values in `check_standin_exports` come from the tool's own `_reviewed_sources`; `check_reviewed_sources` is the only independent check on them. - A new export stays `unmeasured` until it is added to the reviewed table. A stub that refuses without firing a trap (`XMemTransferMemory`) has no label of its own and stays `unmeasured`. - `d3d12_xs_device.cpp` includes five files that hold direct exports. Only one export, from `d3d12_compute_dispatch.inl`, is tested end to end; the other four rest on reading the include lines. Second-level includes are not followed; nothing needs them today. - Exports found this way are always `unmeasured`. - `tools/gdk_knowledge_report.py` has its own `EXPORTS` handling, which is not changed here. - The empty `EXPORTS` case shares its `raise` with the missing-section case and was not isolated by a mutation. - The other conditions of the malformed-entry check in `read_def_exports` (reserved name, repeated flag, `NONAME` without an ordinal, ordinal outside 1..65535, text before `EXPORTS`) and the strict UTF-8 decoding have no error case.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 13:15:04 +00:00
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-11-29 13:40 UTC · original

Review of head beb33721. Its merge-base is 77d1ba4d. git merge-tree --write-tree origin/main beb33721 against main 4b0586d4 exits 0. I ran tests/compat_report_check.py with Python 3.13 on Linux, at the head and on a trial merge with main.

Why CI is UNSTABLE: Run platform-independent Python checks on Linux fails in this PR's own test. The job log has FAILED: tests/compat_report_check.py, from check_standin_exports at assert [tuple(row[field] for field in fields) for row in routing["imports"]] == [ (AssertionError). It is the only failing group in that job. The other jobs passed.

  • At the head, the test passes: compat report synthetic checks passed, exit 0.
  • On the trial merge with main 17b662a2, it fails the same way as CI (exit 1). The tool reports x2w_d3d12_compute_census at src/startup_stubs/d3d12_compute_dispatch.inl:1199, and the test expects :1126.
  • On main that line has moved twice since this PR's base: grep -n 'x2w_d3d12_compute_census(' gives 1126 at 77d1ba4d, 1199 at 17b662a2 and 1232 at 4b0586d4. The edits came from the packed_d16_x manifest commits and the native-compute-bindings merge.

MUST

  1. check_standin_exports hard-codes line numbers in live repository sources. They are d3d12_compute_dispatch.inl:1126, xmem_shim.cpp:84, xg_xs.cpp:508, and xmem_shim.def:3/:4 and xg_xs.def:4. Any edit above one of those lines makes the Linux job fail on every open PR. That is happening now. 469b8e4a stopped pinning these numbers in the reviewed table, but the test's expected rows still pin them. A suggested fix is to compute each expected path:line in the test by finding the definition or .def line in that file, the way check_reviewed_sources checks the cited line. Keep the path part and the status columns literal. A rebase that only updates 1126 would go red again on the next edit to that file.

NIT

  1. XMemTransferMemory is in the reviewed table as trap, but its body (src/xmem_shim.cpp) sets ERROR_NOT_SUPPORTED and returns FALSE. It never calls x2w_trap::fire. Because of that row, xmem.dll counts toward stub_providers. I compared every other trap entry against its body: each one fires x2w_trap::fire unless the module's permissive variable is set, directly or through accept() in chad.cpp. Either document that trap includes refusal stubs, or give refusal stubs their own label.

Checked: the 57 reviewed names all resolve to extern "C" … name(…) { or X2W_TRAP_EXPORT lines on the merged tree. None of the 35 implemented bodies calls x2w_trap::fire. import_tables(..., typed_symbols=False) keeps the old #N strings for other callers. The diff has no binary files and adds no title-specific inputs.

Not merged because of MUST 1.

AI-assisted.

**@⁠JohnConnorNPC** on GitHub · 2026-11-29 13:40 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3455#issuecomment-7256721162) Review of head `beb33721`. Its merge-base is `77d1ba4d`. `git merge-tree --write-tree origin/main beb33721` against `main` `4b0586d4` exits 0. I ran `tests/compat_report_check.py` with Python 3.13 on Linux, at the head and on a trial merge with `main`. **Why CI is UNSTABLE:** `Run platform-independent Python checks on Linux` fails in this PR's own test. The job log has `FAILED: tests/compat_report_check.py`, from `check_standin_exports` at `assert [tuple(row[field] for field in fields) for row in routing["imports"]] == [` (`AssertionError`). It is the only failing group in that job. The other jobs passed. - At the head, the test passes: `compat report synthetic checks passed`, exit 0. - On the trial merge with `main` `17b662a2`, it fails the same way as CI (exit 1). The tool reports `x2w_d3d12_compute_census` at `src/startup_stubs/d3d12_compute_dispatch.inl:1199`, and the test expects `:1126`. - On `main` that line has moved twice since this PR's base: `grep -n 'x2w_d3d12_compute_census('` gives 1126 at `77d1ba4d`, 1199 at `17b662a2` and 1232 at `4b0586d4`. The edits came from the `packed_d16_x` manifest commits and the native-compute-bindings merge. **MUST** 1. `check_standin_exports` hard-codes line numbers in live repository sources. They are `d3d12_compute_dispatch.inl:1126`, `xmem_shim.cpp:84`, `xg_xs.cpp:508`, and `xmem_shim.def:3/:4` and `xg_xs.def:4`. Any edit above one of those lines makes the Linux job fail on every open PR. That is happening now. `469b8e4a` stopped pinning these numbers in the reviewed table, but the test's expected rows still pin them. A suggested fix is to compute each expected `path:line` in the test by finding the definition or `.def` line in that file, the way `check_reviewed_sources` checks the cited line. Keep the `path` part and the status columns literal. A rebase that only updates `1126` would go red again on the next edit to that file. **NIT** 2. `XMemTransferMemory` is in the reviewed table as `trap`, but its body (`src/xmem_shim.cpp`) sets `ERROR_NOT_SUPPORTED` and returns `FALSE`. It never calls `x2w_trap::fire`. Because of that row, `xmem.dll` counts toward `stub_providers`. I compared every other `trap` entry against its body: each one fires `x2w_trap::fire` unless the module's permissive variable is set, directly or through `accept()` in `chad.cpp`. Either document that `trap` includes refusal stubs, or give refusal stubs their own label. Checked: the 57 reviewed names all resolve to `extern "C" … name(…) {` or `X2W_TRAP_EXPORT` lines on the merged tree. None of the 35 `implemented` bodies calls `x2w_trap::fire`. `import_tables(..., typed_symbols=False)` keeps the old `#N` strings for other callers. The diff has no binary files and adds no title-specific inputs. Not merged because of MUST 1. AI-assisted.
Author
Owner

@⁠Leyukaka on GitHub · 2026-11-29 13:53 UTC · original

New head 711f2227. The branch now includes main c3cae611 (merge db5334bf).

  1. MUST 1, c68ffa88: check_standin_exports no longer holds a line number of a live source. Each expected path:line is computed, with the path and the status columns still literal (tests/compat_report_check.py:370-385). direct_export_source (:324) finds the extern "C" __declspec(dllexport) definition with its own regex, def_export_source (:333) reads the .def entry through read_def_exports, and the two behavior_source values come from _reviewed_sources.
  2. NIT 2, 711f2227: XMemTransferMemory is removed from the reviewed table (tools/standin_exports.py:16-32), so it reports unmeasured with a null behavior_source, and xmem.dll no longer counts toward stub_providers. trap keeps one meaning, a body that reaches x2w_trap::fire on the default path, and refusal stubs get no label of their own. Seven of the 21 remaining trap bodies were re-read on this head (acphal, chad, xapu, xg_xs); all seven fire when no permissive or trap-override variable is set. The fixture imports XMemTransferMemory and expects the unmeasured row (tests/compat_report_check.py:349, :379-380). The table now holds 56 names: 35 implemented, 21 trap.

Measured on 711f2227, dev preset configured with -DX2W_WITH_OPUS=OFF:

  • ctest --preset dev --no-tests=error -R '^compat_report': 1/1 passed.
  • python -I -B tests/compat_report_check.py: compat report synthetic checks passed, exit 0.
  • A blank line inserted at the top of src/startup_stubs/d3d12_compute_dispatch.inl moves x2w_d3d12_compute_census from 1232 to 1233; the test still passes.
  • With that blank line in place, the expected value forced back to the literal src/startup_stubs/d3d12_compute_dispatch.inl:1232: the test fails with an AssertionError at the row comparison.
  • grep -nE ':[0-9]+' tests/compat_report_check.py matches only buf[0:2] = b"MZ".

Not covered: the two expected behavior_source values come from the tool's own _reviewed_sources, so that column compares the tool with itself. The only independent check on it is check_reviewed_sources (tests/compat_report_check.py:303), which requires the cited line to contain the name.

**@⁠Leyukaka** on GitHub · 2026-11-29 13:53 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3455#issuecomment-7256884719) New head `711f2227`. The branch now includes `main` `c3cae611` (merge `db5334bf`). 1. MUST 1, `c68ffa88`: `check_standin_exports` no longer holds a line number of a live source. Each expected `path:line` is computed, with the path and the status columns still literal (`tests/compat_report_check.py:370-385`). `direct_export_source` (`:324`) finds the `extern "C" __declspec(dllexport)` definition with its own regex, `def_export_source` (`:333`) reads the `.def` entry through `read_def_exports`, and the two `behavior_source` values come from `_reviewed_sources`. 2. NIT 2, `711f2227`: `XMemTransferMemory` is removed from the reviewed table (`tools/standin_exports.py:16-32`), so it reports `unmeasured` with a null `behavior_source`, and `xmem.dll` no longer counts toward `stub_providers`. `trap` keeps one meaning, a body that reaches `x2w_trap::fire` on the default path, and refusal stubs get no label of their own. Seven of the 21 remaining `trap` bodies were re-read on this head (acphal, chad, xapu, xg_xs); all seven fire when no permissive or trap-override variable is set. The fixture imports `XMemTransferMemory` and expects the `unmeasured` row (`tests/compat_report_check.py:349`, `:379-380`). The table now holds 56 names: 35 `implemented`, 21 `trap`. Measured on `711f2227`, `dev` preset configured with `-DX2W_WITH_OPUS=OFF`: - `ctest --preset dev --no-tests=error -R '^compat_report'`: 1/1 passed. - `python -I -B tests/compat_report_check.py`: `compat report synthetic checks passed`, exit 0. - A blank line inserted at the top of `src/startup_stubs/d3d12_compute_dispatch.inl` moves `x2w_d3d12_compute_census` from 1232 to 1233; the test still passes. - With that blank line in place, the expected value forced back to the literal `src/startup_stubs/d3d12_compute_dispatch.inl:1232`: the test fails with an `AssertionError` at the row comparison. - `grep -nE ':[0-9]+' tests/compat_report_check.py` matches only `buf[0:2] = b"MZ"`. Not covered: the two expected `behavior_source` values come from the tool's own `_reviewed_sources`, so that column compares the tool with itself. The only independent check on it is `check_reviewed_sources` (`tests/compat_report_check.py:303`), which requires the cited line to contain the name.
github manually merged commit 6a323db95e into main 2026-11-29 14:19:38 +00:00
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-11-29 14:16 UTC · original

Re-review of head 711f2227 (new since beb33721: merge of main db5334bf, then c68ffa88 and 711f2227). git merge-tree --write-tree origin/main 711f2227 against main 0ed385dc exits 0. I ran tests/compat_report_check.py with Python 3.13 on Linux at the head and on that trial merge, plus five mutations of the merged tree.

Earlier findings

  1. MUST 1 (pinned line numbers): fixed. The expected rows now compute each path:line (direct_export_source, def_export_source). The path and status columns stay literal.
    • Head: compat report synthetic checks passed, exit 0. Trial merge: same, exit 0. On that main, x2w_d3d12_compute_census( is at line 1250 (git grep -n), so the old literal :1126 would have failed again.
    • With a blank line added at the top of d3d12_compute_dispatch.inl, the test still passes (exit 0). With a comment line added above EXPORTS in src/xmem_shim.def, it also still passes (exit 0).
    • The tool reports a direct export one line late (f"{path}:{line + 1}" in _direct_exports): AssertionError, exit 1. The tool reports a .def export one line late: AssertionError, exit 1. So the computed expectations are not just copies of the tool's own output.
    • behavior_source still comes from _reviewed_sources, as your reply says. If _reviewed_sources reports lines one late, check_reviewed_sources fails (AssertionError: ('XMemAlloc', 'src/xmem_shim.cpp:85'), exit 1). So that column has an independent check.
  2. NIT 2 (XMemTransferMemory as trap): fixed. It is out of the reviewed table and the fixture expects unmeasured. Putting the trap row back fails the test (AssertionError, exit 1). No tool source still names XMemTransferMemory (grep -c gives 0 in standin_exports.py, gdk_shim_coverage.py and compat_report.py).

New findings: none.

CI on 711f2227 is green, including Run platform-independent Python checks on Linux. There are no reviews or change requests. The diff has no binary files and no title-specific inputs.

Merging.

AI-assisted.

**@⁠JohnConnorNPC** on GitHub · 2026-11-29 14:16 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3455#issuecomment-7257172586) Re-review of head `711f2227` (new since `beb33721`: merge of `main` `db5334bf`, then `c68ffa88` and `711f2227`). `git merge-tree --write-tree origin/main 711f2227` against `main` `0ed385dc` exits 0. I ran `tests/compat_report_check.py` with Python 3.13 on Linux at the head and on that trial merge, plus five mutations of the merged tree. **Earlier findings** 1. MUST 1 (pinned line numbers): fixed. The expected rows now compute each `path:line` (`direct_export_source`, `def_export_source`). The path and status columns stay literal. - Head: `compat report synthetic checks passed`, exit 0. Trial merge: same, exit 0. On that `main`, `x2w_d3d12_compute_census(` is at line 1250 (`git grep -n`), so the old literal `:1126` would have failed again. - With a blank line added at the top of `d3d12_compute_dispatch.inl`, the test still passes (exit 0). With a comment line added above `EXPORTS` in `src/xmem_shim.def`, it also still passes (exit 0). - The tool reports a direct export one line late (`f"{path}:{line + 1}"` in `_direct_exports`): `AssertionError`, exit 1. The tool reports a `.def` export one line late: `AssertionError`, exit 1. So the computed expectations are not just copies of the tool's own output. - `behavior_source` still comes from `_reviewed_sources`, as your reply says. If `_reviewed_sources` reports lines one late, `check_reviewed_sources` fails (`AssertionError: ('XMemAlloc', 'src/xmem_shim.cpp:85')`, exit 1). So that column has an independent check. 2. NIT 2 (`XMemTransferMemory` as `trap`): fixed. It is out of the reviewed table and the fixture expects `unmeasured`. Putting the `trap` row back fails the test (`AssertionError`, exit 1). No tool source still names `XMemTransferMemory` (`grep -c` gives 0 in `standin_exports.py`, `gdk_shim_coverage.py` and `compat_report.py`). **New findings:** none. CI on `711f2227` is green, including `Run platform-independent Python checks on Linux`. There are no reviews or change requests. The diff has no binary files and no title-specific inputs. Merging. AI-assisted.
This discussion has been locked. Commenting is limited to contributors.
No description provided.