Repository navigation
fix(workflows): accept object-shaped manifest inputs in preflight - #443
Merged
Merged
Conversation
A manifest may declare `inputs` as slot objects ({ type, label, required })
instead of type names. The preflight compared those objects against output
type strings, so every connection looked missing and the error named the
type "text" whatever it was.
Slot objects are now reduced to their type when the manifest is parsed,
with their labels and optional flags carried as inputLabels and
inputsRequired. Preflight only requires types with at least one required
slot, and names unknown types as declared.
Fixes #241
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.
Summary
A manifest may declare
inputsas slot objects instead of type names:The workflow preflight compared those objects against output type strings, so every connection looked missing and the error named the type "text" whatever it was ("Image to Image needs an incoming text connection").
normalizeNodeInputsinextension-install-utils.ts): slot objects are reduced to theirtypewhen the manifest is parsed, both at install validation and when listing extensions. Their labels becomeinputLabels(explicitinput_labelsstill win) and optional slots are carried asinputsRequired. Every downstream consumer (node handles, edges, runner) keeps receiving type names. An entry with notypeis rejected with a clear manifest error.assignSlotFilePaths), so an optional slot left empty runs fine.Fixes #241
Test plan
extension-install-utils.test.mjs(normalization, labels, optionality, rejection, scene-shape check on object slots) andpreflight.test.mjs(optional slots, type naming). The two preflight tests fail ondevand pass here.npm run test:node: 0 failurestscreports no errors in touched files (pre-existing errors ondevunchanged)inputs(e.g. modly-Codex-image-extension), wire an image into it, and check the workflow runs and the slot labels show