Skip to content

Add a generic manual operator action framework - #1203

Draft
j0nch wants to merge 2 commits into
PyLabRobot:mainfrom
j0nch:feat/manual-operator-actions
Draft

Add a generic manual operator action framework#1203
j0nch wants to merge 2 commits into
PyLabRobot:mainfrom
j0nch:feat/manual-operator-actions

Conversation

@j0nch

@j0nch j0nch commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a machine-agnostic ManualOperator frontend for awaiting work performed by a person
  • define a transport-neutral provider contract so terminal, GUI, HTTP, LIMS, or message-broker integrations can present and acknowledge the same request
  • distinguish completed, cancelled, and failed operator outcomes
  • include an asynchronous console provider that does not block the event loop
  • add move_resource() for acknowledged manual transfers with PLR resource-model reconciliation
  • document the framework and manual resource-move semantics

Resource moves

ManualOperator.move_resource() validates the modeled source and destination before prompting, leaves the resource assigned to its source while the operator works, and updates the model only after successful acknowledgement. It revalidates before assignment to avoid overwriting state that changed while the request was pending. Cancellation, reported failure, and provider exceptions leave the resource model unchanged.

The operation uses PLR's standard resource-assignment machinery, including default ResourceHolder child positioning and optional explicit destination coordinates. Requests contain transport-safe resource names rather than live Resource objects.

Scope

This initial implementation intentionally has no EventBus dependency. It establishes the manual-operation and provider contracts independently; event integration can be considered separately once the base API is reviewed.

Testing

  • python3 -m unittest pylabrobot.manual_operator.manual_operator_tests -v
  • 12 focused tests passing
  • python3 -m compileall -q pylabrobot/manual_operator
  • git diff --check

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