Skip to content

os: add support for windows - #3724

Draft
AmyJeanes wants to merge 6 commits into
commaai:masterfrom
AmyJeanes:windows
Draft

os: add support for windows#3724
AmyJeanes wants to merge 6 commits into
commaai:masterfrom
AmyJeanes:windows

Conversation

@AmyJeanes

@AmyJeanes AmyJeanes commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Small changes so opendbc's car interfaces and safety tests work on a native Windows development build (MSYS2 CLANG64), plus a windows-latest CI entry.

  • get_interface_attr() uses os.path.basename() instead of splitting paths on /, which failed on Windows and left FW_VERSIONS/FW_QUERY_CONFIGS empty.
  • libsafety builds with -mno-ms-bitfields and unsigned int flag bitfields so CANPacket_t keeps its layout under cffi's MSVC rules; Linux/macOS unchanged (same fix as panda).
  • ./test.sh runs on windows-latest as a third matrix entry (same 3971 tests); cppcheck comes from its PyPI wheel.

Line endings were split out and comma has already merged them.

Draft: the one TEMP commit at the tip (marked TODO REMOVE) drops once commaai/dependencies#107 publishes the win_amd64 cppcheck wheel; it points uv at a pre-release index meanwhile.

Part of a six-repo series: commaai/openpilot#38810, commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/dependencies#107. dependencies merges first; the rest independently.

Generated with Claude, human-reviewed and tested locally and in CI.

@github-actions github-actions Bot added CI / testing DBC signals car related to opendbc/car/ car safety vehicle-specific safety code labels Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Car behavior report

Replays driving segments through this PR and compares the behavior to master.
Please review any changes carefully to ensure they are expected.

✅ No changes detected

@AmyJeanes
AmyJeanes marked this pull request as draft September 7, 2026 23:24
@AmyJeanes AmyJeanes changed the title os: add support for windows (1/2) os: add support for windows Sep 7, 2026
AmyJeanes added a commit to AmyJeanes/openpilot-upstream that referenced this pull request Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) ---

Until the four submodule PRs merge, the pointers move to the windows-tidy
branches on my fork and .gitmodules fetches them from there: panda and
opendbc just below their own TEMP index commits (their uv sources would
leak into this lockfile), rednose at its TEMP commit (its source supplies
comma-deps-eigen for Windows), msgq's series on openpilot's current pin
(windows-tidy-pin). The lock follows the submodules' metadata.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes added a commit to AmyJeanes/openpilot-upstream that referenced this pull request Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) ---

Until the four submodule PRs merge, the pointers move to the windows-tidy
branches on my fork and .gitmodules fetches them from there: panda and
opendbc just below their own TEMP index commits (their uv sources would
leak into this lockfile), rednose at its TEMP commit (its source supplies
comma-deps-eigen for Windows), msgq's series on openpilot's current pin
(windows-tidy-pin). The lock follows the submodules' metadata.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes added a commit to AmyJeanes/openpilot-upstream that referenced this pull request Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) ---

Until the four submodule PRs merge, the pointers move to the windows-tidy
branches on my fork and .gitmodules fetches them from there: panda and
opendbc just below their own TEMP index commits (their uv sources would
leak into this lockfile), rednose at its TEMP commit (its source supplies
comma-deps-eigen for Windows), msgq's series on openpilot's current pin
(windows-tidy-pin). The lock follows the submodules' metadata.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
adeebshihadeh pushed a commit that referenced this pull request Sep 9, 2026
AmyJeanes and others added 4 commits September 9, 2026 18:14
get_interface_attr() split the os.walk() paths on '/', which on Windows
leaves the whole path as the brand name, so every brand import fails.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
CANPacket_t is copied onto the wire, so the test library needs GCC's
packed bitfield layout (-mno-ms-bitfields) and cffi's MSVC rules must
produce the same one: unsigned int flag bits, like addr, do on both.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
The release-cppcheck shim branch only knows Linux and macOS; the
comma-deps-cppcheck wheels cover Windows too (import name unchanged).
The wheel declares Python >=3.12, so the marker keeps the 3.11 half of
requires-python resolving.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
An MSYS2 CLANG64 shell, like openpilot's Windows job. The misra script
calls python: a venv on Windows has no python3. The hosted runner has
4 cores, so that entry gets 180 s from the timeout step.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes added a commit to AmyJeanes/openpilot-upstream that referenced this pull request Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) ---

