betterwithage Claude Opus 4.7 commited on
Commit
cabf38a
·
verified ·
1 Parent(s): 8eec9a6

deploy(hf): sync szl-holdings/a11oy@71e056185ec3090ebe633727ec90c3bfbb19bc78 derived COPY set

Browse files

Reusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy 71e056185ec3090ebe633727ec90c3bfbb19bc78.
Files: 1366 Pruned: 0
Derived from Dockerfile COPY sources (NO hand-maintained allowlist).

Signed-off-by: SZL Holdings <noreply@szlholdings.ai>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

pages/hf-tooling.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ /* SPDX-License-Identifier: Apache-2.0 — SZL Holdings */
2
+ :root{color-scheme:dark;--bg:#060c13;--surface:#0d1823;--line:#243747;--text:#edf6ff;--muted:#acbdcd;--accent:#88dce8;--hold:#d3b9f0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none}
3
+ *{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 85% 0%,#152536 0,transparent 50%),var(--bg);color:var(--text);line-height:1.6}a{color:var(--accent);text-underline-offset:4px}button,a,summary{-webkit-tap-highlight-color:transparent}button,summary{cursor:pointer}button{font:inherit;color:var(--text);border:1px solid var(--line);border-radius:999px;background:var(--surface);min-height:44px;padding:9px 18px}button:hover{border-color:var(--accent)}button:disabled{opacity:.65;cursor:wait}a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:4px}button[aria-pressed=true]{background:var(--accent);color:var(--bg);border-color:var(--accent)}[hidden]{display:none!important}.shell{max-width:1200px;width:100%;margin:auto;padding-inline:32px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-top:22px;padding-bottom:22px;border-bottom:1px solid var(--line)}.brand{color:var(--text);font-size:23px;letter-spacing:-1px;font-weight:700;text-decoration:none;display:inline-flex;gap:12px;align-items:center;min-height:44px}.brand span{color:var(--muted);font-size:10px;font-weight:500;letter-spacing:2px}.topbar nav{display:flex;gap:20px;flex-wrap:wrap}.topbar nav a{font-size:13px;text-decoration:none;min-height:44px;display:flex;align-items:center}.hero{padding:68px 0 32px}.eyebrow{font-size:11px;letter-spacing:2.2px;color:var(--accent);margin:0 0 14px}.hero-line{display:flex;align-items:center;justify-content:space-between;gap:20px}h1{font-size:clamp(52px,8vw,100px);line-height:1.02;letter-spacing:-.06em;font-weight:550;margin:0}h1 span{color:var(--accent)}.intro{font-size:clamp(16px,2vw,22px);color:var(--muted);max-width:520px;margin:24px 0}.hero-bottom{display:flex;gap:16px;align-items:center;flex-wrap:wrap}#status{font-size:12px;color:var(--muted)}#refresh{margin-left:auto;font-size:12px}.pill{border:1px solid var(--line);border-radius:999px;font-size:10px;padding:5px 10px;letter-spacing:.6px;display:inline-block;white-space:normal}.hold{color:var(--hold);border-color:#67517e}.orbit{position:relative;width:210px;height:210px;flex-shrink:0;margin-right:60px;perspective:500px;display:grid;place-items:center}.orbit div{position:absolute;inset:10px;border:1px solid #72c6e799;border-radius:50%;box-shadow:0 0 28px #6bbfff16,inset 0 0 35px #6bbfff0a;transform:rotateX(60deg) rotateZ(25deg);animation:orbit 24s linear infinite}.orbit div:nth-child(2){inset:26px;animation-direction:reverse;transform:rotateY(60deg)}.orbit div:nth-child(3){inset:45px;animation-duration:34s}.orbit span{font-size:38px;font-weight:300;letter-spacing:-2px;color:var(--accent)}@keyframes orbit{to{transform:rotateX(60deg) rotateZ(385deg)}}.chain{padding:20px 0;list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-block:1px solid var(--line);gap:14px}.chain li{font-size:13px;min-width:0}.chain b{display:block;font-size:10px;color:var(--accent);font-weight:400;letter-spacing:2px}.chain span{display:block;font-size:11px;color:var(--muted)}.note{font-size:12px;color:var(--muted);max-width:780px;margin-block:12px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-top:48px}.section-heading .eyebrow{margin-bottom:4px}h2{font-size:26px;font-weight:550;line-height:1.25;letter-spacing:-.025em;margin:0}h3{font-size:20px;line-height:1.3;margin:0;font-weight:550}.filters{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 18px}.filters button{font-size:12px}.lanes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.lane{position:relative;overflow:hidden;min-width:0;border:1px solid var(--line);border-radius:18px;padding:24px;background:linear-gradient(135deg,#12243588,transparent),var(--surface)}.lane:before{content:"";position:absolute;inset:0 auto auto 0;height:2px;width:35%;background:linear-gradient(90deg,var(--accent),transparent)}.lane-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.lane .pill{color:var(--accent)}.lane-meta{font-size:11px;color:var(--muted);margin:12px 0}.check-list{list-style:none;padding:0;margin:18px 0}.check-list li{display:flex;justify-content:space-between;gap:12px;font-size:12px;margin:11px 0}.check-list strong{color:var(--accent);font-size:10px;font-weight:500;align-self:flex-start}.check-list span{min-width:0;overflow-wrap:anywhere}.lane details{border-top:1px solid var(--line);padding-top:5px}summary{font-size:12px;padding:12px 0;min-height:44px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;color:var(--muted);padding:12px;border:1px solid var(--line);border-radius:8px}.lane a{font-size:12px;display:inline-flex;align-items:center;min-height:44px}.packages{display:grid;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-top:20px}.package{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1.1fr);gap:12px;background:var(--surface);padding:17px 20px;align-items:center;font-size:12px}.package>*{min-width:0;overflow-wrap:anywhere}.package strong{font-size:13px;font-weight:500}.package small{display:block;color:var(--muted)}.package .state{color:var(--hold)}.package .match{color:var(--accent)}.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}.provenance{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:40px;border-top:1px solid var(--line);padding-top:32px;margin-top:48px}.provenance details{min-width:0}.provenance summary{padding-top:0}.provenance li{color:var(--muted);font-size:12px;margin-bottom:10px}.provenance ul{padding-left:18px}.provenance dl{font-size:11px}.provenance dt{color:var(--muted);margin-top:16px}.provenance dd{margin:4px 0}.source-links{display:flex;gap:16px;flex-wrap:wrap}.source-links a{font-size:12px;min-height:44px;display:flex;align-items:center}.error{padding:24px;background:#281b2d;border:1px solid var(--hold);border-radius:14px;margin:24px 0}.error p{color:var(--muted);font-size:13px}footer{margin-top:60px!important;padding-top:24px;padding-bottom:32px;border-top:1px solid var(--line);font-size:12px;display:flex;gap:24px;justify-content:space-between}footer span{color:var(--muted);max-width:600px;font-size:11px}.skip{position:absolute;top:0;left:-9999px;background:var(--surface);padding:16px;z-index:10}.skip:focus{left:16px}
4
+ @media(max-width:650px){.shell{padding-inline:20px}.hero{padding-top:38px}.topbar{gap:8px}.brand span{display:none}.topbar nav{gap:14px}.orbit{width:120px;height:120px;margin-right:0}.orbit div{inset:2px}.orbit div:nth-child(2){inset:14px}.orbit div:nth-child(3){inset:24px}.orbit span{font-size:25px}.hero-line{gap:8px}h1{font-size:clamp(45px,11vw,70px)}.chain{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.lanes{grid-template-columns:minmax(0,1fr)}.lane{padding:20px}.provenance{grid-template-columns:minmax(0,1fr);gap:20px}.package{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:16px}.package .state{grid-column:1/-1}.hero-bottom{gap:10px}#refresh{margin-left:0;width:100%}.section-heading{margin-top:36px}footer{flex-direction:column;gap:10px}}
5
+ @media(max-width:400px){.hero-line{display:grid;grid-template-columns:minmax(0,1fr) 64px}h1{font-size:38px}.orbit{width:64px;height:64px}.orbit div:nth-child(2){inset:10px}.orbit div:nth-child(3){inset:18px}.orbit span{font-size:20px}}
6
+ @media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important}.orbit div:nth-child(2){transform:rotateY(60deg)}}
7
+ @media(forced-colors:active){.orbit{display:none}.lane,.pill,.packages,.chain,button{border:1px solid CanvasText}.lane:before{display:none}button[aria-pressed=true]{border:3px solid Highlight}}
pages/hf-tooling.html ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
5
+ <meta name="color-scheme" content="dark light">
6
+ <title>Tooling observatory · A11oy</title>
7
+ <meta name="description" content="Executed Forge evaluations, exact source receipts and the packages installed in this A11oy process. Evaluation is not production authorization.">
8
+ <link rel="stylesheet" href="/frontier-tooling/assets/view.css">
9
+ <script type="module" src="/frontier-tooling/assets/view.js"></script>
10
+ <link rel="stylesheet" href="/assets/szl-flow.css" data-szl-flow-asset="style" />
11
+ </head>
12
+ <body>
13
+ <a class="skip" href="#main">Skip to evidence</a>
14
+ <header class="shell topbar"><a class="brand" href="/">A11oy <span>/ TOOLING</span></a><nav aria-label="Product navigation"><a href="/frontier-now">Frontier</a><a href="https://a11oy.net/">Proof ↗</a></nav></header>
15
+ <main id="main" class="shell">
16
+ <section class="hero" aria-labelledby="title">
17
+ <p class="eyebrow">FORGE → PRODUCT · READ ONLY</p>
18
+ <div class="hero-line"><h1 id="title">Tested.<br><span>Traceable.</span></h1><div class="orbit" aria-hidden="true"><div></div><div></div><div></div><span>HF</span></div></div>
19
+ <p class="intro">Executed evaluations. Installed packages. One honest view.</p>
20
+ <div class="hero-bottom"><span class="pill hold">Production HOLD</span><span id="status" role="status" aria-live="polite">Loading evidence…</span><button id="refresh" type="button">Refresh observation</button></div>
21
+ </section>
22
+ <ol class="chain" aria-label="Source and publication order"><li><b>01</b> GitHub <span>source</span></li><li><b>02</b> Hugging Face <span>projection</span></li><li><b>03</b> a-11-oy.com <span>product</span></li><li><b>04</b> a11oy.net <span>proof</span></li></ol>
23
+ <p class="note">This diagram describes the publication order. It does not assert that every deployment is aligned.</p>
24
+ <section id="error" class="error" hidden role="alert"><h2>Evidence unavailable</h2><p id="error-text">No measurements are displayed without a valid archive.</p></section>
25
+ <div id="content" hidden>
26
+ <section aria-labelledby="eval-title"><div class="section-heading"><div><p class="eyebrow">EXECUTED IN FORGE</p><h2 id="eval-title">Evaluation archive</h2></div><span class="pill">Dated measurement</span></div><p id="archive-date" class="note"></p><div id="lane-filters" class="filters" role="group" aria-label="Filter evaluation lanes"></div><div id="lanes" class="lanes"></div></section>
27
+ <section class="runtime" aria-labelledby="runtime-title"><div class="section-heading"><div><p class="eyebrow">OBSERVED IN THIS PROCESS</p><h2 id="runtime-title">Installed now</h2></div><span class="pill">Version metadata only</span></div><p class="note">Missing training or agent packages can be intentional. A version match is not exact-source attestation or production qualification.</p><div id="packages" class="packages"></div><p id="runtime-observed" class="note mono"></p></section>
28
+ <section aria-labelledby="source-title" class="provenance"><div><p class="eyebrow">FOLLOW THE EVIDENCE</p><h2 id="source-title">Source, not a slogan.</h2><p class="note">The backend checks the committed archive bytes and four exact-run receipt hashes on every read. These receipts are unsigned.</p><div id="source-links" class="source-links"></div></div><details><summary>Boundaries & verification</summary><ul id="bounds"></ul><dl><dt>Forge source</dt><dd id="forge-source" class="mono"></dd><dt>Bundled archive SHA-256</dt><dd id="archive-hash" class="mono"></dd><dt>Product source · runtime-reported</dt><dd id="product-source" class="mono"></dd></dl></details></section>
29
+ </div>
30
+ <noscript><p class="error">JavaScript is disabled. Read the <a href="/api/a11oy/v1/frontier-tooling">Python evidence API</a> directly.</p></noscript>
31
+ </main>
32
+ <footer class="shell">SZL Holdings <span>No training, model routing, deployment or billable jobs are initiated by this view.</span></footer>
33
+ <script src="/assets/szl-flow.js" defer data-szl-flow-asset="script"></script>
34
+ </body>
35
+ </html>
pages/hf-tooling.js ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // SPDX-License-Identifier: Apache-2.0 — SZL Holdings
2
+ // Public evidence only. No credentials, local storage, innerHTML or effectors.
3
+ const endpoint = '/api/a11oy/v1/frontier-tooling';
4
+ const $ = (id) => document.getElementById(id);
5
+ const names = {
6
+ filesystem_path_boundary: 'Unsafe download paths rejected',
7
+ httpx_exception_contract: 'Shared HTTP exception contract',
8
+ public_readme_cache_roundtrip: 'Pinned concurrent reads · no dry-run payload',
9
+ sandbox_label_validation: 'Job labels validated before provider access',
10
+ accelerate_cpu_checkpoint_roundtrip: 'CPU checkpoint restored exactly',
11
+ chunked_nll_loss_gradient_parity: 'Eight CPU loss / gradient comparisons',
12
+ long_context_config_only: '1M-token configuration · no training',
13
+ synthetic_generation_offline: 'Tiny local-model generation',
14
+ catalog_does_not_grant_authority: 'Discovery cannot expand the allowlist',
15
+ custom_message_label_roundtrip: 'Evidence messages and bookmarks persisted',
16
+ legacy_compaction_replay: 'Legacy session replay',
17
+ malformed_session_rejected: 'Malformed session records rejected',
18
+ };
19
+ const titles = { VERSION_MATCH_ONLY: 'Version matches · source unverified', VERSION_DIFFERS: 'Different installed version', NOT_INSTALLED: 'Not installed in this process', UNAVAILABLE: 'Metadata unavailable' };
20
+ const expectedIds = ['hub-linux', 'hub-windows', 'trl', 'tau'];
21
+ let controller;
22
+ let requestNumber = 0;
23
+ let currentFilter = 'all';
24
+ let currentData;
25
+
26
+ function element(tag, text, cls) {
27
+ const node = document.createElement(tag);
28
+ if (text !== undefined) node.textContent = String(text);
29
+ if (cls) node.className = cls;
30
+ return node;
31
+ }
32
+ function link(text, url) {
33
+ const node = element('a', text); node.href = url;
34
+ if (url.startsWith('https://')) { node.target = '_blank'; node.rel = 'noopener noreferrer'; }
35
+ return node;
36
+ }
37
+ function valid(data) {
38
+ // The server authenticates the archive against reviewed source. This client
39
+ // additionally refuses malformed projections and any implied action authority.
40
+ if (!data || data.schema !== 'szl.hf-tooling-product.v1' || data.available !== true || data.kind !== 'ARCHIVED_MEASUREMENT' || data.productionDisposition !== 'HOLD') return false;
41
+ if (data.sourceRepository !== 'szl-holdings/szl-forge' || !/^[a-f0-9]{40}$/.test(data.sourceRevision) || !/^[a-f0-9]{64}$/.test(data.archiveSha256)) return false;
42
+ if (!data.authority || Object.keys(data.authority).length !== 6 || Object.values(data.authority).some((v) => v !== false)) return false;
43
+ if (!Number.isSafeInteger(data.workflowRun) || data.workflowRun <= 0 || data.signatureState !== 'UNSIGNED') return false;
44
+ if (!Array.isArray(data.lanes) || data.lanes.length !== 4 || new Set(data.lanes.map((r) => r.id)).size !== 4) return false;
45
+ for (const lane of data.lanes) {
46
+ if (!expectedIds.includes(lane.id) || lane.state !== 'SMOKE_PASS' || !Number.isSafeInteger(lane.artifactId) || lane.artifactId <= 0) return false;
47
+ if (!/^[a-f0-9]{64}$/.test(lane.receiptSha256) || !Array.isArray(lane.sources) || !Array.isArray(lane.remaining)) return false;
48
+ if (!lane.checks || Object.keys(lane.checks).length !== 4 || Object.entries(lane.checks).some(([key, row]) => !names[key] || row.status !== 'PASS' || !row.evidence)) return false;
49
+ }
50
+ return Array.isArray(data.runtime?.packages) && data.runtime.packages.length === 5 && data.runtime.packages.every((row) => row.state in titles && row.exactInstalledSourceVerified === false) && Array.isArray(data.bounds);
51
+ }
52
+ function renderLanes() {
53
+ const fragment = document.createDocumentFragment();
54
+ for (const lane of currentData.lanes.filter((row) => currentFilter === 'all' || row.id.startsWith(currentFilter))) {
55
+ const card = element('article', undefined, 'lane');
56
+ card.dataset.lane = lane.id;
57
+ const top = element('div', undefined, 'lane-top'); top.append(element('h3', lane.label), element('span', 'Smoke passed', 'pill'));
58
+ const versions = lane.sources.map((row) => `${row.package} ${row.version}`).join(' · ');
59
+ card.append(top, element('p', versions, 'lane-meta mono'));
60
+ const list = element('ul', undefined, 'check-list');
61
+ for (const [name, check] of Object.entries(lane.checks)) {
62
+ const row = element('li'); row.append(element('span', names[name]), element('strong', check.status)); list.append(row);
63
+ }
64
+ card.append(list);
65
+ const measured = element('details'); measured.append(element('summary', 'Inspect measured values'));
66
+ measured.append(element('pre', JSON.stringify(lane.checks, null, 2)));
67
+ const remaining = element('details'); remaining.append(element('summary', `${lane.remaining.length} unmeasured requirements`));
68
+ const missing = element('ul'); for (const name of lane.remaining) missing.append(element('li', name.replaceAll('_', ' '))); remaining.append(missing);
69
+ card.append(measured, remaining, link('Read exact receipt →', `${endpoint}/receipts/${lane.id}`)); fragment.append(card);
70
+ }
71
+ $('lanes').replaceChildren(fragment);
72
+ for (const button of $('lane-filters').querySelectorAll('button')) button.setAttribute('aria-pressed', String(button.dataset.filter === currentFilter));
73
+ }
74
+ function render(data) {
75
+ currentData = data;
76
+ const filters = document.createDocumentFragment();
77
+ for (const [id, label] of [['all', 'All evaluations'], ['hub', 'Hub'], ['trl', 'Training'], ['tau', 'Memory']]) {
78
+ const button = element('button', label); button.type = 'button'; button.dataset.filter = id;
79
+ button.addEventListener('click', () => { currentFilter = id; renderLanes(); }); filters.append(button);
80
+ }
81
+ $('lane-filters').replaceChildren(filters); renderLanes();
82
+ $('archive-date').textContent = `Forge run ${data.workflowRun} · measured ${data.lanes[0].observedAt.slice(0, 10)} · four executed platform lanes. Not a live training run.`;
83
+ const packages = document.createDocumentFragment();
84
+ for (const row of data.runtime.packages) {
85
+ const node = element('div', undefined, 'package');
86
+ const label = element('div'); label.append(element('strong', row.package), element('small', `Evaluated ${row.evaluatedVersion}`));
87
+ node.append(label, element('span', row.installedVersion ?? '—', 'mono'), element('span', titles[row.state], `state ${row.state === 'VERSION_MATCH_ONLY' ? 'match' : ''}`)); packages.append(node);
88
+ }
89
+ $('packages').replaceChildren(packages);
90
+ $('runtime-observed').textContent = `Process observation: ${data.runtime.observedAt}`;
91
+ $('forge-source').textContent = data.sourceRevision; $('archive-hash').textContent = data.archiveSha256;
92
+ $('product-source').textContent = data.runtime.productSourceRevision || data.runtime.productSourceState || 'UNAVAILABLE';
93
+ $('bounds').replaceChildren(...data.bounds.map((text) => element('li', text)));
94
+ const base = 'https://github.com/szl-holdings/szl-forge';
95
+ $('source-links').replaceChildren(link('Merged implementation ↗', `${base}/pull/216`), link('Executed workflow ↗', `${base}/actions/runs/${data.workflowRun}`), link('Product API →', endpoint));
96
+ $('content').hidden = false; $('error').hidden = true;
97
+ $('status').textContent = 'Archive verified · process metadata observed';
98
+ }
99
+ async function refresh() {
100
+ const sequence = ++requestNumber;
101
+ controller?.abort(); controller = new AbortController();
102
+ const active = controller; const timer = setTimeout(() => active.abort(), 12000);
103
+ $('refresh').disabled = true; $('status').textContent = 'Checking evidence…';
104
+ // Never leave a previous green result displayed after a failed refresh.
105
+ $('content').hidden = true; $('error').hidden = true;
106
+ try {
107
+ const response = await fetch(endpoint, { signal: active.signal, credentials: 'omit', cache: 'no-store', headers: { Accept: 'application/json' } });
108
+ if (!response.ok || !response.headers.get('content-type')?.includes('application/json')) throw new Error('Evidence API unavailable');
109
+ const text = await response.text(); if (text.length > 131072) throw new Error('Oversized evidence response');
110
+ const data = JSON.parse(text); if (!valid(data)) throw new Error('Evidence response failed validation');
111
+ if (sequence === requestNumber) render(data);
112
+ } catch (error) {
113
+ if (sequence !== requestNumber) return;
114
+ currentData = undefined; $('lanes').replaceChildren(); $('packages').replaceChildren();
115
+ $('content').hidden = true; $('error').hidden = false;
116
+ $('status').textContent = 'UNAVAILABLE · no cached success';
117
+ $('error-text').textContent = error.name === 'AbortError' ? 'The request timed out. Refresh to retry; no cached success is presented.' : 'The source-bound archive could not be verified. No measurements are presented as current.';
118
+ } finally { clearTimeout(timer); if (sequence === requestNumber) $('refresh').disabled = false; }
119
+ }
120
+ $('refresh').addEventListener('click', refresh);
121
+ void refresh();
routers/__init__.py CHANGED
@@ -32,6 +32,10 @@ scheduler, passport authority, or effectors.
32
  candidate evaluator. It copies no third-party source or identity and binds no
33
  signer, credential, persistence layer, scheduler, or effector.
34
 
 
 
 
 
35
  The package top-level name is `routers` (not szl_*/a11oy_*), so it is intentionally
36
  OUTSIDE the guarded-import-liveness first-party scan — and the files exist anyway.
37
 
@@ -45,4 +49,5 @@ __all__ = [
45
  "frontier_now_control_plane",
46
  "atelier_frontier",
47
  "series_a_control_plane",
 
48
  ]
 
32
  candidate evaluator. It copies no third-party source or identity and binds no
33
  signer, credential, persistence layer, scheduler, or effector.
34
 
35
+ `hf_tooling_evidence` is the read-only product view of archived Forge tooling
36
+ measurements and separately observed current-process distribution metadata. It
37
+ confers no model, provider, training, deployment or billable-job authority.
38
+
39
  The package top-level name is `routers` (not szl_*/a11oy_*), so it is intentionally
40
  OUTSIDE the guarded-import-liveness first-party scan — and the files exist anyway.
41
 
 
49
  "frontier_now_control_plane",
50
  "atelier_frontier",
51
  "series_a_control_plane",
52
+ "hf_tooling_evidence",
53
  ]
routers/data/hf-tooling-20260910.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"kind":"ARCHIVED_MEASUREMENT","rows":[{"archiveSha256":"545ae4a636328cefe14804ba956386b9dc6b6680a1d980c8c3533c9f00e71f89","artifactId":10154971656,"id":"hub-linux","report":{"authority":{"automaticPromotion":false,"hubPublication":false,"jobCreation":false,"productionDependencyPromotion":false,"productionRouteChange":false,"toolExecution":false},"authorityChain":["GitHub","Hugging Face","a-11-oy.com","a11oy.net"],"checks":{"filesystem_path_boundary":{"evidence":{"platform":"Linux","unsafeCasesRejectedBeforeWrite":3,"windowsStylePathCovered":true},"status":"PASS"},"httpx_exception_contract":{"evidence":{"networkCalls":0,"sharedExceptionIdentity":true},"status":"PASS"},"public_readme_cache_roundtrip":{"evidence":{"concurrentReaders":3,"dryRunBookkeepingFiles":[".cache/huggingface/.gitignore",".cache/huggingface/CACHEDIR.TAG",".cache/huggingface/download/README.md.lock"],"dryRunCopiedNoPayload":true,"file":"README.md","fileBytes":11813,"fileSha256":"d2d5f307ceeeb649eb7125eb33711f6d579747d5757de8a15f01cec4e533cfaf","repoId":"gdiamos/amx-reasoning-v1-instruct","revision":"b144ee0138929f0181b9219177f98fc7c8d259c9","weightDownload":false},"status":"PASS"},"sandbox_label_validation":{"evidence":{"invalidCases":6,"labels":{"szl-purpose":"evaluation","szl-run":"fixture-run-42","szl-source":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","szl-vertical":"forge"},"providerCallsExecuted":0,"validLabelsAcceptedBeforeApi":true},"status":"PASS"}},"dependencyClosureFullyHashLocked":false,"dependencyInventory":[{"name":"PyYAML","version":"6.0.3"},{"name":"anyio","version":"4.15.1"},{"name":"certifi","version":"2026.7.22"},{"name":"click","version":"8.5.0"},{"name":"filelock","version":"3.32.6"},{"name":"fsspec","version":"2026.7.0"},{"name":"h11","version":"0.16.0"},{"name":"hf-xet","version":"1.6.0"},{"name":"httpcore","version":"1.0.9"},{"name":"httpx","version":"0.28.1"},{"name":"huggingface_hub","version":"1.31.0"},{"name":"idna","version":"3.19"},{"name":"packaging","version":"26.3"},{"name":"pip","version":"25.0.1"},{"name":"tqdm","version":"4.70.0"},{"name":"typing_extensions","version":"4.16.0"}],"environment":{"machine":"x86_64","platform":"Linux","python":"3.12.14"},"installationStatus":"EXACT_SOURCE_VERIFIED","lane":"hub","liveHubRequested":true,"observedAt":"2026-09-10T13:43:31.919772+00:00","productionDisposition":"HOLD","remainingEvaluation":{"billable_sandbox_job_roundtrip":"UNAVAILABLE","injected_header_timeout_resume":"UNAVAILABLE","mutable_ref_atomic_race":"UNAVAILABLE","production_publisher_regression":"UNAVAILABLE"},"reportSha256":"e58473d6755dcd7eb7e75027440fcf6443681967729bfd46d67ab1997ea723fb","runtimeStatus":"SMOKE_PASS","schema":"szl.forge.hf-tooling-runtime.v1","sourceFilesSha256":{"inference/hf_tooling.py":"06af1251b39c5e0a1772ccffb05c9fe161b097528884511029047f83fd62329d","tools/evaluate_hf_tooling.py":"3156e795383a3f3795da71ab5704a1e552dc658611ecf912ca1166b42172a80d"},"sourceRepository":"szl-holdings/szl-forge","sourceRevision":"74a8a07ced6c6b8697b31b7d0e482c4241d55880","sources":[{"package":"huggingface-hub","repository":"huggingface/huggingface_hub","revision":"495b17c8529614759ae0f1ccf1ebe9a61c148b7c","version":"1.31.0"}]}},{"archiveSha256":"133b0fcce6d86837bf5f0e01060607b1c699a1ed8d80fb465ebe077d4fdf37b1","artifactId":10154985719,"id":"hub-windows","report":{"authority":{"automaticPromotion":false,"hubPublication":false,"jobCreation":false,"productionDependencyPromotion":false,"productionRouteChange":false,"toolExecution":false},"authorityChain":["GitHub","Hugging Face","a-11-oy.com","a11oy.net"],"checks":{"filesystem_path_boundary":{"evidence":{"platform":"Windows","unsafeCasesRejectedBeforeWrite":3,"windowsStylePathCovered":true},"status":"PASS"},"httpx_exception_contract":{"evidence":{"networkCalls":0,"sharedExceptionIdentity":true},"status":"PASS"},"public_readme_cache_roundtrip":{"evidence":{"concurrentReaders":3,"dryRunBookkeepingFiles":[".cache/huggingface/.gitignore",".cache/huggingface/CACHEDIR.TAG"],"dryRunCopiedNoPayload":true,"file":"README.md","fileBytes":11813,"fileSha256":"d2d5f307ceeeb649eb7125eb33711f6d579747d5757de8a15f01cec4e533cfaf","repoId":"gdiamos/amx-reasoning-v1-instruct","revision":"b144ee0138929f0181b9219177f98fc7c8d259c9","weightDownload":false},"status":"PASS"},"sandbox_label_validation":{"evidence":{"invalidCases":6,"labels":{"szl-purpose":"evaluation","szl-run":"fixture-run-42","szl-source":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","szl-vertical":"forge"},"providerCallsExecuted":0,"validLabelsAcceptedBeforeApi":true},"status":"PASS"}},"dependencyClosureFullyHashLocked":false,"dependencyInventory":[{"name":"PyYAML","version":"6.0.3"},{"name":"anyio","version":"4.15.1"},{"name":"certifi","version":"2026.7.22"},{"name":"click","version":"8.5.0"},{"name":"colorama","version":"0.4.6"},{"name":"filelock","version":"3.32.6"},{"name":"fsspec","version":"2026.7.0"},{"name":"h11","version":"0.16.0"},{"name":"hf-xet","version":"1.6.0"},{"name":"httpcore","version":"1.0.9"},{"name":"httpx","version":"0.28.1"},{"name":"huggingface_hub","version":"1.31.0"},{"name":"idna","version":"3.19"},{"name":"packaging","version":"26.3"},{"name":"pip","version":"25.0.1"},{"name":"tqdm","version":"4.70.0"},{"name":"typing_extensions","version":"4.16.0"}],"environment":{"machine":"AMD64","platform":"Windows","python":"3.12.10"},"installationStatus":"EXACT_SOURCE_VERIFIED","lane":"hub","liveHubRequested":true,"observedAt":"2026-09-10T13:43:51.937847+00:00","productionDisposition":"HOLD","remainingEvaluation":{"billable_sandbox_job_roundtrip":"UNAVAILABLE","injected_header_timeout_resume":"UNAVAILABLE","mutable_ref_atomic_race":"UNAVAILABLE","production_publisher_regression":"UNAVAILABLE"},"reportSha256":"fe013be7be73640630176e1f3fdc8bae3aa06965a48a117dd20e41a4ca98fe1a","runtimeStatus":"SMOKE_PASS","schema":"szl.forge.hf-tooling-runtime.v1","sourceFilesSha256":{"inference/hf_tooling.py":"06af1251b39c5e0a1772ccffb05c9fe161b097528884511029047f83fd62329d","tools/evaluate_hf_tooling.py":"3156e795383a3f3795da71ab5704a1e552dc658611ecf912ca1166b42172a80d"},"sourceRepository":"szl-holdings/szl-forge","sourceRevision":"74a8a07ced6c6b8697b31b7d0e482c4241d55880","sources":[{"package":"huggingface-hub","repository":"huggingface/huggingface_hub","revision":"495b17c8529614759ae0f1ccf1ebe9a61c148b7c","version":"1.31.0"}]}},{"archiveSha256":"766b9f1c237b92acc93eb4e206a6dd8aadc1fda35cf89815ca77a18e658a1025","artifactId":10155023898,"id":"trl","report":{"authority":{"automaticPromotion":false,"hubPublication":false,"jobCreation":false,"productionDependencyPromotion":false,"productionRouteChange":false,"toolExecution":false},"authorityChain":["GitHub","Hugging Face","a-11-oy.com","a11oy.net"],"checks":{"accelerate_cpu_checkpoint_roundtrip":{"evidence":{"fsdp2Qualification":false,"optimizerSteps":1,"singleProcessCpu":true,"weightsRestoredExactly":true},"status":"PASS"},"chunked_nll_loss_gradient_parity":{"evidence":{"cases":8,"device":"cpu","dtype":"float32","maxGradientAbsoluteError":2.9802322387695312e-08,"maxLossAbsoluteError":4.76837158203125e-07,"performanceBenchmark":false},"status":"PASS"},"long_context_config_only":{"evidence":{"allocatedSequenceTokens":0,"capacityQualification":false,"configuredMaxLength":1048576,"trainingExecuted":false},"status":"PASS"},"synthetic_generation_offline":{"evidence":{"downloadedWeights":false,"generatedTokens":2,"model":"random-local-one-layer-llama","promptTokens":4},"status":"PASS"}},"dependencyClosureFullyHashLocked":false,"dependencyInventory":[{"name":"Jinja2","version":"3.1.6"},{"name":"MarkupSafe","version":"3.0.3"},{"name":"PyYAML","version":"6.0.3"},{"name":"Pygments","version":"2.21.0"},{"name":"accelerate","version":"1.15.0"},{"name":"aiohappyeyeballs","version":"2.7.1"},{"name":"aiohttp","version":"3.14.3"},{"name":"aiosignal","version":"1.4.0"},{"name":"annotated-doc","version":"0.0.5"},{"name":"anyio","version":"4.15.1"},{"name":"attrs","version":"26.1.0"},{"name":"certifi","version":"2026.7.22"},{"name":"charset-normalizer","version":"3.5.1"},{"name":"click","version":"8.5.0"},{"name":"datasets","version":"5.0.1"},{"name":"dill","version":"0.4.1"},{"name":"filelock","version":"3.32.3"},{"name":"frozenlist","version":"1.8.0"},{"name":"fsspec","version":"2026.6.0"},{"name":"h11","version":"0.16.0"},{"name":"hf-xet","version":"1.6.0"},{"name":"httpcore","version":"1.0.9"},{"name":"httpx","version":"0.28.1"},{"name":"huggingface_hub","version":"1.31.0"},{"name":"idna","version":"3.19"},{"name":"markdown-it-py","version":"4.2.0"},{"name":"mdurl","version":"0.1.2"},{"name":"mpmath","version":"1.3.0"},{"name":"multidict","version":"6.8.0"},{"name":"multiprocess","version":"0.70.19"},{"name":"networkx","version":"3.6.1"},{"name":"numpy","version":"2.5.3"},{"name":"packaging","version":"26.3"},{"name":"pandas","version":"3.0.5"},{"name":"pip","version":"25.0.1"},{"name":"propcache","version":"0.5.2"},{"name":"psutil","version":"7.2.2"},{"name":"pyarrow","version":"25.0.1"},{"name":"python-dateutil","version":"2.9.0.post0"},{"name":"regex","version":"2026.9.10"},{"name":"requests","version":"2.34.2"},{"name":"rich","version":"15.0.0"},{"name":"safetensors","version":"0.8.0"},{"name":"setuptools","version":"78.1.0"},{"name":"shellingham","version":"1.5.4"},{"name":"six","version":"1.17.0"},{"name":"sympy","version":"1.14.0"},{"name":"tokenizers","version":"0.23.2"},{"name":"torch","version":"2.10.0+cpu"},{"name":"tqdm","version":"4.70.0"},{"name":"transformers","version":"5.17.0"},{"name":"trl","version":"1.13.0"},{"name":"typer","version":"0.27.2"},{"name":"typing_extensions","version":"4.16.0"},{"name":"urllib3","version":"2.7.0"},{"name":"xxhash","version":"4.0.1"},{"name":"yarl","version":"1.24.5"}],"environment":{"machine":"x86_64","platform":"Linux","python":"3.12.14"},"existingCoreStackGate":{"allChecksPass":false,"authority":{"automaticPromotion":false,"hubPublication":false,"productionDependencyPromotion":false,"productionRouteChange":false,"weightRehosting":false},"checks":{"accelerate_checkpoint_save_load":"PASS","accelerate_dtensor_grad_clip":"UNAVAILABLE","accelerate_fsdp2_activation_checkpointing":"UNAVAILABLE","accelerate_fsdp2_checkpoint_offload":"UNAVAILABLE","accelerate_peft_full_state":"UNAVAILABLE","rollback_to_prior_stack":"UNAVAILABLE","transformers_cache_negative_path":"UNAVAILABLE","transformers_generation_no_unconditional_hub_download":"UNAVAILABLE","transformers_import_api":"PASS","transformers_kernel_fallback_visibility":"UNAVAILABLE","transformers_vision_rope_compatibility":"UNAVAILABLE","trl_chunked_nll":"PASS","trl_fused_loss_parity":"UNAVAILABLE","trl_long_context_config":"PASS","trl_removed_ppo_migration":"UNAVAILABLE","trl_vllm_fail_fast":"UNAVAILABLE"},"disposition":"HOLD"},"installationStatus":"EXACT_SOURCE_VERIFIED","lane":"trl","liveHubRequested":false,"observedAt":"2026-09-10T13:44:44.098802+00:00","productionDisposition":"HOLD","remainingEvaluation":{"distributed_vllm_weight_sync":"UNAVAILABLE","fsdp2_offload":"UNAVAILABLE","fused_dpo_kto_grpo_parity":"UNAVAILABLE","gpu_tensor_core_throughput":"UNAVAILABLE","million_token_training":"UNAVAILABLE","receipt_agent_quality_bakeoff":"UNAVAILABLE"},"reportSha256":"451f24319b1845c73bcbdcd2a9c6aedd1ee2dec581298eb29099cd49bf82ee3b","runtimeStatus":"SMOKE_PASS","schema":"szl.forge.hf-tooling-runtime.v1","sourceFilesSha256":{"inference/hf_tooling.py":"06af1251b39c5e0a1772ccffb05c9fe161b097528884511029047f83fd62329d","tools/evaluate_hf_tooling.py":"3156e795383a3f3795da71ab5704a1e552dc658611ecf912ca1166b42172a80d"},"sourceRepository":"szl-holdings/szl-forge","sourceRevision":"74a8a07ced6c6b8697b31b7d0e482c4241d55880","sources":[{"package":"huggingface-hub","repository":"huggingface/huggingface_hub","revision":"495b17c8529614759ae0f1ccf1ebe9a61c148b7c","version":"1.31.0"},{"package":"transformers","repository":"huggingface/transformers","revision":"856157a2f3e9594954310df18fdccc31ffddebe9","version":"5.17.0"},{"package":"accelerate","repository":"huggingface/accelerate","revision":"6afc1e5ee217051fde702b23de2813344dc0fd33","version":"1.15.0"},{"package":"trl","repository":"huggingface/trl","revision":"3d9261f1fec9f9a8140099c78a65c7da73dce79c","version":"1.13.0"}]}},{"archiveSha256":"4d66b66e506675c352cb091424c0051a66deb2e853b430508763157de5112639","artifactId":10154973349,"id":"tau","report":{"authority":{"automaticPromotion":false,"hubPublication":false,"jobCreation":false,"productionDependencyPromotion":false,"productionRouteChange":false,"toolExecution":false},"authorityChain":["GitHub","Hugging Face","a-11-oy.com","a11oy.net"],"checks":{"catalog_does_not_grant_authority":{"evidence":{"boundary":"SZL host adapter","liveCatalogContacted":false,"newModelsAutomaticallyAdmitted":false},"status":"PASS"},"custom_message_label_roundtrip":{"evidence":{"bookmarkClearReplayed":true,"customMessageReplayed":true,"recordsPersisted":3,"sessionSha256":"7ba13f0e98b49711d792092f04a37694c506796ab3ccf4cb62eff197a8fa9c93"},"status":"PASS"},"legacy_compaction_replay":{"evidence":{"fixtureSha256":"e0039092c893620257b74bc7ece8cc247d3437fbacc17d109e075c9d0acf4d40","legacyReplacementIdReplay":true,"obsoleteLeafCannotSelectTip":true},"status":"PASS"},"malformed_session_rejected":{"evidence":{"malformedEntriesRejected":3},"status":"PASS"}},"dependencyClosureFullyHashLocked":false,"dependencyInventory":[{"name":"Pygments","version":"2.21.0"},{"name":"annotated-doc","version":"0.0.5"},{"name":"annotated-types","version":"0.8.0"},{"name":"anyio","version":"4.15.1"},{"name":"certifi","version":"2026.7.22"},{"name":"h11","version":"0.16.0"},{"name":"httpcore","version":"1.0.9"},{"name":"httpx","version":"0.28.1"},{"name":"idna","version":"3.19"},{"name":"linkify-it-py","version":"2.2.0"},{"name":"markdown-it-py","version":"4.2.0"},{"name":"mdit-py-plugins","version":"0.6.1"},{"name":"mdurl","version":"0.1.2"},{"name":"packaging","version":"26.3"},{"name":"pillow","version":"12.3.0"},{"name":"pip","version":"25.0.1"},{"name":"platformdirs","version":"4.11.8"},{"name":"pydantic","version":"2.13.5"},{"name":"pydantic_core","version":"2.46.5"},{"name":"rich","version":"15.0.0"},{"name":"shellingham","version":"1.5.4"},{"name":"socksio","version":"1.0.0"},{"name":"tau-ai","version":"0.4.2"},{"name":"textual","version":"8.2.8"},{"name":"typer","version":"0.27.2"},{"name":"typing-inspection","version":"0.4.4"},{"name":"typing_extensions","version":"4.16.0"}],"environment":{"machine":"x86_64","platform":"Linux","python":"3.12.14"},"existingTauContractSha256":"54966a372a62e63fe6c677b0e89d059aaa8f6e6d6652e73659f2d0d19edb3655","installationStatus":"EXACT_SOURCE_VERIFIED","lane":"tau","liveHubRequested":false,"observedAt":"2026-09-10T13:43:34.439619+00:00","productionDisposition":"HOLD","remainingEvaluation":{"provider_streaming_negative_paths":"UNAVAILABLE","real_agent_task_baseline":"UNAVAILABLE","shell_lifecycle_isolation":"UNAVAILABLE","tenant_authorized_host_integration":"UNAVAILABLE","zai_serialization":"UNAVAILABLE"},"reportSha256":"fe4dedc6e88e6581e786c98cdeba3b9053bdd27674251ba4e39954ab526eb30f","runtimeStatus":"SMOKE_PASS","schema":"szl.forge.hf-tooling-runtime.v1","sourceFilesSha256":{"inference/hf_tooling.py":"06af1251b39c5e0a1772ccffb05c9fe161b097528884511029047f83fd62329d","tools/evaluate_hf_tooling.py":"3156e795383a3f3795da71ab5704a1e552dc658611ecf912ca1166b42172a80d"},"sourceRepository":"szl-holdings/szl-forge","sourceRevision":"74a8a07ced6c6b8697b31b7d0e482c4241d55880","sources":[{"package":"tau-ai","repository":"huggingface/tau","revision":"55df51608b8b2d172c4bbac2cd11e8345e307476","version":"0.4.2"}]}}],"schema":"szl.hf-tooling-archive.v1","signatureState":"UNSIGNED","sourceRepository":"szl-holdings/szl-forge","sourceRevision":"74a8a07ced6c6b8697b31b7d0e482c4241d55880","workflowRun":34484379349}
routers/frontier_now_web/index.html CHANGED
@@ -62,6 +62,7 @@
62
  <a href="#proof">Proof rail</a>
