Skip to content

ci(wheels): assert every shipped module imports from the installed wheel - #8

Merged
Onlyti merged 1 commit into
mainfrom
ci/wheel-import-closure
Sep 21, 2026
Merged

Onlyti merged 1 commit into
mainfrom
ci/wheel-import-closure

Conversation

@Onlyti

@Onlyti Onlyti commented Sep 21, 2026

Copy link
Copy Markdown
Owner

What

Closes the wheel import-closure hole that let vdsim_preset.py ship missing (fixed in #7) pass every gate we had.

Two files, no core changes:

file change
tools/wheel_import_smoke.py new. Parses the SKBUILD install list out of python/CMakeLists.txt (single source — the module names are not re-typed in the workflow), imports every shipped module, and asserts each resolves under the installed wheel rather than the checkout.
.github/workflows/wheels.yml CIBW_TEST_COMMAND runs the smoke script; CIBW_TEST_REQUIRES gains matplotlib pillow.

CIBW_TEST_REQUIRES's matplotlib/pillow are the already-declared [plot] extra — vdsim_render imports them at module scope, so the closure check needs them in the test env. install_requires is unchanged; this is not a runtime dependency increase.

Why this is not a 3x-consecutive-count PR

Changed surface is .github/workflows/wheels.yml + tools/** only.

  • registration surface (CMakePresets.json, every CMakeLists.txt, cmake/**) diff vs main: 0 files
  • no ctest registration added → count stays 492/492, docs/VALIDATION.md currency stays canonical (no PENDING transition)
  • gate for this PR: one green build.yml run

Detection evidence

Dry-run against a deliberately stale site-packages resolves 13 modules and flags exactly the shipping gaps:

modules to import (13): vdsim, vdsim_lab, vdsim_plant, vdsim_trace, vdsim_render,
                        vdsim_render3d, vdsim_preset, protocol, opendrive, rd5_route,
                        quickstart, catalog, vdsim_rl
FAIL vdsim_render     ModuleNotFoundError: No module named 'vdsim_preset'
FAIL vdsim_render3d   ModuleNotFoundError: No module named 'vdsim_render3d'

That is the #7 defect class reproduced by the check that would have caught it.

What it does not cover

Import-time only. A module that imports cleanly but needs a data file absent from the wheel still passes here — that is what pre-flight C-2 (clean venv, no source tree, quickstart + demo) is for.

The wheel test command imported vdsim and built Sim twice; it never touched
vdsim_render, so a wheel that shipped vdsim_render.py without the
vdsim_preset.py it imports passed the whole 6-wheel matrix plus the verify
job (measured 2026-09-18, pre-flight C-2).

tools/wheel_import_smoke.py reads the install list out of
python/CMakeLists.txt - the file that decides what ships - and imports every
listed module, asserting each resolves to the installed distribution rather
than to the checkout. Names are never restated in the workflow, so the check
follows the list when it changes.

matplotlib/pillow join CIBW_TEST_REQUIRES because vdsim_render imports them
at module scope; they are the declared [plot] extra.
@Onlyti
Onlyti merged commit 3bf4e6f into main Sep 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant