Skip to content

Validate transmit message types before native access - #255

Open
drebbe-intrepid wants to merge 2 commits into
masterfrom
codex/fix-239-transmit-types
Open

drebbe-intrepid wants to merge 2 commits into
masterfrom
codex/fix-239-transmit-types

Conversation

@drebbe-intrepid

Copy link
Copy Markdown
Collaborator

Fixes #239

Reject unsupported scalar messages and tuple elements with TypeError before taking native pointers or transmitting any part of a batch. SpyMessage and SpyMessageJ1850 inputs remain supported.

Validation: the new regression failed against the original extension (None was accepted). Rebuilt on Windows x64 with CPython 3.12.10: all 31 tests pass. A native mock verifies zero calls for 35 invalid scalar/batch combinations, successful transmission for both supported types, network IDs, empty batches, and native failure propagation. No hardware was accessed.

Independent critic /root/critic239 explicitly agreed with the final diff and independently passed the regression test. Builder agreement recorded before commit e56291f. CI and hardware acceptance remain with the parent coordinator; do not merge as part of this task.

Reject unsupported objects before reading native message fields or transmitting any part of a batch. Preserve both supported message layouts and cover validation with a hardware-free native stub.
Shared None counts include device handle leaks and interpreter bookkeeping. Measure private rejected inputs, batch containers, and valid neighbors over repeated calls while retaining the full type-rejection matrix.
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.

[P1] transmit_messages casts arbitrary Python objects to native message structures

1 participant