63
  <a href="/series-a">Series-A authority</a>
64
  <a href="/frontier">Frontier manifest</a>
 
65
  </nav>
66
 
67
  <div class="canvas">
 
62
  <a href="#proof">Proof rail</a>
63
  <a href="/series-a">Series-A authority</a>
64
  <a href="/frontier">Frontier manifest</a>
65
+ <a href="/frontier-tooling">Tooling evaluations</a>
66
  </nav>
67
 
68
  <div class="canvas">
routers/frontier_reads.py CHANGED
@@ -309,6 +309,18 @@ def register(app) -> dict:
309
  "effectors": [],
310
  }
311
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  return {
313
  "ok": True,
314
  "ns": "a11oy",
@@ -316,6 +328,7 @@ def register(app) -> dict:
316
  "series_a": series_a,
317
  "frontier_now": frontier_now,
318
  "atelier_frontier": atelier_frontier,
 
319
  "routes": [
320
  "/api/a11oy/v1/forecast-baseline", "/v1/forecast-baseline",
321
  "/api/a11oy/v1/vertical-packs", "/v1/vertical-packs",
@@ -327,5 +340,6 @@ def register(app) -> dict:
327
  "/atelier/frontier",
328
  "/api/a11oy/v1/atelier/frontier/registry",
329
  "/api/a11oy/v1/atelier/frontier/evaluate",
 
330
  ],
331
  }
 
