Skip to content

fix(kvaser): pass unsigned integer for local TXACK - #2134

Open
timothyanderson096-ocdealcheck wants to merge 1 commit into
hardbyte:mainfrom
timothyanderson096-ocdealcheck:fix/kvaser-txack-buffer-width-2050
Open

timothyanderson096-ocdealcheck wants to merge 1 commit into
hardbyte:mainfrom
timothyanderson096-ocdealcheck:fix/kvaser-txack-buffer-width-2050

Conversation

@timothyanderson096-ocdealcheck

Copy link
Copy Markdown
Contributor

Summary of Changes

CANlib documents canIOCTL_SET_LOCAL_TXACK as taking an unsigned integer, but the Kvaser constructor passes a one-byte buffer. Use ctypes.c_uint and its native size. Preserve the existing TXECHO byte buffer and error propagation.

Adds a constructor regression covering all four single_handle / receive_own_messages combinations and a news fragment. The vendor contract provides the independent expected type and size.

Related Issues / Pull Requests

Related to #2050, #2051, #2079 and #1908. These reports include other ioctl failures; this change addresses only the TXACK argument contract and does not claim every reported hardware failure is resolved.

Type of Change

  • Bug fix

Checklist

  • Contribution guide followed; current base and existing discussions checked.
  • Regression tests added.
  • Documentation/news fragment added in doc/changelog.d/2050.fixed.rst.
  • All checks and tests pass (tox) — focused and configured static/docs results are below; full suite and hosted matrix remain unverified.

Validation

Exact head 4d417b449d4c8926aacdbbc042eceb303011d6c1, based on current upstream 2aec6d66d28c24559cc1961d901c864d2f5b9e4e. No source revision was needed during this refresh.

  • Linux CPython 3.12.14 and 3.14.10, configured focused pytest with timeout/coverage: 19 tests and 4 subtests pass.
  • Original production with identical final tests on Python 3.14: 19 passing controls and 4 failing subtests, each reporting the TXACK buffer width as 1 instead of 4. Only native CANlib boundaries are mocked.
  • On the configured Python 3.14 runtime: Black 26.10.1 checks all 155 files; Ruff 0.17.5 and the complete configured Pylint 4.1.4 targets pass; Mypy 2.4.1 passes all five configured Python 3.11–3.15 targets (65 source files each).
  • Configured strict HTML build and all 39 documentation doctests pass. Whitespace checks pass.

Native CANlib, physical adapters, the full test suite and hosted OS/interpreter validation remain unverified. This is a vendor-contract regression, not a physical receiver reproduction.

Prepared with OpenAI Codex assistance and independent inspection.

Timothy Anderson — Spotted Ridge Engineering / OC Labs
Independent software verification · GDN (Global Decision Network)
timothyanderson096@gmail.com · Engineering evidence

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T00:06:24.883072Z 4d417b4 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.

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