Skip to content

Fix message ownership, SWIG iterator safety, and container release recovery - #1667

Merged
schaubh merged 5 commits into
developfrom
feature/msg_fixes
Nov 3, 2026
Merged

schaubh merged 5 commits into
developfrom
feature/msg_fixes

Conversation

@schaubh

@schaubh schaubh commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

Port three fixes from the v2.12 maintenance branch to v2.13, preserving the existing ABI:

  1. Retain the module owning a redirected C++ output, reject deleted sources, and avoid direct self-retention.
  2. Preserve message-vector ownership across iteration and later module imports, keep the GIL during affected SWIG iterator operations, and align shared numeric-vector registrations.
  3. Free container-runner disk space and support rebuilding an existing release tag, with source-version, image, and multi-architecture manifest verification.

Raw pointer-vector copies and slices intentionally cannot establish ownership for redirection. Existing message-lifetime restrictions and image-buffer behavior remain unchanged.

The commits retain their original separation. Port-specific adjustments update the v2.13 template-module API usage and documentation snippet layout.

Verification

Added and expanded regression tests for redirected-output lifetimes, vector ownership, import-order behavior, iterator safety, and numeric-vector bindings.

Local validation passed:

  • 671 Python tests under Python 3.15 covering messaging and affected modules.
  • 28 native ownership tests.
  • 90 focused binding tests under Python 3.14.
  • Container workflow lint, documentation snippet generation, and whitespace checks.

Cross-platform execution and actual container publication have not yet been validated.

Documentation

Updated release-note and known-issue snippets describing the ownership fixes, iterator and numeric-vector corrections, and container release recovery.

Reviewers should check the documented restrictions on redirection order, native ownership cycles, pointer-vector copies and slices, and image-buffer lifetime. API comments also document the enclosing-owner argument used to prevent self-retention.

Future work

Broader ownership changes requiring an ABI break remain separate from this PR.

Track the owning module on borrowed output proxies and resolve that owner
when redirecting another output. Retain the module independently for the
redirected message and its consumers, including after the source output is
rerouted. Reject saved proxies whose owning module has already been deleted.
Avoid retaining the enclosing module when redirecting its own outputs.

Add regression coverage for source-module deletion, unrelated-module writes,
reader/recorder/payload lifetimes, reassignment, stale proxies, and direct
or indirect redirection between co-owned outputs. Add patch release notes
and a known-issue follow-up.

Validation: the primary regression failed against the original backport.
Rebuilt the isolated 2.12.2 Release/OpNav tree; 251 Python tests and 193
native tests passed. One MuJoCo-only test skipped because MuJoCo is disabled.
The messaging header compiled in isolation, and the added RST parsed cleanly.
Generated SWIG wrappers retain the pre-existing unused-owner warnings.
- Preserve module owners through vector access and iterator operations,
  including after late module imports.
- Keep the GIL during unsafe native iterator operations.
- Fix import-order-dependent numeric-vector bindings.
- Add regression coverage and document message lifetime limitations.
- Preserve the native ABI.

Validation: 639 Python tests passed, 1 skipped; 193 native tests passed.
Vizard OpNav completed with 200 camera frames and seven plots.
@schaubh schaubh self-assigned this Nov 2, 2026
@schaubh schaubh added bug Something isn't working enhancement New feature or request labels Nov 2, 2026
@schaubh schaubh added this to Basilisk Nov 2, 2026
@schaubh
schaubh requested a review from a team as a code owner November 2, 2026 23:09
@schaubh schaubh moved this to 👀 In review in Basilisk Nov 2, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T23:12:17.397816Z 37944c3 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 37944c3747

ℹ️ 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".

Free hosted-runner disk before Docker setup, and allow manual recovery
from an existing release tag while pinning both builds to its commit.
Validate the source version, published images, and both manifest
architectures. Make latest updates explicit for manual recovery.

Validation: actionlint, pre-commit, shell/Python syntax, tag and version
checks, and complete/incomplete manifest cases.
Follow _swig_bsk_owner chains when resolving message storage owners,
so temporary MuJoCo body and site proxies do not cause false
ReferenceError failures. Resolve destination owners to prevent
self-retention when redirecting outputs within the same scene.

Add regression coverage for temporary accessor chains, scene retention
and release, and deleted-scene rejection. Update the release note.
@schaubh
schaubh merged commit d0f9832 into develop Nov 3, 2026
8 checks passed
@schaubh
schaubh deleted the feature/msg_fixes branch November 3, 2026 15:05
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Basilisk Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant