Skip to content

fix(rest/python): serve the discovery profile with a Cache-Control header - #153

Merged
damaz91 merged 1 commit into
Universal-Commerce-Protocol:mainfrom
vishkaty:fix/discovery-profile-cache-control
Jul 30, 2026
Merged

fix(rest/python): serve the discovery profile with a Cache-Control header#153
damaz91 merged 1 commit into
Universal-Commerce-Protocol:mainfrom
vishkaty:fix/discovery-profile-cache-control

Conversation

@vishkaty

Copy link
Copy Markdown
Contributor

Description

The discovery profile at /.well-known/ucp is returned with no Cache-Control header. The spec requires profile responses to be cacheable (overview.md, Discovery: profile caching):

Profile responses MUST include a Cache-Control header with public and max-age of at least 60 seconds. Profiles MUST NOT be served with private, no-store, or no-cache directives.

This PR sets Cache-Control: public, max-age=3600 on the profile response and adds an integration test asserting the header is present, public, carries a max-age >= 60, and uses none of the forbidden directives.

Verified locally: the new test fails on the current handler and passes with the fix; the full rest/python/server integration suite stays green; and a booted server returns the header on the wire.

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)

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.

…ader

The discovery profile at /.well-known/ucp was returned with no Cache-Control
header. The spec requires profile responses to be cacheable (overview.md,
Discovery: profile caching):

  Profile responses MUST include a Cache-Control header with `public` and
  `max-age` of at least 60 seconds. Profiles MUST NOT be served with
  `private`, `no-store`, or `no-cache` directives.

Set `Cache-Control: public, max-age=3600` on the profile response, and add an
integration test asserting the header is present, `public`, carries a
`max-age` >= 60, and uses none of the forbidden directives.

Verified: new test fails on the current handler and passes with the fix; the
full integration suite stays green; and a booted server returns the header on
the wire.
@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 Jul 29, 2026

@damaz91 damaz91 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@damaz91
damaz91 merged commit 112f2fd into Universal-Commerce-Protocol:main Jul 30, 2026
14 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.

4 participants