Skill Tracer
Skills › Scientific Agent Skills › opentrons-integration › validation_and_operations.md

validation_and_operations.md

319 lines · skills/opentrons-integration/references/validation_and_operations.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Validation and Operations
2
3Use layered validation. A protocol is not ready for live samples merely because
4it compiles or simulates.
5

Validation and Operations

Use layered validation. A protocol is not ready for live samples merely because it compiles or simulates.

Raw lines 1 to 5
6## Reproducible Local Environment
7
8The skill pins separate compatibility environments:
9
10- `requirements-flex.txt`: `opentrons==10.0.0`, tested Flex templates at API 2.29
11 plus an API 2.30 meniscus regression. Documented robot maximum is 2.30.
12- `requirements-ot2.txt`: `opentrons==9.0.0`, OT-2 API 2.28.
14One-shot simulation:
16```bash
17# Flex
18uv run --no-project --isolated --python 3.12 --with "opentrons==10.0.0" opentrons_simulate protocol.py
20# OT-2
21uv run --no-project --isolated --python 3.12 --with "opentrons==9.0.0" opentrons_simulate protocol.py
22```
24Dedicated Flex environment:
26```bash
27uv venv --python 3.12 .venv-opentrons
28uv pip install --python .venv-opentrons/bin/python -r skills/opentrons-integration/requirements-flex.txt
29.venv-opentrons/bin/opentrons_simulate protocol.py
30```
32Use `requirements-ot2.txt` instead for the OT-2 compatibility environment.
33`opentrons==10.0.0` intentionally rejects OT-2 protocols after the release-line
34split; the current OT-2 App remains the authoritative OT-2 analyzer.
36Check the package and maximum API implemented by the local library:
38```bash
39uv run --no-project --isolated --python 3.12 --with "opentrons==10.0.0" python -c \
40 "import opentrons; from opentrons import protocol_api; print(opentrons.__version__, protocol_api.MAX_SUPPORTED_VERSION)"
41```
43For released package 10.0.0 this command prints `10.0.0 2.31`, although the
44official robot versioning page documents Flex only through API 2.30. That
45constant describes the library, not permission to target 2.31 on a robot.
47The local package does not update robot software. A protocol can simulate
48locally and still request an API level unavailable on the target robot.

Reproducible Local Environment

The skill pins separate compatibility environments:

  • requirements-flex.txt: opentrons==10.0.0, tested Flex templates at API 2.29 plus an API 2.30 meniscus regression. Documented robot maximum is 2.30.
  • requirements-ot2.txt: opentrons==9.0.0, OT-2 API 2.28.

One-shot simulation:

# Flex
uv run --no-project --isolated --python 3.12 --with "opentrons==10.0.0" opentrons_simulate protocol.py

# OT-2
uv run --no-project --isolated --python 3.12 --with "opentrons==9.0.0" opentrons_simulate protocol.py

Dedicated Flex environment:

uv venv --python 3.12 .venv-opentrons
uv pip install --python .venv-opentrons/bin/python -r skills/opentrons-integration/requirements-flex.txt
.venv-opentrons/bin/opentrons_simulate protocol.py

Use requirements-ot2.txt instead for the OT-2 compatibility environment. opentrons==10.0.0 intentionally rejects OT-2 protocols after the release-line split; the current OT-2 App remains the authoritative OT-2 analyzer.

Check the package and maximum API implemented by the local library:

uv run --no-project --isolated --python 3.12 --with "opentrons==10.0.0" python -c \
  "import opentrons; from opentrons import protocol_api; print(opentrons.__version__, protocol_api.MAX_SUPPORTED_VERSION)"

For released package 10.0.0 this command prints 10.0.0 2.31, although the official robot versioning page documents Flex only through API 2.30. That constant describes the library, not permission to target 2.31 on a robot.

The local package does not update robot software. A protocol can simulate locally and still request an API level unavailable on the target robot.

Raw lines 6 to 49
Runs code bin/python :28
Runs code bin/opentrons_simulate :29
50## Validation Ladder

Validation Ladder

Raw lines 50 to 51
52### 1. Syntax and import
54```bash
55python -m py_compile protocol.py
56```
58This catches Python syntax errors only. It does not instantiate Protocol API
59objects or validate deck geometry.

