fix(api): Ensure stack of labware on Staging Area Slot properly resolves ancestor slot #16681
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Covers PLAT-538
Previously attempting to stack TC lids in the staging area slots would result in incorrect "Off-Deck" errors. Any and all labware could not be properly stacked in this location due to the Protocol Engine not being able to properly resolve the 'ancestor slot' of staging area slots.
In order to fix this, we now allow Staging Area Slot locations to be resolved as an ancestor, and raise errors where this would cause a conflict (due to staging area slots, as a location, being tied to the fixture location of column 3, rather than column 4). Fortunately, only pipetting actions would encounter these cases. Since we do not allow pipetting in column 4, we should theoretically never run into these kinds of problems.
Test Plan and Hands on Testing
Changelog
Review requests
Do the changes here seem to make sense? Any issues that could occur from the error-raising I'm doing to prevent our conflict cases?
What should we do about the PAPI core
get_deck_slot(...)
function? We have historically had it return an optional DeckSlotName object, should we change that to an optional Union including StagingAreaSlotName? Would that have any negative downstream effects on things using that function likeloaded_labwares()
? Right now I just have it mutating the slot to a DeckSlotName for an equivalent slot in column 3, which is a lie but technically is the deck cutout that both columns originate from. Probably want to replace this with something more sensible before merging.Risk assessment
Low - I believe we're covering the conflict cases pretty aggressively here, and such states should be unreachable. As a result, resolving an ancestor to column 4 should be unblocked for the gripper.