Skip to content

Update logging implementation for S-CORE 0.6#66

Open
4og wants to merge 29 commits intomainfrom
logging_score_0_6
Open

Update logging implementation for S-CORE 0.6#66
4og wants to merge 29 commits intomainfrom
logging_score_0_6

Conversation

@4og
Copy link
Member

@4og 4og commented Feb 17, 2026

Notes for Reviewer

Pre-Review Checklist for the PR Author

  • PR title is short, expressive and meaningful
  • Commits are properly organized
  • Relevant issues are linked in the References section
  • Tests are conducted
  • Unit tests are added

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  • All open points are addressed and tracked via issues

References

Closes #

@4og 4og temporarily deployed to workflow-approval February 17, 2026 15:49 — with GitHub Actions Inactive
@4og 4og temporarily deployed to workflow-approval February 17, 2026 15:49 — with GitHub Actions Inactive
@4og 4og requested a review from rmaddikery February 17, 2026 15:49
@github-actions
Copy link

github-actions bot commented Feb 17, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: a6fd31b6-3a0e-4b22-88ff-56782cf22bbc
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'rules_python', the root module requires module version rules_python@1.4.1, but got rules_python@1.8.3 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'bazel_skylib', the root module requires module version bazel_skylib@1.7.1, but got bazel_skylib@1.8.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_rust', the root module requires module version rules_rust@0.61.0, but got rules_rust@0.67.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_cc', the root module requires module version rules_cc@0.1.1, but got rules_cc@0.2.16 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'aspect_rules_lint', the root module requires module version aspect_rules_lint@1.0.3, but got aspect_rules_lint@2.0.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'buildifier_prebuilt', the root module requires module version buildifier_prebuilt@7.3.1, but got buildifier_prebuilt@8.2.0.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'score_rust_policies', the root module requires module version score_rust_policies@0.0.3, but got score_rust_policies@0.0.5 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'googletest', the root module requires module version googletest@1.17.0.bcr.1, but got googletest@1.17.0.bcr.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 4 packages loaded
Loading: 4 packages loaded
    currently loading: 
WARNING: Target pattern parsing failed.
ERROR: Skipping '//:license-check': no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/logging/logging/BUILD
ERROR: no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/logging/logging/BUILD
INFO: Elapsed time: 11.359s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@github-actions
Copy link

The created documentation from the pull request is available at: docu-html

rmaddikery and others added 21 commits February 17, 2026 17:12
GIT_ORIGIN_SPP_REV_ID: 027d974df77ead0b650e002101e61363753e2e16
- platform/aas/mw/log/log_ext
- platform/aas/mw/log/custom_recorder_example
- platform/aas/mw/log/configuration

GIT_ORIGIN_SPP_REV_ID: 72c0feca4c16fd2f6a32e38d700e0e407b0152a4
- platform/aas/mw/log/detail/file_recorder
- platform/aas/mw/log/detail/text_recorder

GIT_ORIGIN_SPP_REV_ID: f750de78591cc42c642b58bf0402d052c792789a
- platform/aas/mw/log/detail/common
- platform/aas/mw/log/detail/utils/signal_handling
- platform/aas/mw/log/test

GIT_ORIGIN_SPP_REV_ID: 2185a4b87fb9a0941e396933b71b94b6532bddef
GIT_ORIGIN_SPP_REV_ID: 89ff20567f9f90be5ea603bbacc5d4b6b0a0d1be
Replace empty brace initialization with explicit initialization:
- linear_reader_: Use std::nullopt instead of {}
- acquired_data_: Use std::nullopt instead of {}
- number_of_acquired_bytes_: Use 0U instead of {}

This ensures all member variables are explicitly initialized as required
by AUTOSAR C++14 A12-1-1.

GIT_ORIGIN_SPP_REV_ID: 1ee88a7b95c5cc269f57efa48e4506da7b2ac17a
Separate increment operators from other expressions:
- Line 287: Extract member variable before incrementing
- Line 550: Store lock result before incrementing member

AUTOSAR M5-2-10 prohibits mixing increment/decrement operators
with other operators in an expression.

GIT_ORIGIN_SPP_REV_ID: 1db0f836de7d0932f285900bbff883835dc9951b
Replace reference capture with pointer capture in lambdas to avoid
capturing reference that could outlive the lambda object.

Changed from [&persistent_dictionary] to [pd_ptr] where pd_ptr is
a raw pointer obtained from persistent_dictionary.get(). This satisfies
AUTOSAR A5-1-4 by capturing by value instead of by reference.

GIT_ORIGIN_SPP_REV_ID: a69c9c5f304d26d4dc328f065ece0a369712e03e
Fix A7-1-2 violations (lines 127, 133, 543):
- Change const to constexpr for compile-time constants
- service_protocol_config: const -> constexpr
- server_config: const -> constexpr
- message array: const -> constexpr

Fix A5-1-4 violations (lines 165-166):
- Replace lambda capturing 'this' with explicit pointer captures
- disconnect_callback: Capture mutex_ and pid_session_map_ as pointers
- This avoids capturing the whole object by reference

GIT_ORIGIN_SPP_REV_ID: f4c2302447fefb498c911301351fcf71869517d1
Change handlers_ initialization from empty braces to parentheses in
IndexParser constructor to comply with AUTOSAR rule A12-1-1 which
requires explicit initialization.

