Skip to content

Flex: refuse a host beside simulated, fail a pickup from a used column, fix install lines, add test CI - #5

Merged
ivoryzh merged 3 commits into
mainfrom
claude/flex-guards-and-install-docs
Nov 6, 2026
Merged

ivoryzh merged 3 commits into
mainfrom
claude/flex-guards-and-install-docs

Conversation

@ivoryzh

@ivoryzh ivoryzh commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Found while checking the Opentrons Flex end to end from the live Automation Hub, on the current edge.

Two behaviour fixes

  • Flex(simulated=True, host=...) is refused. It used to ignore the host and run the simulator, with every step reporting success. The Hub form opens with simulated ticked, so filling in a host and forgetting to untick it looked like a run on that robot. Only host and serial_port count, because the form always sends the default port.
  • A pickup from a used column fails at the pickup. PyLabRobot skips spots it knows are empty and still sends an 8- or 96-channel pickup, and the simulator always reported a tip on, so the step succeeded and the failure appeared one step later as "No tip mounted". On a robot the tip sensor fails it. The simulator now reads absent when no spot under the nozzles holds a tip, so PyLabRobot's own check raises Tip pickup not detected.
    • It asks PyLabRobot's record of the rack rather than keeping its own, so a rack swapped on the worktable is full at once.
    • Anything unknown still finds a tip, and a partial column is read as its whole column. So it can pass a pickup a robot would fail, but never fails one a robot would pass.
    • Real robots are unaffected: this is simulator code, and a robot has its sensor.

Docs

  • examples/flex_simulated.py said pip install plr-ivoryos ivoryos-edge. That installs 0.2.0, and the script then fails with No module named 'plr_ivoryos.opentrons'.
  • The README's --pre also lets every other dependency be a pre-release (it installed httpx 1.0.dev6). pip install plr-ivoryos==1.0.0b1 gets the same PyLabRobot without it. The README also says uv needs PyLabRobot named.
  • The README now says no real Flex has been run, and that PyLabRobot itself warns "not tested on hardware" on 20 FlexHead96 operations and on FlexHead1 aspirate and dispense, with none on FlexHead8.
  • requirements.txt said pylabrobot>=0.2.2,<1.0, against pyproject's ==1.0.0b1, and nothing used it. Removed.

CI

  • tests.yml runs the tests on Linux, Windows and macOS, on Python 3.10, 3.12 and 3.14, plus an import of the Labware view. The only workflow before this was publish.

No version bump: pyproject.toml stays at 1.0.0b1.

Checked

  • 45 tests pass on Python 3.11: the 38 that were there and 7 new ones. These include a partly used column still picking up what is there, and a swapped rack being full at once.
  • Against the current edge (ivoryos-next main), the edge's labware and parts tests pass (28).
  • A deck started the way the launcher starts one:
    • a host beside simulated is listed under "Not loaded" with the new message;
    • the Hub form as it opens still loads the Flex and its parts;
    • a used column fails at the pickup, and changing the step to the next column and retrying completes the run.
  • pip install "plr-ivoryos[serial]==1.0.0b1" and pip install plr-ivoryos==1.0.0b1 ivoryos-edge resolve in a dry run, with no pre-release other than plr-ivoryos and PyLabRobot.

Intermittent crashes on the machine this was tested on. The suite sometimes dies there with an access violation at an unrelated point, or an impossible error such as Coordinate.__init__() got multiple values for argument 'x'. Alternating run by run, this branch and untouched main each went wrong 4 times in 18, so this PR does not cause it. That workstation has a CPU with known faults, and it logged a corrected hardware error during these runs, though that does not prove the cause. CI's clean machines are the check on this.

Not in this PR

🤖 Generated with Claude Code

ivoryzh and others added 3 commits November 6, 2026 14:10
…id not

Flex(simulated=True, host=...) ignored the host and ran the simulator, and
every step reported success. The Hub form opens with simulated ticked, so
filling in a host and forgetting to untick it looked like a run on that robot.
It is now refused, saying so. Only host and serial_port count: the form always
sends the default port.

PyLabRobot skips spots it knows are empty and still sends an 8- or 96-channel
pickup, and the simulator always reported a tip on, so a pickup from a used
column succeeded and the failure appeared at the next step as "No tip mounted".
On a robot the tip sensor fails it. The simulator now reads absent when no spot
under the nozzles holds a tip, so PyLabRobot's own check fails it at the pickup.
It asks PyLabRobot's record of the rack rather than keeping its own, so a rack
swapped on the worktable is full at once, and anything unknown still finds a
tip: it can pass a pickup a robot would fail, but never fails one a robot would
pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- examples/flex_simulated.py said `pip install plr-ivoryos ivoryos-edge`, which
  installs 0.2.0: the script then fails with No module named
  'plr_ivoryos.opentrons'.
- The README's `--pre` also lets every other dependency be a pre-release (it
  installed httpx 1.0.dev6). `plr-ivoryos==1.0.0b1` gets the same PyLabRobot
  without it. uv needs PyLabRobot named too.
- The README now says only the simulator has been run, and what PyLabRobot
  itself marks as untested on hardware.
- requirements.txt still said pylabrobot>=0.2.2,<1.0, against pyproject's
  ==1.0.0b1, and nothing used it. Removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The only workflow was publish, so nothing ran the tests on a pull request or
before a release. Python 3.10, 3.12 and 3.14 on each, and an import of the
Labware view, the one part that needs IvoryOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ivoryzh
ivoryzh merged commit 3ceafc7 into main Nov 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant