Conversation
Why: commons docs and clients use v1.1.0, but runtime must remain backward compatible with v1.0.0 endpoints. Contract impact: none (existing verb semantics/signing/verification preserved; adds route compatibility and aligns receipt version with requested route).
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.
Motivation
v1.1.0while the runtime previously only registered per-verb routes forv1.0.0, so the runtime must serve both versions for compatibility.Description
SUPPORTED_COMMONS_VERSIONS = ["1.0.0", "1.1.0"]and register each enabled commons verb on both/<verb>/v1.0.0and/<verb>/v1.1.0so both endpoints are available.handleVerbto accept the invoked route version and pass it intonormalizeExecutionEnvelopeso normalizedexecution.versionand emitted receiptversionreflect the requested route version.normalizeExecutionEnvelopeto prefer the route-provided version when present and updated the index (/) response to advertise both supported verb/version paths.runtime/tests/versioned-routes.test.mjsverifyingPOST /summarize/v1.0.0andPOST /summarize/v1.1.0succeed and that an unsupported route (e.g.,/summarize/v2.0.0) returns a controlled404JSON error.Testing
npm run checkto validate syntax, which succeeded with no errors.npm run test:unit(Node tests underruntime/tests/*.test.mjs) which passed all tests including the newversioned-routes.test.mjscases.Codex Task