[CI] Version both baseline files and split conformance badges per spec (#459)
- Rename conformance-baseline.yml to conformance-baseline-2025-11-25.yml so both baseline files carry their spec revision symmetrically, and bring conformance-server/conformance-client up to the same rigor (--suite all, pinned CONFORMANCE, baseline check) as the draft targets - score.php now takes a required spec-version and writes <suite>-conformance-<spec-version>.json, so 2025-11-25 and 2026-07-28 each get their own badge instead of only the dated one - conformance-weekly.yaml generates and publishes badges for both matrix entries instead of gating on 2025-11-25 only, and drops the now-stale unversioned badge files from the badges branch - README shows all four badges alongside the existing packagist/CI/PHP version/license row - Trimmed workflow comments to the minimum needed
This commit is contained in:
parent
cad686aba7
commit
78a8926f17
3 changed files with 66 additions and 64 deletions
53
tests/Conformance/conformance-baseline-2025-11-25.yml
Normal file
53
tests/Conformance/conformance-baseline-2025-11-25.yml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# Expected conformance failures for spec revision 2025-11-25.
|
||||
#
|
||||
# Separate from conformance-baseline-2026-07-28.yml because the two revisions
|
||||
# exercise different lifecycles against different endpoints: this file covers
|
||||
# the handshake era served at /, the other the modern (SEP-2575) era served
|
||||
# at /stateless.
|
||||
#
|
||||
# Entries are per-check (scenario:check-id) rather than whole scenarios, so a
|
||||
# scenario that is mostly conformant keeps reporting the parts that work and a
|
||||
# new regression inside it still fails the run.
|
||||
#
|
||||
# Run with:
|
||||
# make conformance-server
|
||||
# make conformance-client
|
||||
|
||||
# Both pre-existing fixture bugs, not lifecycle-specific: json-schema-2020-12
|
||||
# wants a `json_schema_2020_12_tool` fixture neither conformance server
|
||||
# defines, and resources-templates-read emits a resource-template URI in a
|
||||
# shape the schema rejects. Reproduce identically on the 2026-07-28 endpoint
|
||||
# (see conformance-baseline-2026-07-28.yml).
|
||||
server:
|
||||
- json-schema-2020-12:json-schema-2020-12-tool-found
|
||||
- resources-templates-read:wire-schema-valid
|
||||
|
||||
client:
|
||||
- elicitation-sep1034-client-defaults
|
||||
- sse-retry
|
||||
# The example client doesn't call add_numbers or echo the tool's inputSchema
|
||||
# back, so these checks have nothing to exercise.
|
||||
- tools_call:tool-add-numbers
|
||||
- json-schema-2020-12-preservation:json-schema-2020-12-client-echo-completed
|
||||
- auth/metadata-default
|
||||
- auth/metadata-var1
|
||||
- auth/metadata-var2
|
||||
- auth/metadata-var3
|
||||
- auth/basic-cimd
|
||||
- auth/scope-from-www-authenticate
|
||||
- auth/scope-from-scopes-supported
|
||||
- auth/scope-omitted-when-undefined
|
||||
- auth/scope-step-up
|
||||
- auth/scope-retry-limit
|
||||
- auth/token-endpoint-auth-basic
|
||||
- auth/token-endpoint-auth-post
|
||||
- auth/token-endpoint-auth-none
|
||||
- auth/pre-registration
|
||||
- auth/2025-03-26-oauth-metadata-backcompat
|
||||
- auth/2025-03-26-oauth-endpoint-fallback
|
||||
- auth/offline-access-scope
|
||||
- auth/offline-access-not-supported
|
||||
- auth/client-credentials-jwt
|
||||
- auth/client-credentials-basic
|
||||
- auth/cross-app-access-complete-flow
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
# Expected conformance failures for spec revision 2026-07-28.
|
||||
#
|
||||
# Separate from conformance-baseline.yml because the two revisions exercise
|
||||
# different lifecycles against different endpoints: the dated baseline covers
|
||||
# the handshake era served at /, this one covers the modern (SEP-2575) era
|
||||
# Separate from conformance-baseline-2025-11-25.yml because the two revisions
|
||||
# exercise different lifecycles against different endpoints: the other file
|
||||
# covers the handshake era served at /, this one the modern (SEP-2575) era
|
||||
# served at /stateless.
|
||||
#
|
||||
# Entries are per-check (scenario:check-id) rather than whole scenarios, so a
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
#
|
||||
# Run with:
|
||||
# make conformance-draft-server
|
||||
# make conformance-draft-client
|
||||
|
||||
server:
|
||||
# --- Pre-existing, not lifecycle-specific ----------------------------------
|
||||
|
|
|
|||
|
|
@ -13,13 +13,14 @@
|
|||
* Turns a conformance run's results into a shields.io endpoint badge JSON, so
|
||||
* the client/server conformance score can be rendered in the README.
|
||||
*
|
||||
* php score.php <server|client>
|
||||
* php score.php <server|client> <spec-version> [results-dir]
|
||||
*
|
||||
* The conformance CLI (run with `--output-dir results`) writes one
|
||||
* `checks.json` per scenario into the `results/` directory next to this file.
|
||||
* A scenario counts as passing when none of its checks has a FAILURE status;
|
||||
* the badge message is "<passed>/<total> (<pct>%)" and is written to
|
||||
* `<suite>-conformance.json`.
|
||||
* The conformance CLI writes one `checks.json` per scenario into
|
||||
* `[results-dir]` (default `results`), relative to this file. A scenario
|
||||
* counts as passing when none of its checks has a FAILURE status; the badge
|
||||
* message is "<passed>/<total> (<pct>%)" and is written to
|
||||
* `<suite>-conformance-<spec-version>.json`, so each revision gets its own
|
||||
* badge.
|
||||
*/
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
|
|
@ -36,10 +37,13 @@ require_once dirname(__DIR__, 2).'/vendor/autoload.php';
|
|||
->setName('conformance-score')
|
||||
->setDescription('Generates a shields.io endpoint badge from the conformance results')
|
||||
->addArgument('suite', InputArgument::REQUIRED, 'Which conformance suite was run: "server" or "client"')
|
||||
->addArgument('spec-version', InputArgument::REQUIRED, 'The spec revision that was run, e.g. "2025-11-25"')
|
||||
->addArgument('results-dir', InputArgument::OPTIONAL, 'Directory the conformance CLI wrote results into, relative to this file', 'results')
|
||||
->setCode(static function (InputInterface $input, OutputInterface $output): int {
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$suite = $input->getArgument('suite');
|
||||
$specVersion = $input->getArgument('spec-version');
|
||||
|
||||
if (!in_array($suite, ['server', 'client'], true)) {
|
||||
$io->error(sprintf('Suite must be "server" or "client", got "%s".', $suite));
|
||||
|
|
@ -47,10 +51,10 @@ require_once dirname(__DIR__, 2).'/vendor/autoload.php';
|
|||
return Command::INVALID;
|
||||
}
|
||||
|
||||
$resultsDir = __DIR__.'/results';
|
||||
$resultsDir = __DIR__.'/'.$input->getArgument('results-dir');
|
||||
|
||||
if (!is_dir($resultsDir)) {
|
||||
$io->error(sprintf('Results directory "%s" does not exist; run the conformance suite with `--output-dir results` first.', $resultsDir));
|
||||
$io->error(sprintf('Results directory "%s" does not exist; run the conformance suite with `--output-dir` first.', $resultsDir));
|
||||
|
||||
return Command::FAILURE;
|
||||
}
|
||||
|
|
@ -88,7 +92,7 @@ require_once dirname(__DIR__, 2).'/vendor/autoload.php';
|
|||
|
||||
$badge = [
|
||||
'schemaVersion' => 1,
|
||||
'label' => $suite.' conformance',
|
||||
'label' => sprintf('%s %s', $suite, $specVersion),
|
||||
'message' => $total > 0 ? sprintf('%d/%d (%d%%)', $passed, $total, $pct) : 'no data',
|
||||
'color' => match (true) {
|
||||
0 === $total => 'lightgrey',
|
||||
|
|
@ -99,7 +103,7 @@ require_once dirname(__DIR__, 2).'/vendor/autoload.php';
|
|||
},
|
||||
];
|
||||
|
||||
$outputFile = __DIR__.'/'.$suite.'-conformance.json';
|
||||
$outputFile = __DIR__.'/'.$suite.'-conformance-'.$specVersion.'.json';
|
||||
|
||||
if (false === file_put_contents($outputFile, json_encode($badge, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES)."\n")) {
|
||||
$io->error(sprintf('Could not write badge file "%s".', $outputFile));
|
||||
|
|
|
|||
Loading…
Reference in a new issue