diff --git a/api/src/opentrons/protocol_engine/protocol_engine.py b/api/src/opentrons/protocol_engine/protocol_engine.py index 7b2f8e76678..7c8db74ed06 100644 --- a/api/src/opentrons/protocol_engine/protocol_engine.py +++ b/api/src/opentrons/protocol_engine/protocol_engine.py @@ -242,6 +242,27 @@ def estop(self, maintenance_run: bool) -> None: return current_id = ( # todo + # + ## Notes + # Reading: + # - Get single command by ID + # - Get all commands, ordered + # - Get slice of commands by integer index, potentially starting from "currently running or most recently executed" (but see confusing docs) + # - Get "current" (currently running, or most recently completed) command (but see confusing docs) + # - May need to change for fixup commands + # - Get "next to execute" (first queued setup command or first queued protocol command) + # - Will need to change for fixup commands + # == / !=, mostly for tests + # Writing: + # - Enqueue a new command + # - Update command for its new state + # Steps for this PR: + # 1. Naively move everything into this file + # ?. Resolve get_current()/get_slice() discrepancy + # ?. Add .tail to OrderedSet to support existing JSONv6 performance bug + # ?. General state deduplication and cleanup. + # "Most recently executed" unfortunately does not mean "most recent to have internally entered a completed state," because of mid-JSON-run failures. + # Resolve todo about separate actions for separate state transitions, instead of a single UpdateCommandAction self._state_store.commands.state.running_command_id or self._state_store.commands.state.queued_command_ids.head(None) )