1. Syntax and import

python -m py_compile protocol.py

This catches Python syntax errors only. It does not instantiate Protocol API objects or validate deck geometry.

Raw lines 52 to 60
61### 2. Local simulation
63```bash
64# Flex
65uv run --no-project --isolated --python 3.12 --with "opentrons==10.0.0" opentrons_simulate protocol.py
67# OT-2
68uv run --no-project --isolated --python 3.12 --with "opentrons==9.0.0" opentrons_simulate protocol.py
69```
71Review:
73- Robot type and API level.
74- Every loaded labware, adapter, fixture, pipette, and module.
75- Expanded command order.
76- Tip pickup and disposal.
77- Source and destination wells.
78- Mix, air-gap, blowout, delay, and pause placement.
79- Module state transitions.
80- Gripper and labware moves.
81- Unexpected warnings.
83Useful simulator options:
85```bash
86# More diagnostic logs
87opentrons_simulate -l info protocol.py
89# Custom labware directory; repeat -L as needed
90opentrons_simulate -L custom_labware protocol.py
92# Add only named data files; repeat -d as needed
93opentrons_simulate -d plate_map.csv protocol.py
95# Experimental estimate
96opentrons_simulate -e protocol.py
97```
99Prefer `-d` over `-D` for data because `-D` loads every file in a directory
100into memory. Never point `-D` at a directory containing credentials, unrelated
101data, or large files.
103The current directory is searched for custom labware implicitly, but explicit
104`-L` paths make validation more reproducible.

2. Local simulation

# Flex
uv run --no-project --isolated --python 3.12 --with "opentrons==10.0.0" opentrons_simulate protocol.py

# OT-2
uv run --no-project --isolated --python 3.12 --with "opentrons==9.0.0" opentrons_simulate protocol.py

Review:

  • Robot type and API level.
  • Every loaded labware, adapter, fixture, pipette, and module.
  • Expanded command order.
  • Tip pickup and disposal.
  • Source and destination wells.
  • Mix, air-gap, blowout, delay, and pause placement.
  • Module state transitions.
  • Gripper and labware moves.
  • Unexpected warnings.

Useful simulator options:

# More diagnostic logs
opentrons_simulate -l info protocol.py

# Custom labware directory; repeat -L as needed
opentrons_simulate -L custom_labware protocol.py

# Add only named data files; repeat -d as needed
opentrons_simulate -d plate_map.csv protocol.py

# Experimental estimate
opentrons_simulate -e protocol.py

Prefer -d over -D for data because -D loads every file in a directory into memory. Never point -D at a directory containing credentials, unrelated data, or large files.

The current directory is searched for custom labware implicitly, but explicit -L paths make validation more reproducible.

Raw lines 61 to 105
106### 3. Resource audit
108Independently calculate:
110- Individual tips or multi-channel tip sets.
111- Source volume, disposal volume, dead volume, mixing loss, and reserve.
112- Maximum intermediate volume of every destination.
113- Pipette capacity including air gaps.
114- Module, adapter, staging, trash, and waste positions.
115- Lids and Gripper paths.
116- Runtime under worst-case parameters.
118Simulation does not prove that the liquid budget is sufficient.

3. Resource audit

Independently calculate:

  • Individual tips or multi-channel tip sets.
  • Source volume, disposal volume, dead volume, mixing loss, and reserve.
  • Maximum intermediate volume of every destination.
  • Pipette capacity including air gaps.
  • Module, adapter, staging, trash, and waste positions.
  • Lids and Gripper paths.
  • Runtime under worst-case parameters.

Simulation does not prove that the liquid budget is sufficient.

Raw lines 106 to 119
120### 4. Opentrons App analysis
122Use the App appropriate for the target robot. At API 2.29 and newer, Flex and
123OT-2 use separate software and App release lines.
1251. Connect to the intended robot.
1262. Import the Python protocol and required custom labware or data.
1273. Require successful protocol analysis.
1284. Review analysis warnings and errors; do not bypass them.
1295. Check the starting deck and module setup.
1306. Set runtime parameters and inspect the resulting protocol.
1317. Review protocol visualization and run preview.
1328. Verify labware offsets or Labware Position Check results.
1339. Confirm installed pipettes, mounts, modules, and firmware.
135App analysis is closer to the target robot than local simulation, but it still
136does not verify actual liquids, tips, caps, seals, or calibration.

