Skip to content

result: link tests to requirements - #579

Open
Nikhil2206 wants to merge 6 commits into
eclipse-score:mainfrom
Nikhil2206:nk-result-test-req-trace
Open

Nikhil2206 wants to merge 6 commits into
eclipse-score:mainfrom
Nikhil2206:nk-result-test-req-trace

Conversation

@Nikhil2206

@Nikhil2206 Nikhil2206 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Link all 256 C++ tests in the score/result component to the component requirements using the required RecordProperty metadata.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-579: https://eclipse-score.github.io/baselibs/pr-579/

@Nikhil2206 Nikhil2206 closed this Sep 11, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in BAS - Baselibs FT Sep 11, 2026
@Nikhil2206 Nikhil2206 reopened this Sep 11, 2026
@Nikhil2206
Nikhil2206 marked this pull request as draft September 11, 2026 08:24
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 11, 2026 10:33 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 11, 2026 10:33 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 11, 2026 10:33 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 11, 2026 10:33 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 17, 2026 05:48 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 17, 2026 05:48 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 17, 2026 05:48 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 17, 2026 05:48 — with GitHub Actions Active
…_integration wording

comp_req__result__std_integration's normative text only covers conversion to
std::optional<T>. Twelve extensions_test.cpp tests were linked to it despite
testing score::cpp::expected and score::cpp::optional interop, which the
requirement does not describe. Remove the mismatched PartiallyVerifies links;
Description/TestType/DerivationTechnique remain accurate test-level metadata.
The 4 tests actually converting to/from std::optional keep their existing link.
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 21, 2026 09:27 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 21, 2026 09:27 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 21, 2026 09:27 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 21, 2026 09:27 — with GitHub Actions Active
…tensions tests

comp_req__result__std_integration only covers std::optional<T> conversion, so
the previous fix that removed its links from the score::cpp::expected /
score::cpp::optional conversion tests left 12 tests in extensions_test.cpp
with Description/TestType/DerivationTechnique metadata but no linkage style,
violating the review checklist's 'exactly one linkage style' requirement.

Author comp_req__result__futurecpp_integration to formally cover conversion
to/from score::cpp::expected and to score::cpp::optional, and link the 12
orphaned tests to it via PartiallyVerifies.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 23, 2026
@Nikhil2206
Nikhil2206 marked this pull request as ready for review September 23, 2026 10:26
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 23, 2026 10:26 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 23, 2026 10:26 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 23, 2026 10:26 — with GitHub Actions Active
@Nikhil2206
Nikhil2206 deployed to workflow-approval September 23, 2026 10:26 — with GitHub Actions Active
@4og
4og requested a balanced review from Copilot September 23, 2026 15:02

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

Copilot review overview

🟡 Changes recommended

Several metadata descriptions claim coverage or guarantees that the corresponding tests and implementations do not provide.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity · 2 Low severity

Open (3)
What changed in this PR

Links all 256 score/result C++ tests to component requirements with verification metadata and adds a Future C++ integration requirement.

Changes:

  • Adds requirement links and test metadata across Result tests.
  • Adds coverage descriptions and derivation classifications.
  • Defines a requirement for score::cpp conversions.
File Description
score/​result/​result_test.cpp Links public Result API tests.
score/​result/​error_test.cpp Links Error behavior tests.
score/​result/​error_msg_mapping_test.cpp Links the Rust bridge test.
score/​result/​docs/​requirements/​index.rst Adds the Future C++ integration requirement.
score/​result/​details/​expected/​unexpected_test.cpp Links unexpected-type tests.
score/​result/​details/​expected/​test_type_traits_test.cpp Links constructibility trait tests.
score/​result/​details/​expected/​extensions_test.cpp Links conversion utility tests.
score/​result/​details/​expected/​expected_type_trait_test.cpp Links expected type-trait tests.
score/​result/​details/​expected/​expected_observer_test.cpp Links observer and invalid-access tests.
score/​result/​details/​expected/​expected_monadic_operator_test.cpp Links monadic operation tests.
score/​result/​details/​expected/​expected_equality_test.cpp Links equality tests.
score/​result/​details/​expected/​expected_constructor_test.cpp Links construction tests.
score/​result/​details/​expected/​expected_assignment_test.cpp Links assignment and swap tests.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +332 to +333
"Check that value() on an lvalue expected holding an error throws instead of returning a "
"dangling value.");
Comment on lines +115 to +117
RecordProperty("Description",
"Check that expected's move assignment is noexcept only when both the value and error types "
"are themselves nothrow move-assignable.");
:tags: inspected
:satisfied_by: comp__baselibs_result[version==1]

The Result library shall provide conversion utilities to transform an expected object into a score::cpp::expected object and vice versa, and to transform an expected's value into a score::cpp::optional<T>. The conversion to score::cpp::optional<T> shall require explicit handling of error cases before discarding error information, ensuring that errors cannot be silently ignored.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The "expected object" in the requirement text is indeed confusing as it's an implementation detail of Result. I would not mention it in the requirement. It doesn't, however, change the essence of the requirement.

This branch was successfully deployed

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

Labels

c++ C++ code comp-result Related to score/result component documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants