From 69841124c0c5bfc12ea5435a725cadbc22553884 Mon Sep 17 00:00:00 2001 From: Benjamin Pelletier Date: Tue, 10 Oct 2023 00:36:31 +0000 Subject: [PATCH] Update flight intent validation --- .../flight_intent_validation.md | 65 --------- .../flight_intent_validation.py | 135 ------------------ .../utm/validate_shared_operational_intent.md | 2 +- 3 files changed, 1 insertion(+), 201 deletions(-) diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.md b/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.md index 9d572c3d46..dc390d82e4 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.md @@ -14,8 +14,6 @@ Notably the following requirements: FlightIntentsResource that provides the following flight intents: - `valid_flight`: a valid operational intent upon which other invalid ones are derived, in `Accepted` state - `valid_activated`: state mutation `Activated` - - `invalid_accepted_offnominal`: off-nominal volumes mutation: has (any valid) off-nominal volume - - `invalid_activated_offnominal`: state mutation `Activated` - `invalid_too_far_away`: reference time mutation: reference time pulled back so that it is like the operational intent is attempted to be planned more than OiMaxPlanHorizon = 30 days ahead of time - `valid_conflict_tiny_overlap`: volumes mutation: has a volume that overlaps with `valid_op_intent` just above IntersectionMinimumPrecision = 1cm in a way that must result as a conflict @@ -55,69 +53,6 @@ to reject or accept the flight. If the USS indicates that the injection attempt ### [Validate flight intent too far ahead of time not planned test step](../validate_not_shared_operational_intent.md) -## Attempt to specify off-nominal volume in Accepted and Activated states test case -### Attempt to plan flight with an off-nominal volume test step -The user flight intent that the test driver attempts to plan has an off-nominal volume. -As such, the planning attempt should be rejected. - -#### Incorrectly planned check -If the USS successfully plans the flight or otherwise fails to indicate a rejection, it means that it failed to validate -the intent provided. Therefore, this check will fail if the USS indicates success in creating the flight from the user -flight intent, per **[astm.f3548.v21.OPIN0015](../../../../requirements/astm/f3548/v21.md)**. - -#### Failure check -All flight intent data provided was complete and correct. It should have been processed successfully, allowing the USS -to reject or accept the flight. If the USS indicates that the injection attempt failed, this check will fail per -**[interuss.automated_testing.flight_planning.ExpectedBehavior](../../../../requirements/interuss/automated_testing/flight_planning.md)**. - -### [Validate flight intent with an off-nominal volume not planned test step](../validate_not_shared_operational_intent.md) - -### [Plan valid flight intent test step](../../../flight_planning/plan_flight_intent.md) -The valid flight intent should be successfully planned by the flight planner. - -### [Validate flight sharing test step](../validate_shared_operational_intent.md) - -### Attempt to modify planned flight with an off-nominal volume test step -The user flight intent that the test driver attempts to modify has an off-nominal volume and is in the `Accepted` state. -As such, the modification attempt should be rejected. - -#### Incorrectly modified check -If the USS successfully modifies the flight or otherwise fails to indicate a rejection, it means that it failed to validate -the intent provided. Therefore, this check will fail if the USS indicates success in modifying the flight from the user -flight intent, per **[astm.f3548.v21.OPIN0015](../../../../requirements/astm/f3548/v21.md)**. - -#### Failure check -All flight intent data provided was complete and correct. It should have been processed successfully, allowing the USS -to reject or accept the flight. If the USS indicates that the injection attempt failed, this check will fail per -**[interuss.automated_testing.flight_planning.ExpectedBehavior](../../../../requirements/interuss/automated_testing/flight_planning.md)**. - -### [Validate planned flight not modified test step](../validate_shared_operational_intent.md) -Validate that the planned flight intent was not modified with an off-nominal volume. - -### [Activate valid flight intent test step](../../../flight_planning/activate_flight_intent.md) -The valid flight intent should be successfully activated by the flight planner. - -### [Validate flight sharing test step](../validate_shared_operational_intent.md) - -### Attempt to modify activated flight with an off-nominal volume test step -The user flight intent that the test driver attempts to modify has an off-nominal volume and is in the `Activated` state. -As such, the modification attempt should be rejected. - -#### Incorrectly modified check -If the USS successfully modifies the flight or otherwise fails to indicate a rejection, it means that it failed to validate -the intent provided. Therefore, this check will fail if the USS indicates success in modifying the flight from the user -flight intent, per **[astm.f3548.v21.OPIN0015](../../../../requirements/astm/f3548/v21.md)**. - -#### Failure check -All flight intent data provided was complete and correct. It should have been processed successfully, allowing the USS -to reject or accept the flight. If the USS indicates that the injection attempt failed, this check will fail per -**[interuss.automated_testing.flight_planning.ExpectedBehavior](../../../../requirements/interuss/automated_testing/flight_planning.md)**. - -### [Validate activated flight not modified test step](../validate_shared_operational_intent.md) -Validate that the activated flight intent was not modified with an off-nominal volume. - -### [Delete valid flight intent test step](../../../flight_planning/delete_flight_intent.md) - ## Validate transition to Ended state after cancellation test case ### [Plan flight intent test step](../../../flight_planning/plan_flight_intent.md) The valid flight intent should be successfully planned by the flight planner. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.py b/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.py index 226cb91a99..1002c81156 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.py @@ -39,9 +39,6 @@ class FlightIntentValidation(TestScenario): valid_flight: FlightIntent valid_activated: FlightIntent - invalid_accepted_offnominal: FlightIntent - invalid_activated_offnominal: FlightIntent - invalid_too_far_away: FlightIntent valid_conflict_tiny_overlap: FlightIntent @@ -74,15 +71,11 @@ def __init__( self.valid_flight, self.valid_activated, self.invalid_too_far_away, - self.invalid_accepted_offnominal, - self.invalid_activated_offnominal, self.valid_conflict_tiny_overlap, ) = ( flight_intents["valid_flight"], flight_intents["valid_activated"], flight_intents["invalid_too_far_away"], - flight_intents["invalid_accepted_offnominal"], - flight_intents["invalid_activated_offnominal"], flight_intents["valid_conflict_tiny_overlap"], ) @@ -98,14 +91,6 @@ def __init__( self.invalid_too_far_away.request.operational_intent.state == OperationalIntentState.Accepted ), "invalid_too_far_away must have state Accepted" - assert ( - self.invalid_accepted_offnominal.request.operational_intent.state - == OperationalIntentState.Accepted - ), "invalid_accepted_offnominal must have state Accepted" - assert ( - self.invalid_activated_offnominal.request.operational_intent.state - == OperationalIntentState.Activated - ), "invalid_activated_offnominal must have state Activated" assert ( self.valid_conflict_tiny_overlap.request.operational_intent.state == OperationalIntentState.Accepted @@ -121,19 +106,6 @@ def __init__( time_delta.days > OiMaxPlanHorizonDays ), f"invalid_too_far_away must have start time more than {OiMaxPlanHorizonDays} days ahead of reference time, got {time_delta}" - assert ( - len( - self.invalid_accepted_offnominal.request.operational_intent.off_nominal_volumes - ) - > 0 - ), "invalid_accepted_offnominal must have at least one off-nominal volume" - assert ( - len( - self.invalid_activated_offnominal.request.operational_intent.off_nominal_volumes - ) - > 0 - ), "invalid_activated_offnominal must have at least one off-nominal volume" - assert Volume4DCollection.from_interuss_scd_api( self.valid_flight.request.operational_intent.volumes ).intersects_vol4s( @@ -167,12 +139,6 @@ def run(self): self._attempt_invalid() self.end_test_case() - self.begin_test_case( - "Attempt to specify off-nominal volume in Accepted and Activated states" - ) - self._attempt_invalid_offnominal() - self.end_test_case() - self.begin_test_case("Validate transition to Ended state after cancellation") self._validate_ended_cancellation() self.end_test_case() @@ -207,8 +173,6 @@ def _setup(self) -> bool: [ self.valid_flight, self.valid_activated, - self.invalid_accepted_offnominal, - self.invalid_activated_offnominal, self.invalid_too_far_away, self.valid_conflict_tiny_overlap, ], @@ -236,105 +200,6 @@ def _attempt_invalid(self): ) validator.expect_not_shared() - def _attempt_invalid_offnominal(self): - with OpIntentValidator( - self, - self.tested_uss, - self.dss, - "Validate flight intent with an off-nominal volume not planned", - self._intents_extent, - ) as validator: - submit_flight_intent( - self, - "Attempt to plan flight with an off-nominal volume", - "Incorrectly planned", - {InjectFlightResponseResult.Rejected}, - {InjectFlightResponseResult.Failed: "Failure"}, - self.tested_uss, - self.invalid_accepted_offnominal.request, - ) - validator.expect_not_shared() - - with OpIntentValidator( - self, - self.tested_uss, - self.dss, - "Validate flight sharing", - self._intents_extent, - ) as validator: - _, valid_flight_id = plan_flight_intent( - self, - "Plan valid flight intent", - self.tested_uss, - self.valid_flight.request, - ) - valid_flight_op_intent_ref = validator.expect_shared( - self.valid_flight.request - ) - - with OpIntentValidator( - self, - self.tested_uss, - self.dss, - "Validate planned flight not modified", - self._intents_extent, - valid_flight_op_intent_ref, - ) as validator: - submit_flight_intent( - self, - "Attempt to modify planned flight with an off-nominal volume", - "Incorrectly modified", - {InjectFlightResponseResult.Rejected}, - {InjectFlightResponseResult.Failed: "Failure"}, - self.tested_uss, - self.invalid_accepted_offnominal.request, - ) - valid_flight_op_intent_ref = validator.expect_shared( - self.valid_flight.request - ) - - with OpIntentValidator( - self, - self.tested_uss, - self.dss, - "Validate flight sharing", - self._intents_extent, - valid_flight_op_intent_ref, - ) as validator: - activate_flight_intent( - self, - "Activate valid flight intent", - self.tested_uss, - self.valid_activated.request, - valid_flight_id, - ) - valid_flight_op_intent_ref = validator.expect_shared( - self.valid_activated.request - ) - - with OpIntentValidator( - self, - self.tested_uss, - self.dss, - "Validate activated flight not modified", - self._intents_extent, - valid_flight_op_intent_ref, - ) as validator: - submit_flight_intent( - self, - "Attempt to modify activated flight with an off-nominal volume", - "Incorrectly modified", - {InjectFlightResponseResult.Rejected}, - {InjectFlightResponseResult.Failed: "Failure"}, - self.tested_uss, - self.invalid_activated_offnominal.request, - ) - validator.expect_shared(self.valid_flight.request) - - _ = delete_flight_intent( - self, "Delete valid flight intent", self.tested_uss, valid_flight_id - ) - def _validate_ended_cancellation(self): with OpIntentValidator( self, diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/validate_shared_operational_intent.md b/monitoring/uss_qualifier/scenarios/astm/utm/validate_shared_operational_intent.md index b6fac6fae6..249b93b094 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/validate_shared_operational_intent.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/validate_shared_operational_intent.md @@ -30,7 +30,7 @@ If the operational intent details reported by the USS do not match the user's fl ## Off-nominal volumes check -**astm.f3548.v21.OPIN0015** +**astm.f3548.v21.OPIN0015** specifies that nominal operational intents (Accepted and Activated) must not include any off-nominal 4D volumes, so this check will fail if an Accepted or Activated operational intent includes off-nominal volumes. ## Vertices check