8000 Run workflows as programs with jackdaw::runner; move jackdaw run onto it by arminhammer · Pull Request #52 · arminhammer/jackdaw · GitHub
[go: up one dir, main page]

Skip to content

Run workflows as programs with jackdaw::runner; move jackdaw run onto it - #52

Merged
arminhammer merged 2 commits into
mainfrom
runner-cli
Nov 6, 2026
Merged

arminhammer merged 2 commits into
mainfrom
runner-cli

Conversation

@arminhammer
Copy link
Copy Markdown
Owner

What

jackdaw::runner (no new crate): a Runner wraps an Engine and does what programs built on jackdaw keep rewriting. Runner::run(workflow, input, RunOptions::new(id)) starts the run, continues one a crash stopped, returns the stored output of one that finished, and refuses one that was started with other input or ended in failure unless asked to restart. Runner::status reports where a run is.

What it shows is a Reporter: Headless, Lines (one line per step; .total, .describe, .outputs), Json (one object per event) and Terminal (progress bar, durations, replayed steps, shared display for parallel runs). Env::detect().kind() picks one from where the program runs; RunnerArgs gives clap programs --quiet --json --plain --restart.

  • terminal (indicatif, console) and cli (clap) are optional features; the default build gains no dependency. Neither builds on wasm (compile error naming the feature).
  • Guide chapter guide::runner.

jackdaw run now uses it, from the run's events instead of tracing. Result on stdout, progress on stderr; --quiet, --json, --plain, --id, --restart; failures go to stderr (they went to stdout). Parallel runs share one display. trace.rs keeps only what events can't carry (script output, listener startup, and with --debug task input/context/cache).

Library changes the CLI needed for YAML

  • A YAML run's live events now include its tasks (TaskStarted/Completed/Faulted/Retried), read from the store every 100 ms; steps done before a resume are marked replayed. Before, only start and end were published.
  • execute_with on an existing YAML id continues it (running) or returns its stored outcome (ended), as for Rust workflows; it used to fail with "already exists". purge works for finished YAML instances.
  • InstanceDetails::input.

Version 0.2.3 (the Unreleased changelog section, which also held the wasm entries from #51, becomes 0.2.3).

Tests (BDD, red first)

  • tests/lib/operations/runner.feature: 26 scenarios (lifecycle, reporters, terminal, timeout, shared display).
  • tests/lib/interop/yaml_workflows.feature: YAML task events, attach to a finished YAML id, purge.
  • jackdaw-cli/tests/features/run.feature: 11 scenarios that run the real binary (stdout/stderr split, quiet, json, debug, failure, --id/--restart, parallel, script output).
  • Full suite passes; clippy clean on all features, no features and wasm32-wasip2; rustdoc clean. One trybuild snapshot (misuse_exhaustive_event.stderr) updated: the new dependencies make rustc print jackdaw::api::Event in full.

Known limits

  • A YAML run's input isn't stored with the instance, so the runner can't refuse a changed input for YAML.
  • RunOptions::timeout is for Rust workflows; YAML has its own timeout: (the CLI keeps its 300 s wait).
  • Replay marking for resumed YAML runs has no test (needs a mid-task crash of a YAML run).
  • Task input, context and cache hits remain tracing-only (--debug).

🤖 Generated with Claude Code

arminhammer and others added 2 commits November 5, 2026 21:11
…w run onto it

Add `jackdaw::runner`: a `Runner` that starts, resumes or restarts a run by id and
shows its progress through a `Reporter` (`Headless`, `Lines`, `Json`, and with the
`terminal` feature `Terminal`). The `cli` feature adds `RunnerArgs` for clap programs.
indicatif and clap are optional; the default build gains no dependency.

`jackdaw run` now reports from the run's events: a progress bar on a terminal, plain
lines when piped, the result on standard output. New flags: --quiet, --json, --plain,
--id, --restart. Failures go to standard error.

Library changes the CLI needed for YAML workflows:
- a YAML run's events include its tasks as they happen, with steps done before a
  resume marked as replayed
- execute_with on the id of an existing YAML instance continues it or returns its
  stored outcome, and purge works for finished YAML instances
- InstanceDetails::input

Bump to 0.2.3.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…k to feature-gated items in docs

The image build's dependency layer only created the dummy test files for jackdaw; the
jackdaw-cli manifest now declares a [[test]] target too. The docs job failed on
intra-doc links to Terminal and RunnerArgs, which exist only with their features.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@arminhammer
arminhammer merged commit 66418d2 into main Nov 6, 2026
19 checks passed
@arminhammer
arminhammer deleted the runner-cli branch November 6, 2026 02:56
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

0