Repository navigation
Run workflows as programs with jackdaw::runner; move jackdaw run onto it - #52
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
jackdaw::runner(no new crate): aRunnerwraps anEngineand 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::statusreports where a run is.What it shows is a
Reporter:Headless,Lines(one line per step;.total,.describe,.outputs),Json(one object per event) andTerminal(progress bar, durations, replayed steps, shared display for parallel runs).Env::detect().kind()picks one from where the program runs;RunnerArgsgives clap programs--quiet --json --plain --restart.terminal(indicatif, console) andcli(clap) are optional features; the default build gains no dependency. Neither builds on wasm (compile error naming the feature).guide::runner.jackdaw runnow 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.rskeeps only what events can't carry (script output, listener startup, and with--debugtask input/context/cache).Library changes the CLI needed for YAML
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_withon an existing YAML id continues it (running) or returns its stored outcome (ended), as for Rust workflows; it used to fail with "already exists".purgeworks 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).misuse_exhaustive_event.stderr) updated: the new dependencies make rustc printjackdaw::api::Eventin full.Known limits
RunOptions::timeoutis for Rust workflows; YAML has its owntimeout:(the CLI keeps its 300 s wait).--debug).🤖 Generated with Claude Code