Skip to content

fix: preserve instance annotation fields - #62

Open
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/preserve-instance-annotation-values
Open

fix: preserve instance annotation fields#62
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/preserve-instance-annotation-values

Conversation

@FanouZeng-TT

Copy link
Copy Markdown
Contributor

Description

resolve_object and strip_annotations_recursive recurse into every object and array value. default, const, examples, and enum hold JSON instance data rather than child schemas, so business fields named ucp_request or ucp_response inside those values were removed from resolved output.

Fix: preserve those four instance-data keyword values verbatim while continuing to remove annotations from real schema locations. The regression test verifies both behaviors in one resolved schema.

Category (Required)

  • Core Protocol: Changes to core protocol specifications, breaking changes, or extensions. (Requires Technical Council approval)
  • Governance/Contributing: Changes to governance documentation or contribution guidelines. (Requires Governance Council approval)
  • Capability: Changes to a capability specification. (Requires Maintainer approval)
  • Documentation: Documentation-only changes. (Requires Maintainer approval)
  • Infrastructure: CI, build, or developer tooling changes. (Requires DevOps Maintainer approval)
  • Maintenance: Dependencies or repository maintenance. (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. (Requires Maintainer approval)
  • Community Health (.github): Community health files. (Requires DevOps Maintainer approval)

Related Issues

N/A

Checklist

  • I have followed the Contributing Guide.
  • 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)

  • cargo test --manifest-path /Users/bytedance/All/UCP/PR记录/worktrees/72-ucp-schema/Cargo.toml --all-targets
  • cargo clippy --manifest-path /Users/bytedance/All/UCP/PR记录/worktrees/72-ucp-schema/Cargo.toml --all-targets -- -D warnings
  • cargo fmt --manifest-path /Users/bytedance/All/UCP/PR记录/worktrees/72-ucp-schema/Cargo.toml -- --check
  • uvx pre-commit run --all-files --show-diff-on-failure
  • git diff --check

@damaz91 damaz91 added status:needs-triage Signal that the PR is ready for human triage status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Aug 16, 2026
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