fix(sep-2243): collapse check IDs to one-per-requirement (#287)

The sep-2243 scenario check IDs drifted from the requirement-traceability
yaml in #259 — the code emitted one ID per test case while the yaml
declares one per normative requirement, so the IDs no longer matched.

Rename the emitted IDs so a check ID maps to a single MUST/SHOULD and is
emitted once per case (the per-case detail moves to name/description),
matching the repo's existing 'same id, vary status/message' convention:

- mcp-method-header-* / mcp-name-header-*  -> client-includes-standard-headers
- reject-invalid-tool-* / keep-valid-tool  -> client-reject-invalid-tool
- server-accepts-{lower,upper}case-name    -> header-name-case-insensitive
- server reject status checks (mismatch/missing/case x method/name)
                                            -> server-reject-invalid-headers
- their error-code variants                 -> server-reject-error-code

Merge the yaml's server-reject-mismatch + server-reject-status into one
server-reject-invalid-headers MUST (HTTP 400 on a header-validation
failure); keep server-reject-error-code as the SHOULD. Base64/custom-header
rejection checks keep their own param-validation IDs (out of scope here).

Gates and the whitespace-acceptance check keep their scenario-matching
names. No behavior change — only check IDs, descriptions, and the yaml.
This commit is contained in:
Paul Carleton 2026-05-19 21:48:31 +01:00 • committed by GitHub
commit 70f7ba0004
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -626,7 +626,7 @@ export class HttpInvalidToolHeadersScenario extends BaseHttpScenario {
// Check that valid_tool WAS called — proves client kept valid tools
const validToolCalled = this.calledTools.has('valid_tool');
this.checks.push({
id: 'sep-2243-keep-valid-tool',
id: 'sep-2243-client-reject-invalid-tool',
name: 'ClientKeepsValidTool',
description: 'Client MUST keep valid tools while excluding invalid ones',
status: validToolCalled ? 'SUCCESS' : 'FAILURE',
@ -654,7 +654,7 @@ export class HttpInvalidToolHeadersScenario extends BaseHttpScenario {
for (const toolName of invalidTools) {
const called = this.calledTools.has(toolName);
this.checks.push({
id: `sep-2243-reject-invalid-tool-${toolName.replace(/_/g, '-')}`,
id: 'sep-2243-client-reject-invalid-tool',
name: `ClientRejectsInvalidTool_${toolName}`,
description: `Client MUST NOT call tool '${toolName}' with invalid x-mcp-header`,
status: called ? 'FAILURE' : 'SUCCESS',