Repository navigation
fix(plugins): read a tool when a step runs it - #608
Conversation
b4cd38b to
54293cf
Compare
darkclad
left a comment
There was a problem hiding this comment.
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.
c588492 to
bb8c3cc
Compare
What
wic001naming the file.utils.strip_terminal_codes), the inputs an expression reads (lang.cwl.inputs_read, so output-target detection now also seesinputs["x"]), and positional step keys (parser.step_key).numpy.polyfitreplaces a hand-written solver;target=is typed byTargetName; oneFASTbudget.Why
One unreadable
.cwlon a search path stopped every compile, and regexes restated rules that already had a home.