Skip to content

fix(plugins): read a tool when a step runs it - #608

Merged
vjaganat90 merged 4 commits into
PolusAI:masterfrom
vjaganat90:fix/lazy-tool-discovery
Nov 17, 2026
Merged

vjaganat90 merged 4 commits into
PolusAI:masterfrom
vjaganat90:fix/lazy-tool-discovery

Conversation

@vjaganat90

@vjaganat90 vjaganat90 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What

  • Tool discovery indexes the names and paths of the tools on the search paths and reads none of them; a step reads its tool when it runs it, so a tool file that is not YAML, not text, or not a tool stops only the workflow whose step runs it, with wic001 naming the file.
  • Each rule that two or three private regexes stated is read in one place: terminal codes (utils.strip_terminal_codes), the inputs an expression reads (lang.cwl.inputs_read, so output-target detection now also sees inputs["x"]), and positional step keys (parser.step_key).
  • Tests assert what they claim, in fewer lines: exit codes are compared, not searched for in text; the job-value property fails when every value is refused; numpy.polyfit replaces a hand-written solver; target= is typed by TargetName; one FAST budget.

Why
One unreadable .cwl on a search path stopped every compile, and regexes restated rules that already had a home.

@darkclad darkclad left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Discovery now indexes only names and paths, and Tool.cwl reads the file when a step first needs it, so an unreadable tool is refused at the step that runs it, with wic001, the file, and the step named. Run from the CLI, a workflow beside a broken .cwl compiles, the step that runs it is refused, and a packed $graph with no main now fails as wic013 at its own step instead of at every compile. Gating InsertionCatalog.from_registry on insert_steps_automatically keeps the one registry-wide read off by default. inputs_read, step_key and strip_terminal_codes match the regexes they replace, and the removed hyphen in the old runtime pattern is right, since inputs.a-b is subtraction. Reviewed as its own four commits on top of #605. The core suite fails the same 64 tests at head and at base (f85eb6c8), all environmental on Windows, and the new test passes. mypy is clean on the changed files.

Discovery read and parsed every tool file, so one unreadable .cwl on a search path stopped every compile. It now indexes names and paths; a tool is read at the step that runs it, and refused there with its file named.
Terminal codes, the inputs an expression reads and positional step keys each had two or three
private regexes; each is now read in one place. Output-target detection now sees inputs["x"].
Exit codes are compared, not searched for in text; a stderr check no longer passes on an empty
pattern; diagnostics drop their place by having none, not by a regex.
numpy fits the scaling curve; target= is typed by TargetName, so one check of the table is left; one
FAST budget; the job-value property fails when every value is refused; quiet is checked once per door.
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.

2 participants