catalog-contract: section_groups + Field.section for progressive disclosure; ace-step v2

asset_engine consumer (althing thread 01KRCJF7NGMXYE9F62Q1A6KFD4)
needed structure for ace-step's 27-field form. Two additive Pydantic
changes — backward-compatible, no catalog_version bump per the
policy table:

  - CatalogField.section: str | None = None
  - CatalogService.section_groups: list[CatalogSectionGroup] = []
  - new CatalogSectionGroup model: {id, label, hint?}

Validator: every Field.section value must reference a declared
section_groups[].id within the same service; section_groups[].id
values are unique. CATALOG-CONTRACT.md updated with both the new
service-fields row and a versioning-policy row covering
"add optional Field/Service keys -> no bump."

ace-step entry rewritten to use the new schema:
  - bumped version 1 -> 2
  - declared 6 section groups (basic / generation / conditioning /
    a2a / lora / output) with hints
  - tagged every field with a section
  - added previously-missing checkpoint_path (required: true,
    default: "/app/checkpoints" — the container's mount path).
    Wrapper-side cleanup (default in infer-api.py) queued as
    follow-up.
  - changed lyrics from optional: true -> required: true with
    default "" to match upstream's `lyrics: str` shape (empty
    string satisfies it).

JSON Schema regenerated.

Pydantic-model side of this change lives in asset_engine at
src/asset_engine/catalog.py — committed there separately.
This commit is contained in:
vh
2026-05-11 15:33:08 -07:00
parent 4089990c17
commit 52803d87f8
3 changed files with 123 additions and 6 deletions
+51
View File
@@ -218,6 +218,18 @@
],
"default": null,
"title": "Accepted Types"
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Section"
}
},
"required": [
@@ -425,6 +437,38 @@
"title": "CatalogResponse",
"type": "object"
},
"CatalogSectionGroup": {
"additionalProperties": false,
"description": "A named group of fields, for progressive disclosure in form rendering.\n\nServices with many fields (ace-step has 27) declare section_groups and\ntag each field with a `section: <id>`. Consumers render fields grouped\nunder tabs / accordions / etc. Fields without a section go into an\nimplicit 'main' group rendered first.",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"label": {
"title": "Label",
"type": "string"
},
"hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Hint"
}
},
"required": [
"id",
"label"
],
"title": "CatalogSectionGroup",
"type": "object"
},
"CatalogService": {
"additionalProperties": false,
"properties": {
@@ -502,6 +546,13 @@
"title": "Fields",
"type": "array"
},
"section_groups": {
"items": {
"$ref": "#/$defs/CatalogSectionGroup"
},
"title": "Section Groups",
"type": "array"
},
"response": {
"$ref": "#/$defs/CatalogResponse"
},