Skip to content

fix(metamodel): validate safety requirement allocations - #1000

Closed
AlexanderLanin wants to merge 4 commits into
eclipse-score:mainfrom
etas-contrib:fix/safety-allocation-checks
Closed

AlexanderLanin wants to merge 4 commits into
eclipse-score:mainfrom
etas-contrib:fix/safety-allocation-checks

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

📌 Description

Correctly allocated ASIL_B features and components should not receive missing-fulfils diagnostics. QM requirements may be allocated to QM or ASIL_B elements, while ASIL_B requirements must not be allocated to QM elements.

Check safety compatibility through mandatory satisfied_by allocations and optional fulfils links, and correct the reversed QM fulfils condition. Keep the separate requirement for at least one safety requirement per safety element, using incoming allocations for features/components and fulfils for views/interfaces. Align the tool requirements with the process wording.

A single RST fixture fully verifies both tool requirements. The RST framework now supports informational expectations alongside warnings, with shared field definitions for list options. Use a concrete source-root prefix in the logger fixture and accept the valid prefixed/unprefixed locations so the unit tests also run directly through pytest.

Closes #998.
Closes #999.

🚨 Impact Analysis

Safety compatibility violations are warnings. Allocation-completeness findings remain informational to preserve the existing transition policy. Existing SCORE process-compliance findings are tracked in eclipse-score/score#3378.

  • This change does not violate any tool requirements and is covered by existing tool requirements
  • This change does not violate any design decisions
  • Otherwise I have created a ticket for new tool qualification

✅ Checklist

  • Added/updated documentation for new or changed features
  • Added/updated tests to cover the changes
  • Followed project coding standards and guidelines

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review identified no blocking issues, and the regression fixture covers the required compatibility and completeness distinctions.

No open issues 🎉

What changed in this PR

Corrects metamodel safety-allocation validation while preserving separate informational completeness checks, addressing #998. It also makes graph-check logger fixtures compatible with direct pytest execution for #999.

Changes:

  • Validates safety compatibility through satisfied_by allocations and optional fulfils links, allowing mixed QM and safety requirements.
  • Adds regression coverage and support for informational diagnostic expectations.
  • Aligns tool requirements and testing documentation, and removes logger fixtures’ dependence on Bazel location formatting.
File Description
src/​extensions/​score_metamodel/​tests/​test_rules_file_based.py Checks location-scoped warning and informational expectations.
src/​extensions/​score_metamodel/​tests/​rst/​graph/​test_allocation_safety.rst Covers compatibility, completeness, and multiple allocation targets.
src/​extensions/​score_metamodel/​tests/​rst/​conf.py Registers informational expectations using shared list-field definitions.
src/​extensions/​score_metamodel/​tests/​__init__.py Supports meaningful logger locations under pytest and Bazel.
src/​extensions/​score_metamodel/​metamodel.yaml Corrects compatibility rules and separates allocation-completeness checks.
src/​extensions/​docs/​rst_filebased_testing.md Documents informational diagnostic assertions.
docs/​internals/​requirements/​requirements.rst Aligns safety-link requirements with process wording and allocation relations.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 27, 2026 16:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review found no blocking issues in the focused validation changes or regression coverage; project tests were not executed.

No open issues 🎉

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-1000: https://eclipse-score.github.io/docs-as-code/pr-1000/

Copilot AI balanced review requested due to automatic review settings October 27, 2026 16:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Both safety-compatibility checks emit informational diagnostics instead of the promised warnings, allowing violations to pass warning-as-error builds.

1 open issue

Review effort: Balanced

Comment thread src/extensions/score_metamodel/metamodel.yaml
Copilot AI balanced review requested due to automatic review settings October 27, 2026 17:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Safety-compatibility checks still emit informational diagnostics rather than the specified warnings, allowing incompatible links to bypass warnings-as-errors enforcement.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@AlexanderLanin

Copy link
Copy Markdown
Member Author

merged via #1001

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

Labels

None yet

Projects

2 participants