Skip to content

[Feature Request] Standardize execution receipts, state transitions, and artifact lineage #327

Description

@SchrodingersCattt

Problem

Execution results do not have a common receipt linking requested parameters, resolved resources, device acknowledgements, telemetry, raw files, parsers, and derived results.

Concrete code evidence

  • unilabos/ros/device_node_wrapper.py:36-40 forwards device method calls but exposes no common run/attempt/artifact receipt.
  • unilabos/devices/hplc/AgilentHPLC.py:124-226 has device-specific start_sequence, check_status, and get_data_file methods with a local result shape.
  • unilabos/devices/workstation/workflow_executors.py:245-279 reduces workflow execution to boolean success/failure in one executor path.
  • unilabos/devices/workstation/workflow_executors.py:454-470 similarly collapses a liquid transfer result into a boolean.

Design gap

The current return values cannot consistently distinguish:

command accepted
execution started
execution completed
measurement acquired
raw artifact saved
artifact parsed
QC passed

They also do not provide a uniform lineage from sample/method/resource to raw and derived data.

Proposed receipt

Define a versioned receipt containing:

  • run and attempt IDs;
  • method and capability versions;
  • requested parameters and resolved bindings;
  • resource snapshot and reservation/claim IDs;
  • state transitions and timestamps;
  • device acknowledgements and telemetry references;
  • raw artifact paths, media types, and checksums;
  • parser/analysis job versions and result references;
  • typed failure, blocked, unsupported, and human-confirmation outcomes.

Acceptance criteria

  • Every protocol run can emit a common receipt without device-specific fields being required.
  • Receipts distinguish planning, execution, measurement, artifact, parsing, QC, failure, and recovery states.
  • Raw artifacts are immutable references with sample/method/run lineage and checksums.
  • Receipts integrate with the existing Task/Job restart and recovery model.
  • Tests cover partial execution, timeout, retry, missing artifact, and successful completion.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions