You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e7c103c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(rest): serve the producer's derived discovery version, not config.api.version (#11292)
`registerDiscoveryEndpoints` called `protocol.getDiscovery()` and then
unconditionally overwrote the result's `version` with `this.config.api.version`
— the API version identifier that `normalizeConfig()` defaults to `'v1'` and
that `getApiBasePath()` uses to build the mount. So `GET /api/v1/discovery`
answered with the path segment the caller had just typed to get there.
`DiscoverySchema` declares `version` under "System Identity" alongside `name`
and `environment`; the #10993 ruling settled that as the serving artifact's
version and #11235/#11242 reaffirmed it. Dropping the override lets the
producer's derivation (`OS_RUNTIME_VERSION` → package version → `'unknown'`)
reach the wire, which is the same stamp `/health` and the runtime dispatcher's
own `/discovery` read.
The API-version fact stays recoverable from the same document: every `routes`
entry is prefixed with the mounted base path. No schema change and no new
field.
The pin in `discovery-schema-conformance.test.ts` drives the real producer
through the real handler and asserts PROVENANCE, not a literal — an injected
`OS_RUNTIME_VERSION` stamp must reach the wire, and the served value must equal
the producer's own answer even on a server mounted at a different
`api.version`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019siH5jDmk5hrayvfyojUqR
0 commit comments