309
  "effectors": [],
310
  }
311
 
312
+ try:
313
+ from routers import hf_tooling_evidence as _hf_tooling_evidence
314
+
315
+ hf_tooling = _hf_tooling_evidence.register(app, ns="a11oy")
316
+ except Exception as exc: # evidence projection must never take down A11oy
317
+ hf_tooling = {
318
+ "ok": False,
319
+ "state": "UNAVAILABLE",
320
+ "reason": type(exc).__name__,
321
+ "effectors": [],
322
+ }
323
+
324
  return {
325
  "ok": True,
326
  "ns": "a11oy",
 
328
  "series_a": series_a,
329
  "frontier_now": frontier_now,
330
  "atelier_frontier": atelier_frontier,
331
+ "hf_tooling": hf_tooling,
332
  "routes": [
333
  "/api/a11oy/v1/forecast-baseline", "/v1/forecast-baseline",
334
  "/api/a11oy/v1/vertical-packs", "/v1/vertical-packs",
 
340
  "/atelier/frontier",
341
  "/api/a11oy/v1/atelier/frontier/registry",
342
  "/api/a11oy/v1/atelier/frontier/evaluate",
343
+ "/frontier-tooling", "/api/a11oy/v1/frontier-tooling",
344
  ],
345
  }
routers/hf_tooling_evidence.py ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # Copyright 2026 Stephen P. Lutar Jr. and SZL Holdings
3
+ """Read-only product projection of Forge's executed HF tooling evaluations.
4
+
5
+ The archived results and the packages installed in THIS product process are two
6
+ separate observations. Neither a successful smoke test nor a matching version
7
+ confers model, training, deployment or billable-job authority. No remote service
8
+ is contacted, and upstream packages are never imported or installed by a request.
9
+ """
10
+ from __future__ import annotations
11
+
12
+ import hashlib
13
+ import hmac
14
+ import importlib.metadata as metadata
15
+ import json
16
+ import os
17
+ import re
18
+ from datetime import datetime, timezone
19
+ from pathlib import Path
20
+ from typing import Any
21
+
22
+ from fastapi import FastAPI, HTTPException, Request
23
+ from fastapi.responses import Response
24
+
25
+ SCHEMA = "szl.hf-tooling-product.v1"
26
+ FORGE_SOURCE = "74a8a07ced6c6b8697b31b7d0e482c4241d55880"
27
+ FORGE_REPOSITORY = "szl-holdings/szl-forge"
28
+ WORKFLOW_RUN = 34484379349
29
+ BUNDLE_SHA256 = "4efd64ffd9c3e1c5a6de5a7d18b206d5464d8906cbb0a51d51abeef80e74c12d"
30
+ BUNDLE_PATH = Path(__file__).parent / "data" / "hf-tooling-20260910.json"
31
+ PAGE_ROOT = Path(__file__).resolve().parents[1] / "pages"
32
+ MAX_BUNDLE_BYTES = 128 * 1024
33
+ CHAIN = ["GitHub", "Hugging Face", "a-11-oy.com", "a11oy.net"]
34
+ EXPECTED = {
35
+ "hub-linux": ("hub", "Linux", 10154971656,
36
+ "e58473d6755dcd7eb7e75027440fcf6443681967729bfd46d67ab1997ea723fb"),
37
+ "hub-windows": ("hub", "Windows", 10154985719,
38
+ "fe013be7be73640630176e1f3fdc8bae3aa06965a48a117dd20e41a4ca98fe1a"),
39
+ "trl": ("trl", "Linux", 10155023898,
40
+ "451f24319b1845c73bcbdcd2a9c6aedd1ee2dec581298eb29099cd49bf82ee3b"),
41
+ "tau": ("tau", "Linux", 10154973349,
42
+ "fe4dedc6e88e6581e786c98cdeba3b9053bdd27674251ba4e39954ab526eb30f"),
43
+ }
44
+ PACKAGES = {"huggingface-hub": "1.31.0", "transformers": "5.17.0",
45
+ "accelerate": "1.15.0", "trl": "1.13.0", "tau-ai": "0.4.2"}
46
+ LABELS = {"hub-linux": "Hub · Linux", "hub-windows": "Hub · Windows",
47
+ "trl": "Training stack", "tau": "Agent memory"}
48
+ AUTHORITY = {"productionDependencyPromotion": False, "productionRouteChange": False,
49
+ "hubPublication": False, "automaticPromotion": False,
50
+ "jobCreation": False, "toolExecution": False}
51
+ HEADERS = {"Cache-Control": "no-store", "X-Content-Type-Options": "nosniff",
52
+ "Referrer-Policy": "no-referrer"}
53
+ PAGE_HEADERS = {
54
+ **HEADERS,
55
+ "Content-Security-Policy": (
56
+ "default-src 'none'; script-src 'self'; script-src-attr 'none'; "
57
+ "style-src 'self'; style-src-attr 'none'; connect-src 'self'; "
58
+ "img-src 'self'; font-src 'self'; object-src 'none'; base-uri 'none'; "
59
+ "form-action 'none'; frame-ancestors 'self' https://huggingface.co "
60
+ "https://*.hf.space https://*.huggingface.co"
61
+ ),
62
+ "Permissions-Policy": "camera=(), microphone=(), geolocation=(), payment=(), usb=()",
63
+ }
64
+
65
+
66
+ class EvidenceError(ValueError):
67
+ """Missing or modified archive evidence must fail closed."""
68
+
69
+
70
+ def canonical(value: Any) -> bytes:
71
+ return json.dumps(value, ensure_ascii=False, sort_keys=True,
72
+ separators=(",", ":"), allow_nan=False).encode("utf-8")
73
+
74
+
75
+ def _require(condition: bool) -> None:
76
+ if not condition:
77
+ raise EvidenceError("archive_evidence_invalid")
78
+
79
+
80
+ def _unique(pairs: list[tuple[str, Any]]) -> dict[str, Any]:
81
+ result: dict[str, Any] = {}
82
+ for key, value in pairs:
83
+ _require(key not in result)
84
+ result[key] = value
85
+ return result
86
+
87
+
88
+ def validate_bundle(raw: bytes) -> dict[str, Any]:
89
+ """Validate source-committed byte pin AND nested exact-run receipt bindings.
90
+
91
+ This is integrity relative to reviewed source, not signature verification.
92
+ The ZIP digest is historical provenance; we do not redownload ZIPs on GET.
93
+ """
94
+ try:
95
+ _require(type(raw) is bytes and 0 < len(raw) <= MAX_BUNDLE_BYTES)
96
+ _require(hmac.compare_digest(hashlib.sha256(raw).hexdigest(), BUNDLE_SHA256))
97
+ value = json.loads(raw, object_pairs_hook=_unique,
98
+ parse_constant=lambda _: (_ for _ in ()).throw(EvidenceError()))
99
+ _require(value["schema"] == "szl.hf-tooling-archive.v1")
100
+ _require(value["kind"] == "ARCHIVED_MEASUREMENT" and value["signatureState"] == "UNSIGNED")
101
+ _require(value["sourceRepository"] == FORGE_REPOSITORY and value["sourceRevision"] == FORGE_SOURCE)
102
+ _require(type(value["workflowRun"]) is int and value["workflowRun"] == WORKFLOW_RUN)
103
+ _require(type(value["rows"]) is list and len(value["rows"]) == len(EXPECTED))
104
+ seen: set[str] = set()
105
+ for row in value["rows"]:
106
+ identity = row["id"]
107
+ _require(identity in EXPECTED and identity not in seen)
108
+ seen.add(identity)
109
+ lane, platform, artifact, receipt_hash = EXPECTED[identity]
110
+ report = row["report"]
111
+ _require(row["artifactId"] == artifact)
112
+ _require(report["schema"] == "szl.forge.hf-tooling-runtime.v1")
113
+ _require(report["sourceRepository"] == FORGE_REPOSITORY and report["sourceRevision"] == FORGE_SOURCE)
114
+ _require(report["lane"] == lane and report["environment"]["platform"] == platform)
115
+ _require(report["reportSha256"] == receipt_hash)
116
+ _require(hashlib.sha256(canonical({k: v for k, v in report.items() if k != "reportSha256"})).hexdigest() == receipt_hash)
117
+ _require(report["runtimeStatus"] == "SMOKE_PASS" and report["productionDisposition"] == "HOLD")
118
+ _require(report["installationStatus"] == "EXACT_SOURCE_VERIFIED")
119
+ _require(canonical(report["authority"]) == canonical(AUTHORITY))
120
+ _require(report["dependencyClosureFullyHashLocked"] is False)
121
+ _require(len(report["checks"]) == 4 and all(c["status"] == "PASS" for c in report["checks"].values()))
122
+ _require(all(v == "UNAVAILABLE" for v in report["remainingEvaluation"].values()))
123
+ _require(seen == set(EXPECTED))
124
+ return value
125
+ except (KeyError, TypeError, ValueError, UnicodeError, RecursionError) as exc:
126
+ raise EvidenceError("archive_evidence_invalid") from exc
127
+
128
+
129
+ def load_bundle() -> dict[str, Any]:
130
+ # Path is source-defined, never supplied by a request. Size is bounded before
131
+ # parsing; no caching hides a removed or replaced evidence file.
132
+ try:
133
+ with BUNDLE_PATH.open("rb") as stream:
134
+ raw = stream.read(MAX_BUNDLE_BYTES + 1)
135
+ return validate_bundle(raw)
136
+ except OSError as exc:
137
+ raise EvidenceError("archive_evidence_unavailable") from exc
138
+
139
+
140
+ def installed_packages() -> list[dict[str, Any]]:
141
+ """Inspect only distribution metadata; do not import upstream agent code."""
142
+ rows = []
143
+ for name, evaluated in PACKAGES.items():
144
+ try:
145
+ installed = metadata.version(name)
146
+ state = "VERSION_MATCH_ONLY" if installed == evaluated else "VERSION_DIFFERS"
147
+ except metadata.PackageNotFoundError:
148
+ installed, state = None, "NOT_INSTALLED"
149
+ except (OSError, ValueError, TypeError):
150
+ installed, state = None, "UNAVAILABLE"
151
+ rows.append({"package": name, "evaluatedVersion": evaluated,
152
+ "installedVersion": installed, "state": state,
153
+ "exactInstalledSourceVerified": False})
154
+ return rows
155
+
156
+
157
+ def runtime_source() -> tuple[str | None, str]:
158
+ """Read the canonical publisher identity; conflicting aliases stay unknown.
159
+
160
+ hf-sync.yml publishes SZL_GIT_SHA. Older image builds can also carry
161
+ A11OY_GIT_SHA. Do not silently choose one when both report different sources.
162
+ """
163
+ values = {os.environ.get(key, "").strip() for key in ("SZL_GIT_SHA", "A11OY_GIT_SHA")}
164
+ values.discard("")
165
+ if not values:
166
+ return None, "UNAVAILABLE"
167
+ if not all(re.fullmatch(r"[0-9a-f]{40}", value) for value in values):
168
+ return None, "INVALID"
169
+ if len(values) != 1:
170
+ return None, "CONFLICT"
171
+ return values.pop(), "REPORTED"
172
+
173
+
174
+ def project(bundle: dict[str, Any]) -> dict[str, Any]:
175
+ lanes = []
176
+ for row in bundle["rows"]:
177
+ report = row["report"]
178
+ lanes.append({"id": row["id"], "label": LABELS[row["id"]],
179
+ "state": report["runtimeStatus"], "observedAt": report["observedAt"],
180
+ "environment": report["environment"], "sources": report["sources"],
181
+ "checks": report["checks"], "remaining": list(report["remainingEvaluation"]),
182
+ "receiptSha256": report["reportSha256"], "archiveSha256": row["archiveSha256"],
183
+ "artifactId": row["artifactId"]})
184
+ revision, source_state = runtime_source()
185
+ return {"schema": SCHEMA, "available": True, "kind": "ARCHIVED_MEASUREMENT",
186
+ "authorityChain": CHAIN, "archiveSha256": BUNDLE_SHA256,
187
+ "sourceRepository": FORGE_REPOSITORY, "sourceRevision": FORGE_SOURCE,
188
+ "workflowRun": WORKFLOW_RUN, "signatureState": "UNSIGNED", "lanes": lanes,
189
+ "runtime": {"observedAt": datetime.now(timezone.utc).isoformat(),
190
+ "productSourceRevision": revision, "productSourceState": source_state,
191
+ "packages": installed_packages(), "sourceBinding": "RUNTIME_REPORTED_NOT_INDEPENDENTLY_ATTESTED"},
192
+ "productionDisposition": "HOLD", "authority": AUTHORITY,
193
+ "bounds": ["Archived smoke tests, not a live model-quality or uptime measurement.",
194
+ "A matching installed version does not attest the exact installed source.",
195
+ "Million-token configuration was tested; million-token training was not executed.",
196
+ "GPU throughput, distributed training and full provider/agent integration remain unmeasured.",
197
+ "Dependency closure is recorded, not fully hash-locked; receipts are unsigned."]}
198
+
199
+
200
+ def register(app: FastAPI, ns: str = "a11oy") -> dict[str, Any]:
201
+ """Register before the existing API proxy/SPA fallback. GET/HEAD only."""
202
+ if ns != "a11oy":
203
+ raise ValueError("This projection is bound to the canonical A11oy product.")
204
+ intended = {"/api/a11oy/v1/frontier-tooling",
205
+ "/api/a11oy/v1/frontier-tooling/receipts/{lane_id}",
206
+ "/frontier-tooling", "/frontier-tooling/",
207
+ "/frontier-tooling/assets/view.js", "/frontier-tooling/assets/view.css"}
208
+ existing = [route for route in app.routes if getattr(route, "path", None) in intended]
209
+ if existing:
210
+ complete = len(existing) == len(intended) and {route.path for route in existing} == intended
211
+ owned = all(getattr(getattr(route, "endpoint", None), "__module__", None) == __name__
212
+ and getattr(route, "methods", set()) == {"GET", "HEAD"} for route in existing)
213
+ if complete and owned:
214
+ return {"ok": True, "state": "READ_ONLY", "alreadyRegistered": True, "effectors": []}
215
+ raise RuntimeError("HF_TOOLING_ROUTE_COLLISION")
216
+
217
+ def send(request: Request, body: bytes, media_type: str, *, status: int = 200,
218
+ headers: dict[str, str] | None = None) -> Response:
219
+ return Response(content=b"" if request.method == "HEAD" else body,
220
+ status_code=status, media_type=media_type,
221
+ headers={**HEADERS, "Content-Length": str(len(body)), **(headers or {})})
222
+
223
+ @app.api_route("/api/a11oy/v1/frontier-tooling", methods=["GET", "HEAD"])
224
+ def status(request: Request) -> Response:
225
+ try:
226
+ return send(request, canonical(project(load_bundle())), "application/json")
227
+ except EvidenceError:
228
+ return send(request, canonical({"schema": SCHEMA, "available": False,
229
+ "state": "UNAVAILABLE", "productionDisposition": "HOLD", "lanes": [],
230
+ "authority": AUTHORITY, "reasonCode": "archive_evidence_unavailable_or_invalid"}),
231
+ "application/json", status=503)
232
+
233
+ @app.api_route("/api/a11oy/v1/frontier-tooling/receipts/{lane_id}", methods=["GET", "HEAD"])
234
+ def receipt(lane_id: str, request: Request) -> Response:
235
+ if lane_id not in EXPECTED:
236
+ raise HTTPException(404, "Unknown evaluation lane")
237
+ try:
238
+ report = next(row["report"] for row in load_bundle()["rows"] if row["id"] == lane_id)
239
+ return send(request, canonical(report), "application/json")
240
+ except EvidenceError:
241
+ raise HTTPException(503, "Archive evidence unavailable") from None
242
+
243
+ files = {"/frontier-tooling": ("hf-tooling.html", "text/html"),
244
+ "/frontier-tooling/": ("hf-tooling.html", "text/html"),
245
+ "/frontier-tooling/assets/view.js": ("hf-tooling.js", "text/javascript"),
246
+ "/frontier-tooling/assets/view.css": ("hf-tooling.css", "text/css")}
247
+
248
+ def file_handler(name: str, media_type: str):
249
+ def read(request: Request) -> Response:
250
+ try:
251
+ body = (PAGE_ROOT / name).read_bytes()
252
+ except OSError:
253
+ raise HTTPException(503, "Tooling view unavailable") from None
254
+ return send(request, body, media_type, headers=PAGE_HEADERS if media_type == "text/html" else HEADERS)
255
+ return read
256
+
257
+ for index, (path, (name, media_type)) in enumerate(files.items()):
258
+ app.add_api_route(path, file_handler(name, media_type), methods=["GET", "HEAD"],
259
+ name=f"hf_tooling_file_{index}", include_in_schema=False)
260
+ return {"ok": True, "state": "READ_ONLY", "effectors": [], "productionDisposition": "HOLD",
261
+ "routes": ["/frontier-tooling", "/api/a11oy/v1/frontier-tooling"]}