betterwithage commited on
Commit
51f42ca
·
verified ·
1 Parent(s): 462f17e

chore: publish verified SZL bench-plane snapshot

Browse files
Files changed (3) hide show
  1. README.md +35 -7
  2. index.html +386 -82
  3. results.json +26 -18
README.md CHANGED
@@ -1,17 +1,45 @@
1
  ---
2
  title: SZL Bench Suite
3
  emoji: 📐
4
- colorFrom: blue
5
  colorTo: green
6
  sdk: static
7
  app_file: index.html
8
- pinned: true
9
- short_description: Receipted engine, retrieval, and quantization evidence.
10
  ---
11
 
12
  # SZL Bench Suite
13
 
14
- This static Space is the public, fail-closed display for independently verified
15
- engine, retrieval, and quantization receipts. Its publisher binds every result
16
- to the exact Git revision that supplied it and deploys the complete surface in
17
- one provider commit.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: SZL Bench Suite
3
  emoji: 📐
4
+ colorFrom: gray
5
  colorTo: green
6
  sdk: static
7
  app_file: index.html
8
+ pinned: false
9
+ short_description: Receipt-gated engine, retrieval, and quantization evidence
10
  ---
11
 
12
  # SZL Bench Suite
13
 
14
+ This static Space is the consolidated evidence surface for three SZL bench planes:
15
+
16
+ - **Engine** rows admitted from `szl-holdings/frontier-bench` receipts.
17
+ - **Retrieval** — rows admitted from `szl-holdings/retrieval-bench` receipts.
18
+ - **Quantization** — rows admitted from `szl-holdings/quant-curve` receipts.
19
+
20
+ The page does not run benchmarks and does not turn demos, fixtures, projections, or
21
+ in-memory harness output into measurements. `results.json` is assembled only after
22
+ the deployment controller independently recomputes each receipt hash and chain,
23
+ checks the pinned source revision, requires an operator-provisioned HMAC on every
24
+ `MEASURED` envelope, uploads with a parent-commit precondition, and verifies immutable
25
+ and public readback.
26
+
27
+ `EMPTY_HONEST` means the validated payload contains zero admitted measured rows.
28
+ Local service health and public runtime health require separate evidence.
29
+ `UNAVAILABLE` means the payload could not be fetched or validated;
30
+ it is never displayed as an honest empty result set.
31
+
32
+ The existing `BLOCKED` genesis receipts are unsigned and establish integrity continuity,
33
+ not authorship. A measured row is rejected unless its source, workload, raw-artifact
34
+ digests, hardware-evidence digest, machine, time, method, and metrics are authenticated
35
+ with the operator-held key. HMAC authenticates an operator assertion; it is not an
36
+ independent witness that the workload ran. No separate runtime-witness repository is
37
+ claimed until an addressable, independently verifiable witness exists.
38
+
39
+ The browser verifies the SHA-256 digest of the exact result bytes and validates the
40
+ exported schema and authentication metadata. HMAC verification occurs in the controller;
41
+ the public page has neither the shared secret nor an independently verifiable signature.
42
+
43
+ Sources: [frontier-bench](https://github.com/szl-holdings/frontier-bench) ·
44
+ [retrieval-bench](https://github.com/szl-holdings/retrieval-bench) ·
45
+ [quant-curve](https://github.com/szl-holdings/quant-curve)
index.html CHANGED
@@ -1,86 +1,390 @@
1
  <!doctype html>
2
  <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <meta name="color-scheme" content="dark">
7
- <meta name="theme-color" content="#071411">
8
- <meta name="description" content="Receipted SZL engine, retrieval, and quantization evidence.">
9
- <title>SZL Bench Suite</title>
10
- <link rel="stylesheet" href="style.css">
11
- <script src="app.js" defer></script>
12
- </head>
13
- <body>
14
- <a class="skip-link" href="#evidence">Skip to evidence</a>
15
- <header class="hero">
16
- <nav class="nav" aria-label="Primary">
17
- <a class="brand" href="./" aria-label="SZL Bench Suite home">
18
- <span class="brand-mark" aria-hidden="true">SZL</span>
19
- <span>Bench Suite</span>
20
- </a>
21
- <a class="source-link" href="https://github.com/szl-holdings/frontier-bench">Source <span aria-hidden="true">↗</span></a>
22
- </nav>
23
-
24
- <div class="hero-grid">
25
- <div>
26
- <p class="eyebrow">Public evidence surface</p>
27
- <h1>Measurements with receipts,<br><span>or no claim at all.</span></h1>
28
- <p class="lede">One source-bound view of engine, retrieval, and quantization results. Every displayed row passed its owning verifier before publication.</p>
29
- </div>
30
- <aside class="proof-card" aria-label="Publication guarantees">
31
- <p class="proof-kicker">Publication contract</p>
32
- <ul>
33
- <li><span aria-hidden="true">✓</span> Exact source revisions</li>
34
- <li><span aria-hidden="true">✓</span> Independent receipt verification</li>
35
- <li><span aria-hidden="true">✓</span> One atomic provider commit</li>
36
- </ul>
37
- </aside>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  </div>
39
- </header>
40
-
41
- <main id="evidence">
42
- <section class="status-strip" aria-label="Current publication status">
43
- <div><span class="status-dot" aria-hidden="true"></span><span id="load-state">Loading verified evidence…</span></div>
44
- <dl>
45
- <div><dt>Receipts</dt><dd id="receipt-count">—</dd></div>
46
- <div><dt>Sources</dt><dd id="source-count">—</dd></div>
47
- <div><dt>Evidence through</dt><dd id="published-at">—</dd></div>
48
- </dl>
49
- </section>
50
-
51
- <section class="evidence-section" aria-labelledby="evidence-title">
52
- <div class="section-heading">
53
- <div>
54
- <p class="eyebrow">Verified results</p>
55
- <h2 id="evidence-title">Three planes. One truth standard.</h2>
56
- </div>
57
- <p>Empty planes remain visibly empty. BLOCKED, UNAVAILABLE, and unmeasured data are never promoted into benchmark claims.</p>
58
- </div>
59
-
60
- <div class="tabs" role="tablist" aria-label="Benchmark planes">
61
- <button id="tab-engine" role="tab" aria-selected="true" aria-controls="panel-engine" tabindex="0" data-plane="engine">Engine <span id="count-engine">0</span></button>
62
- <button id="tab-retrieval" role="tab" aria-selected="false" aria-controls="panel-retrieval" tabindex="-1" data-plane="retrieval">Retrieval <span id="count-retrieval">0</span></button>
63
- <button id="tab-quant" role="tab" aria-selected="false" aria-controls="panel-quant" tabindex="-1" data-plane="quant">Quantization <span id="count-quant">0</span></button>
64
- </div>
65
-
66
- <div id="panel-engine" class="panel" role="tabpanel" aria-labelledby="tab-engine" data-panel="engine"></div>
67
- <div id="panel-retrieval" class="panel" role="tabpanel" aria-labelledby="tab-retrieval" data-panel="retrieval" hidden></div>
68
- <div id="panel-quant" class="panel" role="tabpanel" aria-labelledby="tab-quant" data-panel="quant" hidden></div>
69
- </section>
70
-
71
- <section class="provenance" aria-labelledby="provenance-title">
72
- <div>
73
- <p class="eyebrow">Reproducibility</p>
74
- <h2 id="provenance-title">Bound to what actually ran.</h2>
75
- <p>The publisher checks out each evidence repository, runs its verifier, and records the exact 40-character revision beside the admitted results.</p>
76
- </div>
77
- <div id="source-list" class="source-list" aria-live="polite"></div>
78
- </section>
79
- </main>
80
-
81
- <footer>
82
- <p>SZL Holdings · Truthful systems engineering</p>
83
- <p id="deployment-state">Deployment receipt loading…</p>
84
- </footer>
85
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  </html>
 
1
  <!doctype html>
2
  <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="Content-Security-Policy" content="default-src 'none'; connect-src 'self'; style-src 'sha256-pLisQ4+f61i84Ygbh4v8nD9F4v+kDXOqDIHxDMwDHIs='; script-src 'sha256-hFf+d9bE3RDuo3J4aT/K8dcyvZX31R7DzCIN3vP1/l4='; base-uri 'none'; form-action 'none'; object-src 'none'">
6
+ <meta name="szl-results-sha256" content="f981c7b33aa0ccc24c070c347fe62fc10737f585577b013dfae44148a3781c28">
7
+ <meta name="viewport" content="width=device-width,initial-scale=1">
8
+ <meta name="color-scheme" content="dark">
9
+ <title>SZL Bench Suite — measured or absent</title>
10
+ <style>
11
+ :root {
12
+ --bg: #081016;
13
+ --panel: #101b23;
14
+ --panel2: #0c151c;
15
+ --line: #263843;
16
+ --ink: #e5eef3;
17
+ --dim: #94a9b5;
18
+ --good: #3de1af;
19
+ --warn: #f5bc4b;
20
+ --bad: #ff6f78;
21
+ --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
22
+ }
23
+ * { box-sizing: border-box; }
24
+ body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--mono); }
25
+ .wrap { width: min(1100px, calc(100% - 30px)); margin: 28px auto 44px; }
26
+ header, .panel, .status { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
27
+ header { padding: 24px; background: linear-gradient(150deg, #11212a, var(--panel2)); }
28
+ .kicker { color: var(--good); font-size: 12px; letter-spacing: .17em; text-transform: uppercase; }
29
+ h1 { margin: 6px 0 8px; font-size: clamp(23px, 5vw, 36px); line-height: 1.2; }
30
+ h2 { margin: 0 0 12px; font-size: 17px; }
31
+ p { margin: 0; }
32
+ .sub { max-width: 78ch; color: var(--dim); }
33
+ .status { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 16px 0; padding: 15px 18px; }
34
+ .badge { border: 1px solid currentColor; border-radius: 999px; padding: 5px 10px; font-weight: 700; white-space: nowrap; }
35
+ .status.good .badge { color: var(--good); }
36
+ .status.warn .badge { color: var(--warn); }
37
+ .status.bad .badge { color: var(--bad); }
38
+ .status-detail { color: var(--dim); font-size: 13px; overflow-wrap: anywhere; }
39
+ nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
40
+ button { border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--dim); font: inherit; padding: 9px 15px; cursor: pointer; }
41
+ button[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: #032018; font-weight: 700; }
42
+ section[hidden] { display: none; }
43
+ .panel { padding: 20px; overflow: hidden; }
44
+ .truth { margin: 14px 0; border-left: 3px solid var(--warn); padding: 10px 13px; color: var(--dim); background: var(--panel2); }
45
+ .table-wrap { overflow-x: auto; }
46
+ table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 13px; }
47
+ th, td { border: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
48
+ th { color: var(--good); background: var(--panel2); }
49
+ tr.measured td:first-child { border-left: 3px solid var(--good); }
50
+ tr.empty td { color: var(--dim); text-align: center; padding: 20px; }
51
+ .links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 15px; font-size: 13px; }
52
+ a { color: var(--good); }
53
+ .provenance { margin-top: 18px; font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
54
+ code { color: var(--ink); }
55
+ footer { margin-top: 22px; text-align: center; color: var(--dim); font-size: 12px; }
56
+ @media (max-width: 620px) {
57
+ .wrap { width: min(100% - 20px, 1100px); margin-top: 10px; }
58
+ header, .panel { padding: 16px; }
59
+ .status { grid-template-columns: 1fr; }
60
+ }
61
+ </style>
62
+ </head>
63
+ <body>
64
+ <main class="wrap">
65
+ <header>
66
+ <div class="kicker">SZL Bench Suite · evidence surface</div>
67
+ <h1>Measured evidence, with an honest empty state.</h1>
68
+ <p class="sub">Engine, retrieval, and quantization rows appear from a controller-admitted payload whose exact <code>results.json</code> bytes match this page. The browser checks the result schema and authentication metadata; the controller verifies receipt HMACs before publication. This page does not run benchmarks.</p>
69
+ </header>
70
+
71
+ <div id="status" class="status warn" role="status" aria-live="polite">
72
+ <span id="status-badge" class="badge">CHECKING</span>
73
+ <span id="status-detail" class="status-detail">Validating results.json…</span>
74
+ </div>
75
+
76
+ <nav aria-label="Bench planes">
77
+ <button type="button" data-target="engine" aria-pressed="true">Engine</button>
78
+ <button type="button" data-target="retrieval" aria-pressed="false">Retrieval</button>
79
+ <button type="button" data-target="quant" aria-pressed="false">Quantization</button>
80
+ </nav>
81
+
82
+ <section id="engine">
83
+ <div class="panel">
84
+ <h2>Engine evidence</h2>
85
+ <div class="truth">Only receipt-backed observations appear here. The current display repository and its API are evidence consumers; they are not proof that an engine workload ran.</div>
86
+ <div class="table-wrap">
87
+ <table>
88
+ <thead><tr><th>Model</th><th>Precision</th><th>Prompt tok/s</th><th>Decode tok/s</th><th>Peak VRAM</th><th>GPU</th><th>Date</th></tr></thead>
89
+ <tbody data-plane="engine"><tr class="empty"><td colspan="7">Checking evidence payload…</td></tr></tbody>
90
+ </table>
91
+ </div>
92
+ <div class="links"><a href="https://github.com/szl-holdings/frontier-bench">frontier-bench source</a></div>
93
+ </div>
94
+ </section>
95
+
96
+ <section id="retrieval" hidden>
97
+ <div class="panel">
98
+ <h2>Retrieval evidence</h2>
99
+ <div class="truth">Rows require a compatible receipt that binds the named method, machine, time, and measured metrics. Hard-coded demo corpora are not silently presented as production evidence.</div>
100
+ <div class="table-wrap">
101
+ <table>
102
+ <thead><tr><th>Corpus</th><th>Method</th><th>nDCG@10</th><th>Recall@100</th><th>MRR</th><th>p50 ms</th><th>GPU</th><th>Date</th></tr></thead>
103
+ <tbody data-plane="retrieval"><tr class="empty"><td colspan="8">Checking evidence payload…</td></tr></tbody>
104
+ </table>
105
+ </div>
106
+ <div class="links"><a href="https://github.com/szl-holdings/retrieval-bench">retrieval-bench source</a></div>
107
+ </div>
108
+ </section>
109
+
110
+ <section id="quant" hidden>
111
+ <div class="panel">
112
+ <h2>Quantization evidence</h2>
113
+ <div class="truth">A plotted point must come from a compatible measured receipt. Synthetic logits, projections, and labels without model-weight and runtime provenance are not admitted.</div>
114
+ <div class="table-wrap">
115
+ <table>
116
+ <thead><tr><th>Model</th><th>Precision</th><th>Perplexity</th><th>Decode tok/s</th><th>Peak VRAM</th><th>GPU</th><th>Date</th></tr></thead>
117
+ <tbody data-plane="quant"><tr class="empty"><td colspan="7">Checking evidence payload…</td></tr></tbody>
118
+ </table>
119
  </div>
120
+ <div class="links"><a href="https://github.com/szl-holdings/quant-curve">quant-curve source</a></div>
121
+ </div>
122
+ </section>
123
+
124
+ <div id="provenance" class="provenance">Source and receipt provenance unavailable until results.json validates.</div>
125
+ <footer>Hash chains establish continuity; admitted MEASURED rows also require the operator-held HMAC key. That authenticates an operator assertion, not independent execution. <span id="stamp"></span></footer>
126
+ </main>
127
+
128
+ <script>
129
+ (() => {
130
+ 'use strict';
131
+ const planes = ['engine', 'retrieval', 'quant'];
132
+ const sourcePins = {
133
+ engine: {repo: 'frontier-bench', revision: '8b1a3ecb5b567b7836f1d9242694722d316e241c', genesis: 'de352dd39bc106b2d64f8f4cad536e4a26317da6c38d64e282dcb107ab179c37'},
134
+ retrieval: {repo: 'retrieval-bench', revision: 'ca61ce3f294db1b6deca9e0734c5605e6f58a01b', genesis: 'dff9bc08a2b4cfed07337b8eb31ca7e6382f4a9da87314cc0e328a89fb89ab06'},
135
+ quant: {repo: 'quant-curve', revision: '3710a43d2566ea1bf820f5687aad07d3de8ea769', genesis: 'cc56e0f6efe1479dd3daccc23d4dabcc0d78de079dac39509f5e4e0777143c0a'}
136
+ };
137
+ const columns = {
138
+ engine: ['model', 'precision', 'prompt_tps', 'decode_tps', 'peak_vram_gb'],
139
+ retrieval: ['corpus', 'method', 'ndcg10', 'recall100', 'mrr', 'p50_ms'],
140
+ quant: ['model', 'precision', 'perplexity', 'decode_tps', 'peak_vram_gb']
141
+ };
142
+ const spans = {engine: 7, retrieval: 8, quant: 7};
143
+ const hash64 = /^[0-9a-f]{64}$/;
144
+ const timestamp = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
145
+ const artifactName = /^[A-Za-z0-9._/-]{1,128}$/;
146
+ const expectedDigest = document.querySelector('meta[name="szl-results-sha256"]')?.content || '';
147
+ const status = document.getElementById('status');
148
+ const badge = document.getElementById('status-badge');
149
+ const detail = document.getElementById('status-detail');
150
+
151
+ document.querySelectorAll('nav button').forEach(button => {
152
+ button.addEventListener('click', () => {
153
+ document.querySelectorAll('nav button').forEach(item => item.setAttribute('aria-pressed', String(item === button)));
154
+ planes.forEach(plane => { document.getElementById(plane).hidden = plane !== button.dataset.target; });
155
+ });
156
+ });
157
+
158
+ function setStatus(kind, label, message) {
159
+ status.className = `status ${kind}`;
160
+ badge.textContent = label;
161
+ detail.textContent = message;
162
+ }
163
+
164
+ function setEmptyRow(plane, message) {
165
+ const body = document.querySelector(`tbody[data-plane="${plane}"]`);
166
+ body.replaceChildren();
167
+ const row = document.createElement('tr');
168
+ row.className = 'empty';
169
+ const cell = document.createElement('td');
170
+ cell.colSpan = spans[plane];
171
+ cell.textContent = message;
172
+ row.appendChild(cell);
173
+ body.appendChild(row);
174
+ }
175
+
176
+ function unavailable(reason) {
177
+ setStatus('bad', 'UNAVAILABLE', reason);
178
+ planes.forEach(plane => setEmptyRow(plane, 'UNAVAILABLE — results payload was not admitted.'));
179
+ document.getElementById('provenance').textContent = 'No result or empty-state claim is displayed because results.json could not be validated.';
180
+ document.getElementById('stamp').textContent = 'results.json unavailable';
181
+ }
182
+
183
+ function isObject(value) {
184
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
185
+ }
186
+
187
+ function exactKeys(value, expected) {
188
+ if (!isObject(value)) return false;
189
+ const actual = Object.keys(value).sort();
190
+ const wanted = [...expected].sort();
191
+ return actual.length === wanted.length && actual.every((key, index) => key === wanted[index]);
192
+ }
193
+
194
+ function boundedText(value, limit = 512) {
195
+ return typeof value === 'string' && value.trim().length > 0 && [...value].length <= limit;
196
+ }
197
+
198
+ function finite(value) {
199
+ return typeof value === 'number' && Number.isFinite(value);
200
+ }
201
+
202
+ function validTime(value) {
203
+ if (typeof value !== 'string' || value.length > 64 || !timestamp.test(value) || Number(value.slice(0, 4)) < 1) return false;
204
+ const parsed = new Date(value);
205
+ return Number.isFinite(parsed.getTime()) && parsed.toISOString().slice(0, 19) === value.slice(0, 19);
206
+ }
207
+
208
+ function validHash(value) {
209
+ return typeof value === 'string' && hash64.test(value);
210
+ }
211
+
212
+ function validMetrics(plane, metrics) {
213
+ if (!isObject(metrics)) return false;
214
+ if (plane === 'engine') {
215
+ return exactKeys(metrics, ['model', 'precision', 'prompt_tps', 'decode_tps', 'peak_vram_gb']) &&
216
+ boundedText(metrics.model) && boundedText(metrics.precision) &&
217
+ finite(metrics.prompt_tps) && metrics.prompt_tps >= 0 &&
218
+ finite(metrics.decode_tps) && metrics.decode_tps >= 0 &&
219
+ finite(metrics.peak_vram_gb) && metrics.peak_vram_gb >= 0;
220
+ }
221
+ if (plane === 'retrieval') {
222
+ return exactKeys(metrics, ['corpus', 'method', 'ndcg10', 'recall100', 'mrr', 'p50_ms']) &&
223
+ boundedText(metrics.corpus) && boundedText(metrics.method) &&
224
+ finite(metrics.ndcg10) && metrics.ndcg10 >= 0 && metrics.ndcg10 <= 1 &&
225
+ finite(metrics.recall100) && metrics.recall100 >= 0 && metrics.recall100 <= 1 &&
226
+ finite(metrics.mrr) && metrics.mrr >= 0 && metrics.mrr <= 1 &&
227
+ finite(metrics.p50_ms) && metrics.p50_ms >= 0;
228
+ }
229
+ return plane === 'quant' &&
230
+ exactKeys(metrics, ['model', 'precision', 'perplexity', 'decode_tps', 'peak_vram_gb']) &&
231
+ boundedText(metrics.model) && boundedText(metrics.precision) &&
232
+ finite(metrics.perplexity) && metrics.perplexity > 0 &&
233
+ finite(metrics.decode_tps) && metrics.decode_tps >= 0 &&
234
+ finite(metrics.peak_vram_gb) && metrics.peak_vram_gb >= 0;
235
+ }
236
+
237
+ function validRow(row, sources) {
238
+ if (!exactKeys(row, ['plane', 'machine', 'measured_at', 'method', 'metrics', 'receipt', 'source_revision', 'workload', 'artifacts', 'hardware_evidence_sha256', 'receipt_auth'])) return false;
239
+ if (!planes.includes(row.plane) || row.source_revision !== sources[row.plane].revision) return false;
240
+ if (!exactKeys(row.machine, ['cpu', 'ram_gb', 'gpu']) ||
241
+ row.machine.cpu !== 'i9-14900HX' || row.machine.ram_gb !== 128 || row.machine.gpu !== 'RTX 4000 Ada 20GB') return false;
242
+ if (!boundedText(row.method, 1024) || !validTime(row.measured_at) || !validHash(row.receipt) ||
243
+ !validHash(row.hardware_evidence_sha256) || !validMetrics(row.plane, row.metrics)) return false;
244
+ if (!exactKeys(row.workload, ['model_revision', 'data_revision', 'configuration_sha256']) ||
245
+ !boundedText(row.workload.model_revision) || !boundedText(row.workload.data_revision) ||
246
+ !validHash(row.workload.configuration_sha256)) return false;
247
+ if (!isObject(row.artifacts) || Object.keys(row.artifacts).length < 1 || Object.keys(row.artifacts).length > 64 ||
248
+ !Object.entries(row.artifacts).every(([name, digest]) => artifactName.test(name) && validHash(digest))) return false;
249
+ return exactKeys(row.receipt_auth, ['alg', 'key_id']) && row.receipt_auth.alg === 'hmac-sha256' &&
250
+ row.receipt_auth.key_id === 'szl-bench-node-hmac-v1';
251
+ }
252
+
253
+ function validate(data) {
254
+ if (!exactKeys(data, ['schema_version', 'generated_at', 'data_state', 'count', 'results_sha256', 'sources', 'results'])) throw new Error('top-level payload fields do not match the contract');
255
+ if (data.schema_version !== 'szl-bench-results/v2') throw new Error('unsupported or missing schema_version');
256
+ if (!validTime(data.generated_at)) throw new Error('generated_at is invalid');
257
+ if (!Array.isArray(data.results)) throw new Error('results is not an array');
258
+ if (!Number.isInteger(data.count) || data.count < 0 || data.count > planes.length * 10000 || data.count !== data.results.length) throw new Error('count does not equal bounded results length');
259
+ if (!validHash(data.results_sha256)) throw new Error('results_sha256 is missing or malformed');
260
+ if (!exactKeys(data.sources, planes)) throw new Error('sources does not contain the exact three planes');
261
+ for (const plane of planes) {
262
+ const source = data.sources[plane];
263
+ const pin = sourcePins[plane];
264
+ if (!exactKeys(source, ['repo', 'revision', 'genesis', 'receipt_count', 'receipt_head', 'integrity']) ||
265
+ source.repo !== pin.repo || source.revision !== pin.revision || source.genesis !== pin.genesis ||
266
+ !Number.isInteger(source.receipt_count) || source.receipt_count < 1 || source.receipt_count > 10000 ||
267
+ !validHash(source.receipt_head) ||
268
+ (source.receipt_count === 1 && source.receipt_head !== source.genesis) ||
269
+ !['VERIFIED_UNSIGNED_EMPTY_CHAIN', 'VERIFIED_CHAIN_AND_HMAC_MEASUREMENTS'].includes(source.integrity)) {
270
+ throw new Error(`invalid ${plane} source provenance`);
271
+ }
272
+ }
273
+ if (!data.results.every(row => validRow(row, data.sources))) throw new Error('one or more result rows violate the admitted schema');
274
+ if (new Set(data.results.map(row => row.receipt)).size !== data.results.length) throw new Error('duplicate exported receipt');
275
+ for (const plane of planes) {
276
+ const measuredCount = data.results.filter(row => row.plane === plane).length;
277
+ const source = data.sources[plane];
278
+ const integrity = measuredCount ? 'VERIFIED_CHAIN_AND_HMAC_MEASUREMENTS' : 'VERIFIED_UNSIGNED_EMPTY_CHAIN';
279
+ if (source.integrity !== integrity || source.receipt_count < measuredCount + 1) throw new Error(`contradictory ${plane} source integrity or receipt count`);
280
+ }
281
+ const expected = data.results.length ? 'MEASURED' : 'EMPTY_HONEST';
282
+ if (data.data_state !== expected) throw new Error('data_state contradicts result count');
283
+ return data;
284
+ }
285
+
286
+ function valueText(value) {
287
+ if (value === null || value === undefined || value === '') return '—';
288
+ return typeof value === 'object' ? JSON.stringify(value) : String(value);
289
+ }
290
+
291
+ function render(data) {
292
+ for (const plane of planes) {
293
+ const rows = data.results.filter(row => row.plane === plane);
294
+ if (!rows.length) {
295
+ setEmptyRow(plane, 'EMPTY_HONEST — no compatible MEASURED receipt has been admitted.');
296
+ continue;
297
+ }
298
+ const body = document.querySelector(`tbody[data-plane="${plane}"]`);
299
+ body.replaceChildren();
300
+ for (const item of rows) {
301
+ const row = document.createElement('tr');
302
+ row.className = 'measured';
303
+ row.title = `receipt ${item.receipt} · source ${item.source_revision}`;
304
+ for (const key of columns[plane]) {
305
+ const cell = document.createElement('td');
306
+ cell.textContent = valueText(item.metrics[key]);
307
+ row.appendChild(cell);
308
+ }
309
+ const gpu = document.createElement('td');
310
+ gpu.textContent = item.machine.gpu;
311
+ row.appendChild(gpu);
312
+ const date = document.createElement('td');
313
+ date.textContent = item.measured_at.slice(0, 10);
314
+ row.appendChild(date);
315
+ body.appendChild(row);
316
+ }
317
+ }
318
+ const isMeasured = data.data_state === 'MEASURED';
319
+ setStatus(isMeasured ? 'good' : 'warn', data.data_state, `${data.count} admitted row(s) · generated ${data.generated_at} · digest ${data.results_sha256}`);
320
+ const sourceText = planes.map(plane => {
321
+ const source = data.sources[plane];
322
+ return `${plane}: ${source.repo}@${source.revision.slice(0, 12)} · chain ${source.receipt_head.slice(0, 12)} · ${source.integrity}`;
323
+ }).join(' | ');
324
+ document.getElementById('provenance').textContent = sourceText;
325
+ document.getElementById('stamp').textContent = `results.json ${data.results_sha256.slice(0, 12)}`;
326
+ }
327
+
328
+ async function sha256Hex(bytes) {
329
+ if (!globalThis.crypto?.subtle) throw new Error('Web Crypto SHA-256 is unavailable');
330
+ const digest = await crypto.subtle.digest('SHA-256', bytes);
331
+ return [...new Uint8Array(digest)].map(byte => byte.toString(16).padStart(2, '0')).join('');
332
+ }
333
+
334
+ async function readBoundedBody(response, maxBytes) {
335
+ if (!response.body || typeof response.body.getReader !== 'function') throw new Error('streaming response bodies are unavailable');
336
+ const reader = response.body.getReader();
337
+ const chunks = [];
338
+ let total = 0;
339
+ try {
340
+ while (true) {
341
+ const {done, value} = await reader.read();
342
+ if (done) break;
343
+ if (!(value instanceof Uint8Array)) throw new Error('results.json returned an invalid stream chunk');
344
+ total += value.byteLength;
345
+ if (total > maxBytes) {
346
+ await reader.cancel('results.json size limit exceeded');
347
+ throw new Error('results.json exceeds 4 MiB');
348
+ }
349
+ chunks.push(value);
350
+ }
351
+ } finally {
352
+ reader.releaseLock();
353
+ }
354
+ const bytes = new Uint8Array(total);
355
+ let offset = 0;
356
+ for (const chunk of chunks) {
357
+ bytes.set(chunk, offset);
358
+ offset += chunk.byteLength;
359
+ }
360
+ return bytes;
361
+ }
362
+
363
+ async function load() {
364
+ if (!hash64.test(expectedDigest)) throw new Error('page lacks a finalized results digest');
365
+ const controller = new AbortController();
366
+ const timer = setTimeout(() => controller.abort(), 10000);
367
+ try {
368
+ const response = await fetch('results.json', {cache: 'no-store', redirect: 'error', credentials: 'omit', signal: controller.signal});
369
+ if (!response.ok) throw new Error(`HTTP ${response.status}`);
370
+ if (!(response.headers.get('content-type') || '').toLowerCase().includes('application/json')) throw new Error('wrong results.json content type');
371
+ const lengthHeader = response.headers.get('content-length');
372
+ if (lengthHeader !== null) {
373
+ const declaredLength = Number(lengthHeader);
374
+ if (!Number.isInteger(declaredLength) || declaredLength < 0) throw new Error('results.json has an invalid content length');
375
+ if (declaredLength > 4194304) throw new Error('results.json exceeds 4 MiB');
376
+ }
377
+ const bytes = await readBoundedBody(response, 4194304);
378
+ if ((await sha256Hex(bytes)) !== expectedDigest) throw new Error('raw results.json digest does not match this page');
379
+ const text = new TextDecoder('utf-8', {fatal: true}).decode(bytes);
380
+ return validate(JSON.parse(text));
381
+ } finally {
382
+ clearTimeout(timer);
383
+ }
384
+ }
385
+
386
+ load().then(render).catch(error => unavailable(`results.json validation failed: ${error.message}`));
387
+ })();
388
+ </script>
389
+ </body>
390
  </html>
results.json CHANGED
@@ -1,26 +1,34 @@
1
  {
2
  "count": 0,
 
3
  "generated_at": "2026-09-04T02:15:00Z",
4
  "results": [],
5
- "schema": "szl.bench-suite.results/v1",
6
- "sources": [
7
- {
8
- "plane": "engine",
9
- "repository": "szl-holdings/frontier-bench",
10
- "revision": "8b1a3ecb5b567b7836f1d9242694722d316e241c",
11
- "verified_results_sha256": "c06271cef9397d0d88ea0cb7f28264a3a79f8711283edfc8b1d86b99addcac4c"
 
 
 
12
  },
13
- {
14
- "plane": "retrieval",
15
- "repository": "szl-holdings/retrieval-bench",
16
- "revision": "ca61ce3f294db1b6deca9e0734c5605e6f58a01b",
17
- "verified_results_sha256": "c06271cef9397d0d88ea0cb7f28264a3a79f8711283edfc8b1d86b99addcac4c"
 
 
18
  },
19
- {
20
- "plane": "quant",
21
- "repository": "szl-holdings/quant-curve",
22
- "revision": "3710a43d2566ea1bf820f5687aad07d3de8ea769",
23
- "verified_results_sha256": "c06271cef9397d0d88ea0cb7f28264a3a79f8711283edfc8b1d86b99addcac4c"
 
 
24
  }
25
- ]
26
  }
 
1
  {
2
  "count": 0,
3
+ "data_state": "EMPTY_HONEST",
4
  "generated_at": "2026-09-04T02:15:00Z",
5
  "results": [],
6
+ "results_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945",
7
+ "schema_version": "szl-bench-results/v2",
8
+ "sources": {
9
+ "engine": {
10
+ "genesis": "de352dd39bc106b2d64f8f4cad536e4a26317da6c38d64e282dcb107ab179c37",
11
+ "integrity": "VERIFIED_UNSIGNED_EMPTY_CHAIN",
12
+ "receipt_count": 1,
13
+ "receipt_head": "de352dd39bc106b2d64f8f4cad536e4a26317da6c38d64e282dcb107ab179c37",
14
+ "repo": "frontier-bench",
15
+ "revision": "8b1a3ecb5b567b7836f1d9242694722d316e241c"
16
  },
17
+ "quant": {
18
+ "genesis": "cc56e0f6efe1479dd3daccc23d4dabcc0d78de079dac39509f5e4e0777143c0a",
19
+ "integrity": "VERIFIED_UNSIGNED_EMPTY_CHAIN",
20
+ "receipt_count": 1,
21
+ "receipt_head": "cc56e0f6efe1479dd3daccc23d4dabcc0d78de079dac39509f5e4e0777143c0a",
22
+ "repo": "quant-curve",
23
+ "revision": "3710a43d2566ea1bf820f5687aad07d3de8ea769"
24
  },
25
+ "retrieval": {
26
+ "genesis": "dff9bc08a2b4cfed07337b8eb31ca7e6382f4a9da87314cc0e328a89fb89ab06",
27
+ "integrity": "VERIFIED_UNSIGNED_EMPTY_CHAIN",
28
+ "receipt_count": 1,
29
+ "receipt_head": "dff9bc08a2b4cfed07337b8eb31ca7e6382f4a9da87314cc0e328a89fb89ab06",
30
+ "repo": "retrieval-bench",
31
+ "revision": "ca61ce3f294db1b6deca9e0734c5605e6f58a01b"
32
  }
33
+ }
34
  }