4. Opentrons App analysis

Use the App appropriate for the target robot. At API 2.29 and newer, Flex and OT-2 use separate software and App release lines.

  1. Connect to the intended robot.
  2. Import the Python protocol and required custom labware or data.
  3. Require successful protocol analysis.
  4. Review analysis warnings and errors; do not bypass them.
  5. Check the starting deck and module setup.
  6. Set runtime parameters and inspect the resulting protocol.
  7. Review protocol visualization and run preview.
  8. Verify labware offsets or Labware Position Check results.
  9. Confirm installed pipettes, mounts, modules, and firmware.

App analysis is closer to the target robot than local simulation, but it still does not verify actual liquids, tips, caps, seals, or calibration.

Raw lines 120 to 137
138### 5. Operator review
140Use a second-person check for:
142- Correct protocol revision.
143- Correct robot.
144- Deck map against physical deck.
145- Labware identity and orientation.
146- Tip type and sufficient count.
147- Source identity and volume.
148- Destination capacity.
149- Runtime parameter values.
150- Required manual steps.
151- Waste capacity.
152- Safety controls and emergency stop access.

5. Operator review

Use a second-person check for:

  • Correct protocol revision.
  • Correct robot.
  • Deck map against physical deck.
  • Labware identity and orientation.
  • Tip type and sufficient count.
  • Source identity and volume.
  • Destination capacity.
  • Runtime parameter values.
  • Required manual steps.
  • Waste capacity.
  • Safety controls and emergency stop access.
Raw lines 138 to 153
154### 6. Dry run
156For a new or materially changed method:
158- Use water or another validated nonhazardous surrogate.
159- Remove valuable samples and hazardous reagents.
160- Start with low-risk geometry and reduced speed where feasible.
161- Check pickup, aspiration depth, dispense depth, mixing, and disposal.
162- Observe every Gripper, lid, Stacker, and partial-nozzle move.
163- Verify module transitions and operator prompts.
164- Measure delivered volumes when accuracy matters.
166A tip-only dry run is appropriate for new partial-nozzle layouts.

6. Dry run

For a new or materially changed method:

  • Use water or another validated nonhazardous surrogate.
  • Remove valuable samples and hazardous reagents.
  • Start with low-risk geometry and reduced speed where feasible.
  • Check pickup, aspiration depth, dispense depth, mixing, and disposal.
  • Observe every Gripper, lid, Stacker, and partial-nozzle move.
  • Verify module transitions and operator prompts.
  • Measure delivered volumes when accuracy matters.

A tip-only dry run is appropriate for new partial-nozzle layouts.

Raw lines 154 to 167
168### 7. Controlled release
170Keep:
172- Protocol file hash or version.
173- `opentrons` package version used in local simulation.
174- Robot software and App versions.
175- Custom labware definitions and versions.
176- Runtime parameter record.
177- Dry-run and qualification results.
178- Operator and reviewer sign-off as required by the lab's quality system.

7. Controlled release

Keep:

  • Protocol file hash or version.
  • opentrons package version used in local simulation.
  • Robot software and App versions.
  • Custom labware definitions and versions.
  • Runtime parameter record.
  • Dry-run and qualification results.
  • Operator and reviewer sign-off as required by the lab's quality system.
Raw lines 168 to 179
180## What Simulation Does Not Validate
182- Pipette calibration or mechanical wear.
183- Labware manufacturing variation or placement error.
184- Physical caps, seals, lids, warped plates, or obstructions.
185- Actual liquid volume or identity.
186- Viscosity, volatility, surface tension, foaming, or aerosols.
187- Bead settling, pellet location, or cell sedimentation.
188- Reliable liquid-level sensing with the chosen liquid.
189- Gripper friction and every collision scenario.
190- Module thermal equilibration inside the sample.
191- Plate-reader optical performance; simulated readings are zeros.
192- Operator compliance with a pause message.

What Simulation Does Not Validate

  • Pipette calibration or mechanical wear.
  • Labware manufacturing variation or placement error.
  • Physical caps, seals, lids, warped plates, or obstructions.
  • Actual liquid volume or identity.
  • Viscosity, volatility, surface tension, foaming, or aerosols.
  • Bead settling, pellet location, or cell sedimentation.
  • Reliable liquid-level sensing with the chosen liquid.
  • Gripper friction and every collision scenario.
  • Module thermal equilibration inside the sample.
  • Plate-reader optical performance; simulated readings are zeros.
  • Operator compliance with a pause message.
Raw lines 180 to 193
194## Runtime Parameter Testing
196The default value should always produce a meaningful local simulation.
198For each parameter:
200- Test minimum, maximum, default, and every fixed choice.
201- Test branch combinations that change tip count, deck use, timing, or modules.
202- Reject invalid CSV rows before generating any commands.
203- Confirm parameter labels and descriptions are understandable in the App.
204- Recompute source volume and tips for the largest allowed run.
206The command-line simulator primarily analyzes defaults. Use App analysis or
207dedicated test variants to exercise alternate runtime values.

Runtime Parameter Testing

The default value should always produce a meaningful local simulation.

For each parameter:

  • Test minimum, maximum, default, and every fixed choice.
  • Test branch combinations that change tip count, deck use, timing, or modules.
  • Reject invalid CSV rows before generating any commands.
  • Confirm parameter labels and descriptions are understandable in the App.
  • Recompute source volume and tips for the largest allowed run.

The command-line simulator primarily analyzes defaults. Use App analysis or dedicated test variants to exercise alternate runtime values.

Raw lines 194 to 208
209## Custom Labware
211Before live use:
2131. Validate the JSON schema with current Opentrons tooling.
2142. Confirm dimensions against manufacturer drawings and physical measurement.
2153. Check well depth, diameter or dimensions, and total capacity.
2164. Check corner offset and well ordering.
2175. Add stacking offsets for custom labware used on adapters.
2186. Import the exact definition into the App.
2197. Perform Labware Position Check.
2208. Dry-run the highest-risk wells and edge positions.
222Do not silently replace a missing custom definition with standard labware.

Custom Labware

Before live use:

  1. Validate the JSON schema with current Opentrons tooling.
  2. Confirm dimensions against manufacturer drawings and physical measurement.
  3. Check well depth, diameter or dimensions, and total capacity.
  4. Check corner offset and well ordering.
  5. Add stacking offsets for custom labware used on adapters.
  6. Import the exact definition into the App.
  7. Perform Labware Position Check.
  8. Dry-run the highest-risk wells and edge positions.

Do not silently replace a missing custom definition with standard labware.

Raw lines 209 to 223
224## Failure Triage

Failure Triage

Raw lines 224 to 225
226### Unsupported API version
228Symptoms:
230- Protocol imports locally but fails App analysis.
231- Error states that requested API is above the robot maximum.
233Actions:
2351. Check the maximum in robot settings.
2362. Update robot software and the appropriate App if approved.
2373. Otherwise lower the API level and remove or replace unsupported features.
239Do not edit the version string alone; audit every method and behavior gate.

Unsupported API version

Symptoms:

  • Protocol imports locally but fails App analysis.
  • Error states that requested API is above the robot maximum.

Actions:

  1. Check the maximum in robot settings.
  2. Update robot software and the appropriate App if approved.
  3. Otherwise lower the API level and remove or replace unsupported features.

Do not edit the version string alone; audit every method and behavior gate.

Raw lines 226 to 240
241### Invalid pipette or labware load name
243Actions:
245- Copy the current pipette name from the official loading guide.
246- Copy labware names from the Labware Library.
247- Confirm custom namespace and definition version.
248- Replace obsolete Flex names such as `p300_single_flex` with current
249 `flex_*` names only after matching volume and channel count.

Invalid pipette or labware load name

Actions:

  • Copy the current pipette name from the official loading guide.
  • Copy labware names from the Labware Library.
  • Confirm custom namespace and definition version.
  • Replace obsolete Flex names such as p300_single_flex with current flex_* names only after matching volume and channel count.
Raw lines 241 to 250
251### Deck conflict
253Check:
255- Thermocycler footprint.
256- Module caddies.
257- Heater-Shaker adjacent-slot restrictions.
258- Flex staging area and corresponding column-3 slot.
259- Plate-reader lid travel.
260- Stacker shuttle row.
261- Waste chute D3.
262- Partial-nozzle reach and tall adjacent labware.

Deck conflict

Check:

  • Thermocycler footprint.
  • Module caddies.
  • Heater-Shaker adjacent-slot restrictions.
  • Flex staging area and corresponding column-3 slot.
  • Plate-reader lid travel.
  • Stacker shuttle row.
  • Waste chute D3.
  • Partial-nozzle reach and tall adjacent labware.
Raw lines 251 to 263
264### Out of tips
266Count:
268- Every `new_tip="always"` pair.
269- Tip sets for multi-channel pipettes.
270- Branch-specific and retry operations.
271- Tips used for liquid detection.
272- Tips reserved for controls.
274Add racks or redesign the validated tip policy. Do not reset tracking unless the
275operator has physically replaced or correctly refilled racks.

Out of tips

Count:

  • Every new_tip="always" pair.
  • Tip sets for multi-channel pipettes.
  • Branch-specific and retry operations.
  • Tips used for liquid detection.
  • Tips reserved for controls.

Add racks or redesign the validated tip policy. Do not reset tracking unless the operator has physically replaced or correctly refilled racks.

Raw lines 264 to 276
277### Insufficient source volume
279Include distribution disposal volume, dead volume, pre-wet, mixing, carryover,
280and reserve. Liquid setup visualization does not prevent a physical source from
281running dry.

Insufficient source volume

Include distribution disposal volume, dead volume, pre-wet, mixing, carryover, and reserve. Liquid setup visualization does not prevent a physical source from running dry.

Raw lines 277 to 282
283### Module not ready
285Check:
287- Correct generation and load name.
288- USB connection and power.
289- Module firmware.
290- Lid or latch state.
291- Returned concurrent task was awaited.
292- Temperature or speed is physically reachable.

Module not ready

Check:

  • Correct generation and load name.
  • USB connection and power.
  • Module firmware.
  • Lid or latch state.
  • Returned concurrent task was awaited.
  • Temperature or speed is physically reachable.
Raw lines 283 to 293
294### Plate-reader calculation fails only in simulation
296The reader returns zeros during simulation. Skip or substitute analysis-only
297calculations under `protocol.is_simulating()` when a zero denominator is
298possible. Keep the physical-run path unchanged.

Plate-reader calculation fails only in simulation

The reader returns zeros during simulation. Skip or substitute analysis-only calculations under protocol.is_simulating() when a zero denominator is possible. Keep the physical-run path unchanged.

Raw lines 294 to 299
300### Physical pickup or positioning issue
302Stop the run if collision or pickup failure is possible. Check calibration,
303labware definition, offsets, tip compatibility, adapter use, nozzle layout, and
304deck placement. Do not compensate with arbitrary offsets until the underlying
305geometry is understood.

Physical pickup or positioning issue

Stop the run if collision or pickup failure is possible. Check calibration, labware definition, offsets, tip compatibility, adapter use, nozzle layout, and deck placement. Do not compensate with arbitrary offsets until the underlying geometry is understood.

Raw lines 300 to 306
307## Release Checklist
309- [ ] Python compilation passes.
310- [ ] Pinned local simulation passes.
311- [ ] Run log reviewed.
312- [ ] Resource audit completed.
313- [ ] App analysis passes on the target robot.
314- [ ] Deck map and parameters reviewed.
315- [ ] Custom labware and offsets verified.
316- [ ] Nonhazardous dry run completed for new geometry.
317- [ ] Module and Gripper actions observed.
318- [ ] Contamination and waste plan approved.
319- [ ] Protocol revision and environment recorded.

Release Checklist

  • [ ] Python compilation passes.
  • [ ] Pinned local simulation passes.
  • [ ] Run log reviewed.
  • [ ] Resource audit completed.
  • [ ] App analysis passes on the target robot.
  • [ ] Deck map and parameters reviewed.
  • [ ] Custom labware and offsets verified.
  • [ ] Nonhazardous dry run completed for new geometry.
  • [ ] Module and Gripper actions observed.
  • [ ] Contamination and waste plan approved.
  • [ ] Protocol revision and environment recorded.
Raw lines 307 to 319