Skip to content

[SPRINT-02-12] Validate plating/protocol JSON boundary and optional simulation behavior #99

@Gonza10V

Description

@Gonza10V

Parent sprint: #87
Depends on: #93, #94, #97, #98
Recommended order: 12
Codex-ready: yes

Goal

Validate the current plating/protocol boundary honestly: plating is currently metadata/file/protocol-output oriented, not a full SBOL-object stage. Add tests and small fixes so JSON/CSV/manual outputs are deterministic and optional simulation behavior stays optional.

Background

BuildCompiler.plating() currently normalizes transformation output, assigns 96-well positions, writes plate-map JSON/CSV plus a layout CSV, and can write either a manual Markdown protocol or an automated protocol script. The method explicitly does not create new SBOL objects for plating. robotutils.normalize_plating_input(...) is the key boundary between transformation output and plating artifacts.

This sprint should validate the existing boundary before adding any future plating SBOL feature.

Scope

Add tests for:

  • normalize_plating_input(...) consuming transformation output from [SPRINT-02-11] Harden transformation SBOL output and chaining tests #98;
  • deterministic well assignment for one or more transformed strains;
  • plate-map JSON shape;
  • plate-map CSV shape;
  • manual protocol Markdown creation;
  • automated protocol script creation without running simulation by default;
  • simulation errors being reported/skipped safely when optional tools are unavailable.

Small fixes are allowed to make output deterministic, safer, and easier to test.

Non-goals

  • Do not make plating a full SBOL stage in this issue.
  • Do not require Opentrons or PUDU in core tests.
  • Do not run hardware/simulation tools by default.
  • Do not add wet-lab instructions beyond existing high-level manual protocol metadata.

Acceptance criteria

  • Plating consumes transformation output from [SPRINT-02-11] Harden transformation SBOL output and chaining tests #98.
  • Well assignment is deterministic and tested.
  • JSON and CSV outputs are written only to explicit temporary/output paths in tests.
  • Manual protocol artifact is produced in manual mode.
  • Automated script artifact is produced in automated mode without requiring simulation success.
  • Optional simulation remains optional and failures are captured in logs rather than breaking core compiler-only workflows.
  • Core tests do not require PUDU or Opentrons.

Verification

pytest -k "plating or protocol or normalize_plating_input"
pytest -m "not automation"
ruff check .

Codex implementation notes

  • Use tmp_path for all file-writing tests.
  • Do not write files into the repository root.
  • Keep this issue focused on current behavior and testability.
  • If future plating SBOL support is needed, open a follow-up issue instead of mixing it into this one.

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