Skip to content

V2.1.1-beta.4: Updates, Telemetrie und Release-Prozess absichern - #29

Merged
SpecterAoD merged 1 commit into
mainfrom
codex/2.1.1-beta.4
Nov 2, 2026
Merged

SpecterAoD merged 1 commit into
mainfrom
codex/2.1.1-beta.4

Conversation

@SpecterAoD

Copy link
Copy Markdown
Owner

Setzt die Review-Korrekturen für V2.1.1-beta.4 um: Updates bei unbekanntem Fahrzeugzustand sperren, expliziten Wartungsmodus und lokale Boot-Gesundheitsprüfung ergänzen, ungültige/veraltete Messwerte verwerfen und Verbrauch aus Kraftstoffmenge und Strecke berechnen.

JSON-Escaping vereinheitlicht, Web-Assets und Display-Rendering getrennt, Release-Index gegen Downloadfehler geschützt und exakte Debug-Artefakte mit Prüfsummen archiviert. Versionsdatei, Changelog und Betriebsdokumentation aktualisiert; Funkprotokoll bleibt v3.

Validierung: 181 native Tests und 27 Python-Tests bestanden; sender, display, sender_dev und display_dev erfolgreich gebaut. Image-Metadaten, Debug-Archive, JavaScript-Syntax, Secret-Scanner und Diff-Prüfung erfolgreich.

Hardwareprüfungen für CAN, ESP-NOW, OTA und Rollback stehen aus. Dieser PR veröffentlicht keine signierten Firmware-Releases und installiert keine Geräte.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 03:50
@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-02T03:52:22.189935Z 2d96e7c 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.

@SpecterAoD
SpecterAoD merged commit a7fa801 into main Nov 2, 2026
6 checks passed

Copilot AI 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.

🟡 Changes recommended

An unresolved active finding remains, flagging that the comment and vehicleActive() name no longer match the function's broader block-on-unknown/stale behavior.

1 open issue
What changed in this PR

This PR hardens the V2.1.1-beta.4 release of the CAN OBD2 reader firmware across three areas: update safety (block OTA when vehicle status is unknown/stale, add an explicit, authenticated bench "maintenance mode", and gate boot confirmation on local initialization health with automatic rollback), telemetry correctness (expire live values after 60 s even while radio traffic continues, discard invalid/old PID data, and compute average consumption by time-integrating fuel volume and distance), and release/build process (unified JSON escaping, split web assets and display rendering into separate TUs, a download-failure-safe release index, and checksum-verified debug archives). It also refreshes version, changelog, and operations docs while keeping the radio protocol at v3.

Changes:

  • New shared modules: UpdateSafety, BootValidation::HealthGate, Obd::ConsumptionAccumulator, Json::escape, plus snapshot value expiry in LiveData.
  • Refactors: HTML pages moved to lib/web/DevicePages.cpp; display page/widget rendering moved to DisplayRenderer; JSON escaping consolidated onto JsonEscape.h.
  • Release tooling: fetch_previous_manifest.py, archive_build.py, stricter release_manifest.py/check_secrets.py, with CI/release workflow updates and regression tests.

I traced the new state machines (UpdateSafety, HealthGate, ConsumptionAccumulator) and the Python retry/validation logic against their tests, verified no dangling references remain to removed symbols (calcConsumption, BlockInstallWhileVehicleRunning, consumption helpers), and confirmed the new lib files land in directories already registered in platformio.ini. The code is clean, cohesive, and well covered by both native and Python tests. I found one minor documentation/naming inconsistency.

File Description
lib/​update/​UpdateSafety.h New gate separating unknown/parked/active states and timed, non-persisted maintenance mode.
lib/​update/​BootValidation.{h,cpp} HealthGate requiring continuous local health before confirming an image; rollback after deadline.
lib/​obd/​ConsumptionAccumulator.h Time-integrates fuel/distance only while both inputs are fresh; derives instant/avg consumption.
lib/​telemetry/​LiveData.{h,cpp} Expires stale values in snapshot and rejects non-finite updates; age-field semantics documented.
lib/​display/​LiveValueView.{h,cpp} Freshness limits re-derived from config; coolant/ECU voltage treated as slow PIDs.
src/​sender/​{SenderApp,SenderLiveData,SenderPower,OBDHandler}.cpp Wire UpdateSafety/consumption/boot-health; discard invalid PID responses.
src/​display/​{DisplayApp,DisplayReceiver,DisplayWeb,DisplayUi,DisplayRenderer}.* Observe vehicle condition, expose readiness, split rendering from UI; install-blocker uses UpdateSafety.
lib/​web/​{WebAssets,DevicePages,ManagementServer,AuthHelpers}.* Externalize device HTML, add maintenance endpoint + confirmation header, unify JSON escaping.
lib/​utils/​JsonEscape.h, lib/​update/​{UpdateManifest,FirmwareUpdateManager}.cpp, lib/​wifi_station/​WifiStationManager.cpp Shared control-character-safe JSON escaping.
scripts/​{fetch_previous_manifest,archive_build,release_manifest,check_secrets}.py Index-safe fetch/validate, checksummed debug archives, redacted secret locations.
.github/​workflows/​{ci,release}.yml Archive debug images, extended retention, explicit index initialization.
VERSION.txt, CHANGELOG.md, README.md, docs/​*, platformio.ini, include/​config/​UpdateConfig.h, include/​{PID_Converter,OBDHandler}.h, lib/​runtime/​SenderRuntimeState.h, lib/​obd/​ObdDiagnostics.h Version/docs/config updates and API cleanup supporting the above.
test/​** New/updated native and Python regression tests for all new behavior.

Review effort: Balanced

Comment on lines 74 to +77
// Updates must not interrupt the driver: block while the sender reports a
// running vehicle.
bool vehicleActive() {
const String& state = DisplayData::runtime().vehicleState;
return DisplayData::isEspNowConnected() && (state == "Running" || state == "StartStop" || state == "Idle");
return FirmwareUpdate::updateSafety.blocked(millis());
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.

2 participants