GIT_ORIGIN_SPP_REV_ID: 3aa46e970c434b4b63c1bd8078ae760865559837
GIT_ORIGIN_SPP_REV_ID: 442c2a22862435d1f6fc0d0cfb2813a5aa6b1fa4
- platform/aas/log/detail/data_router
- platfrom/aas/log/detail/slog

GIT_ORIGIN_SPP_REV_ID: 69715ec571edc7532b27dcae16e879b6c10b04cf
- platform/aas/mw/log/legacy_non_verbose_api

GIT_ORIGIN_SPP_REV_ID: b64c30942376baf38fb4ec2900b41eade0549689
GIT_ORIGIN_SPP_REV_ID: 3b6f25fcb60c04ddf333750b7b10382887023c56
GIT_ORIGIN_SPP_REV_ID: a1b2252f967b96091dced377750df4fda16acba8
GIT_ORIGIN_SPP_REV_ID: 54c8a361db43d1fc1582914701eb4e97b534f954
GIT_ORIGIN_SPP_REV_ID: d8578b787639f5304ea59afd9aeb4e7b0e15c80c
Replace lambda captures of [this] with explicit member captures:
- Line 102: Use reference captures for stop_source_ and sender_state_
- Line 196: Use pointer capture for this in connect_callback
- Line 202: Use pointer capture for this in disconnect_callback
- Line 206: Use pointer capture for this in received_send_message_callback

This complies with AUTOSAR rule A5-1-4 which addresses lambda lifetime
safety concerns.

GIT_ORIGIN_SPP_REV_ID: 72c9cd6c9522fb71193442a6174e813a0c65ea2b
Change server_config from const to constexpr in SetupReceiver() method
to comply with AUTOSAR rule A7-1-2 which requires compile-time constants
to be declared as constexpr rather than const.

GIT_ORIGIN_SPP_REV_ID: 796cbab72149ff36cb5554eeac316c0c420daac0
Add explicit initialization of base class MessagePassingFactory in
constructor initializer list to comply with AUTOSAR rule A12-1-1.

GIT_ORIGIN_SPP_REV_ID: 22ff1ff9c1fbb67452753bad0800d6b67b4850af
Remove noexcept specifier from Shutdown() method as it calls
std::this_thread::sleep_for and connect_thread_.join() which can
potentially throw exceptions, violating AUTOSAR rule A15-5-3.
GIT_ORIGIN_SPP_REV_ID: cd4e25d26cf1712fb5bf9f99c5b90de60424ceb2
Mostafa Yasin and others added 8 commits February 17, 2026 17:12
Use std::ignore for return value of connect_thread_.request_stop()
to comply with AUTOSAR rule A0-1-2 which requires return values of
non-void functions to be explicitly used or discarded.

GIT_ORIGIN_SPP_REV_ID: 72444ffe52250b9bfa6a1e7faf4671e15c8a84e4
- Change integer literals 0 and 10 to unsigned literals 0U and 10U in
  IClientFactory::ClientConfig initialization.
- Change static_cast<int> to static_cast<std::ptrdiff_t> in std::advance
  to avoid implicit signedness conversion from unsigned to signed type.

More explaination:
std::advance expects a signed type: The second parameter of std::advance should be the iterator's difference_type, which is a signed integer type. For std::string::iterator, this is typically std::ptrdiff_t.

Original violation: MessagePassingConfig::kRandomFilenameStartIndex is std::size_t (unsigned), and casting it to int creates an implicit signedness conversion, violating AUTOSAR M5-0-4.

std::ptrdiff_t is the standard type for iterator distances: According to the C++ standard, std::ptrdiff_t is specifically designed for:
= Pointer arithmetic results.
= Iterator difference operations.
= Signed versions of size operations.

Better than int:
= std::ptrdiff_t matches the address space size (32-bit on 32-bit systems, 64-bit on 64-bit systems).
= Prevents potential overflow issues with large container sizes.

So std::ptrdiff_t is the semantically correct and standards-compliant type for this operation, avoiding the AUTOSAR violation while ensuring type safety.

refer to: https://en.cppreference.com/w/cpp/types/ptrdiff_t.html

GIT_ORIGIN_SPP_REV_ID: d20d91dd28b6d0fa9a3f8a155119526a0002bf56
Add parentheses around comparison operator (==) when used as operand to
logical AND (&&) operator to clarify operator precedence and improve
readability.

GIT_ORIGIN_SPP_REV_ID: 4b8fb9db4ae8a856a6b7a77964d57e559f76eaaa
Add std::ignore to explicitly discard return value from fetch_add()
to comply with AUTOSAR rule requiring that return values from non-void
functions must not be ignored.

GIT_ORIGIN_SPP_REV_ID: 067ef1022be628b9643b143c0e9169f3d52e08ec
GIT_ORIGIN_SPP_REV_ID: 94ec3366f256d8e7f994c24ac06301b63fa3c6b8
- Bumps module deps making logging buildable
- Adds common config to support current builds and tests running
@4og 4og force-pushed the logging_score_0_6 branch from 4f940f0 to 813d2bf Compare February 17, 2026 16:13
@4og 4og deployed to workflow-approval February 17, 2026 16:13 — with GitHub Actions Active
@4og 4og temporarily deployed to workflow-approval February 17, 2026 16:13 — with GitHub Actions Inactive
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.

3 participants