Conversation
Nothing passed an operation's declared output flag. The command was built from parameters and inputs only, and output_def was read solely for the name, mode and types -- so a tool whose output is a file was never asked to produce one, and the check could only ever report the file missing. That is 45 of the 186 declared outputs across the catalogue. The shape follows what the frontend already does when it builds an invocation: a flag and a target, or a bare target when the flag is the empty string, with the declared filename used when the recipe gives one. Where no flag is declared there is still no way to say where the output should go, and those are left alone. Discovery now looks for the name the tool was told to write before falling back to matching a file whose stem happens to equal the output name, which is all that was possible before. Effect on the recipes that can be built without Docker: none turns red. tn93 now receives -o out.txt and exits 1, which is a better answer than before -- it is rejecting its input rather than never having been asked -- and the reason is that the example FASTA holds one sequence while pairwise distances need at least two. fermi-lite is unchanged because its output is stdout, and it produces nothing because a single 98 base read does not assemble. Both are limits of the example inputs rather than of the tools, and neither is addressed here.
A filename with no flag was appended as soon as it was built, so it landed ahead of every flag that followed. A getopt-style parser stops scanning at the first non-option, so those flags were never seen: tn93 given "input_in.txt -o out.txt" printed its usage and exited 1, while "-o out.txt input_in.txt" runs and writes its output. Flagless arguments are held back and appended last now, which is what the frontend already does when it builds an invocation. This is what the missing output flags were really hiding. With both changes tn93 goes from "Output file not found" to producing a correct result -- a header row and no pairs, which is right for a single sequence -- and no warnings. Of the five recipes that can be built without Docker, four now run clean. fermi-lite still reports empty output: it writes to stdout, so no output flag applies, and a single 98 base read does not assemble.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
Nothing ever passed an operation's declared output flag. The command was built from parameters and inputs only;
output_defwas read solely for the name, mode and types. So a tool whose output is a file was never asked to produce one, and the check could only ever report it missing.That is 45 of the 186 declared outputs in the catalogue — every one of them structurally unable to pass or fail on its actual result.
The change
The shape follows what the frontend already does when it builds an invocation: a flag and a target, or a bare target when the flag is the empty string, using the recipe's
filenamewhen it declares one. Where no flag is declared there is still no way to say where output should go, so those are left alone.Discovery now looks for the name the tool was told to write, before falling back to matching a file whose stem happens to equal the output name — which is all that was possible before.
Argument order was the bigger half
Chasing why
tn93still failed turned up a second fault, and it was the one actually doing the damage. A filename with no flag was appended as soon as it was built, so it landed ahead of every flag that followed. A getopt-style parser stops scanning at the first non-option, so those flags were never seen:Flagless arguments are held back and appended last now, matching what the frontend already does.
Effect on real recipes
Built and tested with the hub's own pipeline on the five wasm-only emscripten recipes:
edlib,abpoa,cgrangestn93Output file not foundID1,ID2,Distance, exit 0fermi-liteEmpty outputstdout, no flag appliesNothing turns red, and
tn93goes from a warning to a correct result: a header row with no pairs, which is right for a single sequence.One thing worth recording, because it contradicts what I assumed: the richer fixture is the broken one. Handed the
Multi-FASTAexample instead,tn93exits 1 and writes nothing — its two records are 99 bp and 100 bp, and tn93 requires an alignment. So "give the fixtures more content" is not the fix it looks like; a multi-record FASTA is not an alignment.What this does not fix
Both remaining warnings are limits of the example inputs, not of the tools:
fermi-liteis an assembler given a single 98 base readAnd the pass criterion is still lenient — empty output detects as
TEXTwhereTEXTis accepted (67 outputs), and a missing file is only a warning. Making either fail would turn recipes red for reasons the fixtures cause rather than the recipes, so it belongs after the fixtures improve. That is the natural next change, and deliberately not this one.Merge order
Stacked on #32. Both are independent of
sbom-implementation, which does not touchhub/tests/.