Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


.. Title contains no stop word
#EXPECT-NOT: feat_req__test__title_good: contains a weak word: `must` in option: `title`. Please revise the wording.
#EXPECT-NOT: title

.. feat_req:: This is a test
:id: feat_req__test__title_good
Expand All @@ -38,7 +38,7 @@



#EXPECT-NOT: stkh_req__test_title_good: contains a weak word: `must` in option: `title`. Please revise the wording.
#EXPECT-NOT: title

.. stkh_req:: This is a test
:id: stkh_req__test_title_good
Expand Down Expand Up @@ -67,7 +67,7 @@


.. Description of architecture view of type feat_arc_sta is not checked for weak words
#EXPECT-NOT: feat_arc_sta_desc_good: contains a weak word: `really` in option: `content`. Please revise the wording.
#EXPECT-NOT: content

.. feat_arc_sta:: This is a test
:id: feat_arc_sta_desc_good
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


.. Positive Test: Child requirement QM. Parent requirement has the correct related safety level. Parent requirement is `QM`.
#EXPECT-NOT: feat_req__child__1: Parent need `feat_req__parent__QM` does not fulfill condition `safety == QM`. Explanation: An ASIL requirement must link at least one parent/upstream ASIL requirement for correct decomposition. Please ensure the parent’s safety level is QM and its status is valid.
#EXPECT-NOT: safety

.. feat_req:: Child requirement 1
:id: feat_req__child__1
Expand All @@ -41,7 +41,7 @@


.. Positive Test: Child requirement ASIL B. Parent requirement has the correct related safety level. Parent requirement is `QM`.
#EXPECT-NOT: feat_req__child__2: Parent need `feat_req__parent__ASIL_B` does not fulfill condition `safety == QM`. Explanation: An ASIL requirement must link at least one parent/upstream ASIL requirement for correct decomposition. Please ensure the parent’s safety level is QM and its status is valid.
#EXPECT-NOT: safety

.. feat_req:: Child requirement 2
:id: feat_req__child__2
Expand All @@ -62,17 +62,6 @@

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.

AI-assisted review (Claude):

