Skip to content

[runtime] Support commons verb routes for v1.0.0 and v1.1.0#52

Merged
GsCommand merged 1 commit intomainfrom
codex/update-commandlayer-runtime-routes-for-v1.1.0
Apr 26, 2026
Merged

[runtime] Support commons verb routes for v1.0.0 and v1.1.0#52
GsCommand merged 1 commit intomainfrom
codex/update-commandlayer-runtime-routes-for-v1.1.0

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • Commons docs and clients are on v1.1.0 while the runtime previously only registered per-verb routes for v1.0.0, so the runtime must serve both versions for compatibility.

Description

  • Introduced SUPPORTED_COMMONS_VERSIONS = ["1.0.0", "1.1.0"] and register each enabled commons verb on both /<verb>/v1.0.0 and /<verb>/v1.1.0 so both endpoints are available.
  • Updated handleVerb to accept the invoked route version and pass it into normalizeExecutionEnvelope so normalized execution.version and emitted receipt version reflect the requested route version.
  • Adjusted normalizeExecutionEnvelope to prefer the route-provided version when present and updated the index (/) response to advertise both supported verb/version paths.
  • Added runtime/tests/versioned-routes.test.mjs verifying POST /summarize/v1.0.0 and POST /summarize/v1.1.0 succeed and that an unsupported route (e.g., /summarize/v2.0.0) returns a controlled 404 JSON error.

Testing

  • Ran npm run check to validate syntax, which succeeded with no errors.
  • Ran npm run test:unit (Node tests under runtime/tests/*.test.mjs) which passed all tests including the new versioned-routes.test.mjs cases.

Codex Task

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).
@GsCommand GsCommand merged commit d9930bb into main Apr 26, 2026
1 check failed
@GsCommand GsCommand deleted the codex/update-commandlayer-runtime-routes-for-v1.1.0 branch April 28, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant