Preserve saved tip state during tracker restoration - #1466
Open
hazlamshamin wants to merge 1 commit into
Open
hazlamshamin wants to merge 1 commit into
hazlamshamin wants to merge 1 commit into
Conversation
Member
|
why not add this to the new OT driver rather than legacy? |
Compare committed and pending tips before attaching a tip to its holder. Resource placement must not turn a committed state into a pending transaction. Restore saved liquid volume through the committed tip volume tracker. Reuse the committed tip when both tip states match, while preserving pending pickup and removal transactions for commit or rollback. Keep resource-tree tip ownership and the saved state format unchanged.
hazlamshamin
force-pushed
the
feat/ot2-eight-channel-upstream
branch
from
October 6, 2026 02:48
cb27f46 to
b3bd5a7
Compare
Collaborator
Author
|
oh god, i genuinely missed that. been working and building on top with the legacy one even before the new driver is merged last month. didn't realise it. but thats a good news for me too then... i have narrowed this PR to just the saved tip-state restoration, since the eight-channel capability i needed already exists in the new driver. apologies for duplicating! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Preserve committed tip state and saved liquid volume when loading a tip tracker. Attaching a deserialized tip to its spot changes its resource placement. Comparing tip states after attachment can incorrectly create a pending transaction, and ignoring the saved volume state loses the liquid in the tip.
The shared
TipSpot.serialize_state()andTipSpot.load_state()APIs delegate to this tracker. The fix therefore also applies to rack state used by the current OT-2 driver. No pipette driver or hardware command changes are included.Verification
Three regression tests fail against upstream main at
3eb0b68cbda63095a4172dccc9844185deb3a674and pass with the fix. A fourth test checks preservation of pending pickup transactions.python -m pytest -q pylabrobot/legacy/liquid_handling pylabrobot/resources pylabrobot/legacy/tip_tracker_tests.py pylabrobot/opentrons/ot2 pylabrobot/opentrons/tracking_tests.py— 954 passed, 8 unchanged skips, and 341 subtests passed.python -m ruff check pylabrobot/legacy/tip_tracker.py pylabrobot/legacy/tip_tracker_tests.py— passed.python -m ruff format --check pylabrobot/legacy/tip_tracker.py pylabrobot/legacy/tip_tracker_tests.py— passed.python -m mypy --follow-imports=silent --ignore-missing-imports pylabrobot/legacy/tip_tracker.py— passed; scoped to the changed source file.Existing tests and CI configuration are unchanged. The full repository test suite and hardware tests did not run for this change.