Skip to content

fix: escape lint diagnostic pointers - #65

Open
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/escape-lint-diagnostic-pointers
Open

fix: escape lint diagnostic pointers#65
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:fix/escape-lint-diagnostic-pointers

Conversation

@FanouZeng-TT

Copy link
Copy Markdown
Contributor

Description

Diagnostic.path values use JSON Pointer-style /token paths, but object keys were appended without RFC 6901 escaping. A property named a/b~c therefore produced diagnostics such as /properties/a/b~c/ucp_request, which splits one property token into multiple levels and leaves an invalid ~c escape.

Fix: escape dynamic object-key path tokens with ~0 and ~1 before appending them. Array indexes and fixed keywords keep their existing spelling. The regression test covers E002, E004, and E008 diagnostics for keys containing both / and ~.

Category (Required)

  • Core Protocol: Changes to core protocol specifications. (Requires Technical Council approval)
  • Governance/Contributing: Changes to governance or contributing processes. (Requires Governance Council approval)
  • Capability: New or updated capabilities. (Requires Maintainer approval)
  • Documentation: Documentation-only changes. (Requires Maintainer approval)
  • Infrastructure: Build, CI, or deployment changes. (Requires DevOps Maintainer approval)
  • Maintenance: Dependencies and 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): Organization-wide community files. (Requires DevOps Maintainer approval)

Related Issues

N/A

Checklist

  • I have followed the Contributing Guide and Code of Conduct.
  • 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 (not applicable).

Screenshots / Logs (if applicable)

N/A — verified with cargo test --all-targets, cargo clippy --all-targets -- -D warnings, cargo fmt --check, all pre-commit hooks, and 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
@carolinerg1

Copy link
Copy Markdown

Hi @FanouZeng-TT,

Thank you for all these great bug fixes and improvements to ucp-schema! All the underlying changes look clean, well-tested, and pass validation.

To help streamline the review and merge process, and to avoid CI overhead and merge conflicts across sibling PRs touching the same files, would you mind grouping related micro-changes into single, cohesive PRs in the future?

For example, related changes can be combined as follows:

  1. Linter Traversal Fixes: Combine fix: validate examples through internal refs #59, fix: skip example instances during lint traversal #60, fix: skip annotation checks in instance data #61, fix: preserve instance annotation fields #62, fix: skip ref checks in instance data #63, and fix: escape lint diagnostic pointers #65 into 1 PR (fix(linter): skip instance data keywords during traversal and escape diagnostic pointers).
  2. CLI Improvements & Tests: Combine test: cover lint command output and exit codes #53 and fix: reject unsupported lint output formats #54 into 1 PR (fix(cli): reject unsupported lint formats and add CLI output tests).
  3. Documentation: Combine docs: document include-future resolve option #52, docs: scope verbose guidance to supported commands #55, docs: pass values to strict mode flags #56, and docs: fix remote resolve example URL #57 into 1 PR (docs: update CLI flags and examples in README).

Bundling related fixes this way makes it much easier and faster for maintainers to review, approve, and merge your PRs in one go without waiting on multiple individual CI pipelines.

Thanks again for your contributions!

@FanouZeng-TT

Copy link
Copy Markdown
Contributor Author

Understood. I’ll group related changes by subsystem going forward rather than opening separate micro-PRs that touch the same files. Thanks for the concrete grouping guidance.

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