mod workflows

module workflows

Command bodies the CLI prints and the MCP tools return.

Each function is the one implementation of that command. The CLI prints the report. The MCP tool returns the same report, so the two surfaces cannot drift.

Variables

const STACK_EASYSTACK_OUT: &str

Default --out for stack easystack.

const STACK_ORDER_OUT: &str

Default --out for stack order.

const STACK_SECTIONS_UNFILED: &str

Default --unfiled for stack sections.

Functions

fn read_lock(path: &Path) -> Result<StackLock>

Read a stack lock. The path is named once, as --lock.

fn recipe_easyblock(name: Option<&str>, charmap: bool) -> Result<EasyblockReport>

Print the derived easyblock class, or the encoding table.

--charmap wins when both are set, which is what the CLI does.

fn recipe_hierarchy(export: bool) -> Result<JsonReport>

Print the known toolchain hierarchies.

--export is the spec a page embeds, the same role as recipe templates --export. The plain command is the lookup: fixture generations only. The GCC-family rule is synthetic, not one of those generations, so it stays on the export.

fn recipe_templates(name: Option<&str>, version: Option<&str>, export: bool) -> Result<JsonReport>

Print the template spec, or the values name and version resolve.

--export wins when a name is also present.

fn repro_summary(request: &ReproSummaryRequest) -> Result<ReproSummaryReport>

Read the score directory and, when asked, check the ratchet.

fn stack_easystack(request: &StackEasystackRequest) -> Result<StackEasystackReport>

Write the lock as an easystack, attaching each --option.

fn stack_easystack_eessi(request: &StackEasystackEessiRequest) -> Result<StackEasystackReport>

Write the lock as EESSI software-layer easystacks: one file per EasyBuild release and generation, 001-system for toolchain-free recipes, and accel/nvidia/ for CUDA builds.

fn stack_order(request: &StackOrderRequest) -> Result<StackOrderReport>

Order the builds roots need and write the files the CLI writes.

fn stack_sections(request: &StackSectionsRequest) -> Result<StackSectionsReport>

Regroup list under the section headers of from.

Structs and Unions

struct EasyblockReport

What recipe easyblock prints.

stdout: String

CLI stdout.

class_name: Option<String>

Derived class name, when a software name was given and --charmap was not.

charmap: Option<Value>

Encoding table, when --charmap was set.

struct JsonReport

Pretty JSON plus the trailing newline the CLI prints.

stdout: String

CLI stdout.

document: Value

The document stdout renders.

struct ReproSummaryReport

What repro summary prints.

body is the table or the JSON. ratchet_line is set when the run holds. violations is set when it does not. The CLI prints body, then either the ratchet line or the violations.

body: String

Table or JSON, including its trailing newline.

ratchet_line: Option<String>

ratchet: N cases hold at T plus a newline, when the run holds.

violations: Vec<String>

Violation text, when the run does not hold.

Implementations

impl ReproSummaryReport

Functions

fn stdout(&self) -> String

Stdout for a run that holds. A run with violations prints body and then the violations on stderr.

struct ReproSummaryRequest

Arguments for repro summary.

scores: PathBuf

Directory of per-case score artifacts.

ratchet: Option<PathBuf>

Committed allowance counts. Absent, the scoreboard is only printed.

json: bool

Print the collected scores as JSON instead of a table.

struct StackEasystackEessiRequest

Arguments for stack easystack --eessi-version.

lock: PathBuf

Stack lock JSON written by stack solve.

out_dir: PathBuf

Software-layer root the easystack files are written under.

eessi_version: String

EESSI version, 2026.06.

easybuild_version: String

EasyBuild release, 5.4.1.

generation: String

Toolchain generation, 2026.1.

options: Vec<String>

Per-easyconfig options, each <file.eb>:<option>=<value>.

struct StackEasystackReport

What stack easystack wrote and printed.

stdout: String

CLI stdout.

out: PathBuf

Path of the easystack.

entries: usize

YAML entries written.

packages: usize

Packages in the lock.

struct StackEasystackRequest

Arguments for stack easystack.

lock: PathBuf

Stack lock JSON written by stack solve.

out: PathBuf

Easystack YAML to write.

options: Vec<String>

Per-easyconfig options, each <file.eb>:<option>=<value>.

struct StackOrderHashes

Hash file stack order --hashes-out wrote.

path: PathBuf

Path of the hash file.

modules: usize

Modules listed in the file.

incomplete: usize

Modules whose recipe could not be read.

struct StackOrderReport

What stack order wrote and printed.

stdout: String

CLI stdout.

out: PathBuf

Path of the order file.

builds: usize

Builds in the order.

multiple: Vec<(String, Vec<String>)>

Names with more than one build, in name order.

easystack: Option<PathBuf>

Easystack path when one was written.

hashes: Option<StackOrderHashes>

Hash-file summary when one was written.

installed_modules: Option<usize>

Installed modules the walk stopped at, when --installed was given.

None when the command was not asked to read an installed list.

struct StackOrderRequest

Arguments for stack order.

easyconfigs: Vec<PathBuf>

Easyconfig trees. Later trees win on one identity.

roots: Vec<String>

Roots, each a package name or name==version.

out: PathBuf

Build-order file to write.

oldest: bool

Take the oldest admissible version of an unpinned requirement.

easystack_out: Option<PathBuf>

Easystack to write in build order.

hashes_out: Option<PathBuf>

Input-hash file to write.

filter_deps: Vec<String>

Dependencies to drop the way EasyBuild’s --filter-deps drops them.

Empty means read EASYBUILD_FILTER_DEPS.

installed: Vec<PathBuf>

Installed-module lists or Lmod trees. A module they name is a leaf.

struct StackSectionsReport

What stack sections wrote and printed.

stdout: String

CLI stdout.

out: PathBuf

Path of the grouped list.

sections: usize

Section headers written, including the unfiled header.

of: usize

Previous sections plus the unfiled header.

struct StackSectionsRequest

Arguments for stack sections.

list: PathBuf

The build list to regroup.

from: PathBuf

Previous build list whose headers decide where each entry goes.

unfiled: String

Header for entries no previous section names.

out: PathBuf

Grouped build list to write.