Skip to content

[FEATURE] Complete the publish bundle loop (verifiable archive + run/pull consumers) #51

Description

@andrewbudge

The idea

publish already emits a manifest.json (format: "oxoflow-bundle-v1"), so the
scaffolding for shareable bundles exists — but the loop isn't closed, and a schema
mismatch makes it bundle nothing for most workflows today.

What I found in the code

  1. Wrong environment schema. publish.rs scans each rule for [rules.env].file
    and a conda_env field. Neither exists — the real schema is [rules.environment]
    (EnvironmentSpec, rule.rs:203) with conda / pixi / docker / singularity
    / venv. A rule using [rules.environment]\nconda = "envs/fastp.yaml" matches
    nothing, so publish collects zero env files and bundles none — silently.
  2. Output is a loose, uncompressed directory, and the manifest records env
    filenames with no checksums — nothing self-contained or verifiable to hand off.
  3. No consumer. Nothing reads manifest.json: run has no bundle path and there's
    no fetch. The manifest is write-only.

Proposed solution

Close the loop in three pieces:

  • Producer — read the real [rules.environment] schema; preserve source-relative
    paths (keep envs/); include bin/ (Nextflow auto-PATH convention); emit a single
    archive (.tar.zst) with a complete manifest: format version, entrypoint workflow,
    producing oxo-flow version, per-file SHA-256, and container image digests.
  • Consumerrun accepts a bundle: extract → verify every file against the
    manifest → execute, refusing on checksum mismatch.
  • Transport — a new oxo-flow pull <url> subcommand (there's no fetch path
    today) that resolves a remote bundle (GitHub release asset / raw URL /
    gh:owner/repo@ref), downloads it, verifies it against its manifest, and lands it
    locally ready to run.

End state: oxo-flow pull gh:user/repo@v1 && oxo-flow run <bundle> reproduces the
exact scripts + environments, checksum-verified. Because the bundle carries bin/,
this also makes it easy to share workflows that depend on custom helper scripts
the collaborator gets them automatically, instead of having to track down and place
loose scripts by hand.

Open questions:

  1. Env/container vendoring. conda/pixi: spec files, lock files, or fully packed
    (conda-pack)? Containers: record digests + pull-on-run, or vendor image tarballs?
    This is the repro-vs-size tradeoff , and I want your input before making any design decisions.
  2. Trust. pull + run is remote code execution. Checksums give integrity, not
    provenance — verify-before-run only, a confirmation gate, or signing later?
  3. v1 scope. Stop at local archive round-trip (A–C), or include remote fetch (D)?

Suggested phasing (each a small PR)

  • A. Fix the publish env-schema + path bugs — pure bugfix, independent of B–D.
  • B. Emit a single verifiable archive + complete manifest.
  • C. run consumes + verifies a local bundle.
  • D. Add the new pull subcommand for remote bundles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions