G1 — Cross-platform end-to-end validation (Windows / macOS)¶
Registry: UC-PLAT-windows-pe (complete), UC-PLAT-macos-macho (complete)
Effort: L · Risk: medium (CI runner availability, toolchain drift)
Problem¶
This plan tracked the transition from parser-level PE/PDB and Mach-O support to
workflow-level native-binary validation. It is now closed for the core compare
workflow: native PE/Mach-O comparisons are exercised in CI, and the MSVC+PDB lane
remains as a non-blocking compatibility-hardening lane.
Goal & acceptance criteria¶
- [x] A
comparesmoke job on native PE binaries (MinGW first, then MSVC) runs a curated subset of the catalog and matchesground_truth.json. - [x] A
compare/appcompatsmoke job on native Mach-O binaries (x86-64 and ARM64) runs the same curated subset. - [x] macOS ARM64 AAPCS: HFA/HVA aggregates and small-struct register passing
produce a
VALUE_ABI_TRAIT_CHANGED/CALLING_CONVENTION_CHANGED-class finding where the SysV-x86-64 path already does, or the divergence is documented as a typedknown_gap. - [x] Each case promoted from aspirational to validated drops its
known_gapandtests/test_platform_coverage_honesty.pyis updated so macOS/Windows counts reflect the newly-validated reality.
Progress¶
- Closed: native PE/Mach-O compare validation is covered by the cross-platform lane; MSVC+PDB coverage is tracked in Backlog until it is promoted from non-blocking.
- Castxml-free portable subset (Linux baseline):
tests/test_castxml_free_examples.pyvalidates 40 catalog cases end-to-end using only a C/C++ compiler + DWARF (no castxml), in the default lane. This hardens the no-external-tools path and is a prerequisite for extending the same compiler-only validation to macOS (.dSYM) and MinGW Windows (DWARF), where castxml is the current blocker. Documented under "Castxml-free validation" indocs/reference/platforms.md.
Design¶
- Curate a portable subset of the catalog that compiles cleanly under
MinGW/MSVC and Apple clang (start from cases already tagged for the platform
without a
known_gap). Drive them throughcomparewithground_truth.jsonas the oracle, reusing the autodiscovery harness intests/test_abi_examples.py/tests/test_example_autodiscovery.py. - Windows: extend the existing
windows-latestlane (and the MSVC lane) to build the subset with the platform compiler and assert verdicts. Reconcile the MSVC-vs-Itanium mangling mismatch already documented for--scope-public-headers(abicheck/service.py::_has_matched_public_surface). - macOS: add a
macos-latestlane (Apple clang + castxml from Homebrew). Track the castxml__has_cpp_attributeXcode issue (seedocs/concepts/limitations.md) via the shim-header workaround. - ARM64 calling convention: extend
abicheck/macho_metadata.py/abicheck/dwarf_advanced.pyvalue-ABI heuristics to model AAPCS64 HFA/HVA and the 16-byte small-struct boundary; reusetests/test_macos_arm64_abi.pyas the unit anchor.
Files & surfaces¶
- CI:
.github/workflows/ci.yml(new/extended macOS + PE smoke lanes). abicheck/macho_metadata.py,abicheck/dwarf_advanced.py(ARM64 AAPCS).tests/test_abi_examples.py(parametrize platform-native builds).tests/test_platform_coverage_honesty.py(relax the strict-subset guard as cases get validated).
Tests¶
@pytest.mark.integrationjobs gated to the relevant runner OS.- Unit coverage for the ARM64 AAPCS heuristic with synthetic DWARF.
Example fixtures¶
Reuse existing cases; add native build recipes to examples/CMakeLists.txt.
Out of scope¶
Windows ordinal-only DLLs without a name table; two-level-namespace Mach-O resolution (track separately).