From 919a0abcaf47df3af92eb77ac7aaab53be422cba Mon Sep 17 00:00:00 2001 From: Maximilien Cuony Date: Tue, 16 Dec 2025 14:27:09 +0100 Subject: [PATCH 1/2] [mock_uss] Add uses_cmsa option --- monitoring/mock_uss/scd_injection/routes_injection.py | 10 ++++++++++ monitoring/monitorlib/locality.py | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/monitoring/mock_uss/scd_injection/routes_injection.py b/monitoring/mock_uss/scd_injection/routes_injection.py index edf9ca71d5..69c38bfbc4 100644 --- a/monitoring/mock_uss/scd_injection/routes_injection.py +++ b/monitoring/mock_uss/scd_injection/routes_injection.py @@ -178,6 +178,16 @@ def unsuccessful( except PlanningError as e: return unsuccessful(PlanningActivityResult.Rejected, str(e)) + if not locality.uses_cmsa(): + if new_flight.op_intent.reference.state in [ + scd_api.OperationalIntentState.Nonconforming, + scd_api.OperationalIntentState.Contingent, + ]: + return unsuccessful( + PlanningActivityResult.NotSupported, + f"The current locality {locality} does not support CMSA, flight cannot transition to {new_flight.op_intent.reference.state}", + ) + step_name = "performing unknown operation" notes: str | None = None try: diff --git a/monitoring/monitorlib/locality.py b/monitoring/monitorlib/locality.py index a3b3fafb50..5b3ef77ca0 100644 --- a/monitoring/monitorlib/locality.py +++ b/monitoring/monitorlib/locality.py @@ -37,6 +37,11 @@ def highest_priority(self) -> int: """Returns the highest priority level for ASTM F3548-21 defined by the regulator of this locality""" raise NotImplementedError(Locality._NOT_IMPLEMENTED_MSG) + @abstractmethod + def uses_cmsa(self) -> bool: + """Return true if the ecosystem supports CMSA operations""" + raise NotImplementedError(Locality._NOT_IMPLEMENTED_MSG) + def __str__(self): return self.__class__.__name__ @@ -69,6 +74,9 @@ def lowest_bound_priority(self) -> int: def highest_priority(self) -> int: return 100 + def uses_cmsa(self) -> bool: + return True + class UnitedStatesIndustryCollaboration(Locality): @classmethod @@ -86,3 +94,6 @@ def lowest_bound_priority(self) -> int: def highest_priority(self) -> int: return 100 + + def uses_cmsa(self) -> bool: + return True From 151ab7832bb01d36251b0afdac8cee8cf10174a4 Mon Sep 17 00:00:00 2001 From: Maximilien Cuony Date: Mon, 22 Dec 2025 08:36:25 +0100 Subject: [PATCH 2/2] Disable CMSA on UnitedStatesIndustryCollaboration --- monitoring/monitorlib/locality.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitoring/monitorlib/locality.py b/monitoring/monitorlib/locality.py index 5b3ef77ca0..f22e1c771f 100644 --- a/monitoring/monitorlib/locality.py +++ b/monitoring/monitorlib/locality.py @@ -96,4 +96,4 @@ def highest_priority(self) -> int: return 100 def uses_cmsa(self) -> bool: - return True + return False