Skip to content

Bugfix/clean wrapper packaging safety (Codex gpt-5.6) - #28

Merged
PeterCalifano merged 9 commits into
mainfrom
bugfix/clean-wrapper-packaging-safety
Jul 28, 2026
Merged

Bugfix/clean wrapper packaging safety (Codex gpt-5.6)#28
PeterCalifano merged 9 commits into
mainfrom
bugfix/clean-wrapper-packaging-safety

Conversation

@PeterCalifano

@PeterCalifano PeterCalifano commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

This follow-up records the final v1.12.1 scope and validation. The original packaging objectives remain unchanged, while the implementation was simplified, split by responsibility, and hardened against resolved filename collisions and source-archive races.

The signed v1.12.1 tag resolves to 480d10a692836040bcae2023e763c553acfcc64d.

Main Changes

  • Split the former monolithic wrapper implementation into:
  • HandleWrapper.cmake for public gtwrap orchestration;
  • HandlePythonWrapper.cmake for Python targets and packaging;
  • HandleMatlabWrapper.cmake for MATLAB handling;
  • StagePythonRuntimeArtifacts.cmake for resolved-name validation and serialized staging.
  • Resolve wrapper, runtime target-file, and SONAME filenames at build time instead of approximating them during configuration.
  • Reject runtime/runtime, runtime/wrapper-extension, and target-file/SONAME collisions before copying any artifact, including configuration-dependent generator-expression output names.
  • Keep Python wheel and CMake installations prefix-relative and loader-relative, while excluding checkout-only _wrapper_build.py metadata.
  • Exclude active and cache-proven generated build trees from sourcearchives without dropping legitimate nested source, install, or foreign child-project content.
  • Preserve all production wrapper modules through tailoring while keeping template-conformance verifiers template-owned for the v1.12.1 baseline.
  • Synchronize all four ROS 2 package manifests with the final v1.12.1 release.

Testing / Validation

  • Fresh template CPU build and complete CTest suite passed: 28/28.
  • Fresh CUDA 12.9.41 build targeting sm_120 passed: 31/31.
  • ROS 2 Jazzy built all four packages and passed 10/10 tests with no errors, failures, or skips.
  • Focused Python packaging, source-release, clean-path ownership, tailoring, and tailored-project wrapper acceptance passed.
  • Wheel and CMake-prefix installations imported with no checkout loader path and contained exactly the declared native artifacts.
  • Collision rejection, incremental runtime refresh, loader-relative RUNPATH, metadata exclusion, shared/static packaging, install/export, and external-consumer checks passed.
  • The aligned TestField v1.12.1 downstream acceptance passed:
    • CPU: 40/40;
    • CUDA: 41/41;
    • explicit OptiX: 17/17;
    • ROS 2: 10/10.
  • Template branch/tag native, documentation, ROS 2, rollout-rehearsal, and tailored-project CI completed successfully.
  • TestField main/tag native, documentation, and ROS 2 CI also completed successfully.
  • CUDA CI remains intentionally skipped while the self-hosted runner is disabled; the corresponding local CUDA and OptiX matrices passed.
  • ShellCheck, bash -n, Python byte-compilation, YAML/XML parsing, conflict-marker checks, git diff --check, and the CMake 3.15 API-floor audit passed.

Notes For Reviewers

  • HandleWrapper.cmake is now a smaller public facade rather than the owner of every Python, MATLAB, and runtime-staging detail.
  • Public wrapper options, including <namespace>_GTWRAP_RUNTIME_DEPENDENCY_TARGETS, remain supported. Private helper signatures and the previous configure-time filename analyzer are intentionally not preserved.
  • Runtime declarations still accept direct project-owned SHARED_LIBRARY or MODULE_LIBRARY targets. Alias, imported, static, interface, and missing targets remain intentionally unsupported.
  • _wrapper_build.py remains checkout-only metadata and is excluded from wheels and CMake installations.
  • The v1.12.1 tag is the fixed correctness baseline. Moving template- system conformance ownership into the standalone TestField harness is a separate v2.0.0 refactor and is not part of this pull request.

- Add a distinct option for direct runtime dependency targets

- Automatically package the main shared library beside the Python extension

- Stage and install exact target and SONAME artifacts without directory scanning

- Use loader-relative runtime paths and prefix-relative CMake destinations

- Produce deterministic wheels and reject stale runtime metadata

- Add Windows DLL search handles and document the direct-target contract
@PeterCalifano PeterCalifano self-assigned this Jul 27, 2026
@PeterCalifano PeterCalifano added the enhancement New feature or request label Jul 27, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f21709791

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmake/HandleWrapper.cmake Outdated
Comment thread cmake/HandleWrapper.cmake Outdated
- Derive the prefix-relative site-packages path from resolved major/minor

- Reject configurations without a resolved Python ABI version

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b277e4b84e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmake/HandleWrapper.cmake Outdated
Comment thread CMakeLists.txt Outdated
- Resolve runtime filenames at build time and reject flat-package collisions.

- Split Python, MATLAB, and runtime-staging wrapper responsibilities.

- Exclude only active or cache-proven build trees from source archives.

- Preserve production wrapper modules through tailoring and update documentation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 480d10a692

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmake/StagePythonRuntimeArtifacts.cmake
@PeterCalifano
PeterCalifano merged commit ec2b86e into main Jul 28, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant