Skip to content

fix: generate capability role schemas from dotted defs - #94

Merged
carolinerg1 merged 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/identity-linking-role-defs
Sep 2, 2026
Merged

fix: generate capability role schemas from dotted defs#94
carolinerg1 merged 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/identity-linking-role-defs

Conversation

@FanouZeng-TT

Copy link
Copy Markdown
Contributor

Summary

  • split dotted capability role containers during schema preprocessing instead of generating Any aliases for the container itself
  • regenerate the affected 2026-08-25 models so identity linking and fulfillment expose platform/business role models
  • add regression coverage for the preprocessing rule and identity-linking business config validation

Why

common/identity_linking.json defines dev.ucp.common.identity_linking as a container with platform_schema and business_schema. The old flattening path renamed the container as a single $defs entry, which generated IdentityLinking1 = Any and dropped the business-role config.scopes constraints from the SDK surface.

The same container shape exists in shopping/fulfillment.json, so regenerating the pinned 2026-08-25 models also restores those role models.

Verification

  • ./generate_models.sh 2026-08-25
  • uv run python -m unittest tests.test_codegen_pipeline.SchemaNormalizationTest tests.test_codegen_pipeline.IdentityLinkingRoleSchemaTest
  • uv run python -m unittest discover -s tests -p 'test_*.py'
  • uv run ruff format --check preprocess_schemas.py tests/test_codegen_pipeline.py
  • uv run ruff check preprocess_schemas.py tests/test_codegen_pipeline.py
  • git diff --check
  • uvx pre-commit run hooks were run individually: trailing-whitespace, end-of-file-fixer, check-yaml, check-json, shebang hooks, ruff, ruff-format, prettier, shellcheck, and codespell passed. The local check-added-large-files hook hung in pre-commit; equivalent verification found no newly added file over 500KB.

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Sep 2, 2026
@carolinerg1 carolinerg1 added status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Sep 2, 2026
@carolinerg1
carolinerg1 self-requested a review September 2, 2026 17:45
@carolinerg1
carolinerg1 merged commit c0c4a3b into Universal-Commerce-Protocol:main Sep 2, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants