From da727760e9935ef2efc16baf22d54bd0d140827a Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Mon, 21 Oct 2024 17:12:52 -0400 Subject: [PATCH] Todo comments. --- .../protocol_engine/actions/get_state_update.py | 11 +++++++++++ .../protocol_engine/commands/drop_tip_in_place.py | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/api/src/opentrons/protocol_engine/actions/get_state_update.py b/api/src/opentrons/protocol_engine/actions/get_state_update.py index 9458027669c..d48ffd559bb 100644 --- a/api/src/opentrons/protocol_engine/actions/get_state_update.py +++ b/api/src/opentrons/protocol_engine/actions/get_state_update.py @@ -23,3 +23,14 @@ def get_state_update(action: Action) -> StateUpdate | None: return action.state_update else: return None + + # FIX BEFORE MERGE: + # If it's a FailCommandAction, and the error recovery policy was + # "assume false-positive and continue," there are actually two StateUpdates + # that we need to return here: + # + # 1. The "main" one from the command failure. + # 2. The "extra" one from assuming it's a false-positive and fixing things up + # so we're ready to continue. + # + # Or we need to merge them into a single update or something. diff --git a/api/src/opentrons/protocol_engine/commands/drop_tip_in_place.py b/api/src/opentrons/protocol_engine/commands/drop_tip_in_place.py index 81b47e05c08..f88f982b52a 100644 --- a/api/src/opentrons/protocol_engine/commands/drop_tip_in_place.py +++ b/api/src/opentrons/protocol_engine/commands/drop_tip_in_place.py @@ -83,7 +83,11 @@ async def execute(self, params: DropTipInPlaceParams) -> _ExecuteReturn: ) ], ) - return DefinedErrorData(public=error, state_update=state_update) + # FIX BEFORE MERGE: state_update_if_false_positive + return DefinedErrorData( + public=error, + state_update=state_update, + ) else: state_update.update_pipette_tip_state( pipette_id=params.pipetteId, tip_geometry=None