Repository navigation
feat(schema): requires.inputs, chart values a variant leaves to the deploy - #103
Merged
Merged
Conversation
…eploy A variant declares the chart values it needs and cannot know (a Mooncake master address, say) as requires.inputs: path, title, type, pattern and an example. values must leave each input unset; validate:helm renders with the example. swiss answers them from the site profile's features.inputs, and the deployer can override any of them. docs/requires-design.md has the design and the rollout order: swiss and the console ship first, since an older swissd refuses the unknown key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
This was referenced Nov 9, 2026
aceforeverd
marked this pull request as ready for review
November 10, 2026 02:26
A value values gives an input's path is now its default, checked against the input's type and pattern, rather than refused. "" or null is no default, and such an input stays required. validate:helm renders the example only where there is no default. So a variant can declare an input over the value of the cluster it was tuned on, without dropping it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
…nswer "" and null are no longer read as "no default": a value values gives an input's path is its default and must be a valid answer, so a blank placeholder fails the input's type or pattern. Without a default, the site or the deploy answers it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
requires.inputs[].default is the answer swiss selects when the site profile gives none, and puts in the derived layer with the site's answers. It must be of the input's type and match its pattern. values again leaves every input's path alone: the answer lives in the derived layer, so a value there would be dead. validate:helm renders each input with its default, else its example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
A require is an abstraction swiss interprets and checks against the cluster; an input names one chart path and swiss only relays its answer. So inputs moves to the variant's top level, in v1 and v2 alike. The v2 index no longer carries them, since nothing lists or picks a variant by them, and the catalog web's index types drop Input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
It is the dotted key helm --set takes, so key rather than path.
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.
A generic
inputsfields to declare what's missing in this model variant but required at deploy time. This is the part of modelsphere/modelsphere#57Both
requiresandinputsare cluster-specific values, but slightly different on how they works:.requires: high-level abstraction, helm chart non-aware, swiss fill the gap.inputs: much low level, no abstraction, helm chart aware, swiss just fillAdds
inputsto the variant schema, besiderequires: chart values every deploy must answer, such as a Mooncake master address. Each input has a key (the chart value's dotted key, ashelm --settakes it), a title, type, pattern, example and an optional default.They're separate from
requiresbecause swiss treats them differently. A require is an abstraction swiss interprets and checks against the cluster. An input names one chart value by its key, and swiss only relays its answer.Swiss puts the answer in the derived layer: the site profile's
inputs, else the input'sdefault. The deployer's override goes over it. Every input is required, so swiss refuses a plan that ends without a valid answer for one.inputssits at the variant's top level, in v1 version files and v2 variant files alike. The v2 index doesn't carry it, since nothing lists or picks a variant by inputs.valuessets nothing at an input's key or under it;model.localPathcan never be an input.No rule yet keeps an input off a key swiss derives from
requires. The schema can add one later.No variant uses inputs yet. Converting the Mooncake variants waits until modelsphere/swiss#54 and modelsphere/console#125 are deployed, because an older swissd refuses the unknown key.