Until the four submodule PRs merge, the pointers move to the windows-tidy
branches on my fork and .gitmodules fetches them from there: panda and
opendbc just below their own TEMP index commits (their uv sources would
leak into this lockfile), rednose at its TEMP commit (its source supplies
comma-deps-eigen for Windows), msgq at its tip. The lock follows the
submodules' metadata.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes added a commit to AmyJeanes/openpilot-upstream that referenced this pull request Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) ---

Until the four submodule PRs merge, the pointers move to the windows-tidy
branches on my fork and .gitmodules fetches them from there: panda and
opendbc just below their own TEMP index commits (their uv sources would
leak into this lockfile), rednose at its TEMP commit (its source supplies
comma-deps-eigen for Windows), msgq at its tip. The lock follows the
submodules' metadata.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes added a commit to AmyJeanes/openpilot-upstream that referenced this pull request Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) ---

Until the four submodule PRs merge, the pointers move to the windows-tidy
branches on my fork and .gitmodules fetches them from there: panda and
opendbc just below their own TEMP index commits (their uv sources would
leak into this lockfile), rednose at its TEMP commit (its source supplies
comma-deps-eigen for Windows), msgq at its tip. The lock follows the
submodules' metadata.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes and others added 2 commits September 10, 2026 11:55
Quote $DIR (and the misra script's paths) in the setup and test scripts so
a checkout path containing spaces works. Cross-platform: unquoted, these
break on Linux too, spaces are just far more common on Windows.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
…ies#107 publishes

--- TODO REMOVE AFTER DEPENDENCY PR MERGES (commaai/dependencies#107) ---

Dropped once the win_amd64 wheels are on PyPI; until then uv takes
comma-deps-cppcheck for win32 from a release on my fork built from that
PR, and uv.lock is relocked from PyPI when this goes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes added a commit to AmyJeanes/openpilot-upstream that referenced this pull request Sep 10, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) ---

Until the four submodule PRs merge, the pointers move to the windows-tidy
branches on my fork and .gitmodules fetches them from there: panda and
opendbc just below their own TEMP index commits (their uv sources would
leak into this lockfile), rednose at its TEMP commit (its source supplies
comma-deps-eigen for Windows), msgq at its tip. The lock follows the
submodules' metadata.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes added a commit to AmyJeanes/openpilot-upstream that referenced this pull request Sep 10, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) ---

Until the four submodule PRs merge, the pointers move to the windows-tidy
branches on my fork and .gitmodules fetches them from there: panda and
opendbc just below their own TEMP index commits (their uv sources would
leak into this lockfile), rednose at its TEMP commit (its source supplies
comma-deps-eigen for Windows), msgq at its tip. The lock follows the
submodules' metadata.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes added a commit to AmyJeanes/openpilot-upstream that referenced this pull request Sep 10, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) ---

Until the four submodule PRs merge, the pointers move to the windows-tidy
branches on my fork and .gitmodules fetches them from there: panda and
opendbc just below their own TEMP index commits (their uv sources would
leak into this lockfile), rednose at its TEMP commit (its source supplies
comma-deps-eigen for Windows), msgq at its tip. The lock follows the
submodules' metadata.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes added a commit to AmyJeanes/openpilot-upstream that referenced this pull request Sep 10, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) ---

Until the four submodule PRs merge, the pointers move to the windows-tidy
branches on my fork and .gitmodules fetches them from there: panda and
opendbc just below their own TEMP index commits (their uv sources would
leak into this lockfile), rednose at its TEMP commit (its source supplies
comma-deps-eigen for Windows), msgq at its tip. The lock follows the
submodules' metadata.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

car safety vehicle-specific safety code car related to opendbc/car/ CI / testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant