ci: run tests and drift for js-sdk#73 - #1
Closed
vishkaty wants to merge 1 commit into
Closed
Conversation
…chema UcpDiscoveryProfileSchema.ucp (UcpSchema) was a hand written projection node carrying the withdrawn 2026-01-11 discovery shape: capabilities as a flat array and required, services as a record of single objects, and no payment_handlers. ucp.json#/$defs/base declares every registry as an object keyed by reverse domain name whose values are entity arrays and requires only version; #/$defs/business_schema additionally requires services and payment_handlers and adds supported_versions. The published package therefore rejected the business profile example that the specification publishes (overview/index.md, def=business_schema) on both capabilities and services, while UcpProfileDocumentSchema in the same file, which is derived from the schema, accepted it. Derive the node from business_schema the same way the response envelope is derived, through buildResponseEnvelopeSchema plus the required list and properties of the overlay. Registry items use the per entity response compat shape, as the envelope does. No title is set so the type keeps its property derived name and the UcpSchema export is unchanged. Two properties were being widened past what the schema declares, and both are corrected here. The envelope builder collapsed the map_order $ref to a string, which rejected the second business profile example in the overview (the block with map_order.payment_handlers); map_order is now a record of string arrays per ucp.json#/$defs/map_order, so UcpResponseSchema and UcpCheckoutResponseSchema change on that one line as well. supported_versions was typed as a record of any and accepted a number where the overlay declares a profile URI; its values are now typed as strings. Compile time breaking for consumers of the discovery type: Ucp.capabilities changes from CapabilityDiscovery[] to Record<string, CapabilityResponse[]> and Ucp.services from Record<string, UcpService> to Record<string, ServiceResponse[]>. No exported name is added or removed. Tests: tests/discovery-profile-shape.test.js parses the business profile example from release/2026-08-25 (tests/fixtures/business_profile_2026-08-25.json) through UcpDiscoveryProfileSchema, and pins the record shape of capabilities and services, the presence of payment_handlers, the base and business_schema required sets, the map_order shape, and the supported_versions value type. The two existing tests that used the empty legacy fixture now use the spec shape.
Owner
Author
|
Closing: this existed only to run the workflows for the commit proposed in Universal-Commerce-Protocol#73. Both runs are green and linked from that pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI vehicle only. This runs the Tests and Lint workflows on the fork for the exact
commit proposed upstream in Universal-Commerce-Protocol#73, because
workflow runs on that pull request are held behind the maintainer approval gate.
Not for merge.