@@ -169,8 +169,8 @@ export type InboundValidationRung =
169169 | 'envelope'
170170 | 'method-registry'
171171 | 'request-params'
172- | 'client-capabilities'
173172 | 'standard-header-validation'
173+ | 'client-capabilities'
174174 | 'param-header-validation' ;
175175
176176/** A ladder rejection: the JSON-RPC error to emit and the HTTP status to emit it with. */
@@ -314,9 +314,23 @@ export const INBOUND_VALIDATION_LADDER: readonly InboundValidationRungDescriptor
314314 rationale : 'Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table.'
315315 } ,
316316 {
317- rung : 'client-capabilities ' ,
317+ rung : 'standard-header-validation ' ,
318318 order : 7 ,
319319 evaluatedAt : 'pre-dispatch' ,
320+ codes : [ HEADER_MISMATCH_ERROR_CODE ] ,
321+ conformance : [ 'http-header-validation' ] ,
322+ rationale :
323+ 'SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check ' +
324+ '— are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before ' +
325+ 'dispatch. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge ' +
326+ '`era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the ' +
327+ 'capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by ' +
328+ 'the standard-header rung first.'
329+ } ,
330+ {
331+ rung : 'client-capabilities' ,
332+ order : 8 ,
333+ evaluatedAt : 'pre-dispatch' ,
320334 codes : [ ProtocolErrorCode . MissingRequiredClientCapability ] ,
321335 conformance : [ 'server-stateless' ] ,
322336 rationale :
@@ -327,21 +341,6 @@ export const INBOUND_VALIDATION_LADDER: readonly InboundValidationRungDescriptor
327341 'missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must ' +
328342 'consult the method registry before the gate if the documented precedence is to stay observable.'
329343 } ,
330- {
331- rung : 'standard-header-validation' ,
332- order : 8 ,
333- evaluatedAt : 'pre-dispatch' ,
334- codes : [ HEADER_MISMATCH_ERROR_CODE ] ,
335- conformance : [ 'http-header-validation' ] ,
336- rationale :
337- 'SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check ' +
338- '— are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before ' +
339- 'dispatch. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge ' +
340- '`era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. The documented order ' +
341- '(after method resolution, params validation, and the capability gate) is not the observed precedence: serveModern ' +
342- 'evaluates this rung immediately after the supported-revision gate, so a request that fails several rungs is ' +
343- 'answered by this gate before the dispatch rungs (5–6) and the capability gate (7) are consulted.'
344- } ,
345344 {
346345 rung : 'param-header-validation' ,
347346 order : 9 ,
0 commit comments