Repository navigation
fix(usai-catalog): allow summary and title roles in catalog recommendations schema - #551
Conversation
…ations schema catalog.schema.json restricted recommendations to primary/small/compaction while the shipped catalog.json and the OpenCode renderer also use summary and title. Add both roles and a schema-level test (real JSON Schema validator) so schema, data, and renderer vocabulary stay aligned. Co-authored-by: OpenCode Agent <user@gsa.gov>
wz-gsa
left a comment
There was a problem hiding this comment.
Fixed-head review of 28a6c3ea3d77cc595369885491cbce24c7df8832: the three-file schema-only slice adds summary and title as nonempty advisory recommendation roles. The shipped catalog.json already contains those five roles, and the OpenCode renderer’s role vocabulary matches. The new Python test validates the shipped catalog with Draft 2020-12 and rejects unknown/empty role values. Required current-head checks pass and no unresolved threads were observed. This approval covers schema compatibility only: the existing catalog builder does not yet preserve recommendations through regeneration or check role-reference membership; the stacked #553 explicitly owns that behavior and must remain separately reviewed and gated. AI-assisted static review (OpenCode), no PR code executed on the host.
🤖: AI agent (First Mate), AI-assisted change (OpenCode). Human review required before merge.
Context
integrations/providers/usai/catalog.schema.jsonallowed onlyprimary,small,compactionunderrecommendations(additionalProperties: false), but the shippedcatalog.jsonand the OpenCode kit renderer also usesummaryandtitle. Part of the epic #357.Plan / Changes
summaryandtitle(string, minLength 1) torecommendationsincatalog.schema.json. Nodefaultsblock;catalog.jsondata unchanged.scripts/tests/test_usai_catalog_schema.py(runs in CI viapytest scripts/tests/): shipped catalog validates against shipped schema withjsonschema; role set equals renderer vocabulary; unknown role and empty values rejected.Premise check
catalog.json:recommendations: Additional properties are not allowed ('summary', 'title').validateCatalog()inbuild-catalog.mjsdoes NOT checkrecommendations(only top-level/gateway/vendor/model keys), so no existing test caught it.acq-neutral-model-catalog.schema.jsonandnormalize-catalog.mjsalready list all five roles;render-provider-config.mjsROLE_PATHS andvalidate_provider_input_contract.pyneed no change.Verification
make validate: all validators passed.pytest scripts/tests: 740 passed.make test-kits: opencode 62, usai-provider 18, paseo 65, providers/usai 122 pass, 0 fail.Rollback
Revert this commit; no data or runtime change.
Security Impact
None: schema permits two additional advisory role keys already used by shipped data.