From 59ae826f863a0282a74ff277a7442014deeb983b Mon Sep 17 00:00:00 2001 From: Krishna Satish Deshkulkarni Shankaranarayana Date: Thu, 9 Jul 2026 10:14:22 +0200 Subject: [PATCH 1/2] mw::com: add AoU DoNotTrustGetSubscriptionStateReturnValue --- .../component_requirements_ipc.trlc | 8 +++++--- score/mw/com/dependability/safety_analysis/aou.trlc | 8 ++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/score/mw/com/dependability/requirements/component_requirements/component_requirements_ipc.trlc b/score/mw/com/dependability/requirements/component_requirements/component_requirements_ipc.trlc index 2f3f9f52b..4cfe6c9f9 100644 --- a/score/mw/com/dependability/requirements/component_requirements/component_requirements_ipc.trlc +++ b/score/mw/com/dependability/requirements/component_requirements/component_requirements_ipc.trlc @@ -2149,11 +2149,11 @@ section "com" { The SubscriptionState expresses the state of a event or field subscription on the consumer/proxy side. The semantics of the enum values shall be: - * {{kSubscribed}}: Subscription has been successfully acknowledged by the provider side and has not been withdrawn by the provider (implicitly by stop-offer of the enclosing service or a negative acknowlege/refusal of the subscribe) + * {{kSubscribed}}: Subscription has been successfully acknowledged by the provider side and the consumer has not been notified that the service is no longer offered (either the provider has called stop_offer() or crashed). * {{kNotSubscribed}}:In case of the following cases: - * Subscribe() has not been called or the last Subscribe() has been withdrawn with call to Unsubscribe() + * Subscribe() has not been called or the last successful Subscribe() has been withdrawn with call to Unsubscribe() * Last call to Subscribe() has been rejected/negatively acknowledged by the provider side or provider side explicitly cancels an already acknowldged subscription. @@ -2165,7 +2165,9 @@ section "com" { ** has been already dispatched to the provider side, but acknowlegde from provider side is pending - * state was already in {{kSubscribed}}, but then the whole enclosing providing service instance has been stopped offering. This is the "auto-reconnect mode". As soon as the service instance is detected being offered again, the Subscribe() will get automatically dispatched to the provider again.''' + * state was already in {{kSubscribed}}, but then the consumer has been notified that the whole enclosing providing service instance has stopped offering. This is the "auto-reconnect mode". As soon as the consumer is notified that the service instance is being offered again, the state would transition back to {{kSubscribed}}.''' + + note = "The notification to the consumer that the provider has stopped offering may be delayed" safety = ScoreReq.Asil.B derived_from = [Communication.ProducerConsumerPattern@1] version = 1 diff --git a/score/mw/com/dependability/safety_analysis/aou.trlc b/score/mw/com/dependability/safety_analysis/aou.trlc index 36a96591d..d9b8b4469 100644 --- a/score/mw/com/dependability/safety_analysis/aou.trlc +++ b/score/mw/com/dependability/safety_analysis/aou.trlc @@ -370,3 +370,11 @@ ScoreReq.AoU MethodInArgPtrMatches { version = 1 mitigates = "Communication.CallBlocksOnCaller, Communication.CallBlocksOnCallee, Communication.CallBlocksOnUserHandler" } + +/* broken_link_c/issue/79416086 */ +ScoreReq.AoU NoGuaranteeOnSubscriptionStateCorrectness { + description = "For safety critical use cases, an application must treat a SubscriptionState of kSubscribed or kSubscriptionPending (returned by GetSubscriptionState() or reported by the SubscriptionStateChangeHandler) as the same." + safety = ScoreReq.Asil.B + note = "On a technical level, kSubscribed and kSubscriptionPending cannot be reliably differentiated, see {{SubscriptionState}} Component requirement for more details" + version = 1 +} From 53feb67de955ec3b5436adf6980cfd6c43409e7e Mon Sep 17 00:00:00 2001 From: Krishna Satish Deshkulkarni Shankaranarayana Date: Mon, 20 Jul 2026 09:41:43 +0200 Subject: [PATCH 2/2] mw::com: remove misleading comment about subscription states --- .../component_requirements/component_requirements_ipc.trlc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/score/mw/com/dependability/requirements/component_requirements/component_requirements_ipc.trlc b/score/mw/com/dependability/requirements/component_requirements/component_requirements_ipc.trlc index 4cfe6c9f9..311531299 100644 --- a/score/mw/com/dependability/requirements/component_requirements/component_requirements_ipc.trlc +++ b/score/mw/com/dependability/requirements/component_requirements/component_requirements_ipc.trlc @@ -2155,7 +2155,7 @@ section "com" { * Subscribe() has not been called or the last successful Subscribe() has been withdrawn with call to Unsubscribe() - * Last call to Subscribe() has been rejected/negatively acknowledged by the provider side or provider side explicitly cancels an already acknowldged subscription. + * Last call to Subscribe() has been rejected/negatively acknowledged by the provider side. * {{kSubscriptionPending}}: