Skip to content

test: point the Verifies trace at the symbol that exists - #253

Open
kutsibalci wants to merge 1 commit into
eclipse-score:mainfrom
kutsibalci:fix-verifies-trace
Open

test: point the Verifies trace at the symbol that exists#253
kutsibalci wants to merge 1 commit into
eclipse-score:mainfrom
kutsibalci:fix-verifies-trace

Conversation

@kutsibalci

Copy link
Copy Markdown

The RecordProperty("Verifies", ...) record in alternating_control_block_test.cpp:95 names a symbol that does not exist:

score::mw::log::detail::wait_free_producer_queue::alternating_control_block_test::GetOppositeLinearControlBlock

Two components of that path are not namespaces:

  • wait_free_producer_queue is the directory. grep -rn "namespace *wait_free_producer_queue" over the repository returns nothing.
  • alternating_control_block_test is this test file's own basename. Same result — it is never declared as a namespace.

GetOppositeLinearControlBlock is declared in alternating_control_block.h:75, inside scoremwlogdetail (opened at lines 19–25, closed at 78–81). So the qualified name is:

score::mw::log::detail::GetOppositeLinearControlBlock

Why it matters here rather than being cosmetic

Verifies is the trace from a test to the unit under test, and this test is marked ASIL B. The record is traceability evidence: it builds, the test passes, and the link points at nothing. Nothing catches it either — clang-tidy sees a string literal, and the string is only ever read by whatever consumes the test report.

Form

The other twenty Verifies records in the repository, all in score/datarouter/test/ut/ut_logging/test_socketserver.cpp, are written with a leading :: and a trailing ():

RecordProperty("Verifies", "::score::platform::datarouter::SocketServer::CreateDltServer()");

so this one is written the same way rather than only having the two bogus components removed.

-    RecordProperty("Verifies",
-                   "score::mw::log::detail::wait_free_producer_queue::alternating_control_block_test::"
-                   "GetOppositeLinearControlBlock");
+    RecordProperty("Verifies", "::score::mw::log::detail::GetOppositeLinearControlBlock()");

How this was found, and what I did not touch

I extracted every RecordProperty("Verifies", ...) value in the repository — 21 sites, which matches grep -c exactly, so the extraction is complete — and resolved each named symbol against the declarations in the tree. This is the only one that does not resolve.

Something I noticed but deliberately left alone: Verifies coverage in score/mw/log/detail/wait_free_producer_queue/ is sparse — 1 record across 22 tests in 5 files, and this was that one record.

file Verifies tests
alternating_control_block_test.cpp 1 5
linear_control_block_test.cpp 0 2
linear_reader_test.cpp 0 1
wait_free_alternating_writer_test.cpp 0 5
wait_free_linear_writer_test.cpp 0 9

Adding the missing ones would mean deciding what each test actually verifies, which is a call for whoever owns that component, so this PR only corrects the record that is wrong. Happy to follow up if that is wanted.

Checks

  • Both bogus path components confirmed absent as namespaces across all .h, .hpp and .cpp in the repository.
  • The corrected path read from the enclosing namespace blocks in alternating_control_block.h, not inferred from the directory layout.
  • One line of test metadata; no production code, no test logic, no build changes.
  • ECA signed; the commit carries Signed-off-by.

AI disclosure

AI-assisted (Claude Code). The extraction and this description were produced with the tool, and I checked the result before opening: I confirmed the extraction found every RecordProperty("Verifies", ...) in the tree by comparing against grep -c, read the namespace nesting in the header rather than assuming it from the path, searched for both suspect components as namespace declarations and found neither, and compared against the twenty existing records to match their form.

Worth stating, because it nearly cost me this finding: my first pass validated each claimed symbol against the set of identifiers appearing anywhere in the repository — which included the claim string itself, so alternating_control_block_test "existed" and the record looked fine. A claim cannot be checked against a corpus that contains the claim. I have reviewed and understood the change and take responsibility for it.

@rmaddikery rmaddikery left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kutsibalci Thanks for the contribution. Appreciate it. Will consider this one, but please take note that this codebase was imported from an internal repo, and the same tooling for safety qualification is not applied here. Hence this (record property based verification) is subject to change. Just fyi..

@github-project-automation github-project-automation Bot moved this from Backlog to On Hold in LOG - Logging FT Aug 18, 2026
The RecordProperty("Verifies", ...) record for
GetOppositeLinearControlBlockShallReturnkBlockEvenAsDefaultValue names

  score::mw::log::detail::wait_free_producer_queue::alternating_control_block_test::GetOppositeLinearControlBlock

Two components of that path are not namespaces. wait_free_producer_queue is
the directory, and alternating_control_block_test is this file's own name;
neither appears in a namespace declaration anywhere in the repository.

The function is declared in alternating_control_block.h inside
score -> mw -> log -> detail, so the trace is written to match the form the
other Verifies records in the repository use, with the leading :: and the
trailing ().

Signed-off-by: Huseyin Kutsi Balci <balcihkutsi@gmail.com>
@github-actions

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: d90f1f88-3abd-4cc9-8ced-f42f8f1c36ef
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'score_process', the root module requires module version score_process@1.5.4, but got score_process@1.6.0 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: 
Computing main repo mapping: 
Loading: 
Loading: 4 packages loaded
Loading: 4 packages loaded
    currently loading: 
Loading: 4 packages loaded
    currently loading: 
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: 10.656s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: On Hold

Development

Successfully merging this pull request may close these issues.

2 participants