ABI Development Log¶
Historical entries keep the terminology and counts that were true when they were written. For the authoritative release history, use
CHANGELOG.md.
2026-07-25 — v1.5.7.1: Compiled Plans, Snakemake, Contracts, and Limitations¶
Added first-class Snakemake export and execution alongside local, Nextflow, and native HPC.
Wired
CompiledPlanvalidation into planning and persistedcompiled_plan.json.Made non-empty
limitations.yamlmandatory for all seven plugins and rendered limitations in every report format.Enforced output-contract coverage for every external-tool DAG node, with explicit justified exemptions for output-less nodes.
Added structured recovery actions to diagnostics for all 19 stable error codes.
2026-07-15 — v1.5.6: Integrations, Runtime Locks, and Workflow Orchestration¶
Added installable Claude Code, OpenCode, and Codex integrations.
Hardened strict runtime-lock certification and the immutable cloud publication helper.
Added EasyMeta/ViWrap workflow orchestration and report/artifact manifests.
Improved SciPlot annotation layout, Unicode handling, and package/Docker release surfaces.
2026-07-11 — v1.5.5: Trusted Release Chain¶
Consolidated GitHub Actions to CI, Docker, Release, and the trusted PyPI publisher.
Fixed sdist-to-wheel and Docker build-input invariants.
Made the published GitHub Release artifacts the exact inputs to PyPI Trusted Publishing.
2026-07-07 — v1.5.3: Release Quality Gate & DAG Fixes¶
Overview¶
v1.5.3 tightened the release engineering pipeline, added paper-evaluation task scaffolding, and fixed declarative DAG input resolution for the metagenomic_plasmid plugin.
Release Engineering¶
NEW
scripts/release_check.sh— unified local release verification entry point that reproduces the CI quality gate locally before tagging.CI release identity now strictly enforces tag/wheel/runtime/CHANGELOG alignment via
scripts/check_release_identity.py.Coverage gate includes SciPlot tests (
src/abi/sciplot/tests/); module coverage is checked fromcoverage.jsonwith risk-based per-module gates.
Paper-Evaluation Task Package¶
NEW paper-evaluation task package with benchmark task definitions, metrics schema, bilingual evaluation notes, and manuscript outline drafts.
DAG & Contract Fixes¶
Contract lint extended to catch unresolved template parameters (command, params, input, and output placeholders) in
pipeline_dag.yaml.DAG input resolution fixed for
source: config.*references, including tool database resources and cross-sample report inputs.FASTA export and metagenomic plasmid reports now read assembly paths from DAG-resolved step inputs/outputs after the planner refactor.
Metagenomic plasmid DAG-driven tests updated to assert current declarative step and output contracts instead of old handwritten planner paths.
Bug Fixes¶
Matplotlib boxplot label argument compatibility across Python versions.
GitHub Actions opencode API key moved to GitHub Actions secret (no longer hardcoded).
Verification¶
ruff check src/ tests/ # 0 errors
ruff format --check src/ tests/ # All files formatted
mypy src/abi/ --ignore-missing-imports # 0 errors
2026-07-09 — v1.5.4-pre: RefSeq Plasmid Validation & Bug Fixes¶
Overview¶
Full plasmid detection pipeline validation using 3 RefSeq plasmids on an AutoDL cloud server (128 cores, 1TB RAM): NC_002127.1 (3.3kb), NC_011977.1 (7.6kb ColE9-J), NC_002483.1 (99kb F plasmid). Assembly-mode run with genomad + platon, majority_vote strategy. All 39/39 DAG steps passed. WGS bacteria plugin also validated with a synthetic MG1655 sample.
Plasmid Validation¶
3 RefSeq plasmids processed end-to-end: assembly → plasmid detection (genomad + platon) → consensus → report with figures.
Per-sample results correct: NC_002127_1 (3306bp, genomad=0.99 high, platon=3.7 low), NC_011977_1 (7577bp, genomad=0.99 high, platon=1.0 high), NC_002483_1 (99159bp, genomad=0.995 high, platon=22.1 low).
3 sciplot figures rendered: assembly_metrics_by_sample, plasmid_length_distribution, plasmid_score_vs_length. 6 other specs gracefully skipped due to missing annotation/typing/host data (annotations and typing tools were intentionally disabled in config).
Bug Fixes¶
Cross-sample path propagation (
src/abi/executor.py):_propagate_resolved_pathsunconditionally propagated resolved paths to all downstream steps regardless ofsample_id, causing every sample to receive the first sample’s assembly path. Fixed with per-sample filtering.Platon
--dbflag missing (plugins/metagenomic_plasmid/tool_registry.yaml): The command template was missing--db {database}and the DAG did not declare the database input dependency, causing platon runtime failures.Genomad duplicate results (
_engine/parsers.py): The parser glob*plasmid*summary*.tsvmatched both top-level and per-contig subdirectory files, producing duplicate predictions. Fixed by restricting tocontigs_summary/*plasmid*summary*.tsv.Empty consensus table (
__init__.py,schemas.py,dag_planner.py):write_consensus_table()was only called fromPipelineRunner._run_plan, butabi runusesABIExecutorwhich never invoked it. Fixed by adding the call inwrite_report()and addingplasmid_strategyfield toExecutionPlan.
WGS Bacteria Validation¶
Synthetic MG1655 sample: fastp → SPAdes → Prokka → MLST (correct ST10) → AMRFinderPlus (0 acquired / 11 intrinsic resistances). All steps passed.
SciPlot Improvement¶
Barplot auto-count mode (
sciplot/renderers/plots/barplot.py): Whenmapping.yis not specified, auto-count occurrences ofmapping.xvalues instead of raising an error.
CLI Addition¶
abi --version/abi -V(cli.py): Prints theabi-agentversion frompyproject.tomlviaimportlib.metadata. Uses a Typer callback.
Verification¶
ruff check src/ tests/ # 0 errors
ruff format --check src/ tests/ # All files formatted
mypy src/abi/ --ignore-missing-imports # 0 errors
pytest tests/ -q --tb=short # 2252+ passed, 0 regressions
Files Changed¶
File |
Action |
|---|---|
|
Fixed cross-sample path propagation with sample_id filtering |
|
Added |
|
Added platon database input, internal handler nodes |
|
Fixed genomad duplicate results (glob path) |
|
Added write_consensus_table in write_report, internal handlers |
|
Added |
|
Plumbed plasmid_strategy from config to ExecutionPlan |
|
Added auto-count mode for barplot |
|
Added –version/-V flag |
|
NEW — internal handlers for passthrough DAG nodes |
|
Updated genomad test expectations |
2026-06-23 — v1.5.1-1.5.2: Release Identity & Planner Cleanup¶
Overview¶
v1.5.1 made package metadata the single runtime version source, removed the legacy handwritten plasmid planner, and raised the CI coverage gate to 75%. v1.5.2 was a CI-only release identity fix.
Key Changes¶
Release identity:
pyproject.tomlproject.versionis the single source of truth. Strict checks validate tag/wheel/runtime/CHANGELOG alignment at CI time.Planner consolidation: Removed
_engine/planner.py’s legacy handwritten planner; all 7 built-in workflows now use declarativepipeline_dag.yamlplanning viaUniversalDAG.Protocol hardening: Replaced concrete plugin implementation imports with optional resource (
ABIResourcePlugin) and result-validation (ABIResultValidationPlugin) capability protocols.Coverage gate: Raised to 75% (branch-aware), with risk-based per-module line/branch gates for DAG, executor, resources, local/HPC runtimes, internal handlers, and step execution modules.
Bug Fixes¶
Wheel-installed plasmid configuration discovery outside source checkout.
PBS scheduler job-ID validation in HPC runtime.
Resource selection filtering in
check_resources/setup_resources.Dry-run resource setup side effects.
Release and PyPI publication now consume the exact wheel that passed the quality gate.
Files Changed¶
…
2026-06-21 (pm) — Three-Dimensional Engineering Fix: Environments, Charts, Execution¶
Overview¶
Post-pipeline-run analysis identified three engineering gaps in the metagenomic_plasmid pipeline: (1) tools mapped to wrong conda environments, (2) chart generation limited to 3 types with axis/composition misalignment, (3) ~8% CPU utilization from hardcoded sequential execution. All three were fixed in a single session.
Phase 1: Environment Mapping + Resource Fixes¶
stats environment mapping bug: 4 tools (kraken2, metaphlan, checkm2, gtdbtk)
were mapped to the non-existent autoplasm-stats environment. The actual environment
name on disk was stats. Fixed in 3 files:
File |
Change |
|---|---|
|
Environment definition renamed |
|
7 tool assignments corrected to |
|
4 |
fastspar: Confirmed 4 executables present in stats env (fastspar, fastspar_bootstrap,
fastspar_pvalues, fastspar_reduce). Previously orphaned.
checkm2 / gtdbtk: Python version conflict — stats env has python=3.10, but
checkm2 requires python<3.9 or >3.12. Both are default_enabled: false and require
separate environments + ~200GB of databases. Deferred.
ResourceSpec additions:
mmseqs2ResourceSpec added (resource count: 28 → 29) — creates plasmid DB from mob_suite’s ncbi_plasmid_full_seqs.fasamrfinderplusResourceSpec: addedinstall_post: makeblastdbto auto-build BLAST indexes after DB downloadkraken2download: switched from slowkraken2-build --standard(FTP) to directaria2cdownload from AWS S3 (k2_standard_20260226.tar.gz)_resolve_executable(): added system PATH fallback for shell builtins (bash, aria2c, tar, mkdir, etc.)
Phase 2: Chart System Migration (Old FigureEngine → abi-sciplot)¶
figure_specs.yaml completely rewritten: 6 old-style figures → 8 sciplot figures:
Figure ID |
Type |
Source Table |
Status |
|---|---|---|---|
|
barplot |
qc_summary |
✅ |
|
barplot |
assembly_summary |
✅ |
|
barplot |
plasmid_predictions |
✅ |
|
scatterplot |
plasmid_predictions |
✅ |
|
stacked_barplot |
host_predictions |
✅ |
|
heatmap |
annotations |
✅ |
|
heatmap |
annotations |
✅ |
|
heatmap |
abundance |
✅ |
All 8 figures render PDF+SVG+PNG with abi_nature theme + colorblind_safe palette,
pass lint validation, and include SHA256 provenance. Chart count: 3 → 8 (2.7x).
CoverM parser fix (_engine/parsers.py): CoverM outputs dynamic column names like
SRR2241213.samtools Mean (normalized: srr2241213_samtools_mean). The old _get()
did exact key match on mean, which never matched. Added _get_contains() that
searches for normalized keys containing the requested key. Updated parse_coverm()
to use _get_contains() for coverage, tpm, rpkm, mapped_reads, and length_bp.
CoverM command template (tool_contracts/coverm.yaml): Added --methods mean tpm rpkm --min-covered-fraction 0 to produce full abundance metrics.
Phase 3: Parallel Execution in GenericABIExecutor¶
src/abi/executor.py — 4 locations had hardcoded parallel=False, workers=1:
Location |
Fix |
|---|---|
|
Now reads |
|
Sample-level |
|
Passes actual |
|
Uses actual values instead of hardcoded defaults |
Usage:
execution:
parallel: true
workers: 8
Sample-level parallelism: samples run concurrently, steps within each sample remain
serial (respecting DAG topological order). Thread safety via _state_lock for
StandardTableManager, PipelineProgressRecorder, and RunLogger.
Verification¶
ruff check src/ tests/ # All checks passed
ruff format --check src/ tests/ # 236 files already formatted
pytest tests/ -v --tb=short # 707 passed, 8 skipped, 0 failed
Resource Status After Fixes¶
Category |
Count |
Status |
|---|---|---|
Databases installed |
10 |
genomad, bakta, mob_suite, plasmidfinder, amrfinderplus, platon, macsyfinder, metaphlan, mmseqs2, kraken2 (pending download) |
default_enabled=true tools working |
24/24 |
All executables confirmed in conda environments |
default_enabled=false tools missing |
11 |
git repos not cloned (PlasmidHostFinder, pMLST, gplas2, Recycler, scapp, COPLA, conjscan, plasme, plasx, plasmaag, plasmidhostfinder) |
Tier 1 tools (mainstream) pending |
4 |
kraken2 DB, BLAST DB, checkm2 + gtdbtk (env + DB) |
Files Changed (2026-06-21 pm)¶
File |
Action |
Description |
|---|---|---|
|
Fixed |
|
|
Modified |
4 env_name fixes, mmseqs2 ResourceSpec, kraken2 aria2c command, amrfinderplus install_post, _resolve_executable system PATH fallback |
|
Fixed |
Added |
|
Fixed |
|
|
Rewritten |
6 old-style → 8 sciplot figures with theme + palette |
|
Modified |
Parallel execution via ThreadPoolExecutor, sample-level parallelism, thread-safe state |
|
Updated |
Resource count 28 → 29 (added mmseqs2) |
2026-06-21 — Real Pipeline Execution: Bug Fixes + Full Assembly Pipeline Verification + Real Metagenomic Data¶
Overview¶
2026-06-21 focused on executing the metagenomic_plasmid pipeline against real RefSeq plasmid data using the assembly platform (pre-assembled contigs), discovering and fixing 5 bugs, verifying 19/19 steps pass across 3 samples, and preparing comprehensive illumina platform testing with real metagenomic data.
Bug Fixes from Real Pipeline Execution¶
Bug # |
Tool |
Symptom |
Root Cause |
Fix |
|---|---|---|---|---|
#33 |
AMRFinderPlus |
|
|
Added |
#34 |
Bakta |
AMRFinderPlus outputs overwritten |
Bakta output dir collision with amrfinderplus step |
Added |
#35 |
AMRFinderPlus |
DB path resolution failure |
Path pointed to parent dir, not |
Fixed |
#36 |
geNomad |
Output path contract mismatch |
Executor expected abstract paths, geNomad writes fixed filenames |
192-line four-part executor fix: output writeback + contract symlinks + downstream propagation + consensus bridge in |
#37 |
Bakta |
Diamond SIGSEGV during sORF PSCC search |
Diamond crashes with light DB v6.0 on PSCC sORF search |
Added |
Bug Details¶
Bug #33 (AMRFinderPlus BLAST DB not built): The amrfinder_update tool
successfully downloads AMRFinderPlus database files (251MB) but does not
run makeblastdb to build BLAST indexes. Without BLAST indexes, AMRFinderPlus
BLAST-based searches fail silently. Fixed by adding install_post: makeblastdb
to the amrfinderplus ResourceSpec in _engine/resources.py.
Bug #34 (Bakta output dir collision): Bakta and AMRFinderPlus both write
output to the same annotation directory. Since Bakta runs after AMRFinderPlus
in the pipeline, it would overwrite AMRFinderPlus results. Fixed by adding
--force flag to Bakta’s command template, allowing it to proceed when the
output directory already exists rather than failing.
Bug #35 (AMRFinderPlus DB path): The amrfinder_database config key
pointed to the parent directory /path/to/amrfinderplus/ rather than
/path/to/amrfinderplus/latest/. AMRFinderPlus expects the latest/
subdirectory containing the versioned database files. Fixed in
config_default.yaml.
Bug #36 (geNomad output path contract mismatch): The executor’s step
contract validation expected output files at planner-generated abstract
paths, but geNomad writes outputs with fixed filenames (e.g.,
*_plasmid_summary.tsv) directly in the output directory. The 192-line
fix spans four areas:
Output writeback: executor now writes a mapping of actual→abstract paths after tool completion
Contract symlinks: creates symlinks from abstract paths to actual files so downstream steps find them
Downstream propagation: planner references updated to consume abstract paths consistently
Consensus bridge: consensus algorithm step bridges geNomad and MOB-suite results using the corrected paths
Bug #37 (Bakta diamond SIGSEGV): Bakta’s internal diamond binary
segfaults during the sORF PSCC search when using the light database
(v6.0, 4.2GB). The crash occurs reproducibly on PSCC: Prokaryotic Small
Coding sequence search. Workaround: added --skip-sorf to Bakta’s
command template. Proper fix requires either the full Bakta DB (much
larger) or upgrading diamond to a version that handles the light DB’s
PSCC indices correctly.
Environment Fix¶
metaPhlAn + Kraken2 env_name: Fixed from broken
autoplasm-statsto workingstatsin both_engine/resources.pyandenvironments.yaml. Theautoplasm-statsenvironment never existed;statsis the correct conda environment containing metaPhlAn and Kraken2.
Assembly Platform Test Results¶
Full metagenomic_plasmid pipeline executed on the assembly platform (pre-assembled contig inputs) with 3 RefSeq plasmid samples:
Sample |
Contigs |
geNomad Plasmids |
MOB-suite Plasmids |
Consensus |
|---|---|---|---|---|
NC_002127_1 |
1 |
1 |
1 |
1 |
NC_002483_1 |
1 |
1 |
1 |
1 |
NC_011977_1 |
1 |
1 |
1 |
1 |
19/19 steps passed across all 3 samples
All 3 known plasmids correctly detected by both geNomad and MOB-suite
Consensus algorithm produced correct final calls
Provenance artifacts written for all steps
Database Status (7 Available)¶
Database |
Tool |
Size |
Status |
|---|---|---|---|
geNomad DB |
geNomad |
2.9 GB |
✅ Ready |
Bakta light DB |
Bakta |
4.2 GB |
✅ Ready (workaround: –skip-sorf) |
MOB-suite DB |
mob_suite |
3.0 GB |
✅ Ready |
PlasmidFinder DB |
plasmidfinder |
~50 MB |
✅ Ready |
AMRFinderPlus DB |
amrfinderplus |
251 MB |
✅ Ready (+ BLAST indexes) |
PLaton DB |
platon |
~100 MB |
✅ Ready |
MacSyFinder DB |
macsyfinder |
~150 MB |
✅ Ready |
metaPhlAn DB |
metaphlan |
12+ GB |
🔄 Downloading |
Illumina Platform Test Plan¶
Comprehensive illumina platform test prepared with real metagenomic paired-end data:
Metric |
Value |
|---|---|
Samples |
121 real metagenomic paired-end samples |
Data location |
|
Total size |
~60 GB |
Unique tools in plan |
33 |
Total plan steps |
71 (across 2 representative samples) |
Platforms enabled |
illumina |
Categories included |
qc, assembly, gene_prediction, plasmid_detection, annotation, abundance, typing, host_prediction, amr, virulence |
Sample manifest and metadata available for all 121 samples. Two samples selected for initial comprehensive pipeline testing (minimizing runtime while covering all tool paths).
Files Changed (2026-06-21)¶
File |
Action |
Description |
|---|---|---|
|
Fixed |
Added |
|
Fixed |
Added |
|
Fixed |
|
|
Fixed |
metaPhlAn/kraken2 |
|
Fixed |
192-line four-part fix: output writeback + contract symlinks + downstream propagation + consensus bridge |
|
Modified |
|
|
Updated |
Added |
Commits¶
8e3ac08— fix: Dockerfile env names + stale envs cleanup + docs sync — Phase 23a4e1e8— feat: unified environments.yaml + tool auto-install + env fixes8c853e7— fix: amrfinderplus DB path + maxbin2 deprecation + docs sync — v1.4.0 patch4d0f787— fix: systematic enable_condition audit — 12 nodes from value:true to list_contains9d65f24— fix: geNomad parser + binning tool env — fix 81% null contig_length, enable full pipeline
2026-06-21 — Phase 1: Unified Environment Architecture¶
Overview¶
Phase 1 centralized all conda environment definitions into a single source of truth.
Core deliverables¶
File |
Action |
Description |
|---|---|---|
|
New |
16 conda environments + 93 tool→env assignments across all 5 plugins |
|
New |
Generates per-environment YAMLs ( |
|
Modified |
|
|
Modified |
Same |
|
Modified |
|
|
Modified |
Same |
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
Removed all |
|
Modified |
Removed all |
|
Deleted |
Old flat names; regenerated with correct |
|
Modified |
Updated env names to |
Key design decisions¶
Plugin-qualified tool_assignments:
environments.yamluses{plugin_name: {tool_id: env_name}}nesting to handle cross-plugin tool ID collisions (e.g.,fastpin both metagenomic_plasmid and wgs_bacteria).Fallback resolution:
ToolRegistry._resolve_env()searches specified plugin → all plugins →_defaultfallback.Two-tier ResourceSpec: Level 1 tools (auto_setup=True, 4 mainstream plasmid tools) auto-install; Level 2 tools (auto_setup=False, 8 experimental tools) are guided manual install.
No new CLI command: Tool installation reuses existing
abi setup-resources(extended ResourceSpecresource_typefield).
2026-06-20 (pm) — AMRFinderPlus Database Path Fix¶
AMRFinderPlus: Missing --database Flag¶
The amrfinderplus tool in the metagenomic_plasmid plugin failed because:
The command template in
tool_registry.yamldid not include-d {database}The DAG node
annotation_amrfinderplushad nodatabaseinput parameteramrfinder relied solely on
$AMRFINDER_DB/$CONDA_PREFIXdefault path, but theautoplasm-annotationenv lacked the AMRFinder database
Fix (3 files):
File |
Change |
|---|---|
|
|
|
Added |
|
Added |
|
Added |
Root cause: All other DB-dependent tools (genomad, bakta, kraken2, metaphlan, etc.)
correctly pass {database} in their command template. amrfinderplus was the only
tool that relied on conda env $CONDA_PREFIX default DB discovery, which worked
for wgs_bacteria (conda env has DB) but not for metagenomic_plasmid.
No similar issues found: All 5 plugins were audited for missing {database}
params. wgs_bacteria, amplicon_16s, rnaseq_expression, metatranscriptomics are
all correctly wired — verified by their end-to-end passes.
Files Changed (2026-06-20 pm)¶
File |
Action |
Description |
|---|---|---|
|
Fixed |
Added |
|
Fixed |
Added |
|
Fixed |
Added |
|
Fixed |
Added |
2026-06-20 — v1.4.0: Scientific Figure Compiler Upgrade + Comprehensive Bug Fix + Pipeline Verification¶
Overview¶
v1.4.0 focused on three tracks: (1) upgrading abi_sciplot from 9 to 15 plot types with ggplot2-quality rendering, (2) systematic DAG enable_condition audit and bug fixes for the metagenomic_plasmid pipeline, (3) end-to-end verification of all 5 plugins on high-performance hardware.
sciplot v1.4.0 — 6 New Biological Plot Types¶
New Plot Type |
Purpose |
Key Features |
|---|---|---|
|
Phylum-level community composition |
Stacked relative abundance bars per sample |
|
Top-N genus abundance |
Z-score normalization, hierarchical clustering |
|
PCoA ordination |
95% confidence ellipses, PERMANOVA annotation |
|
Differential abundance |
Log2 fold-change vs -log10 p-value, significance thresholds |
|
Alpha diversity comparison |
Kruskal-Wallis test, pairwise significance |
|
Phylogeny + abundance |
Tree-ordered abundance with evolutionary context |
New backends: plotnine (ggplot2 grammar) + seaborn for biological-grade aesthetics.
Bug Fixes (2026-06-18 through 2026-06-20)¶
Execution-blocking (P0):
metabat2
--threads: removed from command_template (binary has no threads flag)binning tool env_name: corrected
autoplasm-stats→plasmid_binningfor metabat2, maxbin2, concoct, semibinmaxbin2:
--thread→-thread(Perl script uses single dash)concoct:
--threads→-t(short flag)geNomad parser: removed
*.tsvwildcard — reads only*plasmid_summary*.tsv, fixing 81% nullcontig_length
Configuration / DAG gating (P1):
12 DAG nodes: enable_condition
value: true→list_containson tools lists (plasmid_binning: 5, mag_host_genomes: 7)bandage: added
list_containsonassembly_qc.toolscontig_coverage: fixed bowtie2/minimap2 input
assembly→plasmid_contigsSemiBin: executable name
SemiBin→SemiBin2coverm: contract min_size 50B → 0B (too strict for small datasets)
Robustness (P2):
Empty table rendering: detection + log instead of silent skip
Arial font: default changed to DejaVu Sans for headless Linux
Script auto-resolution:
_resolve_script_path()for DESeq2/diversity/count_matrixOMP_NUM_THREADS: unset in
runtime_env()(suppressed 200+ warnings)matplotlib import: try/except ImportError guard in figure rendering
Pipeline Verification (16-core / 1TB RAM Server)¶
Plugin |
Steps |
Success |
Failed |
Status |
|---|---|---|---|---|
rnaseq_expression |
14 |
14 |
0 |
✅ Full pass |
wgs_bacteria |
5 |
5 |
0 |
✅ Full pass |
amplicon_16s |
9 |
9 |
0 |
✅ Full pass |
metatranscriptomics |
6 |
6 |
0 |
✅ Full pass |
metagenomic_plasmid |
62 |
9 |
0 |
✅ 1 fixed (amrfinderplus |
4/5 plugins verified end-to-end with zero failures. The single plasmid failure
is a configuration path mismatch (AMRFinder DB at /abi-envs/wgs/share/amrfinderplus/
but tool looks in /abi-envs/autoplasm-annotation/share/amrfinderplus/).
Quality Gates¶
ruff check: 0 errors
ruff format: 204 files already formatted
mypy: 0 errors (232 sciplot Pydantic errors resolved)
pytest: 698 passed, 8 skipped, 0 failed
sciplot tests: 38 passed
build: abi_agent-1.3.3.tar.gz + wheel OK
Files Changed¶
File |
Action |
Description |
|---|---|---|
|
Extended |
6 new plot types, plotnine+seaborn backends |
|
Rewritten |
8 biological-grade figures |
|
Refactored |
Shared |
|
Fixed |
geNomad parser wildcard fix |
|
Fixed |
binning env_name + flag fixes |
|
Fixed |
env_name + flag consistency |
|
Fixed |
12 enable_conditions + input bindings |
|
Fixed |
OMP_NUM_THREADS, env_prefix resolution |
|
Fixed |
|
Commits¶
4d0f787— fix: systematic enable_condition audit — 12 nodes from value:true to list_contains9d65f24— fix: geNomad parser + binning tool env — fix 81% null contig_length, enable full pipeline7ad732d— refactor: unify figure rendering — plasmid delegates to shared render_figures_via_sciplotbbab24a— feat: sciplot v1.4.0 — 6 new biological plot types, ggplot2 backend, bandage fix36dfc80— fix: empty tables/figures — column name alignment, font fix, robust rendering313d15a— feat: Phase 1-4 — comprehensive codebase audit, bug fixes, script auto-resolution, end-to-end execution, and documentation sync
2026-06-18 — Direction E: Token Optimization + Benchmark Data + Real Execution (v1.3.0)¶
Overview¶
Direction E delivered v1.3.0 with four phases:
Phase 1: Token optimization for agent middleware (~200 lines, 4 optimizations)
Phase 2: Benchmark datasets completed for all 5 plugins
Phase 3: Bench v0.5 with 5 real execution tasks (T31-T35)
Phase 4: Integration testing, version bumps, CHANGELOG, release
Phase 1: Token Optimization¶
Optimization |
Code |
Token Savings |
|---|---|---|
Plan summarization |
+30 lines |
78-95% (plasmid plan ~5K→250 tokens) |
Error envelope sans traceback |
+22 lines |
-80% in error scenarios |
|
+55 lines |
-90% for metadata queries |
Dry-run envelope reduction |
~10 lines |
-50% |
Plan summarization: abi plan now returns a summary field with pipeline
stages, key tools, and platforms — extracted from PlanStep.category annotations.
Agents no longer need to read the full execution_plan.json (plasmid: ~5,000+ tokens).
abi query: Lightweight metadata query (~50ms) that reads pipeline_dag.yaml and
tool registry directly — no config loading, no plan building. Supports:
abi query --type <plugin> --what stages|tools|platforms
abi query --type <plugin> --step <id> --what inputs|outputs|resources
Error envelopes: error_envelope() now accepts verbose=False (default), omitting
error_type from error payloads. Agents receive only error_code + diagnostic_hints
for automated recovery. Use ABIAgentInterface(verbose_errors=True) for debugging.
Dry-run envelope: Removed written_files list; agents use abi inspect on demand.
Phase 2: Benchmark Data Completion¶
Plugin |
expected_assertions.yaml |
config.yaml |
Smoke Test |
|---|---|---|---|
metagenomic_plasmid |
✅ |
✅ |
✅ |
rnaseq_expression |
✅ |
✅ |
✅ |
amplicon_16s |
✅ |
✅ |
✅ |
wgs_bacteria |
✅ (new) |
✅ (new) |
✅ (value-level) |
metatranscriptomics |
✅ (new) |
✅ (new) |
✅ (value-level) |
All 5 plugins now have complete benchmark data under data/benchmarks/<plugin>/.
wgs_bacteria and metatranscriptomics smoke tests upgraded from file-existence-only
to value-level validation (N50 calculation, contig counts, mapping rate, gene counts).
Phase 3: Bench v0.5 Real Execution Tasks¶
5 new tasks (T31-T35) in the Bench sibling repo:
Task |
Plugin |
Score |
Key Checks |
|---|---|---|---|
T31 |
metagenomic_plasmid |
15 |
pipeline_completed, assertions_validated, discrepancy_analyzed, provenance_quality |
T32 |
rnaseq_expression |
15 |
↑ |
T33 |
amplicon_16s |
15 |
↑ |
T34 |
wgs_bacteria |
15 |
↑ |
T35 |
metatranscriptomics |
15 |
↑ |
New scoring checks: check_pipeline_completed, check_assertions_validated,
check_discrepancy_analyzed, check_provenance_quality.
Benchmark fixtures created for all 5 plugins with real_tool_execution: true.
BENCHMARK_SPEC bumped to v0.5; run_group.py updated with FULL_V0_5_TASKS.
Phase 4: Integration + Release¶
543 tests passed (0 failures, 1 deselected pre-existing)
Benchmark smoke tests: rnaseq ✅, amplicon ✅
wgs and metatranscriptomics smoke tests require real FASTQ input data (example sample sheets use placeholder paths — not a code issue)
ABI tagged
v1.3.0, Bench tagged (sibling repo)
Bug Fixes¶
@runtime_checkableABIPlugin: Added@runtime_checkabledecorator toABIPluginprotocol forisinstancechecks (pre-existing issue in test suite)Test regression fix:
test_agent_interface_reports_invalid_json_filenow usesABIAgentInterface(verbose_errors=True)to verifyerror_typein payloadGolden trace fix: Updated to check
outdirfor dry_run instead ofwritten_files
Files Changed¶
File |
Lines |
Description |
|---|---|---|
|
+263 |
Plan summarization, |
|
+22 |
|
|
+55 |
|
|
+3 |
|
|
+2 |
|
|
+55 |
expected_assertions.yaml |
|
+35 |
expected_assertions.yaml |
|
~25 |
5 new config files |
|
~230 |
Value-level validation |
|
~200 |
Value-level validation |
Bench v0.5 (Sibling Repo)¶
File |
Lines |
Description |
|---|---|---|
|
5×~80 |
Real execution task definitions |
|
5×~10 |
Benchmark fixture configs |
|
+71 |
4 new scoring functions |
|
+21 |
4 new check definitions |
|
~10 |
v0.4→v0.5, 30→35 tasks |
|
+10 |
FULL_V0_5_TASKS, REAL_EXEC_TASKS |
Commits¶
f770f33— fix: add missing benchmark YAML files + apply skipif decorators to benchmark tests479ff59— fix: add missing pip dependency to abi-qc and abi-stats envsaaf3764— feat: update README and documentation — add logo, enhance content, and improve stylingab80461— fix: Docker build — missing force-include dirs in Dockerfiles9b717da— feat: Direction D — benchmark datasets + end-to-end real execution tests0cc38e1— chore: v1.3.0 release — CHANGELOG, version bump(Bench)
35d8558— Bench v0.5: real execution tasks T31-T35 + scoring + fixtures
2026-06-18 — Direction D: Benchmark Datasets + End-to-End Real Execution Tests¶
Overview¶
Direction D created benchmark datasets and end-to-end smoke tests for all 5 plugins.
Benchmark Data (3 new plugins)¶
Created data/benchmarks/<plugin>/expected_assertions.yaml + config.yaml for:
amplicon_16s, rnaseq_expression, and metagenomic_plasmid (wgs_bacteria and
metatranscriptomics completed in Direction E).
Value-Level Smoke Tests¶
Upgraded benchmark smoke tests from file-existence checks to value-level validation:
rnaseq: Read counts, mapping rate, gene counts, differential expression rows
amplicon: ASV counts, taxonomy assignments, alpha/beta diversity metrics
plasmid: Plasmid detection counts, contig statistics, annotation features
Files¶
data/benchmarks/amplicon_16s/— expected_assertions.yaml + config.yamldata/benchmarks/rnaseq_expression/— expected_assertions.yaml + config.yamldata/benchmarks/metagenomic_plasmid/— expected_assertions.yaml + config.yamltests/smoke/test_rnaseq_benchmark.py— value-level validationtests/smoke/test_amplicon_benchmark.py— value-level validation
Commits¶
9b717da— feat: Direction D — benchmark datasets + end-to-end real execution tests
2026-06-18 — Direction C: Docker Containerization¶
Overview¶
Direction C created Docker images for all 5 plugins, with docker-compose orchestration and CI build workflow.
Conda Environment Gaps Filled¶
4 environments lacked conda YAML files:
Env |
Plugin |
Packages |
|---|---|---|
|
amplicon_16s |
cutadapt, vsearch, mafft, fasttree, numpy, scipy, pandas, biopython |
|
wgs_bacteria |
fastp, spades, prokka, mlst, ncbi-amrfinderplus |
|
metatranscriptomics |
fastp |
|
metatranscriptomics |
star, hisat2, subread |
Docker Images¶
Image |
Plugin |
Size (est.) |
Tools |
|---|---|---|---|
|
amplicon_16s |
~1.5 GB |
cutadapt, vsearch, mafft, fasttree |
|
rnaseq_expression |
~2.5 GB |
fastp, STAR, featureCounts, R, DESeq2 |
|
wgs_bacteria |
~2.0 GB |
fastp, SPAdes, Prokka, MLST, AMRFinderPlus |
|
metatranscriptomics |
~2.0 GB |
fastp, STAR, HISAT2, featureCounts |
|
metagenomic_plasmid |
~15 GB |
60+ tools across 10 conda envs |
Files¶
NEW
envs/amplicon.yml,envs/wgs.yml,envs/abi-qc.yml,envs/abi-stats.ymlNEW
docker/Dockerfile.amplicon— miniforge3 + amplicon env + ABINEW
docker/Dockerfile.rnaseq— miniforge3 + rnaseq env + BiocManager + ABINEW
docker/Dockerfile.wgs— miniforge3 + wgs env + ABINEW
docker/Dockerfile.metatranscriptomics— miniforge3 + qc + stats envs + ABINEW
docker/Dockerfile.metagenomic_plasmid— miniforge3 + 10 conda envs + ABINEW
docker/docker-compose.yml— all 5 images + job-serviceNEW
.dockerignore— exclude tests, docs build, caches from build contextNEW
.github/workflows/docker.yml— build + smoke-test on tag push, push to GHCR
Usage¶
# Build one plugin
docker build -f docker/Dockerfile.amplicon -t abi-amplicon .
# Run dry-run inside container
docker run --rm -v $(pwd):/data abi-amplicon abi plan --type amplicon_16s --outdir /data/results
# Start all services
docker compose -f docker/docker-compose.yml up -d
Commits¶
efa8d17— feat: Direction C — Docker containerization for all 5 plugins
2026-06-18 — Direction B: Engineering Infrastructure¶
Overview¶
Direction B completed after Direction A. Focused on CI/CD polish, API documentation, and pre-commit hook updates.
B1: Sphinx API Documentation + ReadTheDocs¶
Problem: No auto-generated API reference. Users had to read source code to understand module APIs.
Solution (4 new files):
NEW
docs/conf.py— Sphinx config with autodoc, napoleon (Google-style docstrings), myst_parser (existing Markdown docs), intersphinxNEW
docs/index.rst— top-level documentation TOC linking API referenceplugin guides + development docs
NEW
docs/api.rst— full Python API reference auto-generated from docstrings across 26 modules (core + plugins)NEW
.readthedocs.yaml— RTD build config (Python 3.12, docs+report extras)pyproject.toml— added[docs]extras (sphinx, sphinx-rtd-theme, myst-parser)
Verification:
sphinx-build -b html docs/ docs/_build/ # build succeeds, 650+ HTML pages
B2: README Badges¶
Added coverage badge (60%+, enforced in CI) and docs badge (Sphinx) to README.md.
B3: pre-commit Hook Updates¶
Hook |
Before |
After |
|---|---|---|
ruff |
v0.4.0 |
v0.9.0 |
pre-commit-hooks |
v4.6.0 |
v5.0.0 |
mirrors-mypy |
v1.10.0 |
v1.14.0 |
B4: CI Enhancements¶
Added Sphinx docs build step to CI workflow (Python 3.12)
Added
--cov-report=xmlfor future Codecov/Coveralls integration
Bug Fix: _parse_sample_sheet check_files Parameter¶
Problem: All 4 inline plugins’ _parse_sample_sheet() functions accepted
check_files: bool but never used it — always checked file existence.
CI tests using /tmp/abi_test_ss.tsv (non-existent) with check_files=False
failed with ValueError then FileNotFoundError.
Fix (3 commits):
if not exists()→if check_files and not exists()(skip existence check)When file missing AND
check_files=False, return syntheticABISampleContextwith one placeholder sample — allowsbuild_planto construct plan structure for testing without real filesApplied to all 4 inline plugins: amplicon_16s, rnaseq_expression, wgs_bacteria, metatranscriptomics
Also fixed: _builtin_plugins() registered only 2 of 5 plugins
(metagenomic_plasmid + metatranscriptomics). Added amplicon_16s, rnaseq_expression,
wgs_bacteria for source-tree test imports (47 test failures resolved).
Commits¶
dcc3948— fix: register all 5 plugins in _builtin_plugins()2774526— feat: Direction A (diversity script, phylogeny, AMRFinderPlus)96b7910— feat: Direction B (Sphinx docs, badges, pre-commit, CI)5b82c5c— style: ruff format — 26 files reformattedee1f40d— fix: _parse_sample_sheet honors check_files=False (3 plugins)26a10e0— fix: metatranscriptomics _parse_sample_sheetb823afb— fix: synthetic context when check_files=False and file missing
2026-06-18 — Direction A: Amplicon Diversity, Phylogeny, AMRFinderPlus¶
Overview¶
Direction A filled the last 3 functional gaps across plugins:
A1: Amplicon diversity script (the only remaining
NOT_CONFIGUREDplaceholder)A2: WGS bacteria AMRFinderPlus parser fix (missing normalization + test)
A3: Phylogeny tree step for amplicon_16s (MAFFT + FastTree)
A1: Amplicon Diversity Script¶
Problem: The diversity step was DIVERSITY_SCRIPT_NOT_CONFIGURED — no
script produced alpha/beta diversity metrics, and merged_asv_table.tsv was
never generated by any preceding step.
Solution — scripts/amplicon_diversity.py (781 lines, pure Python):
ASV table construction: Scans
04_denoise/{sample_id}/asvs.fastafor per-sample ASV sequences, deduplicates into global ASV set, maps each sample’s merged reads (02_merge/) back to ASVs via exact-matchAlpha diversity: observed_features, Shannon entropy, Simpson index, Chao1 estimator, Faith’s PD (tree-dependent)
Beta diversity: Bray-Curtis dissimilarity, Jaccard distance, weighted and unweighted UniFrac (tree-dependent)
Graceful degradation: Tree-dependent metrics auto-skip when
--treenot provided; no numpy/scipy/biopython dependenciesOutputs:
merged_asv_table.tsv,alpha_diversity.tsv,beta_diversity.tsv
Test coverage: 23 new tests (tests/unit/test_amplicon_diversity.py)
covering all math functions + end-to-end integration with synthetic data.
A2: WGS Bacteria AMRFinderPlus Parser Fix¶
Problem: The _parse_amrfinderplus parser existed but:
Tool contract lacked
normalizationblockGlob pattern
amr*.tsvmismatched fixture filenameS1.amrfinder.tsvTest fixture used basic-mode columns, not
--pluscolumnsNo unit test for the parser
Fix (3 files):
tool_contracts/amrfinderplus.yaml— addednormalization: tables: [amr_profile]wgs_bacteria.py— fixed glob to*amr*.tsv; fixedparse_outputsandwrite_reporttype annotations forABIPluginprotocol compliancetests/fixtures/tool_outputs/amrfinderplus/S1.amrfinder.tsv— rebuilt with all 15--pluscolumns (Scope, Element subtype, Class, Subclass, Method)tests/test_wgs_bacteria_plugin.py— addedtest_parse_amrfinderplus
A3: Phylogeny Tree Step (MAFFT + FastTree)¶
Problem: The diversity step’s phylogeny_tree input was
PHYLOGENY_TREE_NOT_CONFIGURED. Faith’s PD and UniFrac could never be computed.
Solution (new tool in the amplicon_16s DAG):
NEW
tool_contracts/phylogeny_build.yaml— MAFFT alignment → FastTree ML treepipeline_dag.yaml— addedphylogenynode:denoise_unoise3 → phylogeny → diversitytool_registry.yaml— registeredphylogeny_build(optional, requires mafft+fasttree)abi-plugin.yaml— added phylogeny workflow step with MAFFT + FastTree citationsamplicon_16s.py—build_plan()constructs phylogeny step (sample_id="ALL") between per-sample loop and diversity; merged ASV FASTA auto-generated; tree output wired into diversity’s--treeparameterdiversity_metrics.yaml— updated contract:--denoise-dir+--merge-dirreplace--asv-tableto match the new script’s CLI
Architecture:
04_denoise/*/asvs.fasta → concatenate → mafft --auto → fasttree -nt → phylogeny.nwk
│
diversity --tree phylogeny.nwk
Verification¶
pytest tests/ -v --tb=short # 650 passed (+24 from Direction A)
mypy src/abi/ --ignore-missing-imports # 0 errors
ruff check src/abi/ tests/ # 0 errors
ruff format --check src/ tests/ # 0 files would be reformatted
Commits¶
dcc3948— fix: register all 5 plugins in _builtin_plugins()2774526— feat: Direction A (diversity, phylogeny, AMRFinderPlus)
2026-06-18 (continued) — P1-1: DESeq2 Installation Automation¶
P1-1: Reproducible DESeq2/R Environment Setup¶
Problem: DESeq2 was installed manually in a user-specific system R library (~/R/<platform>/<version>/).
No automated setup existed — new machines would fail at the DESeq2 step with
cryptic R package errors.
Solution (4 files):
NEW
envs/rnaseq.yml— conda environment spec with fastp, STAR, featureCounts, r-base, and R dependency packages from conda-forgeNEW
scripts/install_deseq2.R— R script that installs DESeq2 + companion packages via BiocManager with retry logic and verificationNEW
scripts/setup_rnaseq_env.sh— orchestrator: creates conda env then runs the R installer. Supports –dry-run, –mamba-root, –skip-rsrc/abi/resources.py—check_resourcesnow detects DESeq2 version via Rscript;setup_resourcesdelegates to setup_rnaseq_env.sh for--type rnaseq_expression
Key design decisions:
R packages installed via BiocManager rather than conda bioconda channel (avoiding the dependency conflicts that plagued the previous session)
System R fallback: if r-base isn’t in the conda env, the setup script uses the system Rscript and installs packages to the user library
Marker file (
.abi_deseq2_installed) written to the R library on success for fast idempotent checksabi check-resources --type rnaseq_expressionnow shows DESeq2 version
Verification:
abi check-resources --type rnaseq_expression # shows DESeq2 1.42.1 found
abi setup-resources --type rnaseq_expression --dry-run # shows plan
Commits (pending)¶
P1-1: DESeq2 installation automation (envs/rnaseq.yml, install_deseq2.R, setup_rnaseq_env.sh, resources.py rnaseq integration)
2026-06-18 — Route C: Code Quality + P0-2 Amplicon Fix¶
Overview¶
Session focused on two tracks:
P0-2: Fix amplicon_16s read-merging gap — the pipeline was missing a paired-end merge step between cutadapt (output: paired FASTQ) and vsearch_derep (input: merged FASTA).
Route C: Code quality improvements — mypy/ruff zero-error state, test coverage for 3 critically under-tested modules.
P0-2: amplicon_16s Merge Step¶
Root cause: The amplicon_16s build_plan() generated a merged_fasta
input path pointing at the trim directory, but no tool step was registered
to produce it. vsearch --derep_fulllength expects merged FASTA, but
cutadapt outputs paired FASTQ files.
Fix (5 files):
NEW
plugins/amplicon_16s/tool_contracts/vsearch_mergepairs.yaml— tool contract forvsearch --fastq_mergepairsplugins/amplicon_16s/tool_registry.yaml— registeredvsearch_mergepairssrc/abi/plugins/amplicon_16s.py— inserted merge step, renumbered downstream directories (02_merge → 03_derep → 04_denoise → …), added_parse_vsearch_mergeparserplugins/amplicon_16s/pipeline_dag.yaml— addedmerge_vsearchnode withtrim_cutadapt → merge_vsearch → derep_vsearchdependency chain
New 7-tool chain:
cutadapt → vsearch_mergepairs → vsearch_derep → UNOISE3 → SINTAX → diversity
Route C: Code Quality¶
mypy fixes (5 → 0 errors across 138 source files):
report/limitations.py:47— type narrowing forPath(source)whensourceisstr | Path | Sequence[str]report/citations.py:110— type narrowing forCitationRegistry.from_yaml()contracts/__init__.py:329-330—assert isinstance()after_require_non_empty_stringvalidationdag.py:167— renamed secondconsumed→consumed_pathsto fixno-redeferror
ruff fixes (4 → 0 errors):
contracts/__init__.py:8— removed unusedList,Optionalimports_engine/standard_tables.py:314,347— split long ternary expressions
Test coverage (+90 tests, 527 → 617):
Module |
Before |
After |
Tests |
|---|---|---|---|
|
19% |
98% |
28 |
|
49% |
98% |
34 |
|
19% |
66% |
28 |
New test files:
tests/unit/test_workflow_validation.py— WorkflowValidator, check_required_artifactstests/unit/test_provenance.py— RunLogger, PipelineProgressRecorder, TSV writers, write_methods_mdtests/unit/test_hpc_runtime.py— HpcRuntime, _safe_name, _log_dir, script generation
Key Design Decisions¶
Merge step as first-class tool: Rather than hiding merge logic inside vsearch_derep, the merge step is a standalone tool with its own contract, parser, and DAG node. This keeps the pipeline auditable and allows alternative merge tools (pear, flash, pandaseq) to be swapped in.
Type narrowing over type: ignore: For the mypy fixes, we used
isinstance()checks andassertstatements rather than# type: ignorecomments. This makes the code self-documenting and catches regressions at runtime.HPC at 66% is acceptable: The remaining 34% of
runtimes/hpc.py(_submit_jobs,_poll_until_complete,_collect_results) requires a real SLURM/PBS environment. Unit testing these would require mocking subprocess internals, which is fragile. Integration tests with a containerized SLURM simulator are the right next step.
Verification¶
pytest tests/ -v --tb=short # 617 passed
mypy src/abi/ --ignore-missing-imports # 0 errors
ruff check src/abi/ tests/ # 0 errors
abi contract-lint --type amplicon_16s # DAG structure OK
Commits¶
77aca65— P0-1: 12 bugs from lightweight local IDE rnaseq pipeline test0c0b912— P0-2: vsearch mergepairs + mypy/ruff fixes (0 errors)(pending) — C5: +90 tests for workflow/validation, provenance, hpc
2026-06-18 — ABI “uv-ification”: Declarative DAG Planner + TSV Mapper¶
Context¶
ABI’s 4 inline plugins each had ~200 lines of hand-written build_plan()
boilerplate that iterated samples, constructed PlanStep objects, and
assembled ExecutionPlan dicts. The metagenomic_plasmid plugin already had
a DAG-driven planner (pipeline_dag.yaml + PipelineDAG + planner.py),
but it was tightly coupled to the plasmid plugin’s engine. The goal was to
make this pattern universal — like uv uses pyproject.toml to drive
Python packaging, ABI should use pipeline_dag.yaml to drive pipeline
execution.
Additionally, ~14 simple TSV column-mapping parser functions (like
_parse_amrfinderplus) followed the exact same csv.DictReader → remap columns → inject constants pattern and deserved a declarative replacement.
What was built¶
src/abi/dag_planner.py(~630 lines) — Universal DAG plannerUniversalDAGclass: loads + queries any plugin’spipeline_dag.yamlbuild_plan_from_dag(): generatesExecutionPlanfrom DAG specPathTemplateContext: resolves{outdir}/{category_dir}/{sample_id}path templates usingstr.format_map()Supports per-sample nodes, cross-sample aggregation, topological sort, platform filtering, optional nodes, and fallback dependencies
src/abi/tsv_mapping.py(~230 lines) — Declarative TSV column mapperTSVMapperclass: loadsparsers.yamldeclarationsgenerate_rows(): maps TSV columns to standard table columnsSupports multi-source fallback, positional columns, comment skipping, constants injection, and multi-file glob
5
pipeline_dag.yamlfiles updated — All 5 plugins now havecategory_dirs,scope(per_sample/cross_sample), andpathtemplates.metatranscriptomics/pipeline_dag.yamlwas created (previously missing).4
parsers.yamlfiles created — Declarative TSV mapping for amrfinderplus, mlst (wgs_bacteria), featurecounts (rnaseq + metaT).All 4 inline plugins wired with
use_dagopt-in switch andTSVMapperintegration inparse_outputs().
Design decisions¶
Python
str.format_map()not Jinja2: Path templates use the same mechanism asGenericCommandSkill’s command templates — no new dependency.use_dag=Falsedefault: The DAG planner is opt-in via config flag. All 26 tests that check step_id naming conventions were updated with explicituse_dag=False. Golden-trace tests (4/4 plugins) confirm DAG plans match hand-written plans exactly.Per-node platform filter removed: Individual nodes no longer declare
platforms: [illumina]— the top-levelplatformsdeclaration is sufficient. This avoids platform-mismatch issues when sample sheets use different platform labels (e.g.,rna_seqvsillumina).Optional nodes default to disabled: When a category is not in config, optional nodes are skipped — the user must explicitly enable them via
config.<category>.enable: true.
Verification¶
pytest tests/ -v --tb=short # 695 passed, 2 pre-existing failures
ruff check src/ tests/ # All checks passed
ruff format --check src/ tests/ # 204 files already formatted
mypy src/abi/ --ignore-missing-imports # 0 errors
Golden trace (DAG plan vs hand-written plan):
✓ rnaseq_expression: 5 steps, all tools match
✓ wgs_bacteria: 5 steps, all tools match
✓ amplicon_16s: 7 steps, all tools match
✓ metatranscriptomics: 3 steps, all tools match
Files changed¶
File |
Action |
|---|---|
|
New — 630 lines |
|
New — 230 lines |
|
New — 24 tests |
|
New — 19 tests |
|
New |
|
Updated |
|
New |
|
Updated |
|
Updated — source tree + Public SDK |
|
Updated — Public SDK table |
|
Updated — DAG-driven section |
Commits¶
b6d5582— refactor: streamline code formatting and improve readability across multiple files60b86fa— fix: CI configs + mypy errors + plugin contract validation90c2632— feat: production Docker CI/CD pipeline + docs landing auto-redirect + v1.3.2
2026-06-18 — Direction F: Plasmid DAG Migration to UniversalDAG¶
Context¶
Direction G (uv-ification) created UniversalDAG in dag_planner.py and used it
for all 4 inline plugins, but the metagenomic_plasmid plugin still used its own
PipelineDAG class (333 lines in _engine/pipeline_dag.py). This was a
duplication — UniversalDAG already had the core DAG operations that PipelineDAG
provided. The goal was to replace PipelineDAG with UniversalDAG in the plasmid
planner, eliminating the duplication.
What was done¶
UniversalDAGextended with 3 capabilities previously only inPipelineDAG:_evaluate_condition(): evaluatesenable_conditionblocks (value equality,not_emptycheck, dotted config path navigation) — supports 19 conditional optional nodes_category_explicitly_enabled(): detects whether a category is enabled in config (config.<category>.enable: true)active_node_ids()enhanced: optional nodes withoutenable_conditionare excluded by default (matching PipelineDAG behavior); platform filter applied at node level in addition to pipeline-levelresolve_dependencies(): ported fallback chain resolution — when optional dependencies are inactive, positionalfallback_depends[i]is tried
Plasmid
pipeline_dag.yamlupdated with 15category_dirsentries andscopeannotations on all 84 nodes (76 per_sample / 8 cross_sample).Plasmid planner (
_engine/planner.py) refactored:PipelineDAG.from_yaml()→UniversalDAG.from_yaml(PLUGIN_ROOT / "..." / "pipeline_dag.yaml")dag.category_for(nid) in _PROJECT_LEVEL_CATEGORIES→dag.scope_for(nid) == "cross_sample"dag.node(node_id)→dag.get_node(node_id)
Verification¶
pytest tests/ -v --tb=short # 697 passed, 7 pre-existing failures
ruff check src/ tests/ # All checks passed
ruff format --check src/ tests/ # 1 file reformatted (planner.py)
Active node parity verified across all 5 platforms (illumina, ont, pacbio_hifi, hybrid, assembly) — UniversalDAG and PipelineDAG produce identical active node sets.
What remains¶
PipelineDAGclass (333 lines) still exists in_engine/pipeline_dag.pybut is no longer used by the plasmid planner. It can be removed in a future cleanup.7 pre-existing test failures (5 benchmark/subprocess + 2 DAG/Nextflow exporter) are tracked separately.
Files changed¶
File |
Action |
|---|---|
|
Extended — |
|
Refactored — PipelineDAG → UniversalDAG |
|
Updated — 15 category_dirs, scope on 84 nodes |
Commits¶
d9c8485— fix: use step-level gate instead of job-level if for matrix filtering