Repository navigation
fix(metamodel): validate safety requirement allocations - #1000
AlexanderLanin wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
🟢 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_byallocations and optionalfulfilslinks, 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
|
Documentation preview for this pull request is available at: |
There was a problem hiding this comment.
🔵 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
|
merged via #1001 |

📌 Description
Correctly allocated ASIL_B features and components should not receive missing-
fulfilsdiagnostics. 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_byallocations and optionalfulfilslinks, and correct the reversed QMfulfilscondition. Keep the separate requirement for at least one safety requirement per safety element, using incoming allocations for features/components andfulfilsfor 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.
✅ Checklist