diff --git a/README.md b/README.md index ccdc9645..2558a458 100644 --- a/README.md +++ b/README.md @@ -423,6 +423,7 @@ recipe file tools. (easyblocks; `eb_build_test` only with `EB_STACK_ALLOW_BUILD=1`); - `eb_stack_solve`, `eb_stack_sbom`, `eb_stack_order`, `eb_stack_easystack`, `eb_stack_gap`, `eb_stack_provided`, + `eb_stack_buildenv`, `eb_stack_shadow`, `eb_stack_batch`, `eb_stack_shard`, `eb_stack_arch`, `eb_stack_files`, `eb_stack_generation`, `eb_stack_cuda_cc`, `eb_stack_known_failures`, `eb_stack_oom`, diff --git a/changelog.d/+stack-buildenv.feature.md b/changelog.d/+stack-buildenv.feature.md new file mode 100644 index 00000000..c288ae02 --- /dev/null +++ b/changelog.d/+stack-buildenv.feature.md @@ -0,0 +1 @@ +`eb-stack stack buildenv --build-list LIST [--installed MODULES]` names every toolchain a build list builds with and whether its `buildenv/default-` module is installed, listed or missing, with the easyconfig that adds it. `--strict` exits 1 while one is missing, so a pipeline can require a build environment for every toolchain it ships. diff --git a/docs/orgmode/explanation/sbom-blast-radius.org b/docs/orgmode/explanation/sbom-blast-radius.org index f55a6423..bc97b6a0 100644 --- a/docs/orgmode/explanation/sbom-blast-radius.org +++ b/docs/orgmode/explanation/sbom-blast-radius.org @@ -992,7 +992,7 @@ table. ~reverse=0~ again, for the same reason as the CMakeMake run. * The same document over MCP -The Model Context Protocol (MCP) catalog has 64 tools. ~tools/list~ prints +The Model Context Protocol (MCP) catalog has 65 tools. ~tools/list~ prints their names: #+begin_src bash @@ -1030,6 +1030,7 @@ eb_stack_easystack eb_package_latest eb_stack_gap eb_stack_provided +eb_stack_buildenv eb_stack_shadow eb_stack_batch eb_stack_capacity @@ -1068,7 +1069,7 @@ eb_ledger_verify_anchors eb_ledger_project #+end_src -That is 64 tools. +That is 65 tools. ~eb_stack_sbom~ writes the CycloneDX file ~stack sbom~ writes. Its ~tools/list~ description reads: "Emit CycloneDX from an existing stack lock, reading dependency edges and source checksums from the easyconfigs the lock names. With backport_list, also write the modules whose reach class justifies a backport." ~eb_stack_sbom~ reads the Cbc lock: diff --git a/docs/orgmode/reference/cli.org b/docs/orgmode/reference/cli.org index f42841d7..a4fbf921 100644 --- a/docs/orgmode/reference/cli.org +++ b/docs/orgmode/reference/cli.org @@ -50,6 +50,7 @@ Package commands take the toolchain as ~--toolchain name/version~, the spelling | ~stack sections~ | Regroup a Jenkins build list under a previous list's headers | | ~stack from-commit~ | Report ~from-commit~ pins already contained in an EasyBuild release | | ~stack provided~ | Fail when a build list names software a baseline already provides | +| ~stack buildenv~ | Name the toolchains of a build list that have no ~buildenv~ module | | ~stack shadow~ | Report a site-layer recipe that shadows an EESSI base-stack module | | ~stack arch~ | Refuse a plan an architecture cannot build, and flag entries never installed there | | ~stack files~ | Find the patch and source files an easystack's easyconfigs need that no tree has | @@ -803,6 +804,18 @@ route (~site-only.tsv~ for ~excluded~, ~bump.tsv~ for ~no-recipe~, and ~moved~ names the target EESSI version, ~site-only~ is an ~excluded~ name, and every other missing route is ~gone~ until it lands. +~stack buildenv~ reads each ~--build-list~ and collects the toolchain +of every line (~foss-2026.1~, ~iimpi-2026.1~, ~NVHPC-26.9~); system +recipes and comments are not counted. A toolchain is ~installed~ when an +~--installed~ listing (~Name/Version~ per line, a trailing ~.lua~ +dropped) has ~buildenv/default-~, ~listed~ when a line of +the lists builds ~buildenv-default-.eb~, and ~missing~ +otherwise, printed with the easyconfig to add. The last line is +~ of toolchains have no buildenv module~. ~--json~ +prints the rows with the list and line where each toolchain is first +used. The exit status is 0; ~--strict~ makes a missing build +environment exit 1. + ~stack provided~ reads each ~--build-list~ (a Jenkins list or one easyconfig path per line; ~#~ comments are skipped) and fails when a line's package name is one ~--installed~ or ~--baseline-lock~ already diff --git a/docs/orgmode/reference/mcp.org b/docs/orgmode/reference/mcp.org index 154ca1dc..1787a0cb 100644 --- a/docs/orgmode/reference/mcp.org +++ b/docs/orgmode/reference/mcp.org @@ -88,7 +88,7 @@ absolute path there. * Tools -The catalog has 64 tools. ~tools/list~ returns one tool for each CLI +The catalog has 65 tools. ~tools/list~ returns one tool for each CLI command in the table, and the recipe and easyblock tools that have no command. ~mcp~ publishes that catalog and has no tool of its own. Each command's tool calls the same runner as that command. The ~text~ field @@ -113,6 +113,7 @@ name in the schema ~tools/list~ returns. The | ~stack order~ | ~eb_stack_order~ | | ~stack gap~ | ~eb_stack_gap~ | | ~stack provided~ | ~eb_stack_provided~ | +| ~stack buildenv~ | ~eb_stack_buildenv~ | | ~stack shadow~ | ~eb_stack_shadow~ | | ~stack batch~ | ~eb_stack_batch~ | | ~stack shard~ | ~eb_stack_shard~ | diff --git a/llms-full.txt b/llms-full.txt index ab05fffb..883fabd6 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -6762,6 +6762,7 @@ Package commands take the toolchain as `--toolchain name/version`, the spelling | `stack sections` | Regroup a Jenkins build list under a previous list's headers | | `stack from-commit` | Report `from-commit` pins already contained in an EasyBuild release | | `stack provided` | Fail when a build list names software a baseline already provides | +| `stack buildenv` | Name the toolchains of a build list that have no `buildenv` module | | `stack shadow` | Report a site-layer recipe that shadows an EESSI base-stack module | | `stack arch` | Refuse a plan an architecture cannot build, and flag entries never installed there | | `stack files` | Find the patch and source files an easystack's easyconfigs need that no tree has | @@ -7514,6 +7515,18 @@ route (`site-only.tsv` for `excluded`, `bump.tsv` for `no-recipe`, and `moved` names the target EESSI version, `site-only` is an `excluded` name, and every other missing route is `gone` until it lands. +`stack buildenv` reads each `--build-list` and collects the toolchain +of every line (`foss-2026.1`, `iimpi-2026.1`, `NVHPC-26.9`); system +recipes and comments are not counted. A toolchain is `installed` when an +`--installed` listing (`Name/Version` per line, a trailing `.lua` +dropped) has `buildenv/default-`, `listed` when a line of +the lists builds `buildenv-default-.eb`, and `missing` +otherwise, printed with the easyconfig to add. The last line is +` of toolchains have no buildenv module`. `--json` +prints the rows with the list and line where each toolchain is first +used. The exit status is 0; `--strict` makes a missing build +environment exit 1. + `stack provided` reads each `--build-list` (a Jenkins list or one easyconfig path per line; `#` comments are skipped) and fails when a line's package name is one `--installed` or `--baseline-lock` already @@ -9484,7 +9497,7 @@ absolute path there. # Tools -The catalog has 64 tools. `tools/list` returns one tool for each CLI +The catalog has 65 tools. `tools/list` returns one tool for each CLI command in the table, and the recipe and easyblock tools that have no command. `mcp` publishes that catalog and has no tool of its own. Each command's tool calls the same runner as that command. The `text` field @@ -9509,6 +9522,7 @@ name in the schema `tools/list` returns. The | `stack order` | `eb_stack_order` | | `stack gap` | `eb_stack_gap` | | `stack provided` | `eb_stack_provided` | +| `stack buildenv` | `eb_stack_buildenv` | | `stack shadow` | `eb_stack_shadow` | | `stack batch` | `eb_stack_batch` | | `stack shard` | `eb_stack_shard` | @@ -13722,7 +13736,7 @@ table. `reverse=0` again, for the same reason as the CMakeMake run. # The same document over MCP -The Model Context Protocol (MCP) catalog has 64 tools. `tools/list` prints +The Model Context Protocol (MCP) catalog has 65 tools. `tools/list` prints their names: ```bash @@ -13760,6 +13774,7 @@ eb_stack_easystack eb_package_latest eb_stack_gap eb_stack_provided +eb_stack_buildenv eb_stack_shadow eb_stack_batch eb_stack_capacity @@ -13798,7 +13813,7 @@ eb_ledger_verify_anchors eb_ledger_project ``` -That is 64 tools. +That is 65 tools. `eb_stack_sbom` writes the CycloneDX file `stack sbom` writes. Its `tools/list` description reads: "Emit CycloneDX from an existing stack lock, reading dependency edges and source checksums from the easyconfigs the lock names. With backport_list, also write the modules whose reach class justifies a backport." `eb_stack_sbom` reads the Cbc lock: diff --git a/src/buildenv.rs b/src/buildenv.rs new file mode 100644 index 00000000..59089b8a --- /dev/null +++ b/src/buildenv.rs @@ -0,0 +1,329 @@ +//! Name the toolchains of a build list that have no `buildenv` module. +//! +//! A program compiled by hand against a stack links correctly only through a +//! build environment of its toolchain: `buildenv/default-` sets the +//! compiler variables and puts the RPATH wrappers first on `PATH`. A stack +//! gets one for the toolchains somebody thought of. `stack buildenv` reads the +//! build lists, collects every toolchain a line builds with, and reports the +//! ones that neither a line of the lists nor an installed-module listing +//! covers, with the line that would add each. + +use crate::cli_parse::usage; +use crate::easystack::filename_toolchain; +use crate::jenkins::parse_build_list; +use crate::shard::parse_lines; +use anyhow::{Context, Result}; +use serde::Serialize; +use std::collections::{BTreeMap, BTreeSet}; +use std::path::PathBuf; + +/// The EasyBuild name of the build environment recipes. +const BUILDENV: &str = "buildenv"; +/// The version every `buildenv` recipe of the community repository carries. +const BUILDENV_VERSION: &str = "default"; + +/// What `stack buildenv` reads. +#[derive(Debug, Clone, Default)] +pub struct BuildenvRequest { + /// Build lists, one easyconfig per line with optional `eb` flags. + pub build_lists: Vec, + /// Installed-module listings, `Name/Version` per line. + pub installed: Vec, + /// Print JSON. + pub json: bool, + /// Report a missing build environment as a failure. + pub strict: bool, +} + +/// Where the build environment of a toolchain comes from. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)] +#[serde(rename_all = "lowercase")] +pub enum Source { + /// An installed-module listing has the module. + Installed, + /// A line of the build lists builds it. + Listed, + /// Neither. + Missing, +} + +/// One toolchain of the build lists. +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +pub struct ToolchainRow { + /// Toolchain label, `foss-2026.1`. + pub toolchain: String, + /// Lines of the lists that build with it, the build environments excluded. + pub lines: usize, + /// The first such line, as `:`. + pub first: String, + /// The module of its build environment, `buildenv/default-foss-2026.1`. + pub module: String, + /// The easyconfig that builds the module. + pub easyconfig: String, + /// Where the build environment comes from. + pub source: Source, +} + +/// The report of one run. +#[derive(Debug, Clone, Serialize)] +pub struct BuildenvReport { + /// One row per toolchain, by name. + pub toolchains: Vec, + /// How many rows are `missing`. + pub missing: usize, + /// The printed form. + #[serde(skip)] + pub stdout: String, + #[serde(skip)] + strict: bool, +} + +impl BuildenvReport { + /// The message of a failed run: a toolchain lacks its build environment + /// and `--strict` was given. + pub fn failure(&self) -> Option { + (self.strict && self.missing > 0).then(|| { + format!( + "{} of {} toolchains have no buildenv module", + self.missing, + self.toolchains.len() + ) + }) + } +} + +/// The module names of one installed-module listing: the first word of each +/// line, without a trailing `.lua`, comments and blank lines left out. +fn installed_modules(text: &str) -> BTreeSet { + text.lines() + .filter_map(|line| line.split('#').next()?.split_whitespace().next()) + .map(|word| word.strip_suffix(".lua").unwrap_or(word).to_string()) + .collect() +} + +/// Run `stack buildenv`. +pub fn run_buildenv(args: &BuildenvRequest) -> Result { + if args.build_lists.is_empty() { + return Err(usage("stack buildenv needs --build-list")); + } + let mut installed = BTreeSet::new(); + for path in &args.installed { + let text = std::fs::read_to_string(path) + .with_context(|| format!("read installed-module listing {}", path.display()))?; + installed.extend(installed_modules(&text)); + } + // toolchain -> (lines, first line) + let mut used: BTreeMap = BTreeMap::new(); + let mut listed = BTreeSet::new(); + for path in &args.build_lists { + let text = std::fs::read_to_string(path) + .with_context(|| format!("read build list {}", path.display()))?; + for shard_line in parse_lines(&text) { + let Some(line) = parse_build_list(&shard_line.text).into_iter().next() else { + continue; + }; + let Some(found) = filename_toolchain(&line.file) else { + continue; + }; + if found.name == BUILDENV { + listed.insert(found.toolchain); + continue; + } + let at = format!("{}:{}", path.display(), shard_line.number); + used.entry(found.toolchain) + .and_modify(|(count, _)| *count += 1) + .or_insert((1, at)); + } + } + let toolchains: Vec = used + .into_iter() + .map(|(toolchain, (lines, first))| { + let module = format!("{BUILDENV}/{BUILDENV_VERSION}-{toolchain}"); + let source = if installed.contains(&module) { + Source::Installed + } else if listed.contains(&toolchain) { + Source::Listed + } else { + Source::Missing + }; + ToolchainRow { + easyconfig: format!("{BUILDENV}-{BUILDENV_VERSION}-{toolchain}.eb"), + toolchain, + lines, + first, + module, + source, + } + }) + .collect(); + let missing = toolchains + .iter() + .filter(|row| row.source == Source::Missing) + .count(); + let mut report = BuildenvReport { + toolchains, + missing, + stdout: String::new(), + strict: args.strict, + }; + report.stdout = if args.json { + let mut text = serde_json::to_string_pretty(&report)?; + text.push('\n'); + text + } else { + render_text(&report) + }; + Ok(report) +} + +fn render_text(report: &BuildenvReport) -> String { + let width = report + .toolchains + .iter() + .map(|row| row.toolchain.len()) + .max() + .unwrap_or(0); + let mut out = String::new(); + for row in &report.toolchains { + let state = match row.source { + Source::Installed => format!("installed {}", row.module), + Source::Listed => format!("listed {}", row.easyconfig), + Source::Missing => format!("missing add {}", row.easyconfig), + }; + out.push_str(&format!( + "{:4} {} {}\n", + row.toolchain, + row.lines, + if row.lines == 1 { "line " } else { "lines" }, + state + )); + } + out.push_str(&format!( + "{} of {} toolchains have no buildenv module\n", + report.missing, + report.toolchains.len() + )); + out +} + +#[cfg(test)] +mod tests { + use super::*; + + fn run(list: &str, installed: Option<&str>, json: bool, strict: bool) -> BuildenvReport { + let dir = tempfile::tempdir().unwrap(); + let list_path = dir.path().join("site.list"); + std::fs::write(&list_path, list).unwrap(); + let mut request = BuildenvRequest { + build_lists: vec![list_path], + json, + strict, + ..BuildenvRequest::default() + }; + if let Some(text) = installed { + let path = dir.path().join("installed.txt"); + std::fs::write(&path, text).unwrap(); + request.installed.push(path); + } + run_buildenv(&request).unwrap() + } + + const LIST: &str = "\ +# a comment +FFTW-3.3.10-GCC-15.2.0.eb +HDF5-1.14.6-gompi-2026.1.eb --include-systems=snel-zen4 +HDF5-1.14.6-iimpi-2026.1.eb +VASP6-6.6.1-NVHPC-26.9-CUDA-13.3.0-ACC.eb +QuantumESPRESSO-7.5-foss-2026.1.eb +ELPA-2025.06.001-foss-2026.1.eb +buildenv-default-GCC-15.2.0.eb --from-commit=0123456789abcdef +EasyBuild-5.4.2.eb +"; + + fn sources(report: &BuildenvReport) -> Vec<(&str, Source, usize)> { + report + .toolchains + .iter() + .map(|row| (row.toolchain.as_str(), row.source, row.lines)) + .collect() + } + + #[test] + fn each_toolchain_is_installed_listed_or_missing() { + let report = run( + LIST, + Some("buildenv/default-foss-2026.1\nGCC/15.2.0\n"), + false, + false, + ); + assert_eq!( + sources(&report), + [ + ("GCC-15.2.0", Source::Listed, 1), + ("NVHPC-26.9", Source::Missing, 1), + ("foss-2026.1", Source::Installed, 2), + ("gompi-2026.1", Source::Missing, 1), + ("iimpi-2026.1", Source::Missing, 1), + ] + ); + assert_eq!(report.missing, 3); + assert!(report + .stdout + .contains("missing add buildenv-default-NVHPC-26.9.eb")); + assert!(report + .stdout + .ends_with("3 of 5 toolchains have no buildenv module\n")); + assert!(report.failure().is_none()); + } + + #[test] + fn a_system_recipe_and_a_build_environment_are_not_users_of_a_toolchain() { + let report = run( + "EasyBuild-5.4.2.eb\nbuildenv-default-foss-2026.1.eb\n", + None, + false, + true, + ); + assert!(report.toolchains.is_empty()); + assert!(report.failure().is_none()); + } + + #[test] + fn strict_fails_only_while_a_build_environment_is_missing() { + let missing = run(LIST, None, false, true); + assert_eq!( + missing.failure().as_deref(), + Some("4 of 5 toolchains have no buildenv module") + ); + let covered = run( + "FFTW-3.3.10-GCC-15.2.0.eb\n", + Some("buildenv/default-GCC-15.2.0.lua # from a directory listing\n"), + false, + true, + ); + assert_eq!(sources(&covered), [("GCC-15.2.0", Source::Installed, 1)]); + assert!(covered.failure().is_none()); + } + + #[test] + fn json_carries_the_line_to_add_and_where_the_toolchain_is_first_used() { + let report = run(LIST, None, true, false); + let value: serde_json::Value = serde_json::from_str(&report.stdout).unwrap(); + let rows = value["toolchains"].as_array().unwrap(); + let nvhpc = rows + .iter() + .find(|row| row["toolchain"] == "NVHPC-26.9") + .unwrap(); + assert_eq!(nvhpc["source"], "missing"); + assert_eq!(nvhpc["easyconfig"], "buildenv-default-NVHPC-26.9.eb"); + assert_eq!(nvhpc["module"], "buildenv/default-NVHPC-26.9"); + assert!(nvhpc["first"].as_str().unwrap().ends_with("site.list:5")); + assert_eq!(value["missing"], 4); + } + + #[test] + fn no_build_list_is_a_usage_error() { + let error = run_buildenv(&BuildenvRequest::default()).unwrap_err(); + assert!(error.to_string().contains("--build-list")); + } +} diff --git a/src/lib.rs b/src/lib.rs index 52323cda..f8b34152 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,6 +10,7 @@ pub mod batch; pub mod bot_result; pub mod build_backend; pub mod build_order; +pub mod buildenv; pub mod bump_companion; pub mod campaign; pub mod cargo; diff --git a/src/main.rs b/src/main.rs index dd1280df..48fee93d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1669,6 +1669,34 @@ enum StackCommand { #[arg(long)] out_dir: PathBuf, }, + /// Name the toolchains of a build list that have no `buildenv` module. + /// + /// A program compiled by hand links correctly only through the build + /// environment of its toolchain. Every toolchain a line builds with is + /// reported as installed (an `--installed` listing has + /// `buildenv/default-`), listed (a line of the lists builds + /// it) or missing, with the easyconfig that would add it. System recipes + /// and comment lines are not counted. Exits 0; with `--strict`, exits 1 + /// while a toolchain is missing its build environment. + #[command( + after_long_help = "Examples:\n eb-stack stack buildenv --build-list site.list --installed modules.txt\n eb-stack stack buildenv --build-list site.list --strict --json" + )] + Buildenv { + /// Build list, one easyconfig per line, with optional `eb` flags. + /// Repeatable. + #[arg(long = "build-list", required = true)] + build_lists: Vec, + /// Installed modules, `Name/Version` per line; a trailing `.lua` + /// is dropped, so a directory listing works. Repeatable. + #[arg(long = "installed")] + installed: Vec, + /// Print the report as JSON. + #[arg(long)] + json: bool, + /// Exit 1 while a toolchain has no build environment. + #[arg(long)] + strict: bool, + }, /// Fail when a build list names software a baseline already provides. /// /// The comparison is the package name, ignoring version and toolchain, @@ -3716,6 +3744,24 @@ fn run_stack(command: StackCommand) -> Result<()> { } Ok(()) } + StackCommand::Buildenv { + build_lists, + installed, + json, + strict, + } => { + let report = eb_stack::buildenv::run_buildenv(&eb_stack::buildenv::BuildenvRequest { + build_lists, + installed, + json, + strict, + })?; + print!("{}", report.stdout); + if let Some(message) = report.failure() { + bail!(message); + } + Ok(()) + } StackCommand::Shadow { easyconfigs, base, diff --git a/src/mcp.rs b/src/mcp.rs index 70438531..fc05e035 100644 --- a/src/mcp.rs +++ b/src/mcp.rs @@ -421,6 +421,16 @@ fn tool_catalog() -> Vec { ("strict", "boolean"), ], ), + tool_with_optional( + "eb_stack_buildenv", + "Name the toolchains of a build list that have no buildenv module, as `stack buildenv` does. Each toolchain a line builds with is installed (an installed listing has buildenv/default-), listed (a line builds it) or missing, with the easyconfig that adds it. strict fails while one is missing.", + &[("build_list", "array_min1")], + &[ + ("installed", "array"), + ("json", "boolean"), + ("strict", "boolean"), + ], + ), tool_with_optional( "eb_stack_shadow", "Report site-layer recipes that shadow a module the EESSI base stack already provides, as `stack shadow` does. base is an Lmod tree or a module listing, loaded the same way `stack gap` loads installed. A recipe whose software version is already in that inventory is same; another version of a base name is different; a base name with no recorded version is unversioned. A name the base does not have is not reported. A shadow, or a recipe that does not parse, is a tool error.", @@ -979,6 +989,7 @@ fn call_tool(name: &str, arguments: &Value) -> Result { "eb_package_latest" => package_latest_tool(arguments), "eb_stack_gap" => stack_gap_tool(arguments), "eb_stack_provided" => stack_provided_tool(arguments), + "eb_stack_buildenv" => stack_buildenv_tool(arguments), "eb_stack_shadow" => stack_shadow_tool(arguments), "eb_stack_batch" => stack_batch_tool(arguments), "eb_stack_shard" => stack_shard_tool(arguments), @@ -3307,6 +3318,24 @@ fn stack_shadow_tool(arguments: &Value) -> Result { })) } +fn stack_buildenv_tool(arguments: &Value) -> Result { + let report = crate::buildenv::run_buildenv(&crate::buildenv::BuildenvRequest { + build_lists: path_array(arguments, "build_list")?, + installed: optional_paths(arguments, "installed")?, + json: optional_bool(arguments, "json"), + strict: optional_bool(arguments, "strict"), + }) + .map_err(workflow_error)?; + if let Some(message) = report.failure() { + return Err(format!("{}\n{message}", report.stdout)); + } + Ok(json!({ + "text": report.stdout, + "toolchains": report.toolchains, + "missing": report.missing, + })) +} + fn stack_provided_tool(arguments: &Value) -> Result { let json = optional_bool(arguments, "json"); let format = match optional_string(arguments, "format") { diff --git a/tests/mcp_stdio.rs b/tests/mcp_stdio.rs index 66c0890a..126e7c2c 100644 --- a/tests/mcp_stdio.rs +++ b/tests/mcp_stdio.rs @@ -329,6 +329,7 @@ fn mcp_stdio_catalog_lists_the_overlap_and_reach_tools() { "eb_package_latest", "eb_stack_gap", "eb_stack_provided", + "eb_stack_buildenv", "eb_stack_shadow", "eb_stack_batch", "eb_stack_shard", @@ -357,7 +358,7 @@ fn mcp_stdio_catalog_lists_the_overlap_and_reach_tools() { ] { assert!(names.contains(&expected), "missing {expected}: {names:?}"); } - assert_eq!(names.len(), 64, "{names:?}"); + assert_eq!(names.len(), 65, "{names:?}"); } fn software_layer_prs() -> Vec { diff --git a/tests/mcp_v1.rs b/tests/mcp_v1.rs index 498c25ba..367b4841 100644 --- a/tests/mcp_v1.rs +++ b/tests/mcp_v1.rs @@ -145,6 +145,7 @@ fn mcp_catalog_matches_the_version_one_workflows() { "eb_package_latest", "eb_stack_gap", "eb_stack_provided", + "eb_stack_buildenv", "eb_stack_shadow", "eb_stack_batch", "eb_stack_shard", @@ -185,7 +186,7 @@ fn mcp_catalog_matches_the_version_one_workflows() { ] { assert!(names.contains(&expected), "missing {expected}: {names:?}"); } - assert_eq!(names.len(), 64, "unexpected MCP tools: {names:?}"); + assert_eq!(names.len(), 65, "unexpected MCP tools: {names:?}"); let inspect = response["result"]["tools"] .as_array() @@ -2580,6 +2581,7 @@ fn mcp_schemas_cover_cli_flags() { ("eb_stack_from_commit", "stack from-commit"), ("eb_stack_gap", "stack gap"), ("eb_stack_provided", "stack provided"), + ("eb_stack_buildenv", "stack buildenv"), ("eb_stack_shadow", "stack shadow"), ("eb_stack_batch", "stack batch"), ("eb_stack_shard", "stack shard"), @@ -3857,6 +3859,7 @@ fn every_cli_subcommand_has_an_mcp_tool() { ("eb_stack_from_commit", &["stack", "from-commit"]), ("eb_stack_gap", &["stack", "gap"]), ("eb_stack_provided", &["stack", "provided"]), + ("eb_stack_buildenv", &["stack", "buildenv"]), ("eb_stack_shadow", &["stack", "shadow"]), ("eb_stack_batch", &["stack", "batch"]), ("eb_stack_shard", &["stack", "shard"]),