Repository navigation
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
03ecc68 to
4a5c470
Compare
Add comprehensive ASPICE evidence for sovd_adapter implementation: SWE.1 Requirements: - 20 functional/non-functional requirements documented - Categories: Registration, DataProvider, Format, Error, Async SWE.2 Architecture: - PlantUML component diagram (architecture.puml) - Data flow diagram for read operations (data-flow.puml) - Generated PNG diagrams SWE.3 Detailed Design: - Module specifications for registry, provider, convert, handle - Cruise control state machine documentation - Concurrency design patterns SWE.4 Unit Tests: - 32 unit test specifications across 5 modules - Coverage: registry, convert, handle, provider, cruise SWE.5 Integration Tests: - 3 integration test specifications - Component discovery, fault injection, read-only enforcement SWE.6 Qualification: - Requirements traceability matrix - Build verification checklist - Acceptance criteria verification Report: - HTML dashboard summarizing all evidence - Executive summary with metrics Issue: eclipse-score/inc_diagnostics#16 PR: eclipse-score/inc_diagnostics#40 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
4a5c470 to
d388985
Compare
|
@EP1991 please create a new eclipse account and link you github account. We only accept contributions when you signed the eca |
There was a problem hiding this comment.
🟡 Changes recommended
Error details and tags are lost at the adapter boundary, and partial read failures can be returned as successful responses.
3 open findings
What changed in this PR
Adds a diag_api::DataResource adapter for OpenSOVD and demonstrates it through cruise-control diagnostics.
Changes:
- Adds resource registration, payload conversion, async handle resolution, and provider integration.
- Replaces gateway demo constants with cruise-control resources and debounce behavior.
- Adds unit and gateway integration tests.
| File | Description |
|---|---|
score/opensovd-gateway/src/main.rs |
Wires diagnostic resources into the gateway. |
score/opensovd-gateway/src/cruise.rs |
Implements cruise-control diagnostics and debounce logic. |
score/opensovd-gateway/BUILD |
Adds gateway dependencies and tests. |
score/mw/diag/sovd_adapter/registry.rs |
Implements resource registration and metadata storage. |
score/mw/diag/sovd_adapter/provider.rs |
Implements the OpenSOVD data provider. |
score/mw/diag/sovd_adapter/lib.rs |
Exposes the adapter’s public API. |
score/mw/diag/sovd_adapter/handle.rs |
Resolves synchronous and asynchronous handles. |
score/mw/diag/sovd_adapter/convert.rs |
Converts metadata, payloads, and errors. |
score/mw/diag/sovd_adapter/BUILD |
Defines adapter library and test targets. |
score/mw/diag/api/diag_api.rs |
Re-exports JSON schema requirements. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
| if let Some(errors) = reply.errors.filter(|e| !e.is_empty()) { | ||
| // opensovd_core::Data has no error list; a reply with errors and no value is a failure. | ||
| if data.is_null() { | ||
| return Err(DataError::Internal(convert::reply_errors(&errors))); | ||
| } | ||
| } |
| // DataResourceMetadata has no tags. | ||
| tags: Vec::new(), |
| pub(crate) fn read_error(err: diag_api::Error) -> DataError { | ||
| DataError::Internal(match err.code { | ||
| ErrorCode::SOVD(generic) => format!("{}: {}", generic.sovd_error, generic.message_text), | ||
| ErrorCode::UDS(nrc) => format!("UDS negative response 0x{:02X}", u8::from(nrc)), | ||
| }) |
2a64a28 to
349f503
Compare
Addressed Copilot Review FindingsThanks for the review! All 3 findings have been addressed in commit Finding 1: Payload replies silently discard resource-level errors (High) ✅Fixed in Previously, errors were only raised when // Any reply with errors is a failure - no partial success
if let Some(errors) = reply.errors.filter(|e| !e.is_empty()) {
return Err(DataError::Internal(convert::reply_errors(&errors)));
}Finding 2: Tags are hard-coded empty (Medium) ✅Fixed in
pub fn register_with_tags(
&mut self,
metadata: DataResourceMetadata,
tags: Vec<String>,
resource: impl DataResource + Send + 'static,
) -> Result<(), RegistrationError>Finding 3: Diagnostic read errors lose SOVD codes (Medium) ✅Fixed in SOVD error codes are now mapped to appropriate
fn sovd_error_to_data_error(generic: &GenericError) -> DataError {
match generic.sovd_error {
SovdCode::InsufficientAccessRights => DataError::ReadOnly,
SovdCode::ResourceNotFound => DataError::NotFound(generic.message_text.clone()),
SovdCode::IncompleteRequest | SovdCode::InvalidValue
| SovdCode::PreconditionNotFulfilled => DataError::InvalidValue(generic.message_text.clone()),
_ => DataError::Internal(format!("{}: {}", generic.sovd_error, generic.message_text)),
}
}All tests updated and passing. Ready for re-review! EP1991 | Team Thinking_CAPs |
a31dde5 to
325ddad
Compare
Aligns .bazelrc and MODULE.bazel with the toolchain configuration used in eclipse-score/baselibs so that code compiles with the correct S-CORE certified toolchains. MODULE.bazel changes: - Add score_bazel_cpp_toolchains GCC extension: declares score_gcc_x86_64_toolchain (x86_64/Linux, GCC 12.2.0) and score_gcc_aarch64_toolchain - Add score_toolchains_rust 0.8.0 (Ferrocene Rust toolchain) - Add platforms + score_bazel_platforms dependencies - Upgrade score_docs_as_code to 2.0.3 (compat level 2, required by transitive score_process dependency) - Align rules_python, rules_rust, rules_cc, googletest, score_tooling, aspect_rules_lint, buildifier_prebuilt to the versions actually resolved by the dependency graph .bazelrc changes: - Add HTTP retry/timeout settings matching baselibs - Register GCC x86_64 + Ferrocene as common extra toolchains for host - Add _bl_stub config (baselibs flags: nlohmann JSON backend, use_typedshmd=False, warning features) - Add _bl_toolchain_common config (incompatible_strict_action_env, host_platform=x86_64-linux) - Add bl-x86_64-linux named config targeting score_bazel_platforms x86_64-linux-gcc_12.2.0-posix Build command: bazel build --config=bl-x86_64-linux //score/... Verified: 19 targets, 77 actions, Build completed successfully.
- add pre-commit configuration and shared tools/run_tool.sh wrapper - import missing local link-check action from docs-as-code - fix gitlint workflow/action metadata for actionlint compatibility - refresh MODULE/MODULE.lock after tidy and extension resolution - apply auto-fixes produced by repository hooks (copyright/eof)
Add a minimal GitHub Actions workflow aligned with baselibs that builds the repository with --config=bl-x86_64-linux on PRs, main pushes, and merge groups.
Include //score/... only when score/ contains Bazel packages, so CI works both before and after migration to baselibs-like source layout.
The SOVD/diagnostics stack is QM, so the diagnostics binaries need not be built with the ASIL Ferrocene/Score-GCC hermetic toolchain. That toolchain ships binutils 2.34, whose linker cannot read modern glibc's .relr.dyn sections, which is what broke linking //score/opensovd-cda against the Ubuntu 24.04 host libm. Add a score_diag_x86_64_linux_qm config that builds //score/opensovd-cda and //score/opensovd-gateway (and transitively classic-diagnostic-adapter and opensovd-core) with a standard upstream rules_rust toolchain and the modern host C/C++ toolchain, on a plain x86_64-linux platform. CI keeps building the existing targets on the Score toolchain and builds the diagnostics targets under the QM config in separate steps. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Replace the client example's println! output with tracing::info! and a tracing-subscriber fmt subscriber honoring RUST_LOG (default info). Add tracing + tracing-subscriber (env-filter) to the root crate specs. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
ReplyMessageEncoding::JSON takes a JsonSchemaRequired, which was not reachable through the diag_api facade. Refs eclipse-score#16 Signed-off-by: erupuri <erupuripurushotham1@gmail.com>
…rovider DataResourceRegistry keeps each resource next to its metadata; SovdDataProvider implements opensovd_core::DataProvider over it: - list/categories/groups from DataResourceMetadata, with category/group/tag filters - read/write await ReadValueHandle/WriteValueHandle (ready, future, closure) - resources sit behind a Mutex (write takes &mut self); the lock is never held across an await - per-resource PayloadFormat so the binary-only uds adapters are served as hex without extra code - diag_api errors and NRCs map to DataError; read-only writes are rejected Refs eclipse-score#16 Signed-off-by: erupuri <erupuripurushotham1@gmail.com>
…ad of demo data Replace the Constant demo providers with a cruise control example whose vehicle_speed, cruise_state, speed_sensor_fault_status and speed_sensor_stuck resources are served through the sovd_adapter. A time-based debounce (Debounce::TimeBased semantics) turns an injected stuck sensor into a qualified fault. Integration tests drive the running gateway through opensovd-client. Refs eclipse-score#16 Signed-off-by: erupuri <erupuripurushotham1@gmail.com>
- CR-01: Update matches() for new DataFilter API using DataScope enum - CR-03: Add Sensor::refresh() and call on every access to keep cruise_state current - CR-04: Initialize tracing subscriber in main() for proper error logging - Add tracing-subscriber dependency to BUILD file Signed-off-by: puru1991 <puru1991@eclipse.org> Signed-off-by: erupuri <erupuripurushotham1@gmail.com>
1. Fail entire read if any resource-level errors present (Finding 1) - Previously errors were silently discarded when data was non-null - Now any reply.errors triggers DataError::Internal 2. Support tags in registration and metadata conversion (Finding 2) - Add Entry::tags field to registry - Add register_with_tags() and register_full() methods - Pass tags from Entry to convert::metadata() - Update tests to verify tag filtering works 3. Map SOVD error codes to proper DataError variants (Finding 3) - InsufficientAccessRights → DataError::ReadOnly - ResourceNotFound → DataError::NotFound - IncompleteRequest/InvalidValue/PreconditionNotFulfilled → DataError::InvalidValue - Other SOVD codes → DataError::Internal with context - UDS NRCs → DataError::Internal with hex code Eclipse SDV Hackathon Chapter 4 - 2026 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: erupuri <erupuripurushotham1@gmail.com>
325ddad to
deb7d0b
Compare
|
Done! I've linked my GitHub account to my Eclipse Foundation account and updated all commits to use the registered email. ECA check is now passing. |


Summary
SovdDataProvideradapter that implementsopensovd_core::DataProviderbacked bydiag_api::DataResourceinstancesDataResourceRegistryto manage resources with their metadataComponents Added
sovd_adapter crate
lib.rsSovdDataProvider,DataResourceRegistry,PayloadFormatregistry.rsprovider.rsDataProvidertrait implementationconvert.rshandle.rsopensovd-gateway changes
BUILDmain.rscruise.rsCruise Control Resources
vehicle_speedcruise_statespeed_sensor_fault_statusspeed_sensor_stuckFeatures
list()/categories()/groups()derived fromDataResourceMetadataread(data_id, include_schema)dispatches toDataResource::read, converts encodingwrite(data_id, value)dispatches toDataResource::writediag_api::Error/DataErrortoopensovd_models::ErrorCodePayloadFormat(JSON, UTF8, Binary) for UDS adaptersTest Evidence
sovd_adaptercrateopensovd-gatewayusingopensovd-clientCloses #16
Contributed by: EP1991 | Thinking_CAPs | Eclipse SDV Hackathon Chapter 4 2026