cwl-test-to-galaxy-test-plan
Turn the CWL summary’s discovered test cases into a reviewable Galaxy test plan. Preserve each case’s job-file and expected-output provenance so implement-galaxy-workflow-test can author the final test against the concrete Galaxy workflow. The plan records assertion intent and open mappings, not a tests-format test file.
For each tests[] case, open its job_path when available. Map the declared CWL input values onto the Galaxy inputs the summary and translation imply. Keep File locations, Directory contents, secondaryFiles, arrays, and collection element identifiers visible where they affect the fixture or its Galaxy shape. Record the source path or URL and any known checksum. If a job file is missing or an input cannot be mapped, leave the fixture or label unresolved with a reason. A job_path in the summary is a pointer to inputs, not the inputs themselves.
Translate each recorded expected output into a Galaxy output to check. Use the CWL output id and any supplied path, URL, checksum, or assertion as evidence for an appropriate tests-format assertion family. Record what the assertion should establish, its expected value and tolerance when supported, and the source of that expectation. Do not infer a passing value from an output name or turn a checksum into a Galaxy assertion without confirming that the translated output can be compared that way. For collections and sidecars, identify the element or file that the check actually addresses.
Bind input and output labels to a concrete Galaxy draft only if one is available to inspect. Otherwise mark inferred labels as assumed or unresolved, set workflow.label_source accordingly, and record the mapping that implement-galaxy-workflow-test must confirm. Set source.derived_from: test-evidence for a plan based on discovered CWL tests, and evidence: test-evidence only for assertions supported by those tests. If a useful Galaxy check must instead be inferred from workflow intent, mark that assertion evidence: intent and explain its lower confidence.
Record unavailable fixtures, expression-dependent shapes, untranslatable assertions, and missing label or datatype mappings in unresolved[] or warnings[] as appropriate. Put outputs deliberately left unasserted in omissions[] with a reason. If the summary has no usable test case, report that coverage gap rather than presenting a fabricated case as translated evidence. Validate the emitted galaxy-test-plan.yml with foundry validate-galaxy-workflow-test-plan before handing it to implement-galaxy-workflow-test.