Where state lives
Orca keeps two kinds of state, in two places, both inside the package folder.
- Setup is what you decide about the lab: positions, deck layouts, how each device is driven. It lives in JSON files you can read, edit and commit.
- Activity is what happened: where each plate is, what each run did, which incidents were raised. The daemon writes it to one SQLite file.
The package folder
my_lab/
topology.py # build_topology(), optional SYSTEM_NAME and SYSTEM_DESCRIPTION
workflows/<name>.py # one per workflow, each with build_workflow(topology)
devices/<name>.json # how one device is driven (optional)
teachpoints/<device>.json # the positions one transporter can reach
deck_layouts/<device>.json # what is on one liquid handler's deck
access_configs.json # how an arm approaches a position
move_defaults.json # default move settings
grip_profiles.json # how a labware type is gripped
system_config.json # system settings: timeouts (optional)
global_variables.json # global variable definitions and set values (optional)
labware/<name>.json # labware definitions you added
profiles/<name>.json # saved deployment profiles
.orca/ # written by the daemon
state.db
check_runs/
Only topology.py and workflows/ are needed for a check run of a lab with no arm. A lab with a transporter needs its teachpoint file and access_configs.json. A liquid handler needs a deck layout.
Setup files
| File | What it holds | Page |
|---|---|---|
devices/<name>.json | Which orca-client runs the device, its real driver and connection, its sim settings | orca-client |
teachpoints/<device>.json | One entry per position: coordinates, orientation, and the access config it uses | Transporters |
access_configs.json | Named approach settings that teachpoints refer to | Transporters |
deck_layouts/<device>.json | Named layouts for one liquid handler | Topology |
move_defaults.json, grip_profiles.json | Move and grip settings | Move parameters |
labware/<name>.json | Labware definitions beyond the built-in catalog | Labware |
profiles/<name>.json | Saved variable sets a run can load by name | Variables |
system_config.json | Timeouts and retry timing; optional | System settings |
global_variables.json | Global variable definitions (type, default, bounds) and the values orca var set-global sets; optional | Variables |
Rules that hold for every setup file:
- People and Orca write the same files. Each has CLI commands that write it through the daemon (
orca teachpoints,orca access-configs,orca deck-layouts,orca move-defaults,orca grip-profiles,orca profiles,orca device write-setup), and you can also edit the file by hand.orca var set-globalwrites a global's value intoglobal_variables.json; its definitions are edited by hand.system_config.jsonhas no command yet: edit it by hand. - A changed teachpoint, access config, move default, grip profile, labware definition or profile applies the next time it is read. No restart.
- A new position, any deck layout change and any
devices/<name>.jsonchange needsorca runtime reload. - A bad file is refused with the file, the field and the reason.
Commit the setup files with topology.py. Together they are the lab.
System settings
system_config.json is optional. It is read once when the system builds, before topology.py, so a change needs orca runtime reload.
{"reservation": {"action_reservation_timeout": 3600}}
| Setting | Default | What it limits |
|---|---|---|
reservation.move_reservation_timeout | none (wait forever) | seconds a move waits for its path to free |
reservation.action_reservation_timeout | none (wait forever) | seconds an action waits for its device; a timeout pauses the thread |
reservation.site_vacate_patience | 15 | seconds a plate on a busy device's site waits before it may move to a free pad |
reservation.retry_interval | 0.5 | seconds between reservation retries |
coordination.co_labware_timeout | none (wait forever) | seconds a thread waits for a partner plate; a timeout pauses the thread and RETRY waits again |
coordination.event_timeout | none (wait forever) | seconds orca.on / orca.branch wait for an event, unless the step sets its own |
A setting left out keeps its default. A misspelled setting is refused when the system builds, with the file named.
Activity: .orca/state.db
The daemon writes these to <package>/.orca/state.db:
- labware: each plate, tip rack and reservoir, where it is, its volumes and tips
- runs and their threads
- incidents
- events
- audit rows
- the record of device operations that volumes and tips are derived from
- each device's sim or live setting
.orca/ is the daemon's. Do not edit it and do not commit it.
.orca/check_runs/ holds the stores of recent check runs. The newest 50 are kept.
What comes back after a restart
Everything in state.db. Stop the daemon, start it again, mount the package, and the plates are where Orca last recorded them, past runs are listed, and open incidents are still open.
Two consequences:
- A second run starts with the plates the first run left. A rerun can be refused because a start location is still occupied on record. Clear the plate with the labware commands (see CLI: recover) or start clean.
- A run the daemon was in the middle of does not continue. At the next start it is marked failed and an
EXECUTION.<id>.FAILED_INTERRUPTEDevent is recorded. The plates stay where the record says. See Recovery.
Start clean
Stop the daemon and delete .orca/:
orca shutdown
rm -r .orca # PowerShell: Remove-Item -Recurse .orca
orca start
orca topology mount
This forgets every plate, run and incident. It does not touch the setup files.
Reading the record
orca labware list
orca execution list
orca incident list
orca events list --limit 20
orca audit list
orca ops-history search
See CLI: inspect and CLI: forensics.
Swapping a store
The daemon builds its own stores and there is no setting that replaces one. The store interfaces are exported from orca.sdk.runtime for code that embeds the runtime, but a lab that runs packages on the daemon never touches them.