Implement full_build orchestration with manifest, domestication, assembly_lvl1, transformation, and plating#51
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c75a283bbe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if len(variant_design.components) == 0: | ||
| for comp_index, component in enumerate(ordered_components): | ||
| part_def = variant_parts[comp_index] | ||
| variant_component = variant_design.components.create( | ||
| f"{variant_display_id}_component_{comp_index+1:03d}" |
There was a problem hiding this comment.
Add sequence constraints when generating variant designs
The combinatorial expansion path creates variant ComponentDefinitions with components only, but no SequenceConstraints. Later, full_build calls _find_missing_parts_for_lvl1, which depends on design.getInSequentialOrder() and raises ValueError for designs missing sequence constraints, so full_build fails for CombinatorialDerivation inputs even though this commit advertises support for them.
Useful? React with 👍 / 👎.
| zip_base = zip_path.with_suffix("") | ||
| archive = shutil.make_archive( | ||
| str(zip_base), "zip", root_dir=str(source_dir), base_dir="." | ||
| ) |
There was a problem hiding this comment.
Exclude output archive from its own zip input tree
This archives source_dir while writing full_build_results.zip inside that same directory, so the generated zip contains an entry for full_build_results.zip itself. That self-inclusion is a shutil.make_archive behavior in this layout and leads to bloated/confusing artifacts (the bundle embeds another bundle copy) instead of a clean results package.
Useful? React with 👍 / 👎.
| if manifest["assembly_lvl1"].get("successful"): | ||
| return "completed" | ||
| if ( | ||
| manifest["assembly_lvl1"].get("failed") | ||
| or manifest["domestication"].get("errors") |
There was a problem hiding this comment.
Treat domestication stage errors as non-success status
The status helper returns "completed" whenever any level-1 assembly succeeds, even if manifest["domestication"]["errors"] is populated. In runs where domestication transformation/plating fails but assembly succeeds, callers receive a success status despite recorded stage errors, which can mask partial failures in orchestration consumers.
Useful? React with 👍 / 👎.
Motivation
Description
BuildCompiler.full_build(...)to normalize inputs (single/list/CombinatorialDerivation), preflight missing parts, domesticate unique missing parts, index domestication products, run transformation and plating for domestication outputs, runassembly_lvl1per design, then transform & plate assembly outputs, and record an explicitassembly_lvl2skip in the manifest._normalize_full_build_designs,_expand_combinatorial_derivation,_find_missing_parts_for_lvl1,_index_domestication_products,_safe_display_id,_serialize_sbol_identity,_write_json,_status_from_manifest, and_zip_full_build_results, plus small robustness fixes (fallback for domestication indexing).full_build_manifest.json), attempt to write SBOL tosbol/full_build.xml, and package the results directory intofull_build_results.zip.src/buildcompiler/buildcompiler.py(implementation + helpers) andtests/test_full_build.py(unit tests covering normalization, combinatorial expansion, missing‑part detection, domestication orchestration, assembly orchestration, skip behavior, and packaging).Testing
tests/test_full_build.pyand ran targeted tests together with existing transformation and plating tests usingpytest -q tests/test_full_build.py tests/test_buildcompiler_transformation.py tests/test_plating.py, all tests passed (12 passed).Codex Task