Skip to content

fix: handle transition-shaped ucp_request markers in eval_prop_inclusion - #67

Merged
damaz91 merged 2 commits into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/transition-markers-in-eval_prop_inclusion
Aug 11, 2026
Merged

fix: handle transition-shaped ucp_request markers in eval_prop_inclusion#67
damaz91 merged 2 commits into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/transition-markers-in-eval_prop_inclusion

Conversation

@FanouZeng-TT

@FanouZeng-TT FanouZeng-TT commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

eval_prop_inclusion in preprocess_schemas.py did not handle the
transition-shaped ucp_request marker that UCP introduced for
cart.json's id field:

"ucp_request": {
  "update": {
    "transition": {
      "from": "required",
      "to": "omit"
    }
  }
}

When marker.get(op) returns a dict (the {"transition": {...}} form), the
existing branches only compare against the strings "omit" / "required" /
"optional", none of which match a dict. The field therefore kept its base
default of include=True and is_required = name in base_required.

Result: the generated CartUpdateRequest marks id: str as required, but the
spec says id should be omitted in update requests (prefer transport-level
identification, no duplication). A field that a string "omit" marker handles
everywhere else is silently treated as required under the new transition form.

Fix: when the operation marker resolves to a dict, unwrap its
transition.to value before the existing "omit" / "required" /
"optional" checks, so transition markers behave like their plain-string
equivalents.

Category (Required)

  • 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

N/A

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 local linting and formatting checks.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • (For Core/Capability) I have included/updated the relevant JSON schemas.
  • I have regenerated Python Pydantic models by running generate_models.sh under python_sdk.

Screenshots / Logs (if applicable)

N/A — codegen pipeline fix, no schema/field removal.

@google-cla

google-cla Bot commented Aug 11, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Aug 11, 2026
@damaz91

damaz91 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@oufanz thanks for opening this PR. Can you please sign the CLA at https://cla.developers.google.com/ so we can accept your contributions? Thanks

@damaz91 damaz91 added status:blocked and removed status:needs-triage Signal that the PR is ready for human triage labels Aug 11, 2026
@FanouZeng-TT
FanouZeng-TT force-pushed the fix/transition-markers-in-eval_prop_inclusion branch from e374da3 to 6e69db0 Compare August 11, 2026 09:14
@FanouZeng-TT

Copy link
Copy Markdown
Contributor Author

Thanks @damaz91! The CLA has been signed now — the cla/google check is passing (SUCCESS). Appreciate the quick review, and happy to address any feedback on the change.

@damaz91
damaz91 merged commit 340a06b into Universal-Commerce-Protocol:main Aug 11, 2026
15 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.

2 participants