Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

Conformance: measure any implementation, and a badge that says what the report says (#170)

github-actions[bot]559f97441f59
diff --git a/.github/workflows/conformance-measure.yml b/.github/workflows/conformance-measure.yml
new file mode 100644
index 00000000..08215954
--- /dev/null
+++ b/.github/workflows/conformance-measure.yml
@@ -0,0 +1,165 @@
+# Measure ANY implementation against the conformance suite and record the evidence.
+#
+# The examples page lists implementations by pull request, and the listing criteria say a
+# conformance level appears only once UHP publishes reproducible test evidence. This workflow is
+# how that evidence is produced: it runs the suite against the target named in its inputs, then
+# opens a pull request that adds the JSON report under protocol/conformance/reports/<slug>/. The
+# site build turns the newest report per slug into the level on the listing card and a badge at
+# /badges/<slug>.svg, so a badge can never say more than a report a reader can open.
+#
+# Two ways to reach a target:
+# - a reachable server root (`base_url`), with its bearer in a repository secret;
+# - commands that install and start the server here (`setup`, `start`), for an implementation
+# with no public host, or whose public host is bring-your-own-key. The started server can be
+# handed one secret in its environment (a model key), named by `server_env`.
+# A host that wants a header a stock client never sends (a caller's model key) gets it through
+# `header`, whose value is a secret; the suite never writes header values into the report.
+#
+# The report is recorded whatever the verdict, because a measured failure is evidence too and
+# the badge is derived from the highest class that fully passed. What stops the PR is a run that
+# measured nothing: an ERROR outcome (a suite bug) or discovery not answering.
+name: conformance-measure
+
+on:
+ workflow_dispatch:
+ inputs:
+ slug:
+ description: 'Directory under protocol/conformance/reports (lowercase, hyphens), e.g. superqode'
+ required: true
+ label:
+ description: 'How the report names what was measured, e.g. "SuperQode 2.3.1 serve uhp"'
+ required: true
+ class:
+ description: 'Conformance class to run'
+ type: choice
+ options: [core, extended, full]
+ default: core
+ base_url:
+ description: 'Server root to measure. Leave empty to start the server here with `start`.'
+ default: ''
+ bearer_secret:
+ description: 'Name of the repository secret holding the bearer token (also exported to `start` as UHP_MEASURE_BEARER)'
+ default: 'UHP_TARGET_KEY'
+ header:
+ description: 'Optional extra header NAME sent on every request (e.g. X-Provider-Api-Key)'
+ default: ''
+ header_secret:
+ description: 'Name of the repository secret holding that header value'
+ default: 'UHP_MEASURE_HEADER_VALUE'
+ setup:
+ description: 'Optional shell that installs the implementation (runs before `start`)'
+ default: ''
+ start:
+ description: 'Optional shell that starts the server in the background on http://127.0.0.1:8787 and exits'
+ default: ''
+ server_env:
+ description: 'Optional env var NAME the started server needs (e.g. GEMINI_API_KEY)'
+ default: ''
+ server_env_secret:
+ description: 'Name of the repository secret holding that value'
+ default: 'UHP_MEASURE_SERVER_SECRET'
+
+permissions:
+ contents: write
+ pull-requests: write
+
+jobs:
+ measure:
+ runs-on: ubuntu-latest
+ env:
+ OPEN_PR_APP_ID: ${{ secrets.OPEN_PR_APP_ID }}
+ SLUG: ${{ inputs.slug }}
+ LABEL: ${{ inputs.label }}
+ CLASS: ${{ inputs.class }}
+ BASE_URL: ${{ inputs.base_url || 'http://127.0.0.1:8787' }}
+ UHP_API_KEY: ${{ secrets[inputs.bearer_secret] }}
+ UHP_MEASURE_BEARER: ${{ secrets[inputs.bearer_secret] }}
+ HEADER_NAME: ${{ inputs.header }}
+ # A secret that does not exist reads as empty, so a name that was never set is harmless.
+ HEADER_VALUE: ${{ secrets[inputs.header_secret] }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+ - run: pip install -e protocol/conformance
+
+ - name: Validate the slug
+ run: |
+ [[ "$SLUG" =~ ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$ ]] || { echo "slug must be lowercase letters, digits and hyphens"; exit 2; }
+
+ - name: Install the implementation
+ if: ${{ inputs.setup != '' }}
+ run: ${{ inputs.setup }}
+
+ - name: Start the server here
+ if: ${{ inputs.start != '' }}
+ env:
+ # The one secret a started server may need, under the name the implementer asked for.
+ SERVER_ENV_NAME: ${{ inputs.server_env }}
+ SERVER_ENV_VALUE: ${{ secrets[inputs.server_env_secret] }}
+ run: |
+ if [ -n "$SERVER_ENV_NAME" ]; then export "$SERVER_ENV_NAME=$SERVER_ENV_VALUE"; fi
+ ${{ inputs.start }}
+
+ - name: Wait for discovery
+ run: |
+ for i in $(seq 1 60); do
+ curl -sf -m 3 "$BASE_URL/v1/uhp" >/dev/null && exit 0
+ sleep 2
+ done
+ echo "no discovery document at $BASE_URL/v1/uhp after two minutes"; exit 1
+
+ - name: Run the suite
+ # The CLI exits 1 on any FAIL, which is a verdict, not an accident: it is recorded.
+ continue-on-error: true
+ run: |
+ args=(--base-url "$BASE_URL" --class "$CLASS" --task-timeout 300 --plain --label "$LABEL" --json report.json)
+ if [ -n "$HEADER_NAME" ]; then args+=(--header "$HEADER_NAME: $HEADER_VALUE"); fi
+ uhp-conformance "${args[@]}" | tee run.txt
+
+ - name: Refuse to record a run that measured nothing
+ run: |
+ python3 - <<'PY'
+ import json, sys
+ r = json.load(open("report.json"))
+ checks = {c["id"]: c["outcome"] for c in r["checks"]}
+ errors = [i for i, o in checks.items() if o == "error"]
+ if errors:
+ sys.exit(f"ERROR outcomes are suite bugs, not evidence: {errors}")
+ if checks.get("D-01") != "pass":
+ sys.exit("discovery did not pass; nothing about this target was measured")
+ print("verdict:", "conformant" if r["conformant"] else "conformant with skips" if r["conformant_with_skips"] else "not conformant at the requested class",
+ "| highest class fully passed:", r["highest_class_passed"])
+ PY
+
+ - id: app
+ if: ${{ env.OPEN_PR_APP_ID != '' }}
+ uses: actions/create-github-app-token@v2
+ with:
+ app-id: ${{ secrets.OPEN_PR_APP_ID }}
+ private-key: ${{ secrets.OPEN_PR_APP_PRIVATE_KEY }}
+
+ - name: Record the report by pull request
+ env:
+ GH_TOKEN: ${{ steps.app.outputs.token || github.token }}
+ run: |
+ set -euo pipefail
+ DAY=$(date -u +%Y-%m-%d)
+ DEST="protocol/conformance/reports/$SLUG/$DAY-$CLASS.json"
+ mkdir -p "$(dirname "$DEST")"
+ cp report.json "$DEST"
+ git config user.name "github-actions[bot]"
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+ BRANCH="conformance/measure-$SLUG-$(date -u +%Y%m%d-%H%M)"
+ git checkout -b "$BRANCH"
+ git add "$DEST"
+ git commit -m "conformance: measure $LABEL at class $CLASS
+
+ Recorded by the conformance-measure workflow against $BASE_URL. The site
+ derives the listing level and the badge for $SLUG from the newest report
+ in this directory."
+ git push origin "$BRANCH"
+ gh pr create --base main --head "$BRANCH" \
+ --title "conformance: measure $LABEL ($CLASS)" \
+ --body "$(printf 'Measured by the `conformance-measure` workflow against `%s`, class %s. The report lands at `%s`; the site derives the level on the examples listing and the badge at `/badges/%s.svg` from it.\n\n```\n%s\n```' "$BASE_URL" "$CLASS" "$DEST" "$SLUG" "$(sed -n '/^ Summary/,$p' run.txt)")"
diff --git a/.github/workflows/conformance-remeasure.yml b/.github/workflows/conformance-remeasure.yml
index f174166d..a7bdd72a 100644
--- a/.github/workflows/conformance-remeasure.yml
+++ b/.github/workflows/conformance-remeasure.yml
@@ -46,7 +46,7 @@ jobs:
UHP_API_KEY: ${{ secrets.UHP_TARGET_KEY }}
run: |
uhp-conformance --base-url '${{ inputs.base_url }}' --class full --plain \
- --json report.json | tee run.txt
+ --label '${{ inputs.server_label }}' --json report.json | tee run.txt
- name: Splice the measured result into the README
run: |
diff --git a/protocol/GOVERNANCE.md b/protocol/GOVERNANCE.md
index c4d13015..0e4f8c8c 100644
--- a/protocol/GOVERNANCE.md
+++ b/protocol/GOVERNANCE.md
@@ -100,10 +100,17 @@ from ADR-0007 of an independent UHP implementation.
## Conformance claims
-"UHP 2026-08-11 conformant (class)" means the conformance suite passes at that class. Publishing the
-report alongside the claim is expected. There is no certification body, no fee, and no logo
-programme — the suite is the authority, it is in this repository, and anyone can run it against
-anyone's server.
+"UHP <version> conformant (class)" means the conformance suite passes at that class against a
+server serving that version. Publishing the report alongside the claim is expected. There is no
+certification body, no fee, and no logo programme — the suite is the authority, it is in this
+repository, and anyone can run it against anyone's server.
+
+The site does publish a badge, and it is not a programme: it is a rendering of a report. When the
+`conformance-measure` workflow has run against an implementation and its report has landed in
+`conformance/reports/`, the site generates a badge naming the highest class that fully passed and
+the version served, and the implementation's listing shows it. Nothing is applied for and nobody
+approves it; the report is the whole of the evidence, and a re-measure that fails at a class the
+badge names removes the badge at the next build.
## Naming and conformance
diff --git a/protocol/IMPLEMENTATIONS.md b/protocol/IMPLEMENTATIONS.md
index b5ff0da7..e18ae2cd 100644
--- a/protocol/IMPLEMENTATIONS.md
+++ b/protocol/IMPLEMENTATIONS.md
@@ -17,7 +17,7 @@ A server runs one or more harnesses behind the contract. Guide: [Implement a ser
<div class="impl-list">
-<div class="impl-card">
+<div class="impl-card" id="harnessrouter-ce">
<div class="impl-head"><a href="https://github.com/HarnessRouter/harnessrouter"><b>HarnessRouter Community Edition</b></a><span class="role role-server">Server</span></div>
<p>Open-source runner that puts existing harnesses — Codex, Claude Code, Hermes — behind the UHP contract. HarnessRouter · Apache-2.0.</p>
<p class="impl-meta">UHP 2026-08-11</p>
@@ -31,7 +31,7 @@ A client drives a UHP server. Guide: [Implement a client](CONNECTING.md).
<div class="impl-list">
-<div class="impl-card">
+<div class="impl-card" id="superqode-client">
<div class="impl-head"><a href="https://github.com/SuperagenticAI/superqode"><b>SuperQode</b></a><span class="role role-client">Client</span></div>
<p>Harness-engineering framework that connects to a UHP server via <code>superqode connect uhp</code>. SuperagenticAI · Apache-2.0.</p>
<p class="impl-meta">UHP 2026-08-11</p>
@@ -54,7 +54,11 @@ adding one card. To merge, an entry needs:
A conformance level appears on a listing only once UHP publishes reproducible
test evidence for that implementation; until then, absence of a level is
-expected, not a mark against the entry.
+expected, not a mark against the entry. The evidence is a report produced by
+the `conformance-measure` workflow and landed under `conformance/reports/<slug>/`;
+give your card `id="<slug>"` and the site shows the measured level and badge on
+it, generated from the report. How to get measured, and the badge to embed, are
+on the [conformance page](conformance/README.md#measured-implementations).
Building an implementation? Start with [Implement a server](SERVING.md) or
[Implement a client](CONNECTING.md).
diff --git a/protocol/conformance/README.md b/protocol/conformance/README.md
index 2f4917d6..29e34bb5 100644
--- a/protocol/conformance/README.md
+++ b/protocol/conformance/README.md
@@ -118,6 +118,32 @@ for a conformance claim and its reader is frequently not the person who ran it:
that produced it. A report without these fields predates suite `2026.8.11.post1`; the
checked-in reports from earlier runs are of that older shape.
+## Measured implementations
+
+<!-- measured-implementations -->
+
+A row here is evidence, not a certificate: the report linked in the row was produced by the
+`conformance-measure` workflow in this repository, against the implementation named, and landed
+by a pull request anyone can read. The badge is generated from that report at every site build
+and exists only for a class that fully passed with no skips; it says the class, the protocol
+version the server served, and nothing else. An implementation that did not pass has no badge.
+
+To be measured, open an issue or comment on your listing pull request with either a reachable
+server root and the credential to use, or the commands that install and start your server, and
+a maintainer dispatches the workflow. A bring-your-own-key host can be measured too: the suite's
+`--header` flag sends the header your server wants, with a key the measurer pays for. Each run
+costs about six small model tasks. Re-measure whenever you release: the newest report wins, and
+older ones stay as history.
+
+```bash
+# What the workflow runs, for a local or self-hosted target
+uhp-conformance --base-url http://127.0.0.1:8787 --api-key "$KEY" --class core --plain \
+ --label "My Server 1.2.0" --json report.json
+# For a host that expects the caller's model key in a header of its own
+uhp-conformance --base-url https://uhp.example.com --api-key "$KEY" --class core \
+ --header "X-Provider-Api-Key: $MODEL_KEY" --json report.json
+```
+
## Reference implementation results
<!-- conformance-recorded-run:start — regenerated by .github/workflows/conformance-remeasure.yml; do not edit by hand -->
diff --git a/protocol/conformance/reports/harnessrouter-ce-0.3.0.json b/protocol/conformance/reports/harnessrouter-ce/harnessrouter-ce-0.3.0.json
similarity index 100%
rename from protocol/conformance/reports/harnessrouter-ce-0.3.0.json
rename to protocol/conformance/reports/harnessrouter-ce/harnessrouter-ce-0.3.0.json
diff --git a/protocol/conformance/reports/harnessrouter-ce-0.7.0.json b/protocol/conformance/reports/harnessrouter-ce/harnessrouter-ce-0.7.0.json
similarity index 100%
rename from protocol/conformance/reports/harnessrouter-ce-0.7.0.json
rename to protocol/conformance/reports/harnessrouter-ce/harnessrouter-ce-0.7.0.json
diff --git a/protocol/conformance/reports/harnessrouter-ce-0.8.0.json b/protocol/conformance/reports/harnessrouter-ce/harnessrouter-ce-0.8.0.json
similarity index 100%
rename from protocol/conformance/reports/harnessrouter-ce-0.8.0.json
rename to protocol/conformance/reports/harnessrouter-ce/harnessrouter-ce-0.8.0.json
diff --git a/protocol/conformance/reports/harnessrouter-ce-0.8.2-rc.json b/protocol/conformance/reports/harnessrouter-ce/harnessrouter-ce-0.8.2-rc.json
similarity index 100%
rename from protocol/conformance/reports/harnessrouter-ce-0.8.2-rc.json
rename to protocol/conformance/reports/harnessrouter-ce/harnessrouter-ce-0.8.2-rc.json
diff --git a/protocol/conformance/reports/harnessrouter-ce-0.9.0-rc.json b/protocol/conformance/reports/harnessrouter-ce/harnessrouter-ce-0.9.0-rc.json
similarity index 100%
rename from protocol/conformance/reports/harnessrouter-ce-0.9.0-rc.json
rename to protocol/conformance/reports/harnessrouter-ce/harnessrouter-ce-0.9.0-rc.json
diff --git a/protocol/conformance/reports/superqode/2026-09-13-full.json b/protocol/conformance/reports/superqode/2026-09-13-full.json
new file mode 100644
index 00000000..54775c69
--- /dev/null
+++ b/protocol/conformance/reports/superqode/2026-09-13-full.json
@@ -0,0 +1,644 @@
+{
+ "protocol": "uhp",
+ "protocol_version": "2026-09-12",
+ "suite_protocol_version": "2026-09-12",
+ "suite_version": "2026.9.12",
+ "generated_at": "2026-09-13T20:17:26Z",
+ "target": "http://127.0.0.1:8787",
+ "target_label": "SuperQode 2.3.1 serve uhp, local bind",
+ "implementation": {
+ "name": "superqode",
+ "version": "2.3.1",
+ "harness": "chrn_core"
+ },
+ "requested_class": "full",
+ "conformant": false,
+ "conformant_with_skips": false,
+ "skipped_not_verified": [
+ "X-07",
+ "F-03",
+ "F-04",
+ "F-06",
+ "P-01",
+ "P-02",
+ "P-03",
+ "P-04",
+ "P-05",
+ "P-06",
+ "P-07",
+ "P-08",
+ "P-09",
+ "P-10",
+ "F-07",
+ "R-01",
+ "R-02",
+ "R-03",
+ "R-04",
+ "R-05",
+ "R-06",
+ "R-07",
+ "R-08"
+ ],
+ "highest_class_passed": "core",
+ "summary": {
+ "pass": 46,
+ "fail": 5,
+ "skip": 23,
+ "error": 0,
+ "total": 74
+ },
+ "checks": [
+ {
+ "id": "D-01",
+ "title": "Discovery document is served",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/lifecycle.md#2-capability-discovery",
+ "outcome": "pass",
+ "detail": "conformance_class=core versions=['2026-09-12', '2026-08-11']"
+ },
+ {
+ "id": "D-02",
+ "title": "Discovery is served without authentication",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/lifecycle.md#2-capability-discovery",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "D-03",
+ "title": "Discovery document matches the schema",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/schema.md",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "D-04",
+ "title": "default_version is one of versions",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/lifecycle.md#2-capability-discovery",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "D-05",
+ "title": "conformance_class agrees with capabilities",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/lifecycle.md#2-capability-discovery",
+ "outcome": "pass",
+ "detail": "class=core"
+ },
+ {
+ "id": "V-01",
+ "title": "UHP-Version header on every response",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/lifecycle.md#1-version-negotiation",
+ "outcome": "pass",
+ "detail": "UHP-Version: 2026-09-12"
+ },
+ {
+ "id": "V-02",
+ "title": "A supported version is honoured",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/lifecycle.md#1-version-negotiation",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "V-03",
+ "title": "An unsupported version is refused, not silently substituted",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/lifecycle.md#1-version-negotiation",
+ "outcome": "pass",
+ "detail": "supported=['2026-09-12', '2026-08-11']"
+ },
+ {
+ "id": "A-01",
+ "title": "Authenticated endpoints reject an absent credential",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/architecture.md#5-authentication",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "A-02",
+ "title": "Authenticated endpoints reject an invalid credential",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/architecture.md#5-authentication",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "E-01",
+ "title": "Errors use the structured envelope",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/errors.md#1-the-error-envelope",
+ "outcome": "pass",
+ "detail": "code=harness_not_found"
+ },
+ {
+ "id": "E-02",
+ "title": "Unknown harness reports harness_not_found",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/errors.md#31-request-and-routing",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "E-03",
+ "title": "Unknown response reports response_not_found",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/errors.md#31-request-and-routing",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "E-04",
+ "title": "Error messages carry no stack traces",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/errors.md#1-the-error-envelope",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "H-01",
+ "title": "Harness list is served and well formed",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#1-discovering-harnesses",
+ "outcome": "pass",
+ "detail": "1 harness(es)"
+ },
+ {
+ "id": "H-02",
+ "title": "A harness can be fetched by id",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#1-discovering-harnesses",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "H-03",
+ "title": "Model catalogue is served and availability is a boolean",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#3-models",
+ "outcome": "pass",
+ "detail": "1/1 models available"
+ },
+ {
+ "id": "H-04",
+ "title": "Per-harness model list is served",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#3-models",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "T-01",
+ "title": "A non-streaming task returns a valid Response",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/tasks.md#3-the-response-object",
+ "outcome": "pass",
+ "detail": "status=completed in 1.7s"
+ },
+ {
+ "id": "T-02",
+ "title": "A finished task is in a terminal state",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/lifecycle.md#3-task-lifecycle",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "T-03",
+ "title": "The response names the model that actually ran",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/tasks.md#13-model-selection-and-substitution",
+ "outcome": "pass",
+ "detail": "model=gpt-5.4-mini"
+ },
+ {
+ "id": "T-04",
+ "title": "The response reports its session",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/lifecycle.md#4-session-lifecycle",
+ "outcome": "pass",
+ "detail": "session_id=hsess7c27ea24f4f7428e"
+ },
+ {
+ "id": "T-05",
+ "title": "usage is an object or explicitly null, never fabricated",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/tasks.md#3-the-response-object",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "T-06",
+ "title": "A stored response can be read back",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/tasks.md#4-reading-a-task-back",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "T-07",
+ "title": "Response ids are prefixed",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/architecture.md#3-object-model",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "S-01",
+ "title": "A streaming task emits events",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/streaming.md#1-opening-a-stream",
+ "outcome": "pass",
+ "detail": "7 events"
+ },
+ {
+ "id": "S-02",
+ "title": "Stream content type is text/event-stream",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/streaming.md#1-opening-a-stream",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "S-03",
+ "title": "Every event validates against the schema",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/schema.md",
+ "outcome": "pass",
+ "detail": "7 events valid"
+ },
+ {
+ "id": "S-04",
+ "title": "sequence_number starts at 0 and has no gaps",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/streaming.md#3-ordering-guarantees",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "S-05",
+ "title": "The first event is response.created",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/streaming.md#3-ordering-guarantees",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "S-06",
+ "title": "The stream ends with exactly one terminal event",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/streaming.md#4-terminal-events",
+ "outcome": "pass",
+ "detail": "terminal=response.completed"
+ },
+ {
+ "id": "S-07",
+ "title": "The terminal event carries the complete response",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/streaming.md#4-terminal-events",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "S-08",
+ "title": "Streaming and non-streaming agree on the result shape",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/streaming.md#6-non-streaming",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "S-09",
+ "title": "The stream is progressive, not buffered to the end",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/streaming.md#1-opening-a-stream",
+ "outcome": "pass",
+ "detail": "events spread over 0.8s"
+ },
+ {
+ "id": "C-01",
+ "title": "A task can continue a session",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/sessions.md#1-continuing-a-session",
+ "outcome": "pass",
+ "detail": "session hsess7c27ea24f4f7428e extended"
+ },
+ {
+ "id": "C-02",
+ "title": "Cancelling a terminal task succeeds and changes nothing",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/sessions.md#4-cancelling",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "C-03",
+ "title": "A running task can be cancelled and ends non-running",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/sessions.md#4-cancelling",
+ "outcome": "pass",
+ "detail": "final status=completed"
+ },
+ {
+ "id": "X-01",
+ "title": "Sessions can be listed",
+ "class": "extended",
+ "spec": "protocol/versions/2026-09-12/sessions.md#2-listing-sessions",
+ "outcome": "pass",
+ "detail": "4 session(s)"
+ },
+ {
+ "id": "X-02",
+ "title": "Session listing reports the end of pagination explicitly",
+ "class": "extended",
+ "spec": "protocol/versions/2026-09-12/sessions.md#2-listing-sessions",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "X-03",
+ "title": "A session can be inspected",
+ "class": "extended",
+ "spec": "protocol/versions/2026-09-12/sessions.md#3-inspecting-a-session",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "X-04",
+ "title": "A session's turn history is available, in the specified shape",
+ "class": "extended",
+ "spec": "protocol/versions/2026-09-12/sessions.md#3-inspecting-a-session",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "X-05",
+ "title": "A file can be sent as task input",
+ "class": "extended",
+ "spec": "protocol/versions/2026-09-12/files.md#1-sending-files-in",
+ "outcome": "pass",
+ "detail": "accepted (the harness did not echo the token, which the protocol does not require)"
+ },
+ {
+ "id": "X-06",
+ "title": "Artifacts of a session can be listed",
+ "class": "extended",
+ "spec": "protocol/versions/2026-09-12/files.md#22-by-listing-the-session",
+ "outcome": "fail",
+ "detail": "GET /v1/sessions/{id}/files returned HTTP 404"
+ },
+ {
+ "id": "X-07",
+ "title": "An artifact downloads as raw bytes with nosniff",
+ "class": "extended",
+ "spec": "protocol/versions/2026-09-12/files.md#3-downloading",
+ "outcome": "skip",
+ "detail": "this session produced no artifacts to download"
+ },
+ {
+ "id": "X-08",
+ "title": "Artifact ids do not traverse outside their container",
+ "class": "extended",
+ "spec": "protocol/versions/2026-09-12/files.md#5-retention-and-scope",
+ "outcome": "pass",
+ "detail": "traversal probes refused"
+ },
+ {
+ "id": "F-01",
+ "title": "A harness can be created, updated and deleted",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#4-managing-harnesses",
+ "outcome": "fail",
+ "detail": "create returned HTTP 405: b'{\"detail\":\"Method Not Allowed\"}'"
+ },
+ {
+ "id": "F-03",
+ "title": "A skill folder round-trips through create and read",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#42-skills",
+ "outcome": "skip",
+ "detail": "could not create a harness to configure (HTTP 405)"
+ },
+ {
+ "id": "F-04",
+ "title": "An unrelated harness edit does not destroy skill contents",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#42-skills",
+ "outcome": "skip",
+ "detail": "could not create a harness to configure (HTTP 405)"
+ },
+ {
+ "id": "F-05",
+ "title": "A skill bundle without SKILL.md is refused at config time",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#42-skills",
+ "outcome": "fail",
+ "detail": "expected 400/422, got HTTP 405"
+ },
+ {
+ "id": "F-06",
+ "title": "MCP servers and disabled tools round-trip",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#41-mcp-servers",
+ "outcome": "skip",
+ "detail": "could not create a harness to configure (HTTP 405)"
+ },
+ {
+ "id": "P-01",
+ "title": "The plugins capability names the manifest schemas it installs",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/plugins.md#7-discovery",
+ "outcome": "skip",
+ "detail": "this server reports the plugins capability false or absent, and the Plugins chapter is optional at every class"
+ },
+ {
+ "id": "P-02",
+ "title": "A plugin package round-trips, and is derived rather than copied",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/plugins.md#2-the-plugin-object",
+ "outcome": "skip",
+ "detail": "this server reports the plugins capability false or absent, and the Plugins chapter is optional at every class"
+ },
+ {
+ "id": "P-03",
+ "title": "A package without plugin.json is refused at configuration time",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/plugins.md#21-files",
+ "outcome": "skip",
+ "detail": "this server reports the plugins capability false or absent, and the Plugins chapter is optional at every class"
+ },
+ {
+ "id": "P-04",
+ "title": "A component name collision across the harness and a plugin is refused",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/plugins.md#42-one-namespace-checked-at-configuration-time",
+ "outcome": "skip",
+ "detail": "this server reports the plugins capability false or absent, and the Plugins chapter is optional at every class"
+ },
+ {
+ "id": "P-05",
+ "title": "An unrelated harness edit does not destroy plugin contents",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/plugins.md#3-installing-a-plugin",
+ "outcome": "skip",
+ "detail": "this server reports the plugins capability false or absent, and the Plugins chapter is optional at every class"
+ },
+ {
+ "id": "P-06",
+ "title": "A harness exports as a package that installs, without its credentials",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/plugins.md#5-exporting-a-harness-as-a-plugin",
+ "outcome": "skip",
+ "detail": "this server reports the plugins capability false or absent, and the Plugins chapter is optional at every class"
+ },
+ {
+ "id": "P-07",
+ "title": "A component that fails to load is recorded, not silently dropped",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/plugins.md#22-what-the-server-derives",
+ "outcome": "skip",
+ "detail": "this server reports the plugins capability false or absent, and the Plugins chapter is optional at every class"
+ },
+ {
+ "id": "P-08",
+ "title": "A disabled plugin stays installed, and stays disabled",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/plugins.md#3-installing-a-plugin",
+ "outcome": "skip",
+ "detail": "this server reports the plugins capability false or absent, and the Plugins chapter is optional at every class"
+ },
+ {
+ "id": "P-09",
+ "title": "An unsupported manifest schema is refused, naming the supported ones",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/plugins.md#22-what-the-server-derives",
+ "outcome": "skip",
+ "detail": "this server reports the plugins capability false or absent, and the Plugins chapter is optional at every class"
+ },
+ {
+ "id": "P-10",
+ "title": "Two plugins with the same name are refused",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/plugins.md#3-installing-a-plugin",
+ "outcome": "skip",
+ "detail": "this server reports the plugins capability false or absent, and the Plugins chapter is optional at every class"
+ },
+ {
+ "id": "F-07",
+ "title": "Configured harnesses are cleaned up",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#53-delete",
+ "outcome": "skip",
+ "detail": "no harnesses were created by earlier checks"
+ },
+ {
+ "id": "F-08",
+ "title": "A session can be deleted at the protocol path",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/sessions.md#6-deleting",
+ "outcome": "fail",
+ "detail": "DELETE /v1/sessions/{id} returned HTTP 405. \u00a76 names this path for session deletion; a server may keep /v1/traces/{id} besides, but the named one must work."
+ },
+ {
+ "id": "F-02",
+ "title": "Creating a harness with an unsupported base is refused",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/harnesses.md#41-create",
+ "outcome": "fail",
+ "detail": "an unsupported base returned HTTP 405; expected it to be refused. A server that accepts a base it cannot run fails at task time instead, after the client has committed."
+ },
+ {
+ "id": "T-08",
+ "title": "A request carrying reserved fields is accepted, not rejected",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/tasks.md#11-request-fields",
+ "outcome": "pass",
+ "detail": "accepted and ran"
+ },
+ {
+ "id": "T-09",
+ "title": "Reserved fields are reported in metadata.ignored_fields",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/tasks.md#14-reserved-fields-tools-and-include",
+ "outcome": "pass",
+ "detail": "ignored_fields=['tools', 'include']"
+ },
+ {
+ "id": "T-10",
+ "title": "A task that sends no reserved field is not told one was ignored",
+ "class": "core",
+ "spec": "protocol/versions/2026-09-12/tasks.md#11-request-fields",
+ "outcome": "pass",
+ "detail": ""
+ },
+ {
+ "id": "R-01",
+ "title": "A shared session is published, and the link alone opens it",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/sessions.md#5-session-sharing",
+ "outcome": "skip",
+ "detail": "this server reports session_sharing false, and Sessions \u00a75 is a MAY"
+ },
+ {
+ "id": "R-02",
+ "title": "The share can be read back from the endpoint that minted it",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/sessions.md#5-session-sharing",
+ "outcome": "skip",
+ "detail": "this server reports session_sharing false, and Sessions \u00a75 is a MAY"
+ },
+ {
+ "id": "R-03",
+ "title": "A share id is not a credential for the API",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/sessions.md#5-session-sharing",
+ "outcome": "skip",
+ "detail": "this server reports session_sharing false, and Sessions \u00a75 is a MAY"
+ },
+ {
+ "id": "R-04",
+ "title": "The shared view is read-only",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/sessions.md#5-session-sharing",
+ "outcome": "skip",
+ "detail": "this server reports session_sharing false, and Sessions \u00a75 is a MAY"
+ },
+ {
+ "id": "R-05",
+ "title": "The shared view exposes no credentials",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/sessions.md#5-session-sharing",
+ "outcome": "skip",
+ "detail": "this server reports session_sharing false, and Sessions \u00a75 is a MAY"
+ },
+ {
+ "id": "R-06",
+ "title": "Revocation kills every link minted for the session",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/sessions.md#5-session-sharing",
+ "outcome": "skip",
+ "detail": "this server reports session_sharing false, and Sessions \u00a75 is a MAY"
+ },
+ {
+ "id": "R-07",
+ "title": "Deleting a session takes its shared view with it",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/sessions.md#6-deleting",
+ "outcome": "skip",
+ "detail": "could not share the disposable session (HTTP 404)"
+ },
+ {
+ "id": "R-08",
+ "title": "A bodyless POST publishes, as \u00a75 says it does",
+ "class": "full",
+ "spec": "protocol/versions/2026-09-12/sessions.md#5-session-sharing",
+ "outcome": "skip",
+ "detail": "this server reports session_sharing false, and Sessions \u00a75 is a MAY"
+ }
+ ]
+}
diff --git a/protocol/conformance/uhp_conformance/cli.py b/protocol/conformance/uhp_conformance/cli.py
index 43938df7..0dfe0a16 100644
--- a/protocol/conformance/uhp_conformance/cli.py
+++ b/protocol/conformance/uhp_conformance/cli.py
@@ -30,9 +30,23 @@ def main(argv=None) -> int:
p.add_argument("--json", dest="json_out", default="", help="Write a JSON report to this path")
p.add_argument("--only", default="", help="Comma-separated check ids to run")
p.add_argument("--plain", action="store_true", help="No ANSI colour")
+ p.add_argument("--header", action="append", default=[], metavar="NAME: VALUE",
+ help="Extra header sent on every request, repeatable. For a target that "
+ "needs something a stock client never sends, e.g. a bring-your-own-key "
+ "host wanting the caller's model key. Never echoed into the report.")
+ p.add_argument("--label", default="",
+ help="How the report names the implementation measured, e.g. 'SuperQode 2.3.1'")
a = p.parse_args(argv)
- ctx = Context(client=Client(a.base_url, a.api_key), harness_id=a.harness_id,
+ extra = {}
+ for item in a.header:
+ name, sep, value = item.partition(":")
+ if not sep or not name.strip():
+ print(f"--header expects 'NAME: VALUE', got {item!r}", file=sys.stderr)
+ return 2
+ extra[name.strip()] = value.strip()
+
+ ctx = Context(client=Client(a.base_url, a.api_key, headers=extra), harness_id=a.harness_id,
model=a.model, task_timeout=a.task_timeout)
selected = checks_for(a.cls)
@@ -56,7 +70,7 @@ def main(argv=None) -> int:
if a.json_out:
with open(a.json_out, "w") as f:
- f.write(to_json(results, a.base_url, a.cls, discovery=discovery) + "\n")
+ f.write(to_json(results, a.base_url, a.cls, discovery=discovery, label=a.label) + "\n")
print(f" JSON report: {a.json_out}\n")
bad = sum(1 for r in results if r.outcome in (Outcome.FAIL, Outcome.ERROR))
diff --git a/protocol/conformance/uhp_conformance/client.py b/protocol/conformance/uhp_conformance/client.py
index 4a39eecd..9dd7d30f 100644
--- a/protocol/conformance/uhp_conformance/client.py
+++ b/protocol/conformance/uhp_conformance/client.py
@@ -41,6 +41,10 @@ class Client:
api_key: str = ""
timeout: float = 300.0
calls: list = field(default_factory=list)
+ # Sent on every request, before the per-call headers. For targets that need something a
+ # stock UHP client never sends, such as a bring-your-own-key host that wants the caller's
+ # model key in a header of its own: the suite measures the protocol, the header pays for it.
+ headers: dict = field(default_factory=dict)
def _url(self, path: str) -> str:
return f"{self.base_url.rstrip('/')}{path}"
@@ -56,6 +60,7 @@ class Client:
h["content-type"] = "application/json"
if content_type:
h["content-type"] = content_type
+ h.update({k.lower(): v for k, v in self.headers.items()})
h.update({k.lower(): v for k, v in (headers or {}).items()})
req = urllib.request.Request(url, data=raw, method=method, headers=h)
@@ -95,6 +100,7 @@ class Client:
h = {"accept": "text/event-stream", "content-type": "application/json"}
if self.api_key:
h["authorization"] = f"Bearer {self.api_key}"
+ h.update({k.lower(): v for k, v in self.headers.items()})
h.update({k.lower(): v for k, v in (headers or {}).items()})
req = urllib.request.Request(url, data=json.dumps(body).encode(), method="POST", headers=h)
diff --git a/protocol/conformance/uhp_conformance/report.py b/protocol/conformance/uhp_conformance/report.py
index 42975c5b..948c460f 100644
--- a/protocol/conformance/uhp_conformance/report.py
+++ b/protocol/conformance/uhp_conformance/report.py
@@ -111,7 +111,7 @@ def _wrap(text: str, width: int):
return out or [""]
-def to_json(results, target: str, cls: str, discovery: dict | None = None) -> str:
+def to_json(results, target: str, cls: str, discovery: dict | None = None, label: str = "") -> str:
n = {o.value: sum(1 for r in results if r.outcome is o) for o in Outcome}
return json.dumps({
"protocol": "uhp",
@@ -127,6 +127,10 @@ def to_json(results, target: str, cls: str, discovery: dict | None = None) -> st
"suite_version": __version__,
"generated_at": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
"target": target,
+ # What was measured, as a name a reader recognises; the site shows this on the measured
+ # implementations list. The implementation block is what the server said about itself.
+ "target_label": label,
+ "implementation": (discovery or {}).get("implementation") or {},
"requested_class": cls,
# A skip is never a pass (README), and the consumer of this file is frequently not the
# person who ran the suite — so the verdict field itself goes strict: a run in which
diff --git a/protocol/site/build.py b/protocol/site/build.py
index 7fcce9e4..9b98649c 100644
--- a/protocol/site/build.py
+++ b/protocol/site/build.py
@@ -70,6 +70,109 @@ def archived_pages():
for v in VERSIONS[1:] for name, title in chapters_for(v)]
+REPORTS = ROOT / "conformance" / "reports"
+
+
+def listing_name(slug: str) -> str:
+ """The name on the examples card whose id is `slug`, for a report that carries no label
+ (the reports recorded before --label existed). The card is the listing's own statement of
+ its name, so the row and the card agree."""
+ m = re.search(rf'id="{re.escape(slug)}">.*?<b>(.*?)</b>', (ROOT / "IMPLEMENTATIONS.md").read_text(), re.S)
+ return html.unescape(re.sub(r"<[^>]+>", "", m.group(1))).strip() if m else ""
+
+
+def measured():
+ """One row per measured implementation: the newest report under conformance/reports/<slug>/.
+
+ A report is evidence the conformance-measure workflow produced and a pull request landed;
+ the slug is the directory name, the display name is the report's own target_label. Nothing
+ here is typed by hand, so a badge can never say more than a report does."""
+ rows = []
+ for d in sorted(p for p in REPORTS.iterdir() if p.is_dir()):
+ reports = []
+ for f in sorted(d.glob("*.json")):
+ r = json.loads(f.read_text())
+ reports.append((r.get("generated_at") or "", f, r))
+ if not reports:
+ continue
+ stamp, f, r = max(reports, key=lambda x: (x[0], x[1].name))
+ level = r.get("highest_class_passed") or ""
+ rows.append({
+ "slug": d.name, "file": f, "report": r,
+ "label": r.get("target_label") or listing_name(d.name)
+ or (r.get("implementation") or {}).get("name") or d.name,
+ "level": level if level in ("core", "extended", "full") else "",
+ "version": r.get("protocol_version") or "",
+ "date": (stamp or "")[:10], "suite": r.get("suite_version") or "",
+ "summary": r.get("summary") or {}, "skipped": r.get("skipped_not_verified") or [],
+ })
+ return rows
+
+
+def badge_svg(level: str, version: str, date: str) -> str:
+ """A flat badge, UHP on the left and the class plus version on the right. Same construction
+ as the README star badge, so an implementer's README shows the two as one family. Green
+ because it only exists for a class that fully passed; there is no red or amber badge, an
+ implementation that did not pass simply has none."""
+ msg = f"{level} {version}"
+ left, right = 40, len(msg) * 7 + 16
+ width = left + right
+ title = f"UHP conformance: {msg}, measured {date}"
+ return (f'<svg xmlns="http://www.w3.org/2000/svg" width="{width}" height="20" viewBox="0 0 {width} 20" '
+ f'role="img" aria-label="{html.escape(title)}">\n'
+ f' <title>{html.escape(title)}</title>\n'
+ f' <rect width="{width}" height="20" rx="3" fill="#444c56"/>\n'
+ f' <path fill="#16824B" d="M{left} 0h{right-3}a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H{left}Z"/>\n'
+ f' <g font-family="Verdana,DejaVu Sans,sans-serif" font-size="11" text-anchor="middle" fill="white">\n'
+ f' <text x="{left/2:g}" y="14" font-weight="bold">UHP</text>\n'
+ f' <text x="{left + right/2:g}" y="14">{html.escape(msg)}</text>\n'
+ f' </g>\n</svg>\n')
+
+
+def measured_markdown() -> str:
+ """The table the conformance page shows under its Measured implementations heading, and the
+ badge snippet each implementer pastes. Generated, so the page and the reports agree."""
+ rows = measured()
+ if not rows:
+ return "_No implementation has been measured yet._\n"
+ out = ["| Implementation | Class | Version served | Measured | Report |", "|---|---|---|---|---|"]
+ for m in rows:
+ s = m["summary"]
+ counts = f"{s.get('pass', 0)}/{s.get('total', 0)} passed"
+ if m["skipped"]:
+ counts += f", {len(m['skipped'])} skipped"
+ level = f"**{m['level']}**" if m["level"] else "no class fully passed"
+ rel = m["file"].relative_to(REPORTS).as_posix()
+ out.append(f"| {m['label']} | {level} | `{m['version']}` | {m['date']} (suite {m['suite']}) "
+ f"| [{counts}](reports/{rel}) |")
+ out.append("")
+ for m in rows:
+ if not m["level"]:
+ continue
+ out.append(f"**{m['label']}** badge, for a README or a site:")
+ out.append("")
+ out.append("```markdown")
+ out.append(f"[![UHP {m['level']} {m['version']}](https://{SITE}/badges/{m['slug']}.svg)]"
+ f"(https://{SITE}/conformance#measured-implementations)")
+ out.append("```")
+ out.append("")
+ return "\n".join(out) + "\n"
+
+
+def inject_levels(examples_html: str) -> str:
+ """On the examples page, a card whose id is a measured slug gets its level. The level comes
+ from the report, never from the card's own text, so a listing cannot promote itself."""
+ for m in measured():
+ if not m["level"]:
+ continue
+ pat = (rf'(<div class="impl-card" id="{re.escape(m["slug"])}">.*?<p class="impl-meta">[^<]*</p>)')
+ badge = (f'\\1<p class="impl-level"><img src="/badges/{m["slug"]}.svg" width="{40 + len(m["level"] + " " + m["version"]) * 7 + 16}" height="20" '
+ f'alt="UHP {m["level"]} {m["version"]}, measured {m["date"]}">'
+ f'<a href="/conformance#measured-implementations">measured {m["date"]}</a></p>')
+ examples_html = re.sub(pat, badge, examples_html, count=1, flags=re.S)
+ return examples_html
+
+
# ── information architecture ────────────────────────────────────────────────────────────
# Mirrors the shape a protocol site is expected to have — an introduction, a versioned
# specification, the machine-readable definitions, conformance, and the change process — so a
@@ -210,6 +313,9 @@ CSS = """
.role-client{background:var(--subtle);color:var(--muted)}
.impl-card p{margin:8px 0 0;color:var(--muted);font-size:14px;line-height:1.55}
.impl-card .impl-meta{margin-top:8px;font:500 12px/1 var(--mono);color:var(--faint)}
+.impl-card .impl-level{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-top:10px;font-size:12px;color:var(--muted)}
+.impl-card .impl-level a{white-space:nowrap}
+.impl-card .impl-level img{display:block;height:20px;width:auto}
/* Drawer nav: primary links shown inside the mobile sidebar drawer only */
.drawernav{display:none;margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.drawernav a{display:block;padding:8px 10px;border-radius:7px;color:var(--ink);
@@ -621,7 +727,9 @@ def rewrite_links(html_text: str, depth: int, version: str = VERSION) -> str:
(r'href="(?:\.\./)*SERVING\.md"', f'href="{up}serving"'),
(r'href="(?:\.\./)*CONNECTING\.md"', f'href="{up}connecting"'),
(r'href="(?:\.\./)*IMPLEMENTATIONS\.md"', f'href="{up}examples"'),
+ (r'href="(?:\.\./)*conformance/README\.md#([^"]+)"', rf'href="{up}conformance#\1"'),
(r'href="(?:\.\./)*conformance/README\.md"', f'href="{up}conformance"'),
+ (r'href="reports/([^"]+\.json)"', rf'href="{up}reports/\1"'), # measured evidence files
(r'href="(?:\.\./)*conformance/?"', f'href="{up}conformance"'),
(r'href="(?:\.\./)*\.\./conformance/"', f'href="{up}conformance"'),
# A same-directory chapter link, with or without a section anchor, stays in this version.
@@ -979,6 +1087,9 @@ def build() -> int:
if path in ("connecting.html", "serving.html"):
md_text += GUIDE_CTA
if path == "conformance.html":
+ marker = "<!-- measured-implementations -->"
+ assert marker in md_text, "conformance/README.md lost its measured-implementations marker"
+ md_text = md_text.replace(marker, measured_markdown(), 1)
md_text += (
"\n\n## Example implementations\n\n"
"The [examples](IMPLEMENTATIONS.md) page lists the servers and clients "
@@ -986,6 +1097,8 @@ def build() -> int:
"not a certification — this suite is the only thing that certifies.\n")
rendered, toc = render_markdown(md_text)
body = rewrite_links(rendered, depth)
+ if path == "examples.html":
+ body = inject_levels(body)
# The home page leads with the hero; its markdown H1 would repeat it.
hero, toc_markup = "", toc_html(toc)
if path == "index.html":
@@ -1086,6 +1199,16 @@ def build() -> int:
shutil.copytree(ROOT / "schema", DIST / "schema",
ignore=shutil.ignore_patterns("build.py", "__pycache__"))
+ # Conformance evidence: every report the repository holds, and a badge for each measured
+ # implementation that fully passed a class. Both are derived from the same files, so the
+ # badge an implementer embeds and the report a reader opens cannot disagree.
+ shutil.copytree(REPORTS, DIST / "reports", ignore=shutil.ignore_patterns("*.md"))
+ (DIST / "badges").mkdir()
+ for m in measured():
+ if m["level"]:
+ (DIST / "badges" / f"{m['slug']}.svg").write_text(
+ badge_svg(m["level"], m["version"], m["date"]))
+
# Brand raster assets (the header logo marks and the favicons) ship with the site and are served
# at root-absolute /assets/… so they resolve from every page depth. Copied before the link check
# so the checker sees the files the <img>/<link> tags reference.