Important: This removes a positive test (#EXPECT) for link validation against a non-existent parent. The prior EXPECT-NOT tests were no-ops — this EXPECT test is different. Removing it drops the assertion that the rule produces a warning for unknown outgoing links entirely.

The likely root cause: the warning from sphinx-needs (unknown outgoing link) doesn't contain "score_metamodel", so it gets filtered out by the new pre-filter on line 208. But the fix should be to handle that at the filter level, not to silently drop test coverage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a sphinx-needs warning / error. Not one of our own. I do not think we should start testing sphinx-needs functionality.
This did not work before either (as we filter on just errors coming from score_metamodel).



.. Parent requirement does not exist
#EXPECT: unknown outgoing link
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.

Why remove this test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a sphinx-needs warning / error. Not one of our own. I do not think we should start testing sphinx-needs functionality.
This did not work before either (as we filter on just errors coming from score_metamodel).


.. feat_req:: Child requirement 4
:id: feat_req__linking_to_unknown_parent
:safety: ASIL_B
:status: valid
:satisfies: feat_req__parent0__abcd



.. Mitigation of Safety Analysis (FMEA and DFA) shall be checked. Mitigation shall have the same or higher safety level than the analysed item.
.. Negative Test: Linked to a mitigation that is lower than the safety level of the analysed item.
#EXPECT: feat_saf_dfa__child__5: Parent need `feat_req__parent__QM` does not fulfill condition `safety != QM`. Explanation: An ASIL_B safety requirement must link to a ASIL_B requirement. Please ensure that the linked requirements safety level is not QM and it's status is valid.
Expand All @@ -85,7 +74,7 @@


.. Positive Test: Linked to a mitigation that is equal to the safety level of the analysed item.
#EXPECT-NOT: feat_saf_dfa__child__6: Parent need `feat_req__parent__ASIL_B` does not fulfill condition `safety != QM`. Explanation: An ASIL_B safety requirement must link to a ASIL_B requirement. Please ensure that the linked requirements safety level is not QM and it's status is valid.
#EXPECT-NOT: safety

.. feat_saf_dfa:: Child requirement 6
:id: feat_saf_dfa__child__6
Expand All @@ -106,7 +95,7 @@


.. Positive Test: Linked to a mitigation that is equal to the safety level of the analysed item.
#EXPECT-NOT: comp_saf_dfa__child__8: Parent need `feat_req__parent__ASIL_B` does not fulfill condition `safety != QM`. Explanation: An ASIL_B safety requirement must link to a ASIL_B requirement. Please ensure that the linked requirements safety level is not QM and it's status is valid.
#EXPECT-NOT: safety

.. comp_saf_dfa:: Child requirement 8
:id: comp_saf_dfa__child__8
Expand All @@ -127,7 +116,7 @@


.. Positive Test: Linked to a mitigation that is equal to the safety level of the analysed item.
#EXPECT-NOT: feat_saf_dfa__child__10: Parent need `feat_req__parent__ASIL_B` does not fulfill condition `safety != QM`. Explanation: An ASIL_B safety requirement must link to a ASIL_B requirement. Please ensure that the linked requirements safety level is not QM and it's status is valid.
#EXPECT-NOT: safety

.. feat_saf_dfa:: Child requirement 10
:id: feat_saf_dfa__child__10
Expand All @@ -148,7 +137,7 @@


.. Positive Test: Linked to a mitigation that is equal to the safety level of the analysed item.
#EXPECT-NOT: feat_saf_fmea__child__12: Parent need `feat_req__parent__ASIL_B` does not fulfill condition `safety != QM`. Explanation: An ASIL_B safety requirement must link to a ASIL_B requirement. Please ensure that the linked requirements safety level is not QM and it's status is valid.
#EXPECT-NOT: safety

.. feat_saf_fmea:: Child requirement 12
:id: feat_saf_fmea__child__12
Expand All @@ -159,7 +148,7 @@


.. Positive Test: Linked to a mitigation that is higher to the safety level of the analysed item.
#EXPECT-NOT: feat_saf_fmea__child__13: Parent need `feat_req__parent__ASIL_B` does not fulfill condition `safety != QM`. Explanation: An ASIL_B safety requirement must link to a ASIL_B requirement. Please ensure that the linked requirements safety level is not QM and it's status is valid.
#EXPECT-NOT: safety

.. feat_saf_fmea:: Child requirement 13
:id: feat_saf_fmea__child__13
Expand All @@ -179,8 +168,7 @@


.. Positive Test: Linked to a mitigation that is equal to the safety level of the analysed item.
#EXPECT-NOT: comp_saf_fmea__child__15: Parent need `feat_req__parent__ASIL_B` does not fulfill condition `safety != QM`. Explanation: An ASIL_B safety requirement must link to a ASIL_B requirement. Please ensure that the linked requirements safety level is not QM and it's status is valid.

#EXPECT-NOT: safety
.. comp_saf_fmea:: Child requirement 15
:id: comp_saf_fmea__child__15
:safety: ASIL_B
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
# *******************************************************************************
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.

AI-assisted review (Claude):

Important: This test verified that "feature deeper in path is explicitly allowed" behavior. If the old EXPECT-NOT was a no-op (as claimed), the rule's behavior for this case was never actually verified. Two outcomes are possible:

  • The rule correctly does NOT warn → the test should be kept with a generic form like #EXPECT-NOT: Feature 'test' not in path
  • The rule incorrectly DOES warn → removing the test hides the regression instead of fixing the rule

Please verify by running the test locally with the fix applied. If the rule is correct, restore this test in the new generic style.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I could re-enable this test by renaming the need, or creating more folders.

As the current folder structure is not carried onto the error message (it's just '/' it doesn't go deeper than 1 folder).

What would be preferred here?

#CHECK: id_contains_feature

.. Feature is deeper in the path of the RST file
.. This is now explicitly allowed
#EXPECT-NOT: std_wp__test__abcd.id (std_wp__test__abcd): Feature 'test' not in path

.. std_wp:: This is a test
:id: std_wp__test__abcd

.. Feature is in the path of the RST file
#EXPECT-NOT: Feature 'id_contains_feature' not in path

Expand Down
Loading
Loading