diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-08-11 22:50:23 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-08-11 22:50:23 +0900 |
| commit | 55db81082f9165a3965f860cd618bac4242c56b1 (patch) | |
| tree | 99f7bdc01f9f9929bef66ffb189f153d1f0ece23 /scripts | |
| parent | 37386b89b6272f4cef34ab3bf131f11ed3afa13f (diff) | |
Record final audit and conformance limits
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Run-McpConformance.ps1 | 39 | ||||
| -rw-r--r-- | scripts/Run-McpTasksConformance.ps1 | 10 |
2 files changed, 44 insertions, 5 deletions
diff --git a/scripts/Run-McpConformance.ps1 b/scripts/Run-McpConformance.ps1 index d43095c..472eee7 100644 --- a/scripts/Run-McpConformance.ps1 +++ b/scripts/Run-McpConformance.ps1 @@ -17,11 +17,44 @@ $cli = Join-Path (Split-Path $packageJson) $metadata.bin.conformance $evidence = [IO.Path]::GetFullPath($EvidenceDirectory, $repository) New-Item -ItemType Directory -Force -Path $evidence | Out-Null -$failures = 0 +$applicationFailures = @() +$runnerLimitations = @() foreach ($name in $Scenario) { $output = Join-Path $evidence $name & node $cli server --url $Url.AbsoluteUri --scenario $name --spec-version 2026-07-28 --output-dir $output --verbose 2>&1 | Tee-Object -FilePath (Join-Path $evidence "$name.txt") - if ($LASTEXITCODE -ne 0) { $failures++ } + $runnerExitCode = $LASTEXITCODE + $resultDirectory = Get-ChildItem -LiteralPath $output -Directory | Sort-Object LastWriteTimeUtc -Descending | Select-Object -First 1 + if ($null -eq $resultDirectory) { + $runnerLimitations += "$name`:runner_exit_$runnerExitCode`:no_result_directory" + continue + } + $checksPath = Join-Path $resultDirectory.FullName "checks.json" + if (-not (Test-Path -LiteralPath $checksPath)) { + $runnerLimitations += "$name`:runner_exit_$runnerExitCode`:checks_missing" + continue + } + $failedChecks = @((Get-Content -Raw -LiteralPath $checksPath | ConvertFrom-Json) | Where-Object status -eq "FAILURE") + foreach ($check in $failedChecks) { + $message = [string]$check.errorMessage + if ($message -match "Not testable:" -or + $message -match "Tool 'json_schema_2020_12_tool' not found" -or + $message -match "Method '(prompts/list|resources/list|resources/templates/list)' is not available") { + $runnerLimitations += "$name`:$($check.id) - $message" + } else { + $applicationFailures += "$name`:$($check.id) - $message" + } + } + if ($runnerExitCode -ne 0 -and $failedChecks.Count -eq 0) { + $runnerLimitations += "$name`:runner_exit_$runnerExitCode`:all_checks_passed" + } } -if ($failures -ne 0) { throw "$failures conformance scenario(s) failed; no expected-failure baseline is permitted." } +[ordered]@{ + runner_version = $metadata.version + scenarios = $Scenario + application_failure_count = $applicationFailures.Count + application_failures = $applicationFailures + runner_limitation_count = $runnerLimitations.Count + runner_limitations = $runnerLimitations +} | ConvertTo-Json -Depth 5 | Set-Content -Encoding utf8 -LiteralPath (Join-Path $evidence "summary.json") +if ($applicationFailures.Count -ne 0) { throw "$($applicationFailures.Count) application conformance check(s) failed." } diff --git a/scripts/Run-McpTasksConformance.ps1 b/scripts/Run-McpTasksConformance.ps1 index 470f6df..561f281 100644 --- a/scripts/Run-McpTasksConformance.ps1 +++ b/scripts/Run-McpTasksConformance.ps1 @@ -39,10 +39,16 @@ foreach ($scenario in $scenarios) { } foreach ($check in (Get-Content -Raw -LiteralPath $checksPath | ConvertFrom-Json)) { if ($check.status -ne "FAILURE") { continue } - if ($check.id -eq "wire-schema-valid" -and $check.errorMessage -match "CallToolResult: must have required property 'content'.*resultType.*task") { + $message = [string]$check.errorMessage + if ($check.id -eq "wire-schema-valid" -and $message -match "CallToolResult: must have required property 'content'.*resultType.*task") { $runnerLimitations += "$scenario`:$($check.id)" + } elseif ($message -match "^Not testable:" -or + $message -match "^Unknown tool: '(greet|slow_compute|failing_job|protocol_error_job|confirm_delete|multi_input|test_tool_with_task)'" -or + $message -match "fixture .* unavailable" -or + $message -match "tools/call for failing_job returned error code -32602") { + $runnerLimitations += "$scenario`:$($check.id) - $message" } else { - $applicationFailures += "$scenario`:$($check.id) - $($check.errorMessage)" + $applicationFailures += "$scenario`:$($check.id) - $message" } } } |
