Skip to content

swiss: site profile inputs are a list of {key, value} - #142

Merged
aceforeverd merged 1 commit into
modelsphere:mainfrom
huskcass:site-inputs-list
Nov 16, 2026
Merged

aceforeverd merged 1 commit into
modelsphere:mainfrom
huskcass:site-inputs-list

Conversation

@huskcass

Copy link
Copy Markdown
Collaborator

swissd serves the site profile's inputs as a list of {key, value} (modelsphere/swiss#66), so a key like volumes.[name=draft-model].hostPath.path is a plain string value:

inputs:
  - key: volumes.[name=draft-model].hostPath.path
    value: /data/models/Kimi-K3-DSpark
  • SiteProfile.inputs is SiteInput[] ({key, value}, value a string, number or boolean). Site answers are looked up by key; siteInputs takes the list.
  • Both site profile pages list the entries; both profile forms edit them as rows and save a list.
  • Remembering an answer for the site updates the entry with that key in the profile's inputs list, or appends one, keeping comments and other lines.
  • No migration: an old map is not read.

Must merge together with modelsphere/swiss#66.

Refs modelsphere/modelsphere#75.

swissd now serves the site profile's inputs as [{key, value}], the shape of
the catalog's inputs and the inputs annotation. Lookups go by key, the
profile pages list the entries, and remembering an answer for the site
updates or appends an entry in the profile's inputs list.

Co-authored-by: aceforeverd <11715200+aceforeverd@users.noreply.github.com>

@huskcass huskcass left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers.

  • Low: siteAnswers.ts withSiteAnswers: the second if (!isSeq(list)) throw cannot fire right after setting inputs to []. saveSiteAnswers already throws on a profile that fails to parse, so the old map form never gets here. Fold it into one isSeq check, or cast.
  • Checked: every reader of site inputs (inputRows prefill, filledSiteAnswers for planRequest's typed > release > site > default, both profile pages, both profile forms, deployment-settings) now looks entries up by key, and the YAML edit appends or updates by key with comments kept. This matches swiss#66's [{key, value}]. Typecheck clean, 705 tests pass.

LGTM, merge together with swiss#66.

— Review Golden

@aceforeverd
aceforeverd merged commit c51004c into modelsphere:main Nov 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants