Skip to content

feat: implement spec-mandated webhook headers for Node.js and Python samples - #148

Merged
damaz91 merged 6 commits into
Universal-Commerce-Protocol:mainfrom
damaz91:feat/webhook-headers-147
Jul 28, 2026
Merged

feat: implement spec-mandated webhook headers for Node.js and Python samples#148
damaz91 merged 6 commits into
Universal-Commerce-Protocol:mainfrom
damaz91:feat/webhook-headers-147

Conversation

@damaz91

@damaz91 damaz91 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

Implement spec-mandated Webhook-Timestamp and Webhook-Id headers for orderEvent webhook in both Node.js and Python samples.

  • Generate a unique UUID for Webhook-Id for each event.
  • Generate the current Unix timestamp (seconds since epoch) for Webhook-Timestamp.
  • Include these headers in the POST request to the webhook URL.
  • Update integration tests to assert these headers are present and valid.

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

Fixes #147

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)

damaz91 added 4 commits July 24, 2026 14:35
Only REST transport is currently supported by the Python server.
Removing MCP, A2A, and Embedded transports from the discovery profile
to prevent clients from attempting to use them.

Closes Universal-Commerce-Protocol#133

TAG=agy
CONV=4aee53ae-545a-4ca3-8b91-fee3b95e9ef7
Align Node.js version negotiation error response with the spec and Python
implementation by returning HTTP 422 and a structured UcpErrorDetail.

TAG=agy
CONV=430e7e91-3e21-4a9d-802a-80c71390c95c
Align reference Python server error responses with error_response.json and message_error.json schemas.

- Use 'messages' wrapper instead of 'errors'.

- Use standard 'severity' enums (unrecoverable, requires_buyer_input).

- Raise UcpError/UcpVersionError in dependencies and format in central handler.

- Update integration tests to match new structure.

TAG=agy

CONV=66cef4ea-c19e-4693-8c23-b155a5e0cddc
…samples

Implement `Webhook-Id` and `Webhook-Timestamp` headers for the
`orderEvent` webhook in both Node.js and Python sample servers,
as required by the UCP specification.

- Generate a unique UUID for `Webhook-Id` for each event.
- Generate the current Unix timestamp (seconds since epoch) for `Webhook-Timestamp`.
- Include these headers in the POST request to the webhook URL.
- Update integration tests to assert these headers are present and valid.
@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Jul 27, 2026
@damaz91 damaz91 added status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Jul 27, 2026
@damaz91
damaz91 merged commit dd78948 into Universal-Commerce-Protocol:main Jul 28, 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.

feat: implement spec-mandated Webhook-Timestamp and Webhook-Id headers for orderEvent webhook

4 participants