Skip to content

Refactor compilation around method refinement and facility allocation - #23

Merged
marpaia merged 91 commits into
masterfrom
marpaia/compiler
Aug 31, 2026
Merged

Refactor compilation around method refinement and facility allocation#23
marpaia merged 91 commits into
masterfrom
marpaia/compiler

Conversation

@marpaia

@marpaia marpaia commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR makes facility constraints part of compilation instead of selecting a fixed Protocol before the target laboratory is known.

Intent LAIR
  -> portable Method alternatives
  -> graph-wide facility planning
  -> verified Allocated Procedure LAIR
  -> exact-Asset adapter invocations
  -> reviewed run documents and one facility execution plan

Lab source describes scientific intent. Portable Methods describe valid Procedure graphs. The planner selects one coherent Method, material, capability offering, Asset, and adapter solution for the target SBOLInventory, then freezes that allocation before device lowering.

What it contains

  • Shared capability, Method, and canonical Procedure contracts used by the frontend, planner, adapters, CLI, and Python API.
  • Method, Procedure, Capability, and Allocation LAIR stages with verification at each compiler boundary.
  • Package-contributed lab.method-catalog.v1 documents and matching Python authoring and planning surfaces.
  • Immutable, task-scoped adapter invocations that retain exact resource bindings and compiler-evidence digests.
  • Fail-closed planning and scheduling for ambiguity, exact Asset pins, material identity, capacity, and physical-position conflicts.
  • Removal of the fixed Protocol dialect, pre-facility select_protocol path, duplicate requirement planner, and legacy whole-program backend entry points.

The current interchange formats are lab.planning-problem.v1, lab.facility-planning-solution.v1, lab.adapter-invocations.v1, and lab.execution-plan.v2.

End-to-end evidence

The Golden Gate example allocates 22 Method instances and 88 atomic requirements, then schedules 28 OT-2 Procedure tasks into three reviewed runs: assembly, transformation, and plating. It emits three standalone Python protocols, three operator PDFs, and one aggregate plate-map PDF.

The executable comparison against pinned PUDU revision 1214d2f9efd557aa84bc96502379554174355eae passes all 10 facets across 595 normalized robot actions. Local formatting, Clippy, full Rust workspace tests, Python SDK tests, generated-protocol checks, and exact-head hosted Rust/Python CI all pass.

marpaia added 30 commits August 28, 2026 21:59
marpaia added 26 commits August 30, 2026 17:41
@marpaia
marpaia marked this pull request as ready for review August 31, 2026 22:12
@marpaia marpaia changed the title Refactor compiler around broader articulation of facilities and inventory Refactor compilation around method refinement and facility allocation Aug 31, 2026
@marpaia
marpaia merged commit 726107e into master Aug 31, 2026
2 checks passed
@marpaia
marpaia deleted the marpaia/compiler branch August 31, 2026 22:32
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