Skip to content

Latest commit

 

History

History
106 lines (77 loc) · 5.02 KB

source-research.md

File metadata and controls

106 lines (77 loc) · 5.02 KB

Source research

Research against the local monorepo clone (opentrons/opentrons) configured via OPENTRONS_REPO_PATH (example: upstream/opentrons). Paths below are repository-relative to that monorepo.

Do not paste large portions of Opentrons source here. This document records authoritative locations for implemented interactions.

Python version

Package requires-python
robot-server >=3.11
auth-server >=3.12
update-server >=3.10

Harness target: Python 3.12+.

GET /health

Field Detail
Purpose Robot identity, API/OS/firmware versions, serial, disk, readiness
Source robot-server/robot_server/health/router.py
Models robot-server/robot_server/health/models.py (Health, DiskDetails, HealthLinks)
Route GET /health
Auth None for reads; may return 503 if hardware/DB not ready
Expected errors 503 when not ready; connection/timeouts when robot unreachable
Tests robot-server/tests/health/test_health_router.py; integration helpers in robot-server/tests/integration/
Uncertainty Field availability can vary slightly by robot software version

GET /server/update/health

Field Detail
Purpose Update-server / OE system versions and capabilities
Source update-server/otupdate/openembedded/__init__.py
Response keys updateServerVersion, apiServerVersion, systemVersion, robotModel, capabilities
Route GET /server/update/health
Auth None
Tests update-server/tests/openembedded/test_control.py
Uncertainty Capability map contents vary by build

GET /auth/settings/accessControlEnabled

Field Detail
Purpose Detect whether authorization is enforced across robot HTTP APIs
Source auth-server/auth_server/settings/router.py
Models auth-server/auth_server/settings/models.py (AccessControlResponseData, PatchAccessControlRequestData)
Store auth-server/auth_server/settings/store.py
Route GET /auth/settings/accessControlEnabled
Auth Read currently available when AC is off; when AC is on, protected routes need scopes
Expected errors 404 if auth-server route absent on older builds; 401/403 when AC on without token
Tests auth-server/tests/integration/test_settings.tavern.yaml and related auth integration tests
Critical constraint PATCH accepts only accessControlEnabled: true (Literal[True]). Once set, cannot be modified via API (AccessControlAlreadySetError / HTTP 422). Disable requires Opentrons assistance or SSH wipe of auth-server data (prior art).
Harness policy Detect on all paths. Enable only via flex-test crs enable --confirm-one-way. Catalog probes never PATCH this route.

Flex release manifests (robot-stack)

Field Detail
Purpose Discover published Flex robot OS builds (internal/external; alpha/beta/stable)
Reference repo Opentrons/robot-stack (local: ROBOT_STACK_REPO_PATH, e.g. upstream/robot-stack)
Hosts Internal ot3-development.builds.opentrons.com; external builds.opentrons.com (automation/flex_urls.py)
Robot OS manifest /{ot3-oe}/releases.json (automation/asset_urls.py, automation/flex_assets.py)
Parsing Merge production + productionV2 (automation/release.py)
Tag scheme Internal ot3@X.Y.Z[-alpha.N|-beta.N]; external vX.Y.Z[-alpha.N|-beta.N] (README.md, automation/release_tag_catalog.py)
Harness surface flex-test releases + docs/robot-versions.md
Uncertainty CDN/CloudFront caching can briefly lag freshly published tags until invalidation

Full route inventory

Harness catalog: src/flex_testing_agent/catalog/endpoints.py, regenerated by scripts/generate_endpoint_catalog.py from the monorepo (robot-server PydanticResponse.wrap_route + LightRouter decorators, auth-server, system-server, audit-server, update-server OE web.get/post/...).

CRS testing plan: crs-testing.md.

OAuth scopes SSOT: server-utils/server_utils/auth/scopes.py (Scope enum).

Intentionally not implemented (researched)

PATCH access control enable (CRS enable)

Blocked in harness. Disruptive / one-way. Product: Compliance Ready Software.

OEM / factory mode

PUT /system/oem_mode/enable in system-server/system_server/system/oem_mode/. Ignored by product decision; not part of “lockdown” for Kansas.

User management (CRS-on)

auth-server/auth_server/users/router.py (/auth/users/*). Catalogued; typed client deferred until CRS-on testing has a restore story (EXEC-2176).

OAuth token (CRS-on)

POST /oauth2/token in auth-server/auth_server/oauth2/router.py. Needed for CRS-on dual-mode; not required for inspect/probe when CRS is off.

Client cross-check

TypeScript API client references (optional cross-check, not used as runtime dependency):

  • api-client/src/
  • Auth scopes: server-utils/server_utils/auth/scopes.py