Skip to content

test: add schema preprocessing coverage and CI#54

Merged
damaz91 merged 1 commit into
Universal-Commerce-Protocol:mainfrom
ShuoRen-TT:test/preprocess-schema-coverage
Jul 15, 2026
Merged

test: add schema preprocessing coverage and CI#54
damaz91 merged 1 commit into
Universal-Commerce-Protocol:mainfrom
ShuoRen-TT:test/preprocess-schema-coverage

Conversation

@ShuoRen-TT

Copy link
Copy Markdown
Contributor

Description

preprocess_schemas.py controls schema normalization and request-variant generation, but the repository did not have an automated test suite for this pipeline. This PR adds 13 standard-library unit and integration-style tests covering:

  • local and external reference normalization
  • allOf flattening and entity-field inlining
  • ucp_request operation inclusion rules
  • object and array-root request variant generation
  • transitive variant dependencies and metadata normalization
  • the complete preprocessing pipeline using a temporary schema tree

It also adds a minimal GitHub Actions matrix for Python 3.10, 3.11, and 3.12, plus the corresponding local test command in the README. There are no production-code or generated-model changes.

Category (Required)

Please select one or more categories that apply to this change.

  • Core Protocol: Changes to the base communication layer, global context, or breaking refactors. (Requires Technical Council approval)
  • Governance/Contributing: Updates to GOVERNANCE.md, CONTRIBUTING.md, or CODEOWNERS. (Requires Governance Council approval)
  • Capability: New schemas (Discovery, Cart, etc.) or extensions. (Requires Maintainer approval)
  • Documentation: Updates to README, or documentations regarding schema or capabilities. (Requires Maintainer approval)
  • Infrastructure: CI/CD, Linters, or build scripts. (Requires DevOps Maintainer approval)
  • Maintenance: Version bumps, lockfile updates, or minor bug fixes. (Requires DevOps Maintainer approval)
  • SDK: Language-specific SDK updates and releases. (Requires DevOps Maintainer approval)
  • Samples / Conformance: Maintaining samples and the conformance suite. (Requires Maintainer approval)
  • UCP Schema: Changes to the ucp-schema tool (resolver, linter, validator). (Requires Maintainer approval)
  • Community Health (.github): Updates to templates, workflows, or org-level configs. (Requires DevOps Maintainer approval)

Related Issues

Follow-up regression coverage for #52. This PR does not close an issue.

Checklist

  • I have followed the Contributing Guide (including Conventional Commits title requirements and ! for breaking changes).
  • I have updated the documentation (if applicable).
  • My changes pass all applicable local linting and formatting checks.
  • I have added tests that prove the preprocessing behavior is effective.
  • New and existing unit tests pass locally with my changes.
  • (Not applicable) This PR does not change Core/Capability JSON schemas.
  • (Not applicable) This PR does not change generated models.

Screenshots / Logs (if applicable)

  • python3 -m unittest discover -s tests -p 'test_*.py' -v: 13 tests passed
  • ruff check and ruff format --check: passed
  • Prettier 3.6.2, Codespell, workflow YAML parsing, and git diff --check: passed

The repository-pinned mirrors-prettier@v4.0.0-alpha.8 pre-commit environment could not initialize locally because npm could not resolve tiny-levenshtein@^1.1.0. The applicable changed files were checked directly with stable Prettier 3.6.2 and passed.

@ShuoRen-TT ShuoRen-TT marked this pull request as ready for review July 14, 2026 21:09
@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Jul 14, 2026
@damaz91

damaz91 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Thanks a lot @ShuoRen-TT for working on this. LGTM!

@damaz91 damaz91 added status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Jul 15, 2026
@damaz91 damaz91 added status:ready-to-merge Signaling to the DevOps team that it can be safely merged and removed status:under-review labels Jul 15, 2026
@damaz91 damaz91 merged commit 67a4fa2 into Universal-Commerce-Protocol:main Jul 15, 2026
16 checks passed
@ShuoRen-TT ShuoRen-TT deleted the test/preprocess-schema-coverage branch July 15, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:ready-to-merge Signaling to the DevOps team that it can be safely merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants