Implement Diagnostic Fault Library with basic DFM, SOVD interface, and CI infrastructure#5
Implement Diagnostic Fault Library with basic DFM, SOVD interface, and CI infrastructure#5bburda42dot wants to merge 7 commits intoeclipse-opensovd:mainfrom
Conversation
Migrate from single-crate layout to multi-crate workspace with Bazel 8.3 + Cargo dual build system. Add xtask runner for common development commands.
IPC-safe types (IpcDuration, IpcTimestamp), fault descriptors, catalog configuration, debounce/enabling condition config, query protocol definitions, and iceoryx2 service types.
Fault reporter API, IPC worker with exponential backoff retry, fault catalog validation, enabling condition management, and FaultManagerSink for iceoryx2 transport.
SOVD-compliant fault manager with KVS persistent storage, aging manager, operation cycle tracking, fault record processor, and query server with iceoryx2 IPC transport.
E2E tests covering lifecycle transitions, debounce/aging/cycles, persistent storage, concurrent access, boundary values, error paths, multi-catalog, JSON catalog loading, IPC query/clear, and report-and-query flow.
Workflows: build/test, clippy lint, rustfmt, miri, coverage, copyright header check, cargo audit (pinned to SHA), Bazel format check. All workflows set permissions: contents: read.
…rence Architecture overview, fault catalog/reporter/DFM sequence diagrams, library architecture drawing, Sphinx docs scaffold, and HVAC component design reference example.
|
@bburda42dot Just wanted to know,Why was this PR not started on top of the Initial commit in #4 from Qorix and started from scratch and moved all the files here , when it says continuation from #4? |
@vinodreddy-g I did start on top of Qorix's initial commit from #4 - this PR is a direct continuation of that work. On top of the original ~4.9k lines, I added 63 commits (21k+ lines added, ~800 removed) with significant changes and improvements. The resulting 64-commit history was hard to review as-is, so before opening this PR I squashed them all into a cleaner, logically grouped commit history specifically to enable commit-by-commit review. That squash is why the git history may look like it was started from scratch, but the code lineage traces directly back to #4. If proper attribution is important to you, feel free to point out which parts of the current code originate from the original PR and I can add Co-Authored-By to the relevant commits. |
@bburda42dot ok so you split/changed the initial commit for easy review and added a lot of changes offcourse. Could you update also the design changes/add in the svg/puml files to follow the new changes easily from #4 . |
|
To 4. we should start with what we have now (iceoryx2) later we can evaluate the migration to mw::com. For the artifacts potential next step(not now) could be using sphinx needs |
@vinodreddy-g Thanks for the detailed questions. These changes weren't discussed in OpenSOVD architecture meetings - they follow from the design doc requirements and the code review feedback on #4. Happy to discuss any of them in the next Architecture meeting if needed. I've updated all diagrams in the latest force-push, so you can follow the design changes visually. Here's the breakdown: 1. Fault catalog ( Core idea is the same - builder pattern, SHA-256 hash verification with DFM, decentral catalogs. Main change: the original diagram had an
2. Interfaces between lib and DFM ( That diagram showed I removed On DFM side: I added 3. Fault doesn't exist in catalog ( The #4 code had 4. iceoryx2 vs mw::com Agreed with @FScholPer - iceoryx2 for now, evaluate mw::com migration later. The transport is now isolated behind traits on both sides ( 5. Diagram updates All diagrams are now up to date in
|
Summary
Complete implementation of the Diagnostic Fault Library - a Rust library for managing diagnostic fault reporting, processing, and querying in Software-Defined Vehicles. Replaces the initial scaffold (
src/lib.rs,api.rs,catalog.rs, etc.) with a production-grade multi-crate workspace aligned with the S-CORE module template.What changed
Architecture - multi-crate workspace
common- shared types:FaultId,FaultRecord,FaultCatalog,DebounceMode, IPC service types, compliance tagsfault_lib- reporter-side API:Reporterwith debounce filtering, enabling-condition guards,IpcWorkerwith retry queue (exponential backoff),LogHookobservability,FaultManagerSinkdfm_lib- Diagnostic Fault Manager:FaultRecordProcessor,AgingManager,SovdFaultManagerwith KVS-backed storage,EnablingConditionRegistry,OperationCycleprovider abstractionxtaskcrate for developer automationsrc/lib.rs,src/api.rs,src/model.rs,src/catalog.rs,src/config.rs,src/ids.rs,src/sink.rs,src/utils.rs)Features
CountWithinWindow,HoldTime,EdgeWithCooldown,CountThresholdmodesFaultIdvariant support (Numeric/Text/Uuid)Box::leakwithCow<str>, bounded channelsSafety & quality
#[deny(clippy::unwrap_used)]enforced in runtime code - alltodo!(),expect(), andunwrap()replaced with proper error handlingTODOcomments replaced with documented error pathstests/integration/) covering lifecycle transitions, multi-catalog scenarios, persistent storage, and report-query flowsCI/CD (6 new workflows)
build_test.yml- Cargo build + testlint.yml- Clippy with deny warningsformat.yml- rustfmt checkcoverage.yml- Code coverage reportingmiri.yml- Memory safety checkscopyright.yml- License header validationAll workflows aligned with S-CORE patterns.
Project structure alignment
.bazelrc,MODULE.bazel,BUILDfiles for Bazel 8 support.vscode/settings.jsonandextensions.jsonfor development environment.ruff.toml,.yamlfmt,rustfmt.tomlfor formatting consistencyREADME.mdwith architecture overview, getting started, and examplesChecklist
Related
This work is continuation of #4
Notes for Reviewers
Code is quite large, so it is better to review commit by commit. I split them into categories: "common", "fault-lib", "dfm" etc.