core: client API Majestic, modèles et CLI check

- libopenpu : validation VIN, modèles JSON (getAvailableUpdate, devices),
  classification ecuType -> type/guide, sélection des mises à jour
- couche Transport abstraite + implémentation libcurl (proxy env, redirections,
  streaming, timeout d'inactivité)
- tolérance au EOF TLS sans close_notify de la passerelle Majestic, limitée
  aux corps délimités par la fermeture (ni Content-Length ni chunked)
- openpu-cli : check / raw-devices / raw-updates
- tests doctest (VIN, parsing, classification, client API avec faux transport),
  fixtures dont une capture réelle anonymisée (NAC wave 2)
- qualité : presets CMake (debug, asan, tidy), .clang-tidy, tools/check.sh
  (tests, ASan/UBSan, valgrind, clang-tidy, cppcheck)
- validé contre l'API réelle sur 3 véhicules (NAC w4, RCC, NAC w2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
This commit is contained in:
yann64andClaude Opus 5.5 committed 2026-11-28 17:45:27 +01:00
1 parent 660a420a3e
commit 95704f9882
28 files changed
+1877 -2

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.20)
project(openpu VERSION 0.1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(OPENPU_BUILD_CLI "Build openpu-cli" ON)
option(OPENPU_BUILD_TESTS "Build unit tests" ON)
option(OPENPU_UI_GTK "Build the GTK4 user interface" OFF)
option(OPENPU_UI_HAIKU "Build the Haiku user interface" OFF)
option(OPENPU_WERROR "Treat warnings as errors" OFF)
option(OPENPU_CLANG_TIDY "Run clang-tidy while compiling" OFF)
option(OPENPU_SANITIZE "Build with ASan + UBSan" OFF)
if(CMAKE_SYSTEM_NAME STREQUAL "Haiku")
set(OPENPU_UI_HAIKU_DEFAULT ON)
endif()
add_library(openpu_warnings INTERFACE)
target_compile_options(openpu_warnings INTERFACE -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Wno-sign-conversion)
if(OPENPU_WERROR)
target_compile_options(openpu_warnings INTERFACE -Werror)
endif()
if(OPENPU_SANITIZE)
add_compile_options(-fsanitize=address,undefined -fno-omit-frame-pointer)
add_link_options(-fsanitize=address,undefined)
endif()
if(OPENPU_CLANG_TIDY)
find_program(CLANG_TIDY_EXE NAMES clang-tidy REQUIRED)
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE})
endif()
add_subdirectory(src/core)
if(OPENPU_BUILD_CLI)
add_subdirectory(src/cli)
endif()
if(OPENPU_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()