(1);
const [loading, setLoading] = useState(false);
const [error, setError] = useState(false);
@@ -157,7 +160,7 @@ export default function VideoHistory() {
: [...old, ...data.entries.filter((entry) => !old.some((item) => item.id === entry.id))],
);
setNextPage(data.nextPage);
- setReplay(response.headers.get('x-videogenx-replay') === '1');
+ setReplay(response.headers.has('x-videogenx-replay'));
} catch {
if (!signal?.aborted) setError(true);
} finally {
@@ -173,6 +176,8 @@ export default function VideoHistory() {
void load(1, controller.signal);
return () => controller.abort();
}, []);
+ const entries = videoModelHistory([{ schemaVersion: 1, entries: allEntries, nextPage }], model)[0]
+ .entries;
const observations = entries.flatMap((entry) =>
entry.sources.flatMap((source) => source.observations),
);
@@ -328,7 +333,14 @@ export default function VideoHistory() {
{s.failed}: {fmt(point.failed)}
- {status(point.status)}
+
+ {status(point.status)}
+ {point.hardwareHealth?.status === 'fail' && (
+
+ {s.healthExcluded} {point.hardwareHealth.reason}
+
+ )}
+
{fmt(point.p50)} / {fmt(point.p90)}
n={point.samples}
diff --git a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
index 9520d49fc..14a5ac63c 100644
--- a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
+++ b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
@@ -4,8 +4,9 @@ import { Card } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
import { useLocale } from '@/lib/use-locale';
import { leadCell } from './deployment';
-import { hardwareLabel, VIDEO_HARDWARE_ROSTER } from './hardware';
+import { hardwareLabel } from './hardware';
import { formatMetric, metricValue, type MetricId, type VideoPoint } from './metrics';
+import { videoModelHardware } from './models';
import { latestVideoCells } from './points';
import { metricOptions, type VideoDashboardState } from './video-url-state';
@@ -74,7 +75,7 @@ export default function VideoKpiCards({
};
return (
- {VIDEO_HARDWARE_ROSTER.map(({ key, unavailable }) => {
+ {videoModelHardware(state.model, points).map(({ key, unavailable }) => {
const point = leadCell(cells, key, options);
return (
diff --git a/packages/app/src/components/video-benchmark/VideoPointDetails.tsx b/packages/app/src/components/video-benchmark/VideoPointDetails.tsx
new file mode 100644
index 000000000..9899f6a0d
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoPointDetails.tsx
@@ -0,0 +1,156 @@
+'use client';
+
+import { Button } from '@/components/ui/button';
+import { useLocale } from '@/lib/use-locale';
+import { layoutLabel } from './deployment';
+import type { VideoPoint } from './metrics';
+import { QUALITY_METRICS, qualityMeasurement } from './quality';
+import type { VideoDashboardState } from './video-url-state';
+
+const STRINGS = {
+ en: {
+ title: 'Selected measurement',
+ close: 'Close details',
+ configuration: 'Configuration',
+ capacity: 'GPUs per replica / replicas / observed batch / configured maximum batch',
+ counts: 'Valid / completed / scheduled / failed',
+ samples: 'Latency samples',
+ runtime: 'Engine / runtime / precision / attention',
+ settings: 'Generation settings',
+ workload: 'Canonical workload identity',
+ scheduling: 'Scheduling / acceleration / configuration evidence',
+ health: 'Hardware health',
+ unknown: 'unknown',
+ provenance: 'Run / artifact / source',
+ calibration: 'Quality calibration',
+ unjudged: 'unjudged',
+ quality: 'Quality dimension / assessed coverage',
+ score: 'recorded rating',
+ fidelity: 'Numerical fidelity',
+ evidence: 'Original run and artifacts',
+ noHealth:
+ 'No complete health attestation. Absence of a recorded failure does not prove healthy hardware.',
+ cost: 'TCO is modelled from participating GPU-hours; energy is measured GPU-board energy over the recorded generation window.',
+ },
+ zh: {
+ title: '所选测量',
+ close: '关闭详情',
+ configuration: '配置',
+ capacity: '每副本 GPU 数 / 副本数 / 实际 batch / 配置的最大 batch',
+ counts: '有效 / 完成 / 计划 / 失败',
+ samples: '延迟样本数',
+ runtime: '引擎 / runtime / precision / attention',
+ settings: '生成参数',
+ workload: '完整工作负载身份',
+ scheduling: '调度方式 / 加速方法 / 配置证据',
+ health: '硬件健康状态',
+ unknown: '未知',
+ provenance: '运行 / 产物 / 来源',
+ calibration: '质量校准',
+ unjudged: '尚未评判',
+ quality: '质量维度 / 已评覆盖',
+ score: '记录的评分',
+ fidelity: '数值保真度',
+ evidence: '原始运行与产物',
+ noHealth: '缺少完整健康证明。未记录到故障不等于已验证硬件健康。',
+ cost: 'TCO 按参与计算的 GPU 小时建模;能耗为记录的生成窗口内实测 GPU 板卡能耗。',
+ },
+};
+
+export default function VideoPointDetails({
+ point: p,
+ state,
+ onClose,
+}: {
+ point: VideoPoint;
+ state: VideoDashboardState;
+ onClose: () => void;
+}) {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const d = p.deployment;
+ const quality = qualityMeasurement(p, state.qualityMetric);
+ const metric = QUALITY_METRICS[state.qualityMetric];
+ const fields: [string, string | number][] = [
+ [
+ s.configuration,
+ `${layoutLabel(p, locale)} · Ring ${d?.ring ?? '—'} · CFG ${d?.cfg ?? '—'} · offload ${d?.offload ? JSON.stringify(d.offload) : '—'}`,
+ ],
+ [
+ s.capacity,
+ [d?.gpusPerReplica, p.replicas, d?.batchSize, d?.maxBatchSize]
+ .map((v) => v ?? '—')
+ .join(' / '),
+ ],
+ [s.counts, [p.valid, p.completed, p.scheduled, p.failed].map((v) => v ?? '—').join(' / ')],
+ [s.samples, p.samples],
+ [
+ s.runtime,
+ [d?.engine, p.runtime, d?.precision, p.server?.attention].map((v) => v ?? '—').join(' / '),
+ ],
+ [s.settings, d?.generationKey ?? p.workload],
+ [
+ s.scheduling,
+ [
+ d?.scheduling,
+ `batch delay ${d?.batchDelayMs ?? '—'} ms`,
+ d?.acceleration,
+ d?.configEvidence,
+ ]
+ .map((v) => v ?? '—')
+ .join(' / '),
+ ],
+ [
+ s.health,
+ `${p.hardwareHealth?.status ?? s.unknown}: ${p.hardwareHealth?.reason ?? s.noHealth}`,
+ ],
+ [
+ s.quality,
+ `${locale === 'zh' ? metric.labelZh : metric.label} · ${quality?.status ?? s.unjudged} · ${s.score}: ${quality?.value ?? '—'} · ${quality?.samples ?? '—'}/${quality?.total ?? p.samples} · ${quality?.evaluatorId ?? '—'}@${quality?.evaluatorVersion ?? '—'}`,
+ ],
+ [s.calibration, quality?.calibration ? JSON.stringify(quality.calibration) : s.unjudged],
+ [s.fidelity, `${p.provenance?.fidelity ?? '—'} · ${p.provenance?.calibration ?? '—'}`],
+ [s.provenance, `${p.runId} / ${p.artifactId} / ${p.provenance?.sourceId ?? '—'}`],
+ [
+ 'SHA256 / commit',
+ `${p.provenance?.manifestSha256 ?? '—'} / ${p.provenance?.sourceSha ?? '—'}`,
+ ],
+ ];
+ return (
+
+ );
+}
diff --git a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
index aecdf75aa..090852ccb 100644
--- a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
+++ b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
@@ -1,6 +1,7 @@
'use client';
import { DataTable, type DataTableColumn } from '@/components/ui/data-table';
+import { Button } from '@/components/ui/button';
import { useLocale } from '@/lib/use-locale';
import { layoutLabel } from './deployment';
import { hardwareLabel } from './hardware';
@@ -15,6 +16,7 @@ const STRINGS = {
counts: 'Valid / scheduled',
power: 'Board power (W)',
run: 'CI run',
+ details: 'Details',
},
zh: {
hardware: '硬件',
@@ -22,6 +24,7 @@ const STRINGS = {
counts: '有效 / 计划',
power: '板卡功率(W)',
run: 'CI 运行',
+ details: '详情',
},
};
const METRIC_COLUMNS: readonly MetricId[] = [
@@ -33,6 +36,7 @@ const METRIC_COLUMNS: readonly MetricId[] = [
'apiPricePerVideo',
'kjPerVideo',
'powerPctCap',
+ 'quality',
];
/** Rows for the plotted cells, plus provenance. Queued cells stay in the evidence panel. */
@@ -48,10 +52,12 @@ export default function VideoPointsTable({
points,
state,
hidden,
+ onSelect,
}: {
points: VideoPoint[];
state: VideoDashboardState;
hidden: ReadonlySet;
+ onSelect?: (point: VideoPoint) => void;
}) {
const locale = useLocale();
const s = STRINGS[locale];
@@ -81,7 +87,7 @@ export default function VideoPointsTable({
align: 'right',
cell: (p) => formatMetric(metricValue(p, id, options), id),
sortValue: (p) => metricValue(p, id, options) ?? Number.NEGATIVE_INFINITY,
- importance: id === 'p50Latency' || id === 'videosPerDollar' ? 'key' : 'secondary',
+ importance: id === state.x || id === state.y ? 'key' : 'secondary',
})),
{
header: s.power,
@@ -107,6 +113,19 @@ export default function VideoPointsTable({
),
importance: 'secondary',
},
+ ...(onSelect
+ ? [
+ {
+ header: s.details,
+ cell: (p: VideoPoint) => (
+ onSelect(p)}>
+ {s.details}
+
+ ),
+ importance: 'key' as const,
+ },
+ ]
+ : []),
];
return (
qualityMeasurement(p, state.qualityMetric));
+ const evaluators = [
+ ...new Set(
+ results.flatMap((r) =>
+ r?.evaluatorId && r.evaluatorVersion ? [`${r.evaluatorId}@${r.evaluatorVersion}`] : [],
+ ),
+ ),
+ ];
+ const coverage = [
+ ...new Set(
+ points.map((p, i) => `${results[i]?.samples ?? '—'}/${results[i]?.total ?? p.samples}`),
+ ),
+ ].join(', ');
+ const eligible = points.filter(
+ (p) =>
+ qualityEligibility(p, { metric: state.qualityMetric, threshold: state.qualityThreshold })
+ .eligible,
+ ).length;
+ return (
+
+ track('video_quality_evidence_toggled', { open: event.currentTarget.open })
+ }
+ >
+
+ {s.title}: {locale === 'zh' ? metric.labelZh : metric.label} · {s.higher}
+ {' · '}
+ {s.eligible}: {eligible}
+
+
+ {s.coverage}: {coverage || '—'} · {s.evaluator}: {evaluators.join(', ') || s.unavailable} ·{' '}
+ {s.eligible}: {eligible}
+
+
+ {s.threshold}: {state.qualityThreshold ?? s.off}. {s.provenance}
+
+ {eligible === 0 && (
+
+ {results.some((r) => r?.calibration?.status === 'calibrated') ? s.filtered : s.missing}
+
+ )}
+ {s.descriptive}
+
+ );
+}
diff --git a/packages/app/src/components/video-benchmark/VideoServingEvidence.tsx b/packages/app/src/components/video-benchmark/VideoServingEvidence.tsx
new file mode 100644
index 000000000..07df19927
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoServingEvidence.tsx
@@ -0,0 +1,203 @@
+'use client';
+
+import { Card } from '@/components/ui/card';
+import { Heading } from '@/components/ui/heading';
+import { useLocale } from '@/lib/use-locale';
+import type { VideoServingEvidenceRow } from './serving-evidence';
+
+const STRINGS = {
+ en: {
+ title: 'Serving evidence',
+ scope:
+ 'Every loaded planned cell, including failed and zero-sample cells. Chart, quality and hardware filters do not remove these outcomes.',
+ unknown: (count: number) =>
+ `Cells with unknown workload identity: ${count}. They remain visible.`,
+ empty: 'No serving sources in the loaded history.',
+ source: 'Source / hardware',
+ state: 'Execution / load',
+ scheduled: 'Scheduled',
+ attempted: 'Attempt intent',
+ completed: 'Completed',
+ failed: 'Failed attempts',
+ timedOut: 'Timed out',
+ notStarted: 'Not started',
+ valid: 'Technical-valid',
+ unjudged: 'Quality-unjudged',
+ legacyFailedSlots: 'Legacy failed slots',
+ unfinished: 'Unfinished',
+ deliveryDeadlineSeconds: 'Deadline (s)',
+ qualitySloGoodput: 'Quality/SLO goodput (videos/s)',
+ meaning:
+ 'Attempt intent does not prove server receipt. Completed includes local media analysis. Timed out is a subset of failed attempts; legacy failed slots also include invalid and not-started work. Warmups are excluded.',
+ missing:
+ '— means unavailable. Quality/SLO goodput requires a per-request join of technical validity, calibrated quality and delivery deadlines; cell aggregates cannot supply it.',
+ identity: 'Workload identity unknown',
+ statuses: {
+ complete: 'Complete',
+ failed: 'Failed',
+ running: 'Running',
+ not_started: 'Not started',
+ queued: 'Queued',
+ },
+ modes: { closed_loop: 'Closed loop', serial: 'Serial' },
+ provenance: {
+ 'request-ledger': 'Request ledger',
+ 'cell-summary': 'Cell summary',
+ 'legacy-projection': 'Legacy projection',
+ unavailable: 'Evidence unavailable',
+ },
+ },
+ zh: {
+ title: '服务结果记录',
+ scope:
+ '列出已加载的全部计划 cell,包括失败和零样本 cell。图表、质量和硬件筛选不会移除这些结果。',
+ unknown: (count: number) => `${count} 个 cell 的工作负载标识未知,仍保留在表中。`,
+ empty: '已加载的历史中没有服务结果来源。',
+ source: '来源 / 硬件',
+ state: '执行状态 / 负载',
+ scheduled: '计划数',
+ attempted: '已开始尝试',
+ completed: '已完成',
+ failed: '尝试失败',
+ timedOut: '超时',
+ notStarted: '未启动',
+ valid: '技术有效',
+ unjudged: '质量未评估',
+ legacyFailedSlots: '原始失败槽位',
+ unfinished: '尚未结束',
+ deliveryDeadlineSeconds: '交付时限(s)',
+ qualitySloGoodput: '质量 / SLO 有效吞吐量(视频/s)',
+ meaning:
+ '开始尝试不代表服务端已收到请求。“已完成”包含本地媒体分析。超时属于尝试失败的子集;原始失败槽位还包括无效媒体和未启动请求。计数不含 warmup。',
+ missing:
+ '— 表示数据不可用。质量 / SLO 有效吞吐量需要逐请求关联技术有效性、经校准的质量评估和交付时限;cell 汇总值不足以计算该指标。',
+ identity: '工作负载标识未知',
+ statuses: {
+ complete: '已完成',
+ failed: '失败',
+ running: '运行中',
+ not_started: '未启动',
+ queued: '排队中',
+ },
+ modes: { closed_loop: '闭环负载', serial: '串行' },
+ provenance: {
+ 'request-ledger': '请求记录',
+ 'cell-summary': 'cell 汇总',
+ 'legacy-projection': '历史投影',
+ unavailable: '证据不可用',
+ },
+ },
+};
+
+const COLUMNS = [
+ 'scheduled',
+ 'attempted',
+ 'completed',
+ 'failed',
+ 'timedOut',
+ 'notStarted',
+ 'valid',
+ 'unjudged',
+ 'legacyFailedSlots',
+ 'unfinished',
+ 'deliveryDeadlineSeconds',
+ 'qualitySloGoodput',
+] as const;
+
+export default function VideoServingEvidence({ rows }: { rows: VideoServingEvidenceRow[] }) {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const unknown = rows.filter((row) => !row.workloadKey).length;
+ return (
+
+ {s.title}
+ {s.scope}
+ {unknown > 0 && {s.unknown(unknown)}
}
+ {rows.length === 0 ? (
+ {s.empty}
+ ) : (
+
+
+ {s.title}
+
+
+
+ {s.source}
+
+
+ {s.state}
+
+ {COLUMNS.map((column) => (
+
+ {s[column]}
+
+ ))}
+
+
+
+ {rows.map((row) => {
+ const query = new URLSearchParams({
+ view: 'results',
+ run: row.runId,
+ artifact: String(row.artifactId),
+ source: row.sourceId,
+ });
+ if (row.cell) query.set('cell', row.cell);
+ return (
+
+
+ {row.hardware || '—'}
+
+ {row.sourceId} / {row.cell ?? '—'}
+
+ {!row.workloadKey && (
+ {s.identity}
+ )}
+ {row.error && (
+
+ {row.error}
+
+ )}
+
+
+
+ {s.statuses[row.status as keyof typeof s.statuses] ?? (row.status || '—')} ·
+ C{row.concurrency ?? '—'}
+
+
+ {s.modes[row.mode as keyof typeof s.modes] ?? row.mode ?? '—'}
+
+
+ {s.provenance[row.provenance]}
+
+
+ {COLUMNS.map((column) => (
+
+ {row[column] ?? '—'}
+
+ ))}
+
+ );
+ })}
+
+
+
+ )}
+ {s.meaning}
+ {s.missing}
+
+ );
+}
diff --git a/packages/app/src/components/video-benchmark/archive.test.ts b/packages/app/src/components/video-benchmark/archive.test.ts
index 94f70b438..350a8266d 100644
--- a/packages/app/src/components/video-benchmark/archive.test.ts
+++ b/packages/app/src/components/video-benchmark/archive.test.ts
@@ -11,23 +11,26 @@ function archive(files: Record) {
]);
}
describe('CI ZIP import', () => {
- it('verifies and opens a legacy CI artifact', async () => {
- const manifest = JSON.stringify({
- schema_version: 1,
- run_id: '10',
- run_attempt: '1',
- git_commit: 'a'.repeat(40),
- ci: { repository: 'SemiAnalysisAI/InferenceX' },
- });
- const blob = archive({
- 'manifest.json': manifest,
- SHA256SUMS: `${hash(manifest)} manifest.json\n`,
- });
- const [source] = await archiveSources(blob, artifact);
- expect(source.id).toBe('10');
- const bundle = await loadBundle(source.read);
- expect(bundle.manifestSha256).toBe(hash(manifest));
- });
+ it.each(['h3-video-10-1', 'video-serving-10-1'])(
+ 'verifies and opens CI artifact %s',
+ async (name) => {
+ const manifest = JSON.stringify({
+ schema_version: 1,
+ run_id: '10',
+ run_attempt: '1',
+ git_commit: 'a'.repeat(40),
+ ci: { repository: 'SemiAnalysisAI/InferenceX' },
+ });
+ const blob = archive({
+ 'manifest.json': manifest,
+ SHA256SUMS: `${hash(manifest)} manifest.json\n`,
+ });
+ const [source] = await archiveSources(blob, { ...artifact, name });
+ expect(source.id).toBe('10');
+ const bundle = await loadBundle(source.read);
+ expect(bundle.manifestSha256).toBe(hash(manifest));
+ },
+ );
it('preserves original execution identities in an exported archive', async () => {
const index = JSON.stringify({
schema_version: '1.0.0',
diff --git a/packages/app/src/components/video-benchmark/archive.ts b/packages/app/src/components/video-benchmark/archive.ts
index de1e785d9..5d11c7247 100644
--- a/packages/app/src/components/video-benchmark/archive.ts
+++ b/packages/app/src/components/video-benchmark/archive.ts
@@ -66,9 +66,10 @@ export async function archiveSources(blob: Blob, artifact: CIArtifact) {
)
throw new Error('Missing verified archive entry point');
const index: Json = files['index.json'] ? JSON.parse(await read('index.json').text()) : null;
- const identity = /^h3-(?:video|results|fidelity)-(?\d+)-(?\d+)$/u.exec(
- artifact.name,
- )?.groups;
+ const identity =
+ /^(?:h3-(?:video|results|fidelity)|video-serving)-(?\d+)-(?\d+)$/u.exec(
+ artifact.name,
+ )?.groups;
if (!identity) throw new Error('Invalid H3 artifact identity');
if (fidelity) {
const comparison: Json = JSON.parse(await read('comparison.json').text());
diff --git a/packages/app/src/components/video-benchmark/bundle.test.ts b/packages/app/src/components/video-benchmark/bundle.test.ts
index a5eb683f8..d8e715ea4 100644
--- a/packages/app/src/components/video-benchmark/bundle.test.ts
+++ b/packages/app/src/components/video-benchmark/bundle.test.ts
@@ -185,3 +185,32 @@ it.skipIf(!process.env.H3_ARTIFACT_DIR)(
}
},
);
+
+it('rejects a sealed optional result that contradicts its manifest model', async () => {
+ const manifest = {
+ schema_version: 1,
+ run_id: '123',
+ run_attempt: '1',
+ ci: { repository: 'SemiAnalysisAI/InferenceX' },
+ git_commit: 'a'.repeat(40),
+ workload_plan: { model_id: 'Wan-AI/Wan2.2-T2V-A14B-Diffusers' },
+ evidence: {},
+ };
+ const result = {
+ schema_version: '1.0.0',
+ bundle_type: 'h3_benchmark_result',
+ execution: { ci: { run_id: '123' } },
+ workload: { plan: { model_id: 'MiniMaxAI/MiniMax-H3' } },
+ };
+ const files = await fixture({
+ 'manifest.json': JSON.stringify(manifest),
+ 'result.json': JSON.stringify(result),
+ });
+ await expect(loadBundle(files.read)).rejects.toThrow('different video models');
+ result.workload.plan.model_id = 'Wan-AI/Wan2.2-T2V-A14B';
+ const alias = await fixture({
+ 'manifest.json': JSON.stringify(manifest),
+ 'result.json': JSON.stringify(result),
+ });
+ await expect(loadBundle(alias.read)).resolves.toMatchObject({ manifest });
+});
diff --git a/packages/app/src/components/video-benchmark/bundle.ts b/packages/app/src/components/video-benchmark/bundle.ts
index 406f1a77f..7d24d3433 100644
--- a/packages/app/src/components/video-benchmark/bundle.ts
+++ b/packages/app/src/components/video-benchmark/bundle.ts
@@ -1,3 +1,5 @@
+import { canonicalVideoModelId } from './models';
+
export type Json = null | boolean | number | string | Json[] | { [key: string]: Json };
export const ROLES = ['baseline', 'candidate'] as const;
export function at(value: Json | undefined, ...keys: (string | number)[]): Json {
@@ -86,6 +88,15 @@ export async function readVerifiedFiles(
return { files, documents, checksums };
}
+/** Resolve sealed producer identity; an optional result must agree with its manifest. */
+export function bundleModel(manifest: Json, result: Json): string | null {
+ const declared = canonicalVideoModelId(text(at(manifest, 'workload_plan', 'model_id')));
+ const observed = canonicalVideoModelId(text(at(result, 'workload', 'plan', 'model_id')));
+ if (declared && observed && declared !== observed)
+ throw new Error('Manifest and result identify different video models');
+ return declared || observed || null;
+}
+
export async function loadBundle(read: (path: string) => Promise): Promise {
const { files, documents, checksums } = await readVerifiedFiles(read, 'manifest.json');
const manifest = documents.get('manifest.json') ?? null;
@@ -129,6 +140,7 @@ export async function loadBundle(read: (path: string) => Promise): Promise
at(result, 'execution', 'ci', 'run_id') !== at(manifest, 'run_id'))
)
throw new Error('Unsupported or mismatched H3 result contract');
+ bundleModel(manifest, result);
return {
manifest,
result,
diff --git a/packages/app/src/components/video-benchmark/compare.test.ts b/packages/app/src/components/video-benchmark/compare.test.ts
index 8c9ac4a0d..ec229020b 100644
--- a/packages/app/src/components/video-benchmark/compare.test.ts
+++ b/packages/app/src/components/video-benchmark/compare.test.ts
@@ -315,14 +315,14 @@ describe('compareSide', () => {
set(document(inconsistent.sources[0], 'manifest.json'), 'mode', 'fidelity');
expect(() => compareSide(misbundled, h100)).toThrow('Stored result identity mismatch');
expect(() => compareSide(inconsistent, h100)).toThrow(
- 'Invalid H3 serving matrix: CI identity does not match the manifest',
+ 'Invalid video serving matrix: CI identity does not match the manifest',
);
expect(() =>
compareSide(
{ ...inconsistent, sources: [...inconsistent.sources, ...misbundled.sources] },
h100,
),
- ).toThrow('Invalid H3 serving matrix: CI identity does not match the manifest');
+ ).toThrow('Invalid video serving matrix: CI identity does not match the manifest');
// A readable source without the cell does not prove the unreadable one lacked it.
const readable = stored(h100.runId, h100.artifactId, hardware);
expect(() =>
diff --git a/packages/app/src/components/video-benchmark/csv.ts b/packages/app/src/components/video-benchmark/csv.ts
new file mode 100644
index 000000000..4fe705a69
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/csv.ts
@@ -0,0 +1,133 @@
+import { hardwareLabel } from './hardware';
+import { metricValue, VIDEO_METRICS, type MetricId, type VideoPoint } from './metrics';
+import { listedVideoCells } from './plot';
+import { qualityMeasurement } from './quality';
+import { metricOptions, type VideoDashboardState } from './video-url-state';
+
+const METRICS = Object.keys(VIDEO_METRICS) as MetricId[];
+const cell = (value: unknown): string => {
+ if (value === null || value === undefined) return '';
+ const text = typeof value === 'object' ? JSON.stringify(value) : String(value);
+ return /[",\n]/u.test(text) ? `"${text.replaceAll('"', '""')}"` : text;
+};
+
+/** Same selected rows and formulas as the plot, table and public dashboard API. */
+export function videoCsv(points: VideoPoint[], state: VideoDashboardState): string {
+ const options = metricOptions(state);
+ const rows = listedVideoCells(points, state, new Set(state.hidden));
+ const header = [
+ 'id',
+ 'hardware',
+ 'concurrency',
+ 'valid',
+ 'completed',
+ 'scheduled',
+ 'failed',
+ 'latency_samples',
+ 'participating_gpus',
+ 'allocated_gpus',
+ 'gpus_per_replica',
+ 'replicas',
+ 'tp_size',
+ 'ulysses_degree',
+ 'ring',
+ 'cfg',
+ 'observed_batch_size',
+ 'configured_max_batch_size',
+ 'scheduling',
+ 'offload',
+ 'engine',
+ 'runtime',
+ 'precision',
+ 'attention',
+ 'acceleration',
+ 'generation_settings',
+ 'workload_identity',
+ 'hardware_health',
+ 'health_reason',
+ 'quality_dimension',
+ 'quality_status',
+ 'quality_raw_value',
+ 'quality_assessed',
+ 'quality_target',
+ 'evaluator',
+ 'evaluator_version',
+ 'quality_contract',
+ 'quality_calibration',
+ 'reader_quality_threshold',
+ 'threshold_provenance',
+ 'tco_tier',
+ 'api_price_usd_per_video_second',
+ ...METRICS.map((id) => `${id} (${VIDEO_METRICS[id].unit})`),
+ 'board_power_w',
+ 'enforced_limit_w',
+ 'source_id',
+ 'source_sha',
+ 'manifest_sha256',
+ 'artifact_id',
+ 'artifact_digest',
+ 'ci_run',
+ ];
+ const lines = rows.map((p) => {
+ const d = p.deployment;
+ const q = qualityMeasurement(p, state.qualityMetric);
+ return [
+ p.id,
+ hardwareLabel(p.hardwareKey ?? ''),
+ p.concurrency,
+ p.valid,
+ p.completed,
+ p.scheduled,
+ p.failed,
+ p.samples,
+ p.participating,
+ p.allocated,
+ d?.gpusPerReplica,
+ p.replicas,
+ p.server?.tp,
+ p.server?.ulysses,
+ d?.ring,
+ d?.cfg,
+ d?.batchSize,
+ d?.maxBatchSize,
+ d?.scheduling,
+ d?.offload,
+ d?.engine,
+ p.runtime,
+ d?.precision,
+ p.server?.attention,
+ d?.acceleration,
+ d?.generationKey,
+ p.workloadKey,
+ p.hardwareHealth?.status,
+ p.hardwareHealth?.reason,
+ state.qualityMetric,
+ q?.status,
+ q?.value,
+ q?.samples,
+ q?.total,
+ q?.evaluatorId,
+ q?.evaluatorVersion,
+ p.quality?.contractId,
+ q?.calibration,
+ state.qualityThreshold,
+ state.qualityThreshold === null
+ ? null
+ : 'reader-selected URL; frozen evaluator rule still required',
+ state.tier,
+ state.apiPrice,
+ ...METRICS.map((id) => metricValue(p, id, options)),
+ p.avgPowerW,
+ p.enforcedLimitW,
+ p.provenance?.sourceId,
+ p.provenance?.sourceSha,
+ p.provenance?.manifestSha256,
+ p.artifactId,
+ p.provenance?.artifactDigest,
+ `https://github.com/SemiAnalysisAI/InferenceX/actions/runs/${p.runId}`,
+ ]
+ .map(cell)
+ .join(',');
+ });
+ return `${[header.join(','), ...lines].join('\n')}\n`;
+}
diff --git a/packages/app/src/components/video-benchmark/deployment-contract.ts b/packages/app/src/components/video-benchmark/deployment-contract.ts
new file mode 100644
index 000000000..d568279a3
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/deployment-contract.ts
@@ -0,0 +1,37 @@
+/** Recorded deployment configuration. Missing fields remain unknown, never implicit defaults. */
+export interface VideoDeploymentRecord {
+ gpusPerReplica?: number | null;
+ ring?: number | null;
+ cfg?: number | null;
+ offload?: {
+ ditCpu?: boolean | null;
+ ditLayerwise?: boolean | null;
+ textEncoderCpu?: boolean | null;
+ imageEncoderCpu?: boolean | null;
+ vaeCpu?: boolean | null;
+ } | null;
+ encoderParallel?: string | null;
+ /** Observed request batch size; a configured limit alone does not populate this. */
+ batchSize?: number | null;
+ maxBatchSize?: number | null;
+ batchDelayMs?: number | null;
+ scheduling?: string | null;
+ engine?: string | null;
+ precision?: string | null;
+ acceleration?: string | null;
+ /** Canonical recorded generation settings in addition to the canonical workload identity. */
+ generationKey?: string | null;
+ /** Retained configuration source, including the basis for any replica inference. */
+ configEvidence?: string | null;
+}
+
+export interface VideoHardwareHealth {
+ status: 'pass' | 'fail' | 'unknown';
+ reason: string | null;
+ evidence: string | null;
+}
+
+export interface VideoDeploymentFields {
+ deployment?: VideoDeploymentRecord | null;
+ hardwareHealth?: VideoHardwareHealth | null;
+}
diff --git a/packages/app/src/components/video-benchmark/deployment-frontier.fixture.json b/packages/app/src/components/video-benchmark/deployment-frontier.fixture.json
new file mode 100644
index 000000000..789d7f33e
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/deployment-frontier.fixture.json
@@ -0,0 +1,52 @@
+{
+ "description": "Synthetic dominance cases shared with InferenceX-app; not measured H3 evidence.",
+ "cases": [
+ {
+ "name": "lower-higher preserves ties and excludes dominated coordinates",
+ "xBetter": "lower",
+ "yBetter": "higher",
+ "points": [
+ { "id": "slow", "x": 400, "y": 9 },
+ { "id": "dominated", "x": 151, "y": 4.9 },
+ { "id": "fast", "x": 78, "y": 6.66 },
+ { "id": "tie", "x": 78, "y": 6.66 },
+ { "id": "same-x", "x": 78, "y": 6 },
+ { "id": "same-y", "x": 90, "y": 6.66 }
+ ],
+ "expected": ["fast", "tie", "slow"]
+ },
+ {
+ "name": "higher-higher trades speed for efficiency",
+ "xBetter": "higher",
+ "yBetter": "higher",
+ "points": [
+ { "id": "fast", "x": 2.46, "y": 6.66 },
+ { "id": "dominated", "x": 1.27, "y": 4.9 },
+ { "id": "efficient", "x": 1.2, "y": 7 }
+ ],
+ "expected": ["efficient", "fast"]
+ },
+ {
+ "name": "lower-lower trades latency for cost",
+ "xBetter": "lower",
+ "yBetter": "lower",
+ "points": [
+ { "id": "fast", "x": 78, "y": 0.15 },
+ { "id": "dominated", "x": 151, "y": 0.204 },
+ { "id": "cheap", "x": 300, "y": 0.1 }
+ ],
+ "expected": ["fast", "cheap"]
+ },
+ {
+ "name": "higher-lower trades capacity for energy",
+ "xBetter": "higher",
+ "yBetter": "lower",
+ "points": [
+ { "id": "fast", "x": 8, "y": 300 },
+ { "id": "dominated", "x": 6, "y": 400 },
+ { "id": "efficient", "x": 4, "y": 200 }
+ ],
+ "expected": ["efficient", "fast"]
+ }
+ ]
+}
diff --git a/packages/app/src/components/video-benchmark/deployment.test.ts b/packages/app/src/components/video-benchmark/deployment.test.ts
index d8e18b560..4a032fa3e 100644
--- a/packages/app/src/components/video-benchmark/deployment.test.ts
+++ b/packages/app/src/components/video-benchmark/deployment.test.ts
@@ -1,5 +1,12 @@
import { describe, expect, it } from 'vitest';
-import { deploymentKey, isQueueing, layoutLabel, leadCell, sharedLayoutCells } from './deployment';
+import {
+ deploymentKey,
+ isQueueing,
+ layoutLabel,
+ leadCell,
+ queueingStatus,
+ sharedLayoutCells,
+} from './deployment';
import type { VideoPoint } from './metrics';
const base: VideoPoint = {
@@ -39,15 +46,16 @@ const options = { tier: 'h' } as const;
describe('deployment', () => {
it('keys a deployment by boards and model split, not by concurrency', () => {
const c4: VideoPoint = { ...base, concurrency: 4 };
- expect(deploymentKey(base)).toBe('4g:tp2:u2');
- expect(deploymentKey(c4)).toBe('4g:tp2:u2');
+ expect(deploymentKey(c4)).toBe(deploymentKey(base));
expect(
deploymentKey({
...base,
server: { tp: 1, ulysses: 4, attention: null },
}),
- ).toBe('4g:tp1:u4');
- expect(deploymentKey({ ...base, participating: null, server: null })).toBe('nag:tpna:una');
+ ).not.toBe(deploymentKey(base));
+ expect(deploymentKey({ ...base, participating: null, server: null })).not.toBe(
+ deploymentKey(base),
+ );
});
it('treats concurrency above the replica count as queueing, with one replica when unknown', () => {
expect(isQueueing(base)).toBe(false);
@@ -118,7 +126,7 @@ describe('deployment', () => {
expect(leadCell([noRate], 'h200', options)?.id).toBe('e');
});
it('requires a known shared workload and layout at C1 for evidence comparisons', () => {
- const matching = { ...base, id: 'b', hardwareKey: 'b200' };
+ const matching = { ...base, id: 'b', hardwareKey: 'b200', runtime: 'different-runtime' };
const variants: VideoPoint[] = [
{
...base,
@@ -142,4 +150,57 @@ describe('deployment', () => {
expect(sharedLayoutCells([{ ...base, server: null }])).toEqual([]);
expect(sharedLayoutCells([{ ...base, concurrency: 2, replicas: 2 }])).toEqual([]);
});
+ it('keeps recorded replica, Ring, CFG, offload, batch and generation configurations distinct', () => {
+ const variants: VideoPoint[] = [
+ base,
+ { ...base, replicas: 2 },
+ { ...base, runtime: 'different-runtime' },
+ { ...base, deployment: { ring: 2 } },
+ { ...base, deployment: { cfg: 2 } },
+ { ...base, deployment: { offload: { ditCpu: true } } },
+ { ...base, deployment: { batchSize: 2, scheduling: 'fixed_batch' } },
+ { ...base, deployment: { precision: 'fp8' } },
+ { ...base, deployment: { generationKey: 'steps:25' } },
+ { ...base, deployment: { acceleration: 'cache' } },
+ { ...base, server: { ...base.server!, attention: 'flash' } },
+ ];
+ expect(new Set(variants.map(deploymentKey)).size).toBe(variants.length);
+ });
+ it('uses recorded fixed-batch capacity instead of applying the legacy batch-one rule', () => {
+ const batched = {
+ ...base,
+ replicas: 2,
+ deployment: { batchSize: 2, scheduling: 'fixed_batch' },
+ };
+ expect(isQueueing({ ...batched, concurrency: 4 })).toBe(false);
+ expect(isQueueing({ ...batched, concurrency: 5 })).toBe(true);
+ });
+ it('never selects a failed-hardware observation as a representative or evidence comparison', () => {
+ const failed: VideoPoint = {
+ ...base,
+ id: 'failed',
+ wallSeconds: 100,
+ hardwareHealth: { status: 'fail', reason: 'thermal throttle', evidence: 'health.json' },
+ };
+ expect(leadCell([failed, base], 'h200', options)?.id).toBe('a');
+ expect(sharedLayoutCells([failed, base]).map((p) => p.id)).toEqual(['a']);
+ });
+
+ it('does not equate unknown batch capacity with an observed batch or configured dynamic maximum', () => {
+ const modern = { ...base, replicas: 1, concurrency: 2, deployment: { scheduling: 'dynamic' } };
+ expect(queueingStatus(modern)).toBe('unknown');
+ expect(
+ queueingStatus({ ...modern, deployment: { scheduling: 'dynamic', maxBatchSize: 1 } }),
+ ).toBe('queueing');
+ expect(
+ queueingStatus({ ...modern, deployment: { scheduling: 'dynamic', maxBatchSize: 4 } }),
+ ).toBe('unknown');
+ expect(queueingStatus({ ...modern, concurrency: null })).toBe('unknown');
+ expect(queueingStatus({ ...modern, replicas: null })).toBe('unknown');
+ expect(queueingStatus({ ...modern, replicas: null, concurrency: 1 })).toBe('unqueued');
+ expect(deploymentKey({ ...base, deployment: { batchSize: null } })).toBe(deploymentKey(base));
+ expect(deploymentKey({ ...base, deployment: { offload: { ditCpu: false } } })).not.toBe(
+ deploymentKey(base),
+ );
+ });
});
diff --git a/packages/app/src/components/video-benchmark/deployment.ts b/packages/app/src/components/video-benchmark/deployment.ts
index d0ed6421e..6297cf0cd 100644
--- a/packages/app/src/components/video-benchmark/deployment.ts
+++ b/packages/app/src/components/video-benchmark/deployment.ts
@@ -1,26 +1,88 @@
import { metricValue, type MetricOptions, type VideoPoint } from './metrics';
-type Layout = Pick;
+type Layout = Pick &
+ Partial>;
+type QueueingInput = Pick;
+
+const positiveInteger = (n: number | null | undefined): n is number =>
+ typeof n === 'number' && Number.isInteger(n) && n > 0;
+
+/** A measured server configuration, independent of client concurrency. */
+export function deploymentKey(p: Layout): string {
+ const d = p.deployment;
+ return JSON.stringify([
+ p.runtime ?? null,
+ p.participating,
+ p.server?.tp ?? null,
+ p.server?.ulysses ?? null,
+ p.replicas ?? null,
+ p.server?.attention ?? null,
+ d?.gpusPerReplica ?? null,
+ d?.ring ?? null,
+ d?.cfg ?? null,
+ d?.offload?.ditCpu ?? null,
+ d?.offload?.ditLayerwise ?? null,
+ d?.offload?.textEncoderCpu ?? null,
+ d?.offload?.imageEncoderCpu ?? null,
+ d?.offload?.vaeCpu ?? null,
+ d?.encoderParallel ?? null,
+ d?.batchSize ?? null,
+ d?.maxBatchSize ?? null,
+ d?.batchDelayMs ?? null,
+ d?.scheduling ?? null,
+ d?.engine ?? null,
+ d?.precision ?? null,
+ d?.acceleration ?? null,
+ d?.generationKey ?? null,
+ ]);
+}
/**
- * A deployment is the server layout that produced a cell: how many GPU boards
- * served one request and how they split the model (tensor parallel × Ulysses
- * sequence parallel). Cells that differ only in client concurrency belong to
- * the same deployment, so they share this key.
+ * Known canonical workloads include prompts, seeds and generation settings.
+ * Additional generation/precision/acceleration changes remain separate until a
+ * quality protocol explicitly establishes comparability. Runtime is a disclosed
+ * comparison variable, not a claim of equivalent perceptual quality.
*/
-export function deploymentKey(p: Pick): string {
- return `${p.participating ?? 'na'}g:tp${p.server?.tp ?? 'na'}:u${p.server?.ulysses ?? 'na'}`;
+export function comparisonCohortKey(p: VideoPoint): string | null {
+ if (!p.workloadKey) return null;
+ return JSON.stringify([
+ p.workloadKey,
+ p.model,
+ p.deployment?.generationKey ?? null,
+ p.deployment?.precision ?? null,
+ p.deployment?.acceleration ?? null,
+ ]);
}
/**
- * On a batch-one server every request beyond one per replica waits in a queue:
- * latency grows with concurrency while throughput stays flat. Such a cell is
- * evidence about the same deployment, never a new point on its frontier.
- * Bundles that predate the deployment record ran one supervised endpoint, so
- * an unknown replica count reads as one.
+ * Legacy retained bundles ran a supervised batch-one endpoint. Only those
+ * records keep the historical one-replica fallback. A modern scheduling record
+ * requires recorded capacity: a configured dynamic maximum above one is not
+ * evidence that the server actually batched those requests.
*/
-export function isQueueing(p: Pick): boolean {
- return (p.concurrency ?? 1) > (p.replicas ?? 1);
+export function queueingStatus(p: QueueingInput): 'queueing' | 'unqueued' | 'unknown' {
+ if (p.deployment === null || p.deployment === undefined)
+ return (p.concurrency ?? 1) > (p.replicas ?? 1) ? 'queueing' : 'unqueued';
+ if (!positiveInteger(p.concurrency)) return 'unknown';
+ if (p.concurrency === 1) return 'unqueued';
+ if (!positiveInteger(p.replicas)) return 'unknown';
+ if (p.concurrency <= p.replicas) return 'unqueued';
+ const d = p.deployment;
+ let batch: number | null = null;
+ if (d.scheduling === 'fixed_batch' && positiveInteger(d.batchSize)) batch = d.batchSize;
+ if (d.scheduling === 'dynamic' && d.maxBatchSize === 1) batch = 1;
+ if (d.scheduling === 'batch_one') batch = 1;
+ if (batch === null) return 'unknown';
+ return p.concurrency > p.replicas * batch ? 'queueing' : 'unqueued';
+}
+
+export function isQueueing(p: QueueingInput): boolean {
+ return queueingStatus(p) === 'queueing';
+}
+
+/** A hardware failure or unknown request capacity cannot enter performance rankings. */
+export function deploymentEligible(p: VideoPoint): boolean {
+ return p.hardwareHealth?.status !== 'fail' && queueingStatus(p) === 'unqueued';
}
/** "4 GPU · TP2 × Ulysses 2", plus the replica count when more than one. */
@@ -41,7 +103,16 @@ export function evidenceComparisonKey(p: VideoPoint): string | null {
const layout = [p.participating, p.server?.tp, p.server?.ulysses, p.replicas ?? 1];
if (!p.workloadKey || layout.some((n) => typeof n !== 'number' || !Number.isFinite(n) || n <= 0))
return null;
- return JSON.stringify([p.workloadKey, ...layout]);
+ // Attention backend remains an explicitly disclosed comparison variable in
+ // the existing cross-hardware evidence panel; it still identifies chart deployments.
+ return JSON.stringify([
+ comparisonCohortKey(p),
+ deploymentKey({
+ ...p,
+ runtime: '',
+ server: p.server ? { ...p.server, attention: null } : null,
+ }),
+ ]);
}
/**
@@ -52,7 +123,11 @@ export function evidenceComparisonKey(p: VideoPoint): string | null {
*/
export function sharedLayoutCells(cells: T[]): T[] {
const deployments = cells.filter(
- (p) => p.hardwareKey !== null && p.concurrency === 1 && evidenceComparisonKey(p) !== null,
+ (p) =>
+ p.hardwareKey !== null &&
+ p.concurrency === 1 &&
+ deploymentEligible(p) &&
+ evidenceComparisonKey(p) !== null,
);
const hardwareByLayout = new Map>();
for (const p of deployments) {
@@ -87,7 +162,7 @@ export function leadCell(
let best: VideoPoint | undefined;
let bestRate = Number.NEGATIVE_INFINITY;
for (const p of cells) {
- if (p.hardwareKey !== hardwareKey || isQueueing(p)) continue;
+ if (p.hardwareKey !== hardwareKey || !deploymentEligible(p)) continue;
const rate = metricValue(p, 'videosPerGpuHour', options) ?? Number.NEGATIVE_INFINITY;
const faster = rate === bestRate && (p.p50 ?? Infinity) < (best?.p50 ?? Infinity);
if (best === undefined || rate > bestRate || faster) {
diff --git a/packages/app/src/components/video-benchmark/frontier.test.ts b/packages/app/src/components/video-benchmark/frontier.test.ts
index 6d3215a02..80dca5175 100644
--- a/packages/app/src/components/video-benchmark/frontier.test.ts
+++ b/packages/app/src/components/video-benchmark/frontier.test.ts
@@ -1,5 +1,6 @@
import { describe, expect, it } from 'vitest';
import { paretoFrontier } from './frontier';
+import fixture from './deployment-frontier.fixture.json';
const b200 = { id: 'b200', x: 78.3, y: 6.66 };
const h200 = { id: 'h200', x: 151.1, y: 4.9 };
@@ -37,4 +38,30 @@ describe('paretoFrontier', () => {
it('returns an empty frontier for no points', () => {
expect(paretoFrontier([], 'lower', 'higher')).toEqual([]);
});
+ it('preserves distinct measured deployments with identical nondominated coordinates', () => {
+ const tie = { ...b200, id: 'b200-other-layout' };
+ expect(paretoFrontier([h200, b200, tie], 'lower', 'higher').map((p) => p.id)).toEqual([
+ 'b200',
+ 'b200-other-layout',
+ ]);
+ });
+ it('ignores nonfinite axes rather than allowing them to dominate measurements', () => {
+ const missing = [
+ { id: 'nan', x: Number.NaN, y: 10 },
+ { id: 'infinite', x: 1, y: Infinity },
+ ];
+ expect(paretoFrontier([...missing, b200], 'lower', 'higher')).toEqual([b200]);
+ });
+});
+
+// The same synthetic cases are consumed by Backend #2916's offline reader.
+describe('shared backend dominance cases', () => {
+ it.each(fixture.cases)('$name', ({ points, xBetter, yBetter, expected }) => {
+ if (
+ (xBetter !== 'lower' && xBetter !== 'higher') ||
+ (yBetter !== 'lower' && yBetter !== 'higher')
+ )
+ throw new Error('Invalid fixture direction');
+ expect(paretoFrontier(points, xBetter, yBetter).map((point) => point.id)).toEqual(expected);
+ });
});
diff --git a/packages/app/src/components/video-benchmark/frontier.ts b/packages/app/src/components/video-benchmark/frontier.ts
index 6682b38a2..8cbd8cf01 100644
--- a/packages/app/src/components/video-benchmark/frontier.ts
+++ b/packages/app/src/components/video-benchmark/frontier.ts
@@ -16,9 +16,16 @@ export function paretoFrontier(
): T[] {
const sx = xBetter === 'higher' ? 1 : -1;
const sy = yBetter === 'higher' ? 1 : -1;
- return paretoFrontUpperLeft(
- points,
+ const measured = points.filter((p) => Number.isFinite(p.x) && Number.isFinite(p.y));
+ const frontier = paretoFrontUpperLeft(
+ measured,
(p) => sx * p.x,
(p) => sy * p.y,
- ).toSorted((a, b) => a.x - b.x);
+ );
+ // The shared calculator keeps one point per coordinate. Distinct measured
+ // deployments at that same nondominated coordinate must retain their identities.
+ const coordinates = new Set(frontier.map((p) => JSON.stringify([p.x, p.y])));
+ return measured
+ .filter((p) => coordinates.has(JSON.stringify([p.x, p.y])))
+ .toSorted((a, b) => a.x - b.x);
}
diff --git a/packages/app/src/components/video-benchmark/history.test.ts b/packages/app/src/components/video-benchmark/history.test.ts
index 6bacdb4bf..822f1499b 100644
--- a/packages/app/src/components/video-benchmark/history.test.ts
+++ b/packages/app/src/components/video-benchmark/history.test.ts
@@ -1,11 +1,14 @@
import { describe, expect, it } from 'vitest';
-import { servingFixture } from './serving.fixture';
+import { servingFixture, wanServingFixture } from './serving.fixture';
import { at, entries, type Json } from './bundle';
import { videoHistoryEntry } from './history';
+import { videoModelHistory } from './models';
import type { StoredArtifact } from './stored';
-function saved(): StoredArtifact {
- const fixture = servingFixture();
+function saved(
+ requests = 4,
+ fixture = servingFixture('123', 'NVIDIA H200', requests),
+): StoredArtifact {
fixture.documents.set('manifest.json', fixture.manifest);
fixture.documents.set('ci.json', {
...Object.fromEntries(entries(fixture.ci)),
@@ -151,3 +154,327 @@ describe('video history projection', () => {
expect(source.sourceSha).toBe('c'.repeat(40));
});
});
+
+function addDashboardSidecar(artifact: StoredArtifact) {
+ const source = artifact.sources[0];
+ const docs = new Map(source.documents);
+ const checks = new Map(source.checksums);
+ const sidecar = {
+ schemaVersion: 1,
+ sourceRunId: '123',
+ sourceSha: 'c'.repeat(40),
+ cells: {
+ c1: {
+ runSha256: checks.get('gpu/c1/baseline/run.json')!,
+ specSha256: checks.get('gpu/c1/spec.json')!,
+ deployment: { ring: 1, cfg: 1, maxBatchSize: 1, scheduling: 'dynamic' },
+ hardwareHealth: {
+ status: 'fail',
+ reason: 'fixture thermal failure',
+ evidence: 'fixture://health',
+ },
+ quality: {
+ scale: 'ordinal_0_to_4',
+ contractId: 'fixture-contract',
+ contractSha256: 'd'.repeat(64),
+ rubricVersion: 'fixture-v1',
+ rubricSha256: 'e'.repeat(64),
+ metrics: {},
+ },
+ },
+ },
+ };
+ Object.assign(at(docs.get('manifest.json'), 'evidence')!, {
+ 'dashboard-observations.json': 'f'.repeat(64),
+ });
+ source.documents.push(['dashboard-observations.json', sidecar]);
+ source.checksums.push(['dashboard-observations.json', 'f'.repeat(64)]);
+ return sidecar;
+}
+
+describe('source-bound dashboard evidence', () => {
+ it('projects the sealed per-cell fields and preserves absent evidence as null', () => {
+ const artifact = saved();
+ const sidecar = addDashboardSidecar(artifact);
+ const source = videoHistoryEntry(artifact, null).sources[0];
+ expect(source.error).toBeNull();
+ expect(source.observations[0]).toMatchObject({
+ deployment: sidecar.cells.c1.deployment,
+ hardwareHealth: sidecar.cells.c1.hardwareHealth,
+ quality: sidecar.cells.c1.quality,
+ });
+ expect(source.observations[1]).toMatchObject({
+ deployment: null,
+ hardwareHealth: null,
+ quality: null,
+ });
+ });
+
+ it.each(['source', 'run', 'spec', 'seal', 'shape', 'unknown-cell'])(
+ 'rejects %s mismatches instead of silently qualifying the point',
+ (mutation) => {
+ const artifact = saved();
+ const sidecar = addDashboardSidecar(artifact);
+ if (mutation === 'source') sidecar.sourceRunId = '456';
+ if (mutation === 'run') sidecar.cells.c1.runSha256 = '0'.repeat(64);
+ if (mutation === 'spec') sidecar.cells.c1.specSha256 = '0'.repeat(64);
+ if (mutation === 'seal') artifact.sources[0].checksums.pop();
+ if (mutation === 'shape') Object.assign(sidecar.cells.c1.deployment, { ring: '1' });
+ if (mutation === 'unknown-cell') Object.assign(sidecar.cells, { c8: sidecar.cells.c1 });
+ const result = videoHistoryEntry(artifact, null).sources[0];
+ expect(result.error).toContain('dashboard observation');
+ expect(result.observations).toEqual([]);
+ },
+ );
+});
+
+describe('planned serving population', () => {
+ it('projects successful measured requests without treating valid media as judged quality', () => {
+ const source = videoHistoryEntry(saved(20), null).sources[0];
+ expect(source).toHaveProperty(
+ 'serving',
+ expect.arrayContaining([
+ expect.objectContaining({
+ cell: 'c1',
+ scheduled: 20,
+ attempted: 20,
+ completed: 20,
+ valid: 20,
+ unjudged: 20,
+ failed: 0,
+ notStarted: 0,
+ qualitySloGoodput: null,
+ }),
+ ]),
+ );
+ });
+
+ it('keeps zero-attempt planned cells separate from submitted failures and chart eligibility', () => {
+ const artifact = saved(20);
+ const matrix = new Map(artifact.sources[0].documents).get('serving-smoke.json');
+ Object.assign(at(matrix, 'cells', 0)!, {
+ verified: false,
+ status: 'failed',
+ run: null,
+ receipt: null,
+ power: null,
+ completion: {
+ scheduled: 20,
+ attempted: 0,
+ completed: 0,
+ valid: 0,
+ failed: 20,
+ not_started: 20,
+ unfinished: 0,
+ },
+ });
+ const source = videoHistoryEntry(artifact, null).sources[0];
+ expect(source.error).toBeNull();
+ expect(source.observations[0]).toMatchObject({ samples: 0, workloadKey: null, p50: null });
+ expect(source).toHaveProperty(
+ 'serving',
+ expect.arrayContaining([
+ expect.objectContaining({
+ cell: 'c1',
+ scheduled: 20,
+ attempted: 0,
+ completed: 0,
+ valid: 0,
+ failed: 0,
+ timedOut: 0,
+ notStarted: 20,
+ legacyFailedSlots: 20,
+ qualitySloGoodput: null,
+ workloadKey: null,
+ }),
+ ]),
+ );
+ });
+});
+
+it('preserves sealed planned counts when missing execution evidence cannot support a chart point', () => {
+ const artifact = saved(20);
+ const source = artifact.sources[0];
+ const matrix = new Map(source.documents).get('serving-smoke.json');
+ Object.assign(at(matrix, 'cells', 0)!, {
+ verified: false,
+ status: 'failed',
+ run: null,
+ power: null,
+ completion: {
+ scheduled: 20,
+ attempted: 0,
+ completed: 0,
+ valid: 0,
+ failed: 20,
+ not_started: 20,
+ unfinished: 0,
+ },
+ });
+ source.documents = source.documents.filter(([path]) => path !== 'gpu/c1/spec.json');
+ const projected = videoHistoryEntry(artifact, null).sources[0];
+ expect(projected.error).toContain('supervisor, workload or hardware identity');
+ expect(projected.observations).toEqual([]);
+ expect(projected.serving?.[0]).toMatchObject({
+ scheduled: 20,
+ attempted: 0,
+ notStarted: 20,
+ failed: 0,
+ legacyFailedSlots: 20,
+ workloadKey: null,
+ provenance: 'cell-summary',
+ });
+});
+
+it('keeps planned AMD counts when recorded GPU identity cannot qualify execution', () => {
+ const artifact = saved(20);
+ const matrix = new Map(artifact.sources[0].documents).get('serving-smoke.json');
+ Object.assign(matrix!, { gpu_uuids: ['a4ff7295', '73ff7654'] });
+ Object.assign(at(matrix, 'cells', 0)!, {
+ verified: false,
+ status: 'failed',
+ run: null,
+ power: null,
+ completion: {
+ scheduled: 20,
+ attempted: 0,
+ completed: 0,
+ valid: 0,
+ failed: 20,
+ not_started: 20,
+ unfinished: 0,
+ },
+ });
+ const projected = videoHistoryEntry(artifact, null).sources[0];
+ expect(projected.error).toContain('GPU identity');
+ expect(projected.observations).toEqual([]);
+ expect(projected.serving?.[0]).toMatchObject({
+ scheduled: 20,
+ attempted: 0,
+ notStarted: 20,
+ failed: 0,
+ legacyFailedSlots: 20,
+ workloadKey: null,
+ });
+});
+
+describe('Wan producer model identity', () => {
+ it.each(['Wan-AI/Wan2.2-T2V-A14B-Diffusers', 'Wan-AI/Wan2.2-T2V-A14B'])(
+ 'retains %s on a sealed preflight failure without result.json or generated media',
+ (modelId) => {
+ const artifact = saved(20);
+ changePlans(artifact, (plan) => Object.assign(plan!, { model_id: modelId }));
+ const matrix = new Map(artifact.sources[0].documents).get('serving-smoke.json');
+ Object.assign(matrix!, {
+ gpu_uuids: [],
+ bundle_type: 'video_serving_smoke_matrix',
+ cells: [
+ {
+ concurrency: 1,
+ status: 'failed',
+ verified: false,
+ run: null,
+ receipt: null,
+ power: null,
+ completion: {
+ scheduled: 20,
+ attempted: 0,
+ completed: 0,
+ valid: 0,
+ failed: 20,
+ not_started: 20,
+ unfinished: 0,
+ },
+ },
+ ],
+ });
+ const entry = videoHistoryEntry(artifact, null);
+ expect(entry.sources[0].model).toBe('Wan-AI/Wan2.2-T2V-A14B-Diffusers');
+ const pages = [{ schemaVersion: 1 as const, entries: [entry], nextPage: null }];
+ const wan = videoModelHistory(pages, 'wan22');
+ expect(wan[0].entries).toHaveLength(1);
+ expect(wan[0].entries[0].sources[0].serving?.[0]).toMatchObject({
+ scheduled: 20,
+ attempted: 0,
+ notStarted: 20,
+ failed: 0,
+ qualitySloGoodput: null,
+ });
+ expect(videoModelHistory(pages, 'h3')[0].entries).toEqual([]);
+ },
+ );
+});
+
+it('projects synthetic video-only success through Wan while preserving missing quality', () => {
+ const entry = videoHistoryEntry(saved(20, wanServingFixture()), null);
+ const source = entry.sources[0];
+ expect(source.error).toBeNull();
+ expect(source.observations).toHaveLength(3);
+ expect(videoHistoryEntry(saved(20), null).sources[0].observations[0].durationSeconds).toBe(4);
+ expect(source.observations[0]).toMatchObject({
+ model: 'Wan-AI/Wan2.2-T2V-A14B-Diffusers',
+ valid: 20,
+ samples: 20,
+ p50: 120,
+ durationSeconds: 81 / 16,
+ });
+ expect(source.serving?.[0]).toMatchObject({
+ scheduled: 20,
+ attempted: 20,
+ completed: 20,
+ valid: 20,
+ unjudged: 20,
+ qualitySloGoodput: null,
+ });
+ const pages = [{ schemaVersion: 1 as const, entries: [entry], nextPage: null }];
+ expect(
+ videoModelHistory(pages, 'wan22')[0].entries[0].sources[0].observations.every(
+ (o) => o.quality === null,
+ ),
+ ).toBe(true);
+ expect(videoModelHistory(pages, 'h3')[0].entries).toEqual([]);
+});
+
+it('retains the manifest model and error when a stored result contradicts it', () => {
+ const artifact = saved(20, wanServingFixture());
+ artifact.sources[0].documents.push([
+ 'result.json',
+ { workload: { plan: { model_id: 'MiniMaxAI/MiniMax-H3' } } },
+ ]);
+ const entry = videoHistoryEntry(artifact, null);
+ expect(entry.sources[0]).toMatchObject({
+ model: 'Wan-AI/Wan2.2-T2V-A14B-Diffusers',
+ observations: [],
+ error: 'Manifest and result identify different video models',
+ });
+ expect(
+ videoModelHistory([{ schemaVersion: 1, entries: [entry], nextPage: null }], 'h3')[0].entries,
+ ).toEqual([]);
+});
+
+it('does not classify an unidentified generic producer as a legacy H3 source', () => {
+ const artifact = saved();
+ artifact.artifact.name = 'video-serving-123-1';
+ changePlans(artifact, (plan) => Object.assign(plan!, { model_id: '' }));
+ const page = {
+ schemaVersion: 1 as const,
+ entries: [videoHistoryEntry(artifact, null)],
+ nextPage: null,
+ };
+ for (const model of ['h3', 'wan22'] as const)
+ expect(videoModelHistory([page], model)[0].entries).toEqual([]);
+});
+
+it('resolves a legacy mixed missing/known projection from its unique nonempty model identity', () => {
+ const source = videoHistoryEntry(saved(), null).sources[0];
+ source.model = null;
+ source.observations = [
+ { ...source.observations[0], model: '' },
+ { ...source.observations[1], model: 'Wan-AI/Wan2.2-T2V-A14B-Diffusers' },
+ ];
+ const entry = videoHistoryEntry(saved(), null);
+ entry.sources = [source];
+ const pages = [{ schemaVersion: 1 as const, entries: [entry], nextPage: null }];
+ expect(videoModelHistory(pages, 'h3')[0].entries).toEqual([]);
+ expect(videoModelHistory(pages, 'wan22')[0].entries).toHaveLength(1);
+});
diff --git a/packages/app/src/components/video-benchmark/history.ts b/packages/app/src/components/video-benchmark/history.ts
index b1f2bf9c2..4e11982db 100644
--- a/packages/app/src/components/video-benchmark/history.ts
+++ b/packages/app/src/components/video-benchmark/history.ts
@@ -1,13 +1,17 @@
-import { at, number, text } from './bundle';
+import { at, bundleModel, number, text } from './bundle';
import type { CIArtifact } from './archive';
import { storedBundle, storedFidelityBundle, type StoredArtifact } from './stored';
-import { servingCells } from './serving';
-import { efficiencyValue, latencyValue, tradeoffPoints } from './tradeoff';
+import { plannedServingCells, servingCells } from './serving';
+import { efficiencyValue, latencyValue, tradeoffPoints, workloadDurationSeconds } from './tradeoff';
+import type { VideoDeploymentFields } from './deployment-contract';
+import type { VideoQualityAssessment } from './quality';
+import { sourceObservationFields } from './observation-projection';
+import { servingCellEvidence, type ServingCellEvidence } from './serving-evidence';
/** Shared bound for dashboard history reads in the browser and view API. */
export const VIDEO_HISTORY_MAX_PAGES = 5;
-export interface VideoHistoryObservation {
+export interface VideoHistoryObservation extends VideoDeploymentFields {
id: string;
cell: string | null;
hardware: string;
@@ -41,9 +45,12 @@ export interface VideoHistoryObservation {
/** Summed recorded enforced limits of the same boards; null when a limit was not recorded. */
enforcedLimitW: number | null;
server: { tp: number | null; ulysses: number | null; attention: string | null } | null;
+ quality?: VideoQualityAssessment | null;
}
export interface VideoHistorySource {
id: string;
+ /** Model identity survives zero-observation and failed generation. Absent on legacy H3 projections. */
+ model?: string | null;
sha256: string | null;
sourceSha: string;
hardware: string;
@@ -51,6 +58,8 @@ export interface VideoHistorySource {
observedAt: string | null;
kind: 'observation' | 'fidelity';
observations: VideoHistoryObservation[];
+ /** Planned serving cells, including zero-sample and failed execution. Absent on old projections. */
+ serving?: ServingCellEvidence[];
fidelity: string | null;
calibration: string | null;
releaseQualified: boolean | null;
@@ -102,6 +111,9 @@ export function videoHistoryEntry(
result.releaseQualified = typeof qualified === 'boolean' ? qualified : null;
} else {
const bundle = storedBundle(source);
+ // Keep the sealed producer identity visible even if an optional result contradicts it.
+ result.model = bundleModel(bundle.manifest, null);
+ result.model = bundleModel(bundle.manifest, bundle.result);
result.sha256 = bundle.manifestSha256;
result.sourceSha = text(at(bundle.manifest, 'git_commit'));
result.observedAt = text(at(bundle.ci, 'started_at')) || null;
@@ -114,7 +126,19 @@ export function videoHistoryEntry(
null;
const qualified = at(bundle.ci, 'release_qualified');
result.releaseQualified = typeof qualified === 'boolean' ? qualified : null;
+ const qualityAbsent =
+ !bundle.documents.has('dashboard-observations.json') &&
+ at(bundle.manifest, 'evidence', 'dashboard-observations.json') === null;
+ result.serving = plannedServingCells(bundle).map((cell) =>
+ servingCellEvidence({ ...cell, run: null, spec: null }, qualityAbsent),
+ );
const cells = servingCells(bundle);
+ // Preserve execution accounting even when an optional observation sidecar is rejected.
+ result.serving = cells.map((cell) => servingCellEvidence(cell));
+ const observationFields = sourceObservationFields(bundle, cells);
+ result.serving = cells.map((cell) =>
+ servingCellEvidence(cell, !observationFields.get(cell.id)?.quality),
+ );
result.observations = tradeoffPoints({
bundle,
exportRun: saved.runId,
@@ -123,6 +147,11 @@ export function videoHistoryEntry(
const cell = cells.find((item) => item.id === point.cellId);
return {
id: point.id,
+ ...(observationFields.get(point.cellId ?? '') ?? {
+ deployment: null,
+ hardwareHealth: null,
+ quality: null,
+ }),
cell: point.cellId ?? null,
hardware: point.hardware || text(at(bundle.ci, 'site', 'gpu_model')),
concurrency: point.concurrency,
@@ -144,7 +173,7 @@ export function videoHistoryEntry(
allocated: point.allocated,
replicas: point.replicas,
wallSeconds: point.wall,
- durationSeconds: number(at(point.workload, 'generation', 'duration_seconds')),
+ durationSeconds: workloadDurationSeconds(point.workload),
frameCount: number(at(point.workload, 'generation', 'frame_count')),
avgPowerW: point.power,
enforcedLimitW: point.powerLimit?.watts ?? null,
@@ -158,6 +187,9 @@ export function videoHistoryEntry(
: null,
};
});
+ for (const cell of result.serving)
+ cell.workloadKey =
+ result.observations.find((o) => o.cell === cell.cell)?.workloadKey ?? null;
}
} catch (error) {
result.error = error instanceof Error ? error.message : String(error);
diff --git a/packages/app/src/components/video-benchmark/metrics.test.ts b/packages/app/src/components/video-benchmark/metrics.test.ts
index 03cb96e0a..d78e8d79f 100644
--- a/packages/app/src/components/video-benchmark/metrics.test.ts
+++ b/packages/app/src/components/video-benchmark/metrics.test.ts
@@ -82,6 +82,7 @@ describe('video metrics', () => {
'dollarsPerVideo',
'videosPerGpuHour',
'kjPerVideo',
+ 'quality',
]);
expect(Object.keys(VIDEO_METRICS).toSorted()).toEqual(
[...X_METRICS, ...Y_METRICS, 'powerPctCap', 'apiPricePerVideo'].toSorted(),
@@ -129,6 +130,12 @@ describe('video metrics', () => {
expect(metricValue(h200, 'powerPctCap', opts)).toBeCloseTo(97.41, 1);
expect(metricValue(b200, 'powerPctCap', opts)).toBeCloseTo(96.4, 1);
});
+ it('names the canonical selected quality dimension and its unchanged zero-to-four scale', () => {
+ const qualityOptions = { ...opts, qualityMetric: 'audio_content' as const };
+ expect(metricLabel('quality', 'en', qualityOptions)).toBe('Audio content (0–4)');
+ expect(metricLabel('quality', 'zh', qualityOptions)).toBe('音频内容 (0–4)');
+ expect(formatMetric(0, 'quality')).toBe('0');
+ });
it('prices the clip at the API list price, independent of hardware and tier', () => {
// 0.034 $/video-s × 8 s clip.
expect(metricValue(h200, 'apiPricePerVideo', priced)).toBeCloseTo(0.272, 6);
diff --git a/packages/app/src/components/video-benchmark/metrics.ts b/packages/app/src/components/video-benchmark/metrics.ts
index 183a534e3..a95268ed7 100644
--- a/packages/app/src/components/video-benchmark/metrics.ts
+++ b/packages/app/src/components/video-benchmark/metrics.ts
@@ -1,7 +1,14 @@
import { costPerGpuHour, type CostTier } from './hardware';
+import type { VideoDeploymentFields } from './deployment-contract';
+import {
+ QUALITY_METRICS,
+ qualityValue,
+ type QualityMetricId,
+ type VideoQualityAssessment,
+} from './quality';
/** One published serving cell (hardware × client concurrency) flattened for the dashboard. */
-export interface VideoPoint {
+export interface VideoPoint extends VideoDeploymentFields {
id: string;
runId: string;
artifactId: number;
@@ -40,15 +47,31 @@ export interface VideoPoint {
server: { tp: number | null; ulysses: number | null; attention: string | null } | null;
status: string;
observedAt: string | null;
+ quality?: VideoQualityAssessment | null;
+ provenance?: {
+ sourceId: string;
+ manifestSha256: string | null;
+ sourceSha: string;
+ artifactDigest: string | null;
+ fidelity: string | null;
+ calibration: string | null;
+ releaseQualified: boolean | null;
+ } | null;
}
export type XMetricId = 'p90Latency' | 'p50Latency';
-export type YMetricId = 'videosPerDollar' | 'dollarsPerVideo' | 'videosPerGpuHour' | 'kjPerVideo';
+export type YMetricId =
+ | 'videosPerDollar'
+ | 'dollarsPerVideo'
+ | 'videosPerGpuHour'
+ | 'kjPerVideo'
+ | 'quality';
/** Axis metrics plus the two the cards and evidence read but the chart does not plot. */
export type MetricId = XMetricId | YMetricId | 'powerPctCap' | 'apiPricePerVideo';
export interface MetricOptions {
tier: CostTier;
+ qualityMetric?: QualityMetricId;
/**
* USD an API bills per video-second of the same clip (`H3_API_REFERENCE` or
* the reader's override). Missing or non-positive → the API list price is null.
@@ -74,6 +97,7 @@ export const Y_METRICS: readonly YMetricId[] = [
'dollarsPerVideo',
'videosPerGpuHour',
'kjPerVideo',
+ 'quality',
];
export const COST_TIERS: readonly CostTier[] = ['h', 'r'];
@@ -84,6 +108,13 @@ export const TIER_LABELS: Record = {
};
export const VIDEO_METRICS: Record = {
+ quality: {
+ label: 'Quality rating (selected dimension)',
+ labelZh: '质量评分(所选维度)',
+ unit: 'ordinal 0–4',
+ polarity: 'higher',
+ digits: 2,
+ },
p90Latency: {
label: 'P90 time to video (s)',
labelZh: 'P90 出片时间(s)',
@@ -181,6 +212,10 @@ export function metricValue(
): number | null {
let value: number | null = null;
switch (id) {
+ case 'quality': {
+ value = qualityValue(point, options.qualityMetric ?? 'prompt_adherence');
+ break;
+ }
case 'p90Latency': {
// Same display floor as the run views: P90 needs at least ten valid samples.
value = point.samples >= 10 ? point.p90 : null;
@@ -226,6 +261,10 @@ export function metricValue(
}
export function metricLabel(id: MetricId, locale: 'en' | 'zh', options: MetricOptions): string {
+ if (id === 'quality') {
+ const dimension = QUALITY_METRICS[options.qualityMetric ?? 'prompt_adherence'];
+ return `${locale === 'zh' ? dimension.labelZh : dimension.label} (0–4)`;
+ }
const def = VIDEO_METRICS[id];
const base = locale === 'zh' ? def.labelZh : def.label;
if (!def.tiered) return base;
diff --git a/packages/app/src/components/video-benchmark/models.ts b/packages/app/src/components/video-benchmark/models.ts
new file mode 100644
index 000000000..c23ac6df8
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/models.ts
@@ -0,0 +1,88 @@
+import { H3_API_REFERENCE } from './api-reference';
+import { VIDEO_HARDWARE_ROSTER, type VideoHardwareRosterEntry } from './hardware';
+import type { VideoHistoryPage } from './history';
+import type { VideoPoint } from './metrics';
+
+export const VIDEO_MODELS = {
+ h3: { label: 'MiniMax-H3', modelId: 'MiniMaxAI/MiniMax-H3', apiReference: H3_API_REFERENCE },
+ wan22: {
+ label: 'Wan2.2-T2V-A14B',
+ modelId: 'Wan-AI/Wan2.2-T2V-A14B-Diffusers',
+ apiReference: null,
+ },
+} as const;
+export type VideoModel = keyof typeof VIDEO_MODELS;
+
+/** The original local MVP used the short checkpoint ID. Preserve that selection alias. */
+export function canonicalVideoModelId(model: string): string {
+ return model === 'Wan-AI/Wan2.2-T2V-A14B' ? VIDEO_MODELS.wan22.modelId : model;
+}
+
+/** Filter before workload selection so one model cannot suppress or inherit another's results.
+ * Legacy sources without model metadata belong to the existing H3-only artifact catalog.
+ * New model producers must identify their model even when generation has no observations.
+ */
+export function videoModelHistory(
+ pages: VideoHistoryPage[],
+ model: VideoModel,
+): VideoHistoryPage[] {
+ const modelId = VIDEO_MODELS[model].modelId;
+ return pages.map((page) => ({
+ ...page,
+ entries: page.entries.flatMap((entry) => {
+ const sources = entry.sources.flatMap((source) => {
+ const identities = new Set(
+ source.observations
+ .map((observation) => canonicalVideoModelId(observation.model))
+ .filter(Boolean),
+ );
+ // Ambiguous mixed-model sources cannot assign serving/fidelity evidence safely.
+ if (identities.size > 1) return [];
+ const identity = canonicalVideoModelId(source.model || [...identities][0] || '');
+ if (
+ source.model &&
+ identities.size > 0 &&
+ !identities.has(canonicalVideoModelId(source.model))
+ )
+ return [];
+ if (
+ !(identity
+ ? identity === modelId
+ : model === 'h3' && entry.artifact.name.startsWith('h3-'))
+ )
+ return [];
+ if (model === 'h3') return [source];
+ // Wan's video-only quality contract is not defined in this MVP. Never apply H3's audio rubric.
+ return [
+ {
+ ...source,
+ observations: source.observations.map((observation) => ({
+ ...observation,
+ quality: null,
+ })),
+ ...(source.serving
+ ? { serving: source.serving.map((cell) => ({ ...cell, qualitySloGoodput: null })) }
+ : {}),
+ },
+ ];
+ });
+ return sources.length > 0 ||
+ (model === 'h3' &&
+ entry.artifact.name.startsWith('h3-') &&
+ entry.sources.length === 0 &&
+ entry.error)
+ ? [{ ...entry, sources }]
+ : [];
+ }),
+ }));
+}
+
+export function videoModelHardware(
+ model: VideoModel,
+ points: VideoPoint[],
+): readonly VideoHardwareRosterEntry[] {
+ if (model === 'h3') return VIDEO_HARDWARE_ROSTER;
+ return [
+ ...new Set(points.flatMap((point) => (point.hardwareKey ? [point.hardwareKey] : []))),
+ ].map((key) => ({ key }));
+}
diff --git a/packages/app/src/components/video-benchmark/observation-projection.test.ts b/packages/app/src/components/video-benchmark/observation-projection.test.ts
new file mode 100644
index 000000000..3d44950e0
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/observation-projection.test.ts
@@ -0,0 +1,113 @@
+import { describe, expect, it } from 'vitest';
+import { parseVideoObservationFields } from './observation-projection';
+import { qualityEligibility } from './quality';
+
+// Synthetic complete judgement exercises ingestion; no retained clip was judged.
+function judgement() {
+ const metric = {
+ value: 4,
+ status: 'pass',
+ direction: 'higher',
+ evaluatorId: 'fixture-human',
+ evaluatorVersion: 'v1',
+ evaluatorSha256: 'c'.repeat(64),
+ samples: 20,
+ total: 20,
+ calibration: {
+ status: 'calibrated',
+ cohortId: 'fixture-calibration',
+ threshold: 3,
+ provenance: 'fixture://rule',
+ frozenAt: '2026-09-01T00:00:00Z',
+ },
+ };
+ return {
+ scale: 'ordinal_0_to_4',
+ contractId: 'fixture-contract',
+ contractSha256: 'a'.repeat(64),
+ rubricVersion: 'fixture-rubric',
+ rubricSha256: 'b'.repeat(64),
+ metrics: {
+ prompt_adherence: { ...metric },
+ visual_fidelity: { ...metric },
+ temporal_consistency: { ...metric },
+ motion_plausibility: { ...metric },
+ audio_quality: { ...metric },
+ audio_content: { ...metric },
+ av_sync: { ...metric },
+ },
+ };
+}
+describe('dashboard observation runtime shape', () => {
+ it('preserves zero, null and failed raw scores in the canonical scale', () => {
+ const quality = judgement();
+ Object.assign(quality.metrics.visual_fidelity, { value: 0, status: 'fail' });
+ Object.assign(quality.metrics.audio_content, {
+ value: null,
+ status: 'unjudged',
+ calibration: null,
+ });
+ const parsed = parseVideoObservationFields({ quality });
+ expect(parsed.quality).toEqual(quality);
+ expect(
+ qualityEligibility(parsed, { metric: 'prompt_adherence', threshold: null }).eligible,
+ ).toBe(false);
+ });
+ it.each([undefined, 'ordinal_1_to_5'])('rejects a missing or legacy scale: %s', (scale) => {
+ expect(() => parseVideoObservationFields({ quality: { ...judgement(), scale } })).toThrow(
+ 'dashboard observation',
+ );
+ });
+ it('keeps missing deployment, health and quality null', () => {
+ expect(parseVideoObservationFields({})).toEqual({
+ deployment: null,
+ hardwareHealth: null,
+ quality: null,
+ });
+ expect(
+ parseVideoObservationFields({ deployment: { ring: null, batchSize: null } }).deployment,
+ ).toMatchObject({ ring: null, batchSize: null, maxBatchSize: null });
+ });
+ it('carries complete protocol evidence through the same quality eligibility function', () => {
+ const parsed = parseVideoObservationFields({ quality: judgement() });
+ expect(parsed.quality).toEqual(judgement());
+ expect(
+ qualityEligibility({ ...parsed, samples: 20 }, { metric: 'prompt_adherence', threshold: 4 })
+ .eligible,
+ ).toBe(true);
+ expect(
+ qualityEligibility({ ...parsed, samples: 21 }, { metric: 'prompt_adherence', threshold: 4 })
+ .eligible,
+ ).toBe(false);
+ });
+ it.each([
+ { deployment: { replicas: 1 } },
+ { deployment: { ring: '2' } },
+ { deployment: { cfg: 0 } },
+ { deployment: { batchSize: 1.5 } },
+ { deployment: { batchDelayMs: -1 } },
+ { deployment: { offload: { ditCpu: 'false' } } },
+ { hardwareHealth: { status: 'healthy' } },
+ {
+ quality: {
+ ...judgement(),
+ metrics: { universal_quality: judgement().metrics.prompt_adherence },
+ },
+ },
+ { quality: { ...judgement(), contractSha256: 'not-a-hash' } },
+ ])('rejects malformed or invented projection fields: %j', (value) => {
+ expect(() => parseVideoObservationFields(value)).toThrow('dashboard observation');
+ });
+ it('does not promote unjudged or uncalibrated data during shape parsing', () => {
+ const quality = judgement();
+ Object.assign(quality.metrics.prompt_adherence, {
+ value: null,
+ status: 'unjudged',
+ calibration: null,
+ });
+ const parsed = parseVideoObservationFields({ quality });
+ expect(
+ qualityEligibility(parsed, { metric: 'prompt_adherence', threshold: null }),
+ ).toMatchObject({ eligible: false, value: null });
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/observation-projection.ts b/packages/app/src/components/video-benchmark/observation-projection.ts
new file mode 100644
index 000000000..798068199
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/observation-projection.ts
@@ -0,0 +1,266 @@
+import { at, type Bundle } from './bundle';
+import type {
+ VideoDeploymentFields,
+ VideoDeploymentRecord,
+ VideoHardwareHealth,
+} from './deployment-contract';
+import {
+ QUALITY_METRIC_IDS,
+ QUALITY_SCALE,
+ type VideoQualityAssessment,
+ type VideoQualityMetricResult,
+} from './quality';
+import type { ServingCell } from './serving';
+
+export const DASHBOARD_OBSERVATIONS_PATH = 'dashboard-observations.json';
+export interface VideoObservationFields extends Required {
+ quality: VideoQualityAssessment | null;
+}
+const invalid = (detail: string): never => {
+ throw new Error(`Invalid dashboard observation: ${detail}`);
+};
+function object(value: unknown, keys?: readonly string[]): Record {
+ if (value === null || typeof value !== 'object' || Array.isArray(value))
+ return invalid('expected object');
+ const result = value as Record;
+ if (keys && Object.keys(result).some((key) => !keys.includes(key)))
+ return invalid('unknown field');
+ return result;
+}
+function nullableText(value: unknown): string | null {
+ if (value === null || value === undefined) return null;
+ if (typeof value !== 'string' || !value.trim())
+ return invalid('expected nonempty string or null');
+ return value;
+}
+function nullableHash(value: unknown): string | null {
+ const hash = nullableText(value);
+ if (hash !== null && !/^[a-f0-9]{64}$/u.test(hash)) return invalid('expected SHA256 or null');
+ return hash;
+}
+function numeric(
+ value: unknown,
+ minimum: number,
+ integer = false,
+ maximum = Infinity,
+): number | null {
+ if (value === null || value === undefined) return null;
+ if (
+ typeof value !== 'number' ||
+ !Number.isFinite(value) ||
+ value < minimum ||
+ value > maximum ||
+ (integer && !Number.isSafeInteger(value))
+ )
+ return invalid('invalid numeric field');
+ return value;
+}
+function boolean(value: unknown): boolean | null {
+ if (value === null || value === undefined) return null;
+ if (typeof value !== 'boolean') return invalid('expected boolean or null');
+ return value;
+}
+function choice(value: unknown, choices: readonly T[]): T {
+ if (typeof value !== 'string' || !choices.includes(value as T))
+ return invalid('unsupported value');
+ return value as T;
+}
+function deployment(value: unknown): VideoDeploymentRecord | null {
+ if (value === null || value === undefined) return null;
+ const d = object(value, [
+ 'gpusPerReplica',
+ 'ring',
+ 'cfg',
+ 'offload',
+ 'encoderParallel',
+ 'batchSize',
+ 'maxBatchSize',
+ 'batchDelayMs',
+ 'scheduling',
+ 'engine',
+ 'precision',
+ 'acceleration',
+ 'generationKey',
+ 'configEvidence',
+ ]);
+ const offload =
+ d.offload === null || d.offload === undefined
+ ? null
+ : object(d.offload, [
+ 'ditCpu',
+ 'ditLayerwise',
+ 'textEncoderCpu',
+ 'imageEncoderCpu',
+ 'vaeCpu',
+ ]);
+ return {
+ gpusPerReplica: numeric(d.gpusPerReplica, 1, true),
+ ring: numeric(d.ring, 1, true),
+ cfg: numeric(d.cfg, 1, true),
+ batchSize: numeric(d.batchSize, 1, true),
+ maxBatchSize: numeric(d.maxBatchSize, 1, true),
+ batchDelayMs: numeric(d.batchDelayMs, 0),
+ offload: offload
+ ? {
+ ditCpu: boolean(offload.ditCpu),
+ ditLayerwise: boolean(offload.ditLayerwise),
+ textEncoderCpu: boolean(offload.textEncoderCpu),
+ imageEncoderCpu: boolean(offload.imageEncoderCpu),
+ vaeCpu: boolean(offload.vaeCpu),
+ }
+ : null,
+ encoderParallel: nullableText(d.encoderParallel),
+ scheduling: nullableText(d.scheduling),
+ engine: nullableText(d.engine),
+ precision: nullableText(d.precision),
+ acceleration: nullableText(d.acceleration),
+ generationKey: nullableText(d.generationKey),
+ configEvidence: nullableText(d.configEvidence),
+ };
+}
+function health(value: unknown): VideoHardwareHealth | null {
+ if (value === null || value === undefined) return null;
+ const h = object(value, ['status', 'reason', 'evidence']);
+ return {
+ status: choice(h.status, ['pass', 'fail', 'unknown']),
+ reason: nullableText(h.reason),
+ evidence: nullableText(h.evidence),
+ };
+}
+function qualityMetric(value: unknown): VideoQualityMetricResult {
+ const q = object(value, [
+ 'value',
+ 'status',
+ 'direction',
+ 'evaluatorId',
+ 'evaluatorVersion',
+ 'evaluatorSha256',
+ 'samples',
+ 'total',
+ 'calibration',
+ ]);
+ const c =
+ q.calibration === null || q.calibration === undefined
+ ? null
+ : object(q.calibration, ['status', 'cohortId', 'threshold', 'provenance', 'frozenAt']);
+ const frozenAt = c ? nullableText(c.frozenAt) : null;
+ if (frozenAt !== null && !Number.isFinite(Date.parse(frozenAt)))
+ return invalid('invalid calibration date');
+ return {
+ value: numeric(q.value, QUALITY_SCALE.minimum, false, QUALITY_SCALE.maximum),
+ status: choice(q.status, [
+ 'unjudged',
+ 'judged_unqualified',
+ 'pass',
+ 'fail',
+ 'inconclusive',
+ 'unassessable',
+ ]),
+ direction: choice(q.direction, ['higher', 'lower']),
+ evaluatorId: nullableText(q.evaluatorId),
+ evaluatorVersion: nullableText(q.evaluatorVersion),
+ evaluatorSha256: nullableHash(q.evaluatorSha256),
+ samples: numeric(q.samples, 0, true),
+ total: numeric(q.total, 0, true),
+ calibration: c
+ ? {
+ status: choice(c.status, ['uncalibrated', 'calibrated']),
+ cohortId: nullableText(c.cohortId),
+ threshold: numeric(c.threshold, QUALITY_SCALE.minimum, false, QUALITY_SCALE.maximum),
+ provenance: nullableText(c.provenance),
+ frozenAt,
+ }
+ : null,
+ };
+}
+function quality(value: unknown): VideoQualityAssessment | null {
+ if (value === null || value === undefined) return null;
+ const q = object(value, [
+ 'scale',
+ 'contractId',
+ 'contractSha256',
+ 'rubricVersion',
+ 'rubricSha256',
+ 'metrics',
+ ]);
+ const metrics = object(q.metrics, QUALITY_METRIC_IDS);
+ return {
+ scale: choice(q.scale, [QUALITY_SCALE.unit]),
+ contractId: nullableText(q.contractId),
+ contractSha256: nullableHash(q.contractSha256),
+ rubricVersion: nullableText(q.rubricVersion),
+ rubricSha256: nullableHash(q.rubricSha256),
+ metrics: Object.fromEntries(
+ Object.entries(metrics).map(([key, result]) => [key, qualityMetric(result)]),
+ ),
+ };
+}
+
+/** Validate curator projections too; validation does not turn them into sealed producer evidence. */
+export function parseVideoObservationFields(value: unknown): VideoObservationFields {
+ const fields = object(value, ['deployment', 'hardwareHealth', 'quality']);
+ return {
+ deployment: deployment(fields.deployment),
+ hardwareHealth: health(fields.hardwareHealth),
+ quality: quality(fields.quality),
+ };
+}
+
+/**
+ * Optional additive v1 sidecar. Raw bytes are checked by readVerifiedFiles on ingest;
+ * retained StoredArtifact projections preserve those seals and are a trusted transport.
+ * Reject a mismatched sidecar before publishing any source observations.
+ */
+export function sourceObservationFields(
+ bundle: Pick,
+ cells: ServingCell[],
+): Map {
+ const path = DASHBOARD_OBSERVATIONS_PATH;
+ const document = bundle.documents.get(path);
+ const manifestHash = at(bundle.manifest, 'evidence', path);
+ if (document === undefined) {
+ if (bundle.checksums.has(path) || manifestHash !== null) return invalid('sidecar missing');
+ return new Map();
+ }
+ const seal = nullableHash(bundle.checksums.get(path));
+ if (!seal || seal !== manifestHash) return invalid('sidecar is not bound to manifest');
+ const sidecar = object(document, ['schemaVersion', 'sourceRunId', 'sourceSha', 'cells']);
+ if (
+ sidecar.schemaVersion !== 1 ||
+ sidecar.sourceRunId !== at(bundle.manifest, 'run_id') ||
+ sidecar.sourceSha !== at(bundle.manifest, 'git_commit')
+ )
+ return invalid('source identity mismatch');
+ const records = object(sidecar.cells);
+ if (Object.keys(records).length === 0) return invalid('empty cells');
+ return new Map(
+ Object.entries(records).map(([id, value]) => {
+ const cell = cells.find((candidate) => candidate.id === id);
+ const row = object(value, [
+ 'runSha256',
+ 'specSha256',
+ 'deployment',
+ 'hardwareHealth',
+ 'quality',
+ ]);
+ if (
+ !cell ||
+ !cell.run ||
+ !cell.spec ||
+ !nullableHash(row.runSha256) ||
+ !nullableHash(row.specSha256) ||
+ row.runSha256 !== bundle.checksums.get(cell.runPath) ||
+ row.specSha256 !== bundle.checksums.get(cell.specPath)
+ )
+ return invalid('cell run/spec identity mismatch');
+ return [
+ id,
+ parseVideoObservationFields({
+ deployment: row.deployment,
+ hardwareHealth: row.hardwareHealth,
+ quality: row.quality,
+ }),
+ ];
+ }),
+ );
+}
diff --git a/packages/app/src/components/video-benchmark/plot.test.ts b/packages/app/src/components/video-benchmark/plot.test.ts
index d1799efdd..dd730fda4 100644
--- a/packages/app/src/components/video-benchmark/plot.test.ts
+++ b/packages/app/src/components/video-benchmark/plot.test.ts
@@ -4,6 +4,7 @@ import type { VideoHistoryPage } from './history';
import { X_METRICS, Y_METRICS, type VideoPoint } from './metrics';
import { listedVideoCells, plotVideoPoints } from './plot';
import { videoPoints } from './points';
+import type { VideoQualityAssessment, VideoQualityMetricResult } from './quality';
import { DEFAULT_VIDEO_DASHBOARD_STATE, type VideoDashboardState } from './video-url-state';
const base: VideoPoint = {
@@ -16,6 +17,7 @@ const base: VideoPoint = {
runtime: 'r',
model: 'm',
workload: 'w',
+ workloadKey: 'matched-workload',
concurrency: 1,
participating: 4,
allocated: 8,
@@ -117,7 +119,7 @@ describe('plotVideoPoints', () => {
expect(ids(out.frontiers.h200)).toEqual(['h200-8g', 'h200-4g-c1', 'h200-2g']);
// No axis pair or cost tier re-admits it.
for (const x of X_METRICS) {
- for (const y of Y_METRICS) {
+ for (const y of Y_METRICS.filter((id) => id !== 'quality')) {
expect(ids(plot([base, queued], { ...state, x, y, tier: 'r' }).plotted)).toEqual([
'h200-4g-c1',
]);
@@ -212,3 +214,161 @@ describe('Optimal Only', () => {
).toEqual(['h200-4g-c1', 'h200-4g-nopower']);
});
});
+
+describe('comparison eligibility', () => {
+ it('does not dominate or connect a different workload, generation setting, or unknown identity', () => {
+ const points = [
+ base,
+ cell({
+ id: 'different-plan',
+ workloadKey: 'other-plan',
+ participating: 2,
+ p90: 10,
+ wallSeconds: 200,
+ }),
+ cell({ id: 'different-steps', deployment: { generationKey: 'steps:25' }, participating: 8 }),
+ cell({ id: 'unknown-one', workloadKey: null, participating: 2 }),
+ cell({ id: 'unknown-two', workloadKey: null, participating: 8 }),
+ ];
+ const result = plot(points);
+ expect(ids(result.plotted)).toEqual(ids(points));
+ expect(Object.values(result.frontiers).every((group) => group.length === 1)).toBe(true);
+ expect(result.multiLayout).toBe(false);
+ });
+ it('keeps multiple nonqueued observations of one deployment as unconnected points', () => {
+ const first = cell({ replicas: 2 });
+ const second = cell({
+ id: 'same-layout-c2',
+ replicas: 2,
+ concurrency: 2,
+ p90: 160,
+ wallSeconds: 2500,
+ });
+ const result = plot([first, second]);
+ expect(ids(result.plotted)).toEqual([first.id, second.id]);
+ expect(Object.values(result.frontiers).every((group) => group.length === 1)).toBe(true);
+ expect(result.multiLayout).toBe(false);
+ });
+ it('excludes failed hardware from the chart and table with either Optimal Only setting', () => {
+ const failed = cell({
+ id: 'failed',
+ participating: 2,
+ p90: 10,
+ wallSeconds: 200,
+ hardwareHealth: { status: 'fail', reason: 'throttling', evidence: 'health.json' },
+ });
+ for (const optimal of [true, false]) {
+ expect(ids(plot([failed, base], { ...state, optimal }).plotted)).toEqual([base.id]);
+ expect(ids(listedVideoCells([failed, base], { ...state, optimal }, new Set()))).toEqual([
+ base.id,
+ ]);
+ }
+ });
+ it('does not rank unrecorded capacity as a deployment improvement', () => {
+ const unknown = cell({
+ id: 'scheduler',
+ concurrency: 4,
+ replicas: 1,
+ deployment: { batchSize: 4, scheduling: 'unknown' },
+ });
+ expect(ids(plot([unknown], { ...state, optimal: false }).plotted)).toEqual([]);
+ expect(listedVideoCells([unknown], { ...state, optimal: false }, new Set())).toEqual([]);
+ });
+});
+
+// Synthetic calibrated scores test eligibility only; retained measurements are unjudged.
+function quality(overrides: Partial = {}): VideoQualityAssessment {
+ const metric: VideoQualityMetricResult = {
+ value: 4,
+ status: 'pass',
+ direction: 'higher',
+ evaluatorId: 'fixture-human',
+ evaluatorVersion: 'fixture-v1',
+ evaluatorSha256: 'b'.repeat(64),
+ samples: 20,
+ total: 20,
+ calibration: {
+ status: 'calibrated',
+ cohortId: 'fixture-calibration',
+ threshold: 3,
+ provenance: 'fixture://preregistered',
+ frozenAt: '2026-09-01T00:00:00Z',
+ },
+ };
+ return {
+ scale: 'ordinal_0_to_4',
+ contractId: 'fixture-protocol',
+ contractSha256: 'a'.repeat(64),
+ rubricVersion: 'fixture-v1',
+ rubricSha256: 'c'.repeat(64),
+ metrics: {
+ prompt_adherence: { ...metric, ...overrides },
+ visual_fidelity: { ...metric },
+ temporal_consistency: { ...metric },
+ motion_plausibility: { ...metric },
+ audio_quality: { ...metric },
+ audio_content: { ...metric },
+ av_sync: { ...metric },
+ },
+ };
+}
+
+describe('quality-qualified frontier', () => {
+ it('retains a declared calibrated zero and excludes a faster point failing another dimension', () => {
+ const zero = quality({
+ value: 0,
+ calibration: { ...quality().metrics.prompt_adherence!.calibration!, threshold: 0 },
+ });
+ const failed = quality();
+ failed.metrics.audio_content = { ...failed.metrics.audio_content!, status: 'fail' };
+ const points = [
+ cell({ quality: zero }),
+ cell({ id: 'faster-audio-failure', participating: 2, p90: 10, quality: failed }),
+ ];
+ for (const optimal of [true, false]) {
+ const selected = { ...state, optimal, y: 'quality' as const, qualityThreshold: 0 };
+ expect(plot(points, selected).plotted.map((p) => [p.id, p.y])).toEqual([[base.id, 0]]);
+ expect(ids(listedVideoCells(points, selected, new Set()))).toEqual([base.id]);
+ }
+ });
+ it('filters before dominance and applies the same eligibility with Optimal Only off', () => {
+ const accepted = cell({ quality: quality() });
+ const below = cell({
+ id: 'fast-low-quality',
+ participating: 2,
+ p90: 10,
+ wallSeconds: 200,
+ quality: quality({ value: 3 }),
+ });
+ const unjudged = cell({ id: 'fast-unjudged', participating: 8, p90: 20, wallSeconds: 200 });
+ for (const optimal of [true, false]) {
+ const selected = { ...state, optimal, qualityThreshold: 4 };
+ expect(ids(plot([below, unjudged, accepted], selected).plotted)).toEqual([base.id]);
+ expect(ids(listedVideoCells([below, unjudged, accepted], selected, new Set()))).toEqual([
+ base.id,
+ ]);
+ }
+ });
+ it('keeps evaluator and calibration cohorts separate even when each score is eligible', () => {
+ const first = cell({ quality: quality() });
+ const other = cell({
+ id: 'other-evaluator',
+ participating: 2,
+ p90: 10,
+ wallSeconds: 200,
+ quality: quality({ evaluatorVersion: 'fixture-v2' }),
+ });
+ const result = plot([first, other], { ...state, y: 'quality' });
+ expect(ids(result.plotted)).toEqual([base.id, 'other-evaluator']);
+ expect(result.plotted.map((p) => p.y)).toEqual([4, 4]);
+ expect(Object.values(result.frontiers).every((group) => group.length === 1)).toBe(true);
+ expect(result.multiLayout).toBe(false);
+ });
+ it('returns no quality table or chart rows for uncalibrated retained measurements', () => {
+ for (const optimal of [true, false]) {
+ const selected = { ...state, optimal, y: 'quality' as const };
+ expect(plot(h200, selected).plotted).toEqual([]);
+ expect(listedVideoCells(h200, selected, new Set())).toEqual([]);
+ }
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/plot.ts b/packages/app/src/components/video-benchmark/plot.ts
index a3dca3cb7..861c06391 100644
--- a/packages/app/src/components/video-benchmark/plot.ts
+++ b/packages/app/src/components/video-benchmark/plot.ts
@@ -1,8 +1,9 @@
-import { deploymentKey, isQueueing } from './deployment';
+import { comparisonCohortKey, deploymentEligible, deploymentKey } from './deployment';
import { paretoFrontier } from './frontier';
import { hardwareLabel } from './hardware';
import { metricValue, VIDEO_METRICS, type VideoPoint } from './metrics';
import { latestVideoCells } from './points';
+import { qualityCohortKey, qualityEligibility } from './quality';
import { metricOptions, type VideoDashboardState } from './video-url-state';
export interface PlottedVideoPoint extends VideoPoint {
@@ -17,12 +18,21 @@ export interface PlottedVideoPoint extends VideoPoint {
export interface VideoPlot {
/** Deployment cells to draw: the frontier cells, plus the dominated ones when Optimal Only is off. */
plotted: PlottedVideoPoint[];
- /** Per-hardware Pareto frontier over its deployment cells, ascending x; lines need two or more. */
+ /** Per-hardware, comparable-cohort frontiers, ascending x; lines need two or more. */
frontiers: Record;
- /** True once any hardware has more than one measured deployment. */
+ /** True once a comparable cohort has more than one measured deployment. */
multiLayout: boolean;
}
+/** Shared chart/table/CSV admission, before any dominance calculation. */
+function selectedQualityEligible(point: VideoPoint, state: VideoDashboardState): boolean {
+ if (state.y !== 'quality' && state.qualityThreshold === null) return true;
+ return qualityEligibility(point, {
+ metric: state.qualityMetric,
+ threshold: state.qualityThreshold,
+ }).eligible;
+}
+
/**
* The chart's data model. A hardware's curve is the Pareto frontier over its
* measured deployments (GPUs per video and how they split the model). Client
@@ -37,10 +47,16 @@ export function plotVideoPoints(
): VideoPlot {
const options = metricOptions(state);
const plotted: PlottedVideoPoint[] = latestVideoCells(points).flatMap((p) => {
- if (!p.hardwareKey || hidden.has(p.hardwareKey) || isQueueing(p)) return [];
+ if (
+ !p.hardwareKey ||
+ hidden.has(p.hardwareKey) ||
+ !deploymentEligible(p) ||
+ !selectedQualityEligible(p, state)
+ )
+ return [];
const x = metricValue(p, state.x, options);
const y = metricValue(p, state.y, options);
- if (x === null || y === null) return [];
+ if (x === null || y === null || !Number.isFinite(x) || !Number.isFinite(y)) return [];
return [
{
...p,
@@ -62,10 +78,33 @@ export function plotVideoPoints(
const yBetter = VIDEO_METRICS[state.y].polarity;
const frontiers: Record = {};
let multiLayout = false;
- for (const [key, list] of byHardware) {
- frontiers[key] = paretoFrontier(list, xBetter, yBetter);
- for (const p of frontiers[key]) p.optimal = true;
- if (new Set(list.map(deploymentKey)).size > 1) multiLayout = true;
+ for (const [hardware, list] of byHardware) {
+ const cohorts = new Map();
+ for (const point of list) {
+ // Missing canonical identity may still be shown, but never joined or
+ // used to dominate another observation, even from the same source.
+ const comparison = comparisonCohortKey(point) ?? `unknown:${point.id}`;
+ const cohort =
+ state.y === 'quality' || state.qualityThreshold !== null
+ ? JSON.stringify([comparison, qualityCohortKey(point, state.qualityMetric)])
+ : comparison;
+ cohorts.set(cohort, [...(cohorts.get(cohort) ?? []), point]);
+ }
+ let index = 0;
+ for (const cohort of cohorts.values()) {
+ const key = cohorts.size === 1 ? hardware : `${hardware}:${index++}`;
+ const frontier = paretoFrontier(cohort, xBetter, yBetter);
+ for (const point of frontier) point.optimal = true;
+ // Repeated measurements of one deployment can trade latency for capacity
+ // below its replica/batch limit. They are observations, not a deployment sweep.
+ if (new Set(frontier.map(deploymentKey)).size < frontier.length) {
+ for (const [measurement, point] of frontier.entries())
+ frontiers[`${key}:observation${measurement}`] = [point];
+ } else {
+ frontiers[key] = frontier;
+ }
+ if (new Set(cohort.map(deploymentKey)).size > 1) multiLayout = true;
+ }
}
return {
plotted: state.optimal ? plotted.filter((p) => p.optimal) : plotted,
@@ -85,7 +124,11 @@ export function listedVideoCells(
hidden: ReadonlySet,
): VideoPoint[] {
const rows = latestVideoCells(points).filter(
- (p) => p.hardwareKey && !hidden.has(p.hardwareKey) && !isQueueing(p),
+ (p) =>
+ p.hardwareKey &&
+ !hidden.has(p.hardwareKey) &&
+ deploymentEligible(p) &&
+ selectedQualityEligible(p, state),
);
if (!state.optimal) return rows;
const optimal = new Set(
diff --git a/packages/app/src/components/video-benchmark/points.test.ts b/packages/app/src/components/video-benchmark/points.test.ts
index ddd945833..c138a2072 100644
--- a/packages/app/src/components/video-benchmark/points.test.ts
+++ b/packages/app/src/components/video-benchmark/points.test.ts
@@ -105,6 +105,41 @@ describe('videoPoints', () => {
observedAt: '2026-09-09T10:00:00Z',
});
});
+ it('retains configuration, health and source provenance while preserving unknown values', () => {
+ const enriched = structuredClone(page);
+ enriched.entries[0].sources[0].observations[0] = {
+ ...observation,
+ deployment: { ring: 1, maxBatchSize: 1, batchSize: null, offload: { ditCpu: false } },
+ hardwareHealth: {
+ status: 'unknown',
+ reason: 'No clock evidence',
+ evidence: 'gpu-before.json',
+ },
+ quality: null,
+ };
+ const [point] = videoPoints([enriched]);
+ expect(point.deployment).toMatchObject({
+ ring: 1,
+ maxBatchSize: 1,
+ batchSize: null,
+ offload: { ditCpu: false },
+ });
+ expect(point.hardwareHealth).toEqual({
+ status: 'unknown',
+ reason: 'No clock evidence',
+ evidence: 'gpu-before.json',
+ });
+ expect(point.quality).toBeNull();
+ expect(point.provenance).toEqual({
+ sourceId: source.id,
+ manifestSha256: 'a',
+ sourceSha: 'b',
+ artifactDigest: null,
+ fidelity: null,
+ calibration: null,
+ releaseQualified: false,
+ });
+ });
it('sorts by HW_REGISTRY order, then concurrency', () => {
const b200 = {
...page.entries[0],
@@ -283,3 +318,29 @@ describe('dashboardCells', () => {
expect(result.otherWorkloads).toBe(1);
});
});
+
+describe('deployment observation identity', () => {
+ it('keeps distinct workloads, runtime revisions and recorded configurations', () => {
+ const [base] = videoPoints([page]);
+ const variants = [
+ base,
+ { ...base, id: 'workload:c1', workloadKey: 'other-plan' },
+ { ...base, id: 'runtime:c1', runtime: 'new-runtime' },
+ { ...base, id: 'replica:c1', replicas: 2 },
+ { ...base, id: 'batch:c1', deployment: { batchSize: 2 } },
+ { ...base, id: 'generation:c1', deployment: { generationKey: '25-steps' } },
+ ];
+ expect(latestVideoCells(variants).map((p) => p.id)).toEqual(variants.map((p) => p.id));
+ });
+ it('does not count failed hardware toward the selected workload', () => {
+ const [base] = videoPoints([page]);
+ const failed = {
+ ...base,
+ id: 'failed:c1',
+ workloadKey: 'other-plan',
+ hardwareKey: 'b200',
+ hardwareHealth: { status: 'fail' as const, reason: 'fault', evidence: 'health.json' },
+ };
+ expect(dashboardCells([failed, base]).cells.map((p) => p.id)).toEqual([base.id]);
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/points.ts b/packages/app/src/components/video-benchmark/points.ts
index f7cb1ea5f..df4e6c321 100644
--- a/packages/app/src/components/video-benchmark/points.ts
+++ b/packages/app/src/components/video-benchmark/points.ts
@@ -1,4 +1,5 @@
-import { deploymentKey } from './deployment';
+import { comparisonCohortKey, deploymentKey } from './deployment';
+import type { VideoDeploymentRecord, VideoHardwareHealth } from './deployment-contract';
import { hardwareKey, hardwareSort } from './hardware';
import type { VideoHistoryObservation, VideoHistoryPage } from './history';
import type { VideoPoint } from './metrics';
@@ -6,6 +7,50 @@ import type { VideoPoint } from './metrics';
const num = (value: unknown): number | null =>
typeof value === 'number' && Number.isFinite(value) ? value : null;
+const textOrNull = (value: unknown): string | null =>
+ typeof value === 'string' && value.length > 0 ? value : null;
+const boolOrNull = (value: unknown): boolean | null => (typeof value === 'boolean' ? value : null);
+
+function deploymentRecord(
+ d: VideoDeploymentRecord | null | undefined,
+): VideoDeploymentRecord | null {
+ if (!d || typeof d !== 'object') return null;
+ return {
+ gpusPerReplica: num(d.gpusPerReplica),
+ ring: num(d.ring),
+ cfg: num(d.cfg),
+ offload:
+ d.offload && typeof d.offload === 'object'
+ ? {
+ ditCpu: boolOrNull(d.offload.ditCpu),
+ ditLayerwise: boolOrNull(d.offload.ditLayerwise),
+ textEncoderCpu: boolOrNull(d.offload.textEncoderCpu),
+ imageEncoderCpu: boolOrNull(d.offload.imageEncoderCpu),
+ vaeCpu: boolOrNull(d.offload.vaeCpu),
+ }
+ : null,
+ encoderParallel: textOrNull(d.encoderParallel),
+ batchSize: num(d.batchSize),
+ maxBatchSize: num(d.maxBatchSize),
+ batchDelayMs: num(d.batchDelayMs),
+ scheduling: textOrNull(d.scheduling),
+ engine: textOrNull(d.engine),
+ precision: textOrNull(d.precision),
+ acceleration: textOrNull(d.acceleration),
+ generationKey: textOrNull(d.generationKey),
+ configEvidence: textOrNull(d.configEvidence),
+ };
+}
+
+function hardwareHealth(h: VideoHardwareHealth | null | undefined): VideoHardwareHealth | null {
+ if (!h || typeof h !== 'object') return null;
+ return {
+ status: h.status === 'pass' || h.status === 'fail' ? h.status : 'unknown',
+ reason: textOrNull(h.reason),
+ evidence: textOrNull(h.evidence),
+ };
+}
+
/**
* Flatten published history pages (newest publication first) into chartable
* points. A source re-exported under a later artifact repeats its observation
@@ -21,7 +66,18 @@ export function videoPoints(pages: VideoHistoryPage[]): VideoPoint[] {
for (const observation of source.observations) {
if (seen.has(observation.id)) continue;
seen.add(observation.id);
- points.push(toPoint(observation, entry.runId, entry.artifact.id, source.observedAt));
+ points.push({
+ ...toPoint(observation, entry.runId, entry.artifact.id, source.observedAt),
+ provenance: {
+ sourceId: source.id,
+ manifestSha256: source.sha256,
+ sourceSha: source.sourceSha,
+ artifactDigest: entry.artifact.digest ?? null,
+ fidelity: source.fidelity,
+ calibration: source.calibration,
+ releaseQualified: source.releaseQualified,
+ },
+ });
}
}
return points.toSorted(
@@ -76,6 +132,9 @@ function toPoint(
attention: typeof server.attention === 'string' ? server.attention : null,
}
: null,
+ deployment: deploymentRecord(o.deployment),
+ hardwareHealth: hardwareHealth(o.hardwareHealth),
+ quality: o.quality ?? null,
status: o.status ?? '',
observedAt,
};
@@ -92,7 +151,13 @@ export function latestVideoCells(points: VideoPoint[]): VideoPoint[] {
const seen = new Set();
return points.filter((point) => {
if (point.hardwareKey === null) return true;
- const key = `${point.hardwareKey}:${deploymentKey(point)}:${point.concurrency ?? 'na'}`;
+ const key = JSON.stringify([
+ point.hardwareKey,
+ comparisonCohortKey(point) ?? workloadGroup(point),
+ deploymentKey(point),
+ point.runtime,
+ point.concurrency,
+ ]);
if (seen.has(key)) return false;
seen.add(key);
return true;
@@ -120,7 +185,9 @@ export function dashboardCells(points: VideoPoint[]): {
workload: string | null;
otherWorkloads: number;
} {
- const qualified = points.filter((p) => p.samples >= DASHBOARD_SAMPLE_FLOOR);
+ const qualified = points.filter(
+ (p) => p.samples >= DASHBOARD_SAMPLE_FLOOR && p.hardwareHealth?.status !== 'fail',
+ );
const hardware = new Map>();
const cellKeys = new Map>();
for (const p of qualified) {
diff --git a/packages/app/src/components/video-benchmark/quality.test.ts b/packages/app/src/components/video-benchmark/quality.test.ts
new file mode 100644
index 000000000..b540f6a25
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/quality.test.ts
@@ -0,0 +1,189 @@
+import { describe, expect, it } from 'vitest';
+import {
+ qualityCohortKey,
+ qualityEligibility,
+ qualityValue,
+ type VideoQualityAssessment,
+ type VideoQualityMetricResult,
+ type VideoQualityStatus,
+} from './quality';
+
+// Synthetic calibrated evidence exercises the boundary; no retained H3 clip is judged.
+const calibrated = (
+ overrides: Partial = {},
+): VideoQualityMetricResult => ({
+ value: 4,
+ status: 'pass',
+ direction: 'higher',
+ evaluatorId: 'fixture-human-review',
+ evaluatorVersion: 'fixture-v1',
+ evaluatorSha256: 'a'.repeat(64),
+ samples: 20,
+ total: 20,
+ calibration: {
+ status: 'calibrated',
+ cohortId: 'fixture-calibration-only',
+ threshold: 3,
+ provenance: 'fixture://preregistered-rule',
+ frozenAt: '2026-09-01T00:00:00Z',
+ },
+ ...overrides,
+});
+function point(overrides: Partial = {}) {
+ const quality: VideoQualityAssessment = {
+ scale: 'ordinal_0_to_4',
+ contractId: 'fixture-quality-contract',
+ contractSha256: 'b'.repeat(64),
+ rubricVersion: 'fixture-rubric-v1',
+ rubricSha256: 'd'.repeat(64),
+ metrics: {
+ prompt_adherence: calibrated(overrides),
+ visual_fidelity: calibrated(),
+ temporal_consistency: calibrated(),
+ motion_plausibility: calibrated(),
+ audio_quality: calibrated(),
+ audio_content: calibrated(),
+ av_sync: calibrated(),
+ },
+ };
+ return { quality };
+}
+const selection = { metric: 'prompt_adherence', threshold: null } as const;
+
+describe('quality eligibility', () => {
+ it('preserves a canonical zero score and zero frozen threshold without coercion', () => {
+ const source = point({
+ value: 0,
+ calibration: { ...calibrated().calibration!, threshold: 0 },
+ });
+ expect(qualityEligibility(source, { ...selection, threshold: 0 })).toMatchObject({
+ eligible: true,
+ value: 0,
+ });
+ expect(source.quality.metrics.prompt_adherence?.value).toBe(0);
+ });
+ it('rejects missing and legacy scale metadata without shifting otherwise plausible scores', () => {
+ for (const scale of [undefined, 'ordinal_1_to_5']) {
+ const source = point({ value: 3 });
+ Object.assign(source.quality, { scale });
+ expect(qualityEligibility(source, selection)).toMatchObject({
+ eligible: false,
+ value: null,
+ });
+ expect(source.quality.metrics.prompt_adherence?.value).toBe(3);
+ }
+ });
+ it('keeps retained missing/unjudged quality null, never inventing a score', () => {
+ expect(qualityValue({}, 'prompt_adherence')).toBeNull();
+ expect(qualityEligibility({ quality: null }, selection).reasons).toEqual(['unjudged']);
+ expect(qualityValue(point({ status: 'unjudged', value: null }), 'prompt_adherence')).toBeNull();
+ });
+
+ it.each(['judged_unqualified', 'fail', 'inconclusive', 'unassessable'])(
+ 'excludes a completed score with %s decision',
+ (status) => expect(qualityEligibility(point({ status }), selection).eligible).toBe(false),
+ );
+
+ it('requires complete assessed clip coverage, not a passing survivor subset', () => {
+ for (const samples of [null, 0, 19, 21, 19.5, Number.NaN])
+ expect(qualityEligibility(point({ samples }), selection).reasons).toContain(
+ 'incomplete_coverage',
+ );
+ expect(qualityEligibility(point(), selection).eligible).toBe(true);
+ expect(
+ qualityEligibility({ ...point({ samples: 1, total: 1 }), samples: 20 }, selection).reasons,
+ ).toContain('incomplete_coverage');
+ });
+
+ it('requires calibrated provenance and a frozen threshold even without a reader threshold', () => {
+ const calibration = calibrated().calibration!;
+ for (const missing of [
+ null,
+ { ...calibration, status: 'uncalibrated' as const },
+ { ...calibration, threshold: null },
+ { ...calibration, provenance: null },
+ { ...calibration, cohortId: null },
+ { ...calibration, frozenAt: 'invalid date' },
+ ])
+ expect(qualityEligibility(point({ calibration: missing }), selection).reasons).toContain(
+ 'uncalibrated',
+ );
+ });
+
+ it('preserves equality at the threshold, and cannot relax the frozen threshold', () => {
+ expect(qualityEligibility(point(), { ...selection, threshold: 4 }).eligible).toBe(true);
+ expect(qualityEligibility(point(), { ...selection, threshold: 4.5 }).reasons).toContain(
+ 'below_threshold',
+ );
+ expect(qualityEligibility(point({ value: 2 }), { ...selection, threshold: 1 }).eligible).toBe(
+ false,
+ );
+ expect(qualityEligibility(point(), { ...selection, threshold: Number.NaN }).eligible).toBe(
+ false,
+ );
+ });
+
+ it('rejects missing evaluator identity, out-of-scale values and a reversed human score direction', () => {
+ expect(qualityEligibility(point({ evaluatorSha256: null }), selection).reasons).toContain(
+ 'missing_evaluator',
+ );
+ for (const value of [null, Number.NaN, Infinity, -1, 5])
+ expect(qualityEligibility(point({ value }), selection).reasons).toContain('invalid_value');
+ expect(qualityEligibility(point({ direction: 'lower' }), selection).reasons).toContain(
+ 'incompatible_direction',
+ );
+ const missingContract = point();
+ missingContract.quality.contractSha256 = null;
+ expect(qualityEligibility(missingContract, selection).reasons).toContain('missing_protocol');
+ });
+
+ it('requires every critical dimension even when the selected dimension passes', () => {
+ const missing = point();
+ delete missing.quality.metrics.audio_content;
+ expect(qualityEligibility(missing, selection)).toMatchObject({ eligible: false, value: null });
+ const failed = point();
+ failed.quality.metrics.temporal_consistency = calibrated({ status: 'fail' });
+ expect(qualityEligibility(failed, selection)).toMatchObject({ eligible: false, value: null });
+ const partial = point();
+ partial.quality.metrics.visual_fidelity = calibrated({ samples: 19 });
+ expect(qualityEligibility(partial, selection).reasons).toContain('incomplete_coverage');
+ const uncalibrated = point();
+ uncalibrated.quality.metrics.av_sync = calibrated({ calibration: null });
+ expect(qualityEligibility(uncalibrated, selection).reasons).toContain('uncalibrated');
+ });
+
+ it('keeps raw dimensions separate and applies the reader threshold only to the selected one', () => {
+ const source = point();
+ source.quality.metrics.audio_quality = calibrated({ value: 3 });
+ expect(qualityValue(source, 'prompt_adherence')).toBe(4);
+ expect(qualityValue(source, 'audio_quality')).toBe(3);
+ expect(qualityEligibility(source, { ...selection, threshold: 4 }).eligible).toBe(true);
+ expect(qualityEligibility(source, { metric: 'audio_quality', threshold: 4 }).eligible).toBe(
+ false,
+ );
+ });
+
+ it('isolates evaluator versions, calibration rules and contract revisions in frontier cohorts', () => {
+ const original = qualityCohortKey(point(), 'prompt_adherence');
+ expect(original).not.toBeNull();
+ expect(
+ qualityCohortKey(point({ evaluatorVersion: 'fixture-v2' }), 'prompt_adherence'),
+ ).not.toBe(original);
+ expect(
+ qualityCohortKey(
+ point({ calibration: { ...calibrated().calibration!, cohortId: 'other' } }),
+ 'prompt_adherence',
+ ),
+ ).not.toBe(original);
+ const changedContract = point();
+ changedContract.quality.contractSha256 = 'c'.repeat(64);
+ expect(qualityCohortKey(changedContract, 'prompt_adherence')).not.toBe(original);
+ const changedOtherDimension = point();
+ changedOtherDimension.quality.metrics.audio_content = calibrated({ evaluatorVersion: 'other' });
+ expect(qualityCohortKey(changedOtherDimension, 'prompt_adherence')).not.toBe(original);
+ changedOtherDimension.quality.metrics.audio_content = calibrated({
+ calibration: { ...calibrated().calibration!, threshold: 2 },
+ });
+ expect(qualityCohortKey(changedOtherDimension, 'prompt_adherence')).not.toBe(original);
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/quality.ts b/packages/app/src/components/video-benchmark/quality.ts
new file mode 100644
index 000000000..a7a8b7870
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/quality.ts
@@ -0,0 +1,220 @@
+/** Original Goal 1 rubric dimensions; never an overall quality score. */
+export const QUALITY_METRICS = {
+ prompt_adherence: { label: 'Prompt adherence', labelZh: '提示词遵循度', polarity: 'higher' },
+ visual_fidelity: { label: 'Visual fidelity', labelZh: '视觉质量', polarity: 'higher' },
+ temporal_consistency: {
+ label: 'Temporal consistency',
+ labelZh: '时序一致性',
+ polarity: 'higher',
+ },
+ motion_plausibility: { label: 'Motion plausibility', labelZh: '运动合理性', polarity: 'higher' },
+ audio_quality: { label: 'Audio quality', labelZh: '音频质量', polarity: 'higher' },
+ audio_content: { label: 'Audio content', labelZh: '音频内容', polarity: 'higher' },
+ av_sync: {
+ label: 'Audiovisual synchronization',
+ labelZh: '音画同步',
+ polarity: 'higher',
+ },
+} as const;
+
+export type QualityMetricId = keyof typeof QUALITY_METRICS;
+export const QUALITY_METRIC_IDS = Object.keys(QUALITY_METRICS) as QualityMetricId[];
+/** Original human rubric anchors; scores are never shifted from another scale. */
+export const QUALITY_SCALE = {
+ registryMetricId: 'human.absolute_dimension_rating',
+ registryVersion: '0.2.0-draft',
+ polarity: 'higher',
+ unit: 'ordinal_0_to_4',
+ minimum: 0,
+ maximum: 4,
+} as const;
+
+export type VideoQualityStatus =
+ | 'unjudged'
+ | 'judged_unqualified'
+ | 'pass'
+ | 'fail'
+ | 'inconclusive'
+ | 'unassessable';
+
+export interface VideoQualityMetricResult {
+ /** One dimension's declared aggregate; no averaging across dimensions. */
+ value: number | null;
+ status: VideoQualityStatus;
+ direction: 'higher' | 'lower';
+ evaluatorId: string | null;
+ evaluatorVersion: string | null;
+ evaluatorSha256: string | null;
+ /** Assessed target clips and all target clips, not number of ratings or pair appearances. */
+ samples: number | null;
+ total: number | null;
+ calibration: {
+ status: 'uncalibrated' | 'calibrated';
+ cohortId: string | null;
+ /** Frozen calibrated threshold; Goal 1 v0 has none, so it stays null. */
+ threshold: number | null;
+ provenance: string | null;
+ frozenAt: string | null;
+ } | null;
+}
+
+export interface VideoQualityAssessment {
+ scale: typeof QUALITY_SCALE.unit;
+ contractId: string | null;
+ contractSha256: string | null;
+ rubricVersion: string | null;
+ rubricSha256: string | null;
+ metrics: Partial>;
+}
+
+export interface QualitySelection {
+ metric: QualityMetricId;
+ /** Reader's extra threshold. It cannot relax the frozen protocol threshold. */
+ threshold: number | null;
+}
+
+interface QualityPoint {
+ quality?: VideoQualityAssessment | null;
+ samples?: number;
+}
+export type QualityExclusionReason =
+ | 'unjudged'
+ | 'not_qualified'
+ | 'missing_protocol'
+ | 'missing_evaluator'
+ | 'incomplete_coverage'
+ | 'uncalibrated'
+ | 'invalid_value'
+ | 'incompatible_direction'
+ | 'below_threshold';
+
+const text = (value: string | null | undefined): value is string =>
+ typeof value === 'string' && value.trim().length > 0;
+const hash = (value: string | null | undefined): value is string =>
+ typeof value === 'string' && /^[a-f0-9]{64}$/u.test(value);
+const score = (value: number | null | undefined): value is number =>
+ typeof value === 'number' &&
+ Number.isFinite(value) &&
+ value >= QUALITY_SCALE.minimum &&
+ value <= QUALITY_SCALE.maximum;
+
+export function qualityMeasurement(point: QualityPoint, metric: QualityMetricId) {
+ return point.quality?.metrics?.[metric] ?? null;
+}
+
+function dimensionEligibility(
+ point: QualityPoint,
+ selection: QualitySelection,
+): {
+ eligible: boolean;
+ reasons: QualityExclusionReason[];
+ value: number | null;
+ cohortKey: string | null;
+} {
+ const assessment = point.quality;
+ const measurement = qualityMeasurement(point, selection.metric);
+ if (!measurement) return { eligible: false, reasons: ['unjudged'], value: null, cohortKey: null };
+ const reasons: QualityExclusionReason[] = [];
+ if (measurement.status !== 'pass')
+ reasons.push(measurement.status === 'unjudged' ? 'unjudged' : 'not_qualified');
+ if (
+ assessment?.scale !== QUALITY_SCALE.unit ||
+ !text(assessment?.contractId) ||
+ !hash(assessment?.contractSha256) ||
+ !text(assessment?.rubricVersion) ||
+ !hash(assessment?.rubricSha256)
+ )
+ reasons.push('missing_protocol');
+ if (
+ !text(measurement.evaluatorId) ||
+ !text(measurement.evaluatorVersion) ||
+ !hash(measurement.evaluatorSha256)
+ )
+ reasons.push('missing_evaluator');
+ if (
+ !Number.isSafeInteger(measurement.samples) ||
+ (measurement.samples ?? 0) <= 0 ||
+ measurement.samples !== measurement.total ||
+ (point.samples !== undefined && measurement.total !== point.samples)
+ )
+ reasons.push('incomplete_coverage');
+ const calibration = measurement.calibration;
+ if (
+ calibration?.status !== 'calibrated' ||
+ !text(calibration.cohortId) ||
+ !score(calibration.threshold) ||
+ !text(calibration.provenance) ||
+ !text(calibration.frozenAt) ||
+ !Number.isFinite(Date.parse(calibration.frozenAt))
+ )
+ reasons.push('uncalibrated');
+ if (!score(measurement.value)) reasons.push('invalid_value');
+ if (measurement.direction !== QUALITY_SCALE.polarity) reasons.push('incompatible_direction');
+ if (
+ (selection.threshold !== null && !score(selection.threshold)) ||
+ (score(measurement.value) &&
+ ((score(calibration?.threshold) && measurement.value < calibration.threshold) ||
+ (score(selection.threshold) && measurement.value < selection.threshold)))
+ )
+ reasons.push('below_threshold');
+ const eligible = reasons.length === 0;
+ return {
+ eligible,
+ reasons,
+ value: eligible ? measurement.value : null,
+ cohortKey: eligible
+ ? JSON.stringify([
+ assessment!.contractId,
+ assessment!.contractSha256,
+ assessment!.rubricVersion,
+ assessment!.rubricSha256,
+ selection.metric,
+ QUALITY_SCALE.registryMetricId,
+ QUALITY_SCALE.registryVersion,
+ measurement.direction,
+ measurement.evaluatorId,
+ measurement.evaluatorVersion,
+ measurement.evaluatorSha256,
+ calibration!.cohortId,
+ calibration!.threshold,
+ calibration!.provenance,
+ calibration!.frozenAt,
+ ])
+ : null,
+ };
+}
+
+/** Every critical dimension must qualify before selecting an axis or computing a frontier. */
+export function qualityEligibility(point: QualityPoint, selection: QualitySelection) {
+ const results = QUALITY_METRIC_IDS.map((metric) => ({
+ metric,
+ ...dimensionEligibility(point, {
+ metric,
+ threshold: metric === selection.metric ? selection.threshold : null,
+ }),
+ }));
+ const selected = results.find((result) => result.metric === selection.metric);
+ const reasons = [...new Set(results.flatMap((result) => result.reasons))];
+ const eligible = reasons.length === 0 && selected !== undefined;
+ return {
+ eligible,
+ reasons,
+ value: eligible ? selected.value : null,
+ cohortKey: eligible
+ ? JSON.stringify([
+ QUALITY_SCALE.unit,
+ selection.metric,
+ ...results.map((result) => result.cohortKey),
+ ])
+ : null,
+ };
+}
+
+export function qualityValue(point: QualityPoint, metric: QualityMetricId): number | null {
+ return qualityEligibility(point, { metric, threshold: null }).value;
+}
+
+/** Workload/generation compatibility must additionally be enforced by the plot's cohort. */
+export function qualityCohortKey(point: QualityPoint, metric: QualityMetricId): string | null {
+ return qualityEligibility(point, { metric, threshold: null }).cohortKey;
+}
diff --git a/packages/app/src/components/video-benchmark/serving-evidence.fixture.json b/packages/app/src/components/video-benchmark/serving-evidence.fixture.json
new file mode 100644
index 000000000..a36fbb075
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/serving-evidence.fixture.json
@@ -0,0 +1,327 @@
+{
+ "provenance": {
+ "description": "Read-only projection of retained artifacts; no new execution. All measured records retained; decoder details and infrastructure fields omitted.",
+ "h200": {
+ "runId": "35533977848",
+ "runUrl": "https://github.com/SemiAnalysisAI/InferenceX/actions/runs/35533977848",
+ "artifactMember": "gpu/c1/baseline/run.json",
+ "sha256": "31d57c9ade99bb6fc553a317a764c58c73331b48d9cf3da5314bd370976c7b30"
+ },
+ "amd": {
+ "runId": "35986548616",
+ "runUrl": "https://github.com/SemiAnalysisAI/InferenceX/actions/runs/35986548616",
+ "artifactMember": "serving-smoke.json",
+ "sha256": "17ae678ba828de00ea4046f39d4d22375a608d4ea4a7af1756c23ca8ccf719a6"
+ }
+ },
+ "h200": {
+ "id": "c1",
+ "concurrency": 1,
+ "cell": {
+ "status": "complete",
+ "completion": {
+ "scheduled": 20,
+ "completed": 20,
+ "valid": 20,
+ "failed": 0,
+ "not_started": 0
+ }
+ },
+ "run": {
+ "summary": {
+ "completed": 20,
+ "failed": 0,
+ "failed_attempts": 0,
+ "invalid_completed": 0,
+ "latency_max_seconds": 290.75736394990236,
+ "latency_mean_seconds": 290.3732462304877,
+ "latency_median_seconds": 290.3730132339988,
+ "latency_min_seconds": 289.86329363589175,
+ "latency_sample_stddev_seconds": 0.21760976791751133,
+ "latency_samples": 20,
+ "media_validation_median_seconds": 1.0842243559891358,
+ "not_started": 0,
+ "scheduled": 20,
+ "submit_to_media_median_seconds": 289.2909479374066,
+ "submit_to_terminal_median_seconds": 289.28318243008107,
+ "technical_success_rate": 1.0,
+ "valid": 20,
+ "valid_clips_per_second": 0.003457026195178493
+ },
+ "serving": {
+ "mode": "closed_loop",
+ "submitted": 20,
+ "outcomes": {
+ "completed": 20,
+ "interrupted": 0,
+ "invalid_media": 0,
+ "not_started": 0,
+ "provider_cancelled": 0,
+ "provider_failed": 0,
+ "timed_out": 0,
+ "transport_error": 0,
+ "validation_error": 0
+ },
+ "delivery_deadline_seconds": null
+ },
+ "records": [
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "warmup",
+ "sha256": "460c0260cb3f2835ca0272bf12c1396eda1d5953f2e4478bbb865912371752f5",
+ "slot_id": "warmup-001",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "460c0260cb3f2835ca0272bf12c1396eda1d5953f2e4478bbb865912371752f5",
+ "slot_id": "measurement-r001-c001",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "1d4ad8784f5227abc93641623454c803490ae6e947b4f537681cea35df5a8f4e",
+ "slot_id": "measurement-r001-c002",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "c8eff0108706cf47df6e141e3ebe38e21b6b153741c00a0b150ac24c0ee7a158",
+ "slot_id": "measurement-r001-c003",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "7047c402370b6e7477a438a0364b6da30865b088adb46d9ba58a07f59e565893",
+ "slot_id": "measurement-r001-c004",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "ebff8e5a0b4cc44468c99e266dd11aa1c29a80ab724912084867ea2ce3721551",
+ "slot_id": "measurement-r001-c005",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "93601caa44a5077e3f02c3b7278ed61fda0a4685a50c0ab99e79b5a04d238e10",
+ "slot_id": "measurement-r001-c006",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "717272b921de5e9fbb24693d8ddec6ec788a2fb61d6758976d62c3ab5766f85e",
+ "slot_id": "measurement-r001-c007",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "d95f685c61406b25ba91728c557a94ce58401579f989c1b9b5dddf73296134f3",
+ "slot_id": "measurement-r001-c008",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "483c4f39aec29867cd85ad56c8a6aa08ee3d02ef13dff1dc218c250ad63d4932",
+ "slot_id": "measurement-r001-c009",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "85f00771502271861517783d87f384973efd945a70c6d3db1a808a9d2a841aca",
+ "slot_id": "measurement-r001-c010",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "21fafc4d1f2157c634ac77b77f256dc264ac2186c9d37c59d92bf098b7e81a36",
+ "slot_id": "measurement-r001-c011",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "119254f969ed96a03ace89c41cec348d8393942b06b09dd69d679d73e8ab4efc",
+ "slot_id": "measurement-r001-c012",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "5d2d414d0966fb4f90b1bab94c70e2e84c85d7ea262f5b2abbfb4d2ef3a5c964",
+ "slot_id": "measurement-r001-c013",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "1738206d6e6732d8969758c8a2b97b6770d650b85cb80fbd3a85b73be2a43753",
+ "slot_id": "measurement-r001-c014",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "52777e2e86db835ed5992bd32fc0c7aa686eb916c9d13e6bf50fc2eb87fcef5c",
+ "slot_id": "measurement-r001-c015",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "c435474e06123894229e5d440b90b10cd408b019eb1060444f2daa17cceb9105",
+ "slot_id": "measurement-r001-c016",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "bcc783d3b2abc437d342fc08a0447715a5e54b47bbc3b59e8c28d057c0ca8c93",
+ "slot_id": "measurement-r001-c017",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "eedc35099b9c9daf4da92153eb9b5336b33faa71baaad278c12a10f9e7542290",
+ "slot_id": "measurement-r001-c018",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "261c31990cfa70a5bf7bd2bcf87ba489facbcbbb001e4eceeb920141384aa1b2",
+ "slot_id": "measurement-r001-c019",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ },
+ {
+ "attempted": true,
+ "outcome": "completed",
+ "phase": "measurement",
+ "sha256": "e4a06d32812cd2fb17072e0f9bebfe08170b47b4397b9016f9a30a381d2b396b",
+ "slot_id": "measurement-r001-c020",
+ "status": "succeeded",
+ "media": {
+ "valid": true
+ }
+ }
+ ]
+ },
+ "spec": null
+ },
+ "amd": {
+ "id": "c1",
+ "concurrency": 1,
+ "cell": {
+ "completion": {
+ "attempted": 0,
+ "completed": 0,
+ "failed": 20,
+ "not_started": 20,
+ "scheduled": 20,
+ "unfinished": 0,
+ "valid": 0
+ },
+ "concurrency": 1,
+ "receipt": {
+ "path": "gpu/c1/gpu-job.json",
+ "sha256": "ec68a39add00fe1cad74760ad7348c05251bda315a649af1eb625be9f05d0b53"
+ },
+ "status": "failed",
+ "verified": false
+ },
+ "run": null,
+ "spec": null
+ }
+}
diff --git a/packages/app/src/components/video-benchmark/serving-evidence.test.ts b/packages/app/src/components/video-benchmark/serving-evidence.test.ts
new file mode 100644
index 000000000..8d36cf2bb
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/serving-evidence.test.ts
@@ -0,0 +1,261 @@
+import { describe, expect, it } from 'vitest';
+import type { Json } from './bundle';
+import type { VideoHistoryPage } from './history';
+import { servingCellEvidence, videoServingEvidence } from './serving-evidence';
+import fixture from './serving-evidence.fixture.json';
+
+function page(): VideoHistoryPage {
+ return {
+ schemaVersion: 1,
+ nextPage: null,
+ entries: [
+ {
+ id: '35986548616.2',
+ runId: '35986548616',
+ publishedAt: null,
+ artifact: { id: 2, name: 'retained', expired: false, size_in_bytes: 0 },
+ error: null,
+ sources: [
+ {
+ id: '35986548616',
+ sha256: 'a'.repeat(64),
+ sourceSha: 'b'.repeat(40),
+ hardware: 'AMD Instinct MI355X',
+ execution: 'failed',
+ observedAt: null,
+ kind: 'observation',
+ observations: [],
+ serving: [servingCellEvidence(fixture.amd, true)],
+ fidelity: null,
+ calibration: null,
+ releaseQualified: false,
+ error: null,
+ },
+ ],
+ },
+ ],
+ };
+}
+
+describe('serving outcome accounting', () => {
+ it('preserves the retained H200 measured ledger and excludes its warmup', () => {
+ expect(servingCellEvidence(fixture.h200, true)).toMatchObject({
+ scheduled: 20,
+ attempted: 20,
+ completed: 20,
+ failed: 0,
+ timedOut: 0,
+ notStarted: 0,
+ valid: 20,
+ unjudged: 20,
+ legacyFailedSlots: 0,
+ deliveryDeadlineSeconds: null,
+ qualitySloGoodput: null,
+ provenance: 'request-ledger',
+ });
+ });
+
+ it('preserves AMD scheduled slots without counting unstarted work as failed attempts', () => {
+ expect(servingCellEvidence(fixture.amd, true)).toMatchObject({
+ scheduled: 20,
+ attempted: 0,
+ completed: 0,
+ failed: 0,
+ timedOut: 0,
+ notStarted: 20,
+ valid: 0,
+ unjudged: 0,
+ legacyFailedSlots: 20,
+ unfinished: 0,
+ deliveryDeadlineSeconds: null,
+ qualitySloGoodput: null,
+ provenance: 'cell-summary',
+ });
+ });
+
+ it('keeps timed-out attempts distinct from unstarted slots and retains invalid completed media', () => {
+ const run: Json = {
+ summary: { scheduled: 4, completed: 2, valid: 1, failed: 3 },
+ records: [
+ {
+ slot_id: 'a',
+ phase: 'measurement',
+ attempted: true,
+ status: 'succeeded',
+ outcome: 'completed',
+ media: { valid: true },
+ },
+ {
+ slot_id: 'b',
+ phase: 'measurement',
+ attempted: true,
+ status: 'succeeded',
+ outcome: 'invalid_media',
+ media: { valid: false },
+ },
+ {
+ slot_id: 'c',
+ phase: 'measurement',
+ attempted: true,
+ status: 'failed',
+ outcome: 'timed_out',
+ },
+ {
+ slot_id: 'd',
+ phase: 'measurement',
+ attempted: false,
+ status: 'failed',
+ outcome: 'not_started',
+ },
+ ],
+ };
+ expect(
+ servingCellEvidence({ id: 'c2', concurrency: 2, cell: null, run, spec: null }, true),
+ ).toMatchObject({
+ scheduled: 4,
+ attempted: 3,
+ completed: 2,
+ valid: 1,
+ unjudged: 1,
+ failed: 1,
+ timedOut: 1,
+ notStarted: 1,
+ legacyFailedSlots: 3,
+ qualitySloGoodput: null,
+ });
+ });
+
+ it('does not manufacture complete accounting or quality counts from a partial ledger or aggregate', () => {
+ const partial = structuredClone(fixture.h200);
+ partial.run.records.pop();
+ delete (partial.run.serving as Partial).submitted;
+ const row = servingCellEvidence(partial, true);
+ expect(row.attempted).toBeNull();
+ expect(row.unjudged).toBeNull();
+ expect(row.provenance).toBe('cell-summary');
+ expect(servingCellEvidence(fixture.h200, false).unjudged).toBeNull();
+ expect(servingCellEvidence(fixture.h200, false).qualitySloGoodput).toBeNull();
+ const judged = structuredClone(fixture.h200);
+ Object.assign(judged.run.records[1], { quality_judgment: { status: 'pass' } });
+ expect(servingCellEvidence(judged, true).unjudged).toBeNull();
+ });
+
+ it('preserves fractional deadlines without deriving a quality/deadline intersection', () => {
+ const cell = structuredClone(fixture.h200);
+ Object.assign(cell.run.serving, { delivery_deadline_seconds: 0.5 });
+ expect(servingCellEvidence(cell, true)).toMatchObject({
+ deliveryDeadlineSeconds: 0.5,
+ qualitySloGoodput: null,
+ });
+ });
+
+ it('keeps zero-sample and unknown-workload sources before chart filtering and deduplicates re-exports', () => {
+ const first = page();
+ const older = structuredClone(first);
+ older.entries[0].runId = '100';
+ older.entries[0].artifact.id = 1;
+ expect(videoServingEvidence([first, older])).toMatchObject([
+ {
+ runId: '35986548616',
+ artifactId: 2,
+ sourceId: '35986548616',
+ hardware: 'AMD Instinct MI355X',
+ cell: 'c1',
+ workloadKey: null,
+ scheduled: 20,
+ attempted: 0,
+ notStarted: 20,
+ },
+ ]);
+ expect(videoServingEvidence([first, older])).toHaveLength(1);
+ });
+
+ it('shows source errors and legacy observations without inventing missing outcome counts', () => {
+ const failed = page();
+ const source = failed.entries[0].sources[0];
+ source.serving = [];
+ source.error = 'Invalid H3 serving matrix: unsupported matrix contract';
+ expect(videoServingEvidence([failed])[0]).toMatchObject({
+ cell: null,
+ scheduled: null,
+ attempted: null,
+ failed: null,
+ unjudged: null,
+ provenance: 'unavailable',
+ error: source.error,
+ });
+ const legacy = page();
+ const oldSource = legacy.entries[0].sources[0];
+ delete oldSource.serving;
+ // Old immutable history projections carry aggregate counts only.
+ const observation = {
+ id: 'legacy',
+ cell: 'c1',
+ hardware: oldSource.hardware,
+ concurrency: 1,
+ runtime: '',
+ workload: '',
+ model: '',
+ status: 'complete',
+ valid: 20,
+ completed: 20,
+ scheduled: 20,
+ failed: 0,
+ samples: 20,
+ p50: 100,
+ p90: 100,
+ clipsGpuHour: null,
+ energyKj: null,
+ participating: null,
+ allocated: null,
+ replicas: null,
+ wallSeconds: null,
+ durationSeconds: null,
+ frameCount: null,
+ avgPowerW: null,
+ enforcedLimitW: null,
+ server: null,
+ };
+ oldSource.observations = [observation];
+ expect(videoServingEvidence([legacy])[0]).toMatchObject({
+ scheduled: 20,
+ completed: 20,
+ valid: 20,
+ attempted: null,
+ unjudged: null,
+ failed: null,
+ legacyFailedSlots: 0,
+ provenance: 'legacy-projection',
+ });
+ // An older aggregate-only export must not duplicate a newer sealed c1 row.
+ const current = page();
+ expect(videoServingEvidence([current, legacy])).toHaveLength(1);
+ expect(videoServingEvidence([current, legacy])[0].attempted).toBe(0);
+ oldSource.observations = [
+ { ...observation, id: 'legacy:baseline', cell: null },
+ { ...observation, id: 'legacy:candidate', cell: null },
+ ];
+ expect(videoServingEvidence([legacy])).toHaveLength(2);
+ expect(new Set(videoServingEvidence([legacy]).map((row) => row.id)).size).toBe(2);
+ });
+
+ it('retains a failed published index even when no source could be loaded', () => {
+ const broken = page();
+ broken.entries[0].sources = [];
+ broken.entries[0].error = 'Published source index unavailable';
+ expect(videoServingEvidence([broken])).toMatchObject([
+ {
+ runId: '35986548616',
+ artifactId: 2,
+ sourceId: '',
+ cell: null,
+ scheduled: null,
+ attempted: null,
+ failed: null,
+ unjudged: null,
+ provenance: 'unavailable',
+ error: 'Published source index unavailable',
+ },
+ ]);
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/serving-evidence.ts b/packages/app/src/components/video-benchmark/serving-evidence.ts
new file mode 100644
index 000000000..1c0e1bc98
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/serving-evidence.ts
@@ -0,0 +1,202 @@
+import { at, number, rows, text, type Json } from './bundle';
+import type { VideoHistoryPage } from './history';
+import type { ServingCell } from './serving';
+
+export interface ServingCellEvidence {
+ cell: string | null;
+ concurrency: number | null;
+ status: string;
+ workloadKey: string | null;
+ mode: string | null;
+ scheduled: number | null;
+ /** Durable attempt intent, not proof that the server received the request. */
+ attempted: number | null;
+ /** Legacy completion includes local media analysis. */
+ completed: number | null;
+ /** Attempted records with failed status; timedOut is a subset, not an additive count. */
+ failed: number | null;
+ timedOut: number | null;
+ notStarted: number | null;
+ valid: number | null;
+ unjudged: number | null;
+ /** The original failed field also counts invalid and unstarted scheduled slots. */
+ legacyFailedSlots: number | null;
+ unfinished: number | null;
+ deliveryDeadlineSeconds: number | null;
+ /** Cell quality aggregates cannot establish the per-request quality/deadline intersection. */
+ qualitySloGoodput: null;
+ provenance: 'request-ledger' | 'cell-summary' | 'legacy-projection' | 'unavailable';
+}
+
+export interface VideoServingEvidenceRow extends ServingCellEvidence {
+ id: string;
+ runId: string;
+ artifactId: number;
+ sourceId: string;
+ hardware: string;
+ sourceSha: string;
+ error: string | null;
+}
+
+const count = (value: Json): number | null =>
+ typeof value === 'number' && Number.isSafeInteger(value) && value >= 0 ? value : null;
+
+/** Read verified source records before any sample-floor, hardware or workload filtering. */
+export function servingCellEvidence(
+ cell: Pick,
+ qualityKnownAbsent = false,
+): ServingCellEvidence {
+ const summary = at(cell.run, 'summary');
+ const completion = at(cell.cell, 'completion');
+ const serving = at(cell.run, 'serving');
+ const scheduled = count(at(completion, 'scheduled')) ?? count(at(summary, 'scheduled'));
+ const records = rows(at(cell.run, 'records')).filter((r) => at(r, 'phase') === 'measurement');
+ const fullLedger =
+ scheduled !== null &&
+ records.length === scheduled &&
+ records.every((r) => text(at(r, 'slot_id')) && typeof at(r, 'attempted') === 'boolean') &&
+ new Set(records.map((r) => at(r, 'slot_id'))).size === records.length;
+ const attempts = records.filter((r) => at(r, 'attempted') === true);
+ const attempted =
+ count(at(completion, 'attempted')) ??
+ count(at(serving, 'submitted')) ??
+ (fullLedger ? attempts.length : null);
+ const valid = count(at(summary, 'valid')) ?? count(at(completion, 'valid'));
+ const knownStatuses =
+ fullLedger && attempts.every((r) => ['succeeded', 'failed'].includes(text(at(r, 'status'))));
+ const failed =
+ count(at(summary, 'failed_attempts')) ??
+ (knownStatuses
+ ? attempts.filter((r) => at(r, 'status') === 'failed').length
+ : attempted === 0
+ ? 0
+ : null);
+ const knownTimeouts =
+ fullLedger && attempts.every((r) => at(r, 'status') === 'succeeded' || text(at(r, 'outcome')));
+ const timedOut =
+ count(at(serving, 'outcomes', 'timed_out')) ??
+ (knownTimeouts
+ ? attempts.filter((r) => at(r, 'outcome') === 'timed_out').length
+ : attempted === 0
+ ? 0
+ : null);
+ const validRecords = records.filter(
+ (r) => at(r, 'status') === 'succeeded' && at(r, 'media', 'valid') === true,
+ );
+ const noRecordJudgments = validRecords.every((r) =>
+ ['quality', 'quality_judgment', 'quality_assessment'].every((key) => at(r, key) === null),
+ );
+ return {
+ cell: cell.id,
+ concurrency: cell.concurrency,
+ status: text(at(cell.cell, 'status')),
+ workloadKey: null,
+ mode: text(at(serving, 'mode')) || text(at(cell.spec, 'serving', 'mode')) || null,
+ scheduled,
+ attempted,
+ completed: count(at(summary, 'completed')) ?? count(at(completion, 'completed')),
+ failed,
+ timedOut,
+ notStarted:
+ count(at(completion, 'not_started')) ??
+ count(at(summary, 'not_started')) ??
+ (fullLedger ? records.length - attempts.length : null),
+ valid,
+ unjudged:
+ qualityKnownAbsent &&
+ noRecordJudgments &&
+ ((fullLedger && validRecords.length === valid) || (attempted === 0 && valid === 0))
+ ? valid
+ : null,
+ legacyFailedSlots: count(at(summary, 'failed')) ?? count(at(completion, 'failed')),
+ unfinished: count(at(completion, 'unfinished')),
+ deliveryDeadlineSeconds:
+ number(at(serving, 'delivery_deadline_seconds')) ??
+ number(at(cell.spec, 'serving', 'delivery_deadline_seconds')),
+ qualitySloGoodput: null,
+ provenance: fullLedger ? 'request-ledger' : 'cell-summary',
+ };
+}
+
+/** Newest publication per sealed source/cell; never discard zero-sample or unknown-workload rows. */
+export function videoServingEvidence(pages: VideoHistoryPage[]): VideoServingEvidenceRow[] {
+ const result: VideoServingEvidenceRow[] = [];
+ const seen = new Set();
+ for (const page of pages)
+ for (const entry of page.entries) {
+ if (entry.sources.length === 0 && entry.error && !seen.has(entry.id)) {
+ seen.add(entry.id);
+ result.push({
+ ...servingCellEvidence({ id: '', concurrency: 0, cell: null, run: null, spec: null }),
+ id: entry.id,
+ runId: entry.runId,
+ artifactId: entry.artifact.id,
+ cell: null,
+ concurrency: null,
+ sourceId: '',
+ hardware: '',
+ sourceSha: '',
+ provenance: 'unavailable',
+ error: entry.error,
+ });
+ }
+ for (const source of entry.sources) {
+ if (source.kind !== 'observation') continue;
+ const cells: ServingCellEvidence[] = source.serving?.length
+ ? source.serving
+ : source.observations.length > 0
+ ? source.observations.map((o) => ({
+ ...servingCellEvidence({
+ id: o.cell ?? '',
+ concurrency: o.concurrency ?? 0,
+ cell: null,
+ run: null,
+ spec: null,
+ }),
+ cell: o.cell,
+ concurrency: o.concurrency,
+ status: o.status,
+ workloadKey: o.workloadKey ?? null,
+ scheduled: o.scheduled,
+ completed: o.completed,
+ valid: o.valid,
+ legacyFailedSlots: o.failed,
+ provenance: 'legacy-projection',
+ }))
+ : [
+ {
+ ...servingCellEvidence({
+ id: '',
+ concurrency: 0,
+ cell: null,
+ run: null,
+ spec: null,
+ }),
+ cell: null,
+ concurrency: null,
+ status: source.execution,
+ provenance: 'unavailable',
+ },
+ ];
+ const identities = source.serving?.length
+ ? source.serving.map((cell) => cell.cell ?? 'unknown')
+ : source.observations.map((o) => o.cell ?? o.id);
+ for (const [index, cell] of cells.entries()) {
+ const id = `${source.id}:${source.sha256 ?? entry.id}:${identities[index] ?? 'unknown'}`;
+ if (seen.has(id)) continue;
+ seen.add(id);
+ result.push({
+ ...cell,
+ id,
+ runId: entry.runId,
+ artifactId: entry.artifact.id,
+ sourceId: source.id,
+ hardware: source.hardware,
+ sourceSha: source.sourceSha,
+ error: source.error ?? entry.error,
+ });
+ }
+ }
+ }
+ return result;
+}
diff --git a/packages/app/src/components/video-benchmark/serving.fixture.ts b/packages/app/src/components/video-benchmark/serving.fixture.ts
index fd2fddcdb..69224936d 100644
--- a/packages/app/src/components/video-benchmark/serving.fixture.ts
+++ b/packages/app/src/components/video-benchmark/serving.fixture.ts
@@ -1,4 +1,4 @@
-import type { Bundle, Json } from './bundle';
+import { at, rows, type Bundle, type Json } from './bundle';
const hash = (name: string) => name.padEnd(64, '0');
@@ -227,3 +227,42 @@ export function servingFixture(
},
});
}
+
+/** Synthetic video-only producer contract, never measured Wan performance. */
+export function wanServingFixture(requests = 20) {
+ const fixture = servingFixture('123', 'NVIDIA H200', requests);
+ for (const document of [fixture.manifest, ...fixture.documents.values()]) {
+ if (document === null || typeof document !== 'object' || Array.isArray(document)) continue;
+ const value = document;
+ const plan = value.workload_plan ?? value.plan;
+ if (plan !== null && typeof plan === 'object' && !Array.isArray(plan)) {
+ plan.model_id = 'Wan-AI/Wan2.2-T2V-A14B-Diffusers';
+ plan.generation = {
+ width: 832,
+ height: 480,
+ frame_count: 81,
+ fps: 16,
+ num_inference_steps: 40,
+ guidance_scale: 4,
+ guidance_scale_2: 3,
+ flow_shift: 12,
+ negative_prompt: '',
+ };
+ }
+ if (value.bundle_type === 'h3_serving_smoke_matrix')
+ value.bundle_type = 'video_serving_smoke_matrix';
+ if (value.evidence_kind === 'controlled_h3_gpu') value.evidence_kind = 'controlled_video_gpu';
+ if (value.bundle_type === 'mvp_run') {
+ value.evidence_kind = 'live_video';
+ Object.assign(at(value, 'serving')!, { valid_video_seconds_per_second: 81 / 16 / 120 });
+ for (const record of rows(at(value, 'records')))
+ Object.assign(at(record, 'media', 'video')!, { duration_seconds: 81 / 16 });
+ }
+ if (value.bundle_type === 'video_serving_smoke_matrix')
+ for (const cell of rows(at(value, 'cells')))
+ Object.assign(at(cell, 'metrics', 'serving')!, {
+ valid_video_seconds_per_second: 81 / 16 / 120,
+ });
+ }
+ return fixture;
+}
diff --git a/packages/app/src/components/video-benchmark/serving.test.ts b/packages/app/src/components/video-benchmark/serving.test.ts
index c8a57a62b..3dc2113af 100644
--- a/packages/app/src/components/video-benchmark/serving.test.ts
+++ b/packages/app/src/components/video-benchmark/serving.test.ts
@@ -2,7 +2,7 @@ import { readFile } from 'node:fs/promises';
import { join } from 'node:path';
import { describe, expect, it } from 'vitest';
import { at, loadBundle, type Json } from './bundle';
-import { servingFixture as fixture } from './serving.fixture';
+import { servingFixture as fixture, wanServingFixture } from './serving.fixture';
import { participatingGpuCount, perGpuHour, selectServingRecord, servingCells } from './serving';
function set(value: Json, key: string, replacement: Json) {
@@ -78,7 +78,7 @@ describe('H3 serving matrix', () => {
if (defect === 'fixture') set(run, 'evidence_kind', 'fixture');
if (defect === 'metrics') set(at(cell, 'completion'), 'valid', 3);
if (defect === 'p50') set(at(cell, 'metrics'), 'client_ready_p50_seconds', 1);
- expect(() => servingCells(b)).toThrow('Invalid H3 serving matrix:');
+ expect(() => servingCells(b)).toThrow('Invalid video serving matrix:');
});
it.each(['reference', 'missing', 'spec', 'media', 'traversal', 'power'])(
'rejects broken %s bindings',
@@ -147,3 +147,44 @@ it.skipIf(!process.env.H3_SERVING_ARTIFACT_DIR)(
expect(at(cells[2].cell, 'metrics', 'client_ready_p50_seconds')).toBeCloseTo(297.686668);
},
);
+
+it('accepts the generic video-only serving producer without requiring an audio track', () => {
+ const cells = servingCells(wanServingFixture());
+ expect(cells).toHaveLength(3);
+ expect(at(cells[0].run, 'plan', 'model_id')).toBe('Wan-AI/Wan2.2-T2V-A14B-Diffusers');
+ expect(at(cells[0].run, 'plan', 'generation', 'duration_seconds')).toBeNull();
+ expect(at(cells[0].run, 'summary', 'valid')).toBe(20);
+ expect(at(cells[0].run, 'records', 1, 'media', 'audio')).toBeNull();
+});
+
+it.each(['wan-matrix', 'wan-job', 'wan-run', 'h3-matrix', 'h3-job', 'h3-run'])(
+ 'rejects contradictory model/evidence family: %s',
+ (change) => {
+ const bundle = change.startsWith('wan-') ? wanServingFixture() : fixture();
+ if (change.endsWith('matrix'))
+ set(
+ bundle.documents.get('serving-smoke.json')!,
+ 'bundle_type',
+ change.startsWith('wan-') ? 'h3_serving_smoke_matrix' : 'video_serving_smoke_matrix',
+ );
+ if (change.endsWith('job'))
+ set(
+ bundle.documents.get('gpu/c1/gpu-job.json')!,
+ 'evidence_kind',
+ change.startsWith('wan-') ? 'controlled_h3_gpu' : 'controlled_video_gpu',
+ );
+ if (change.endsWith('run'))
+ set(
+ bundle.documents.get('gpu/c1/baseline/run.json')!,
+ 'evidence_kind',
+ change.startsWith('wan-') ? 'live_h3' : 'live_video',
+ );
+ expect(() => servingCells(bundle)).toThrow('Invalid video serving matrix');
+ },
+);
+
+it('keeps operator_endpoint request evidence valid under a verified Wan supervisor', () => {
+ const bundle = wanServingFixture();
+ set(bundle.documents.get('gpu/c1/baseline/run.json')!, 'evidence_kind', 'operator_endpoint');
+ expect(servingCells(bundle)).toHaveLength(3);
+});
diff --git a/packages/app/src/components/video-benchmark/serving.ts b/packages/app/src/components/video-benchmark/serving.ts
index b90b0b7c6..9e3796ce4 100644
--- a/packages/app/src/components/video-benchmark/serving.ts
+++ b/packages/app/src/components/video-benchmark/serving.ts
@@ -1,4 +1,5 @@
import { at, number, rows, safePath, text, type Bundle, type Json } from './bundle';
+import { canonicalVideoModelId, VIDEO_MODELS } from './models';
export interface ServingCell {
id: string;
@@ -15,7 +16,7 @@ export interface ServingCell {
}
function requireValue(condition: unknown, message: string): asserts condition {
- if (!condition) throw new Error(`Invalid H3 serving matrix: ${message}`);
+ if (!condition) throw new Error(`Invalid video serving matrix: ${message}`);
}
function canonical(value: Json): string {
@@ -28,17 +29,21 @@ function canonical(value: Json): string {
return JSON.stringify(value);
}
-/** Read the backend's single-runtime matrix without manufacturing paired results. */
-export function servingCells(
+/** Read sealed planned cells even when execution evidence is absent or incomplete. */
+export function plannedServingCells(
bundle: Pick,
-): ServingCell[] {
+): Pick[] {
const { documents, checksums, manifest, ci } = bundle;
if (!documents.has('serving-smoke.json')) return [];
const matrix = documents.get('serving-smoke.json') ?? null;
const cells = at(matrix, 'cells');
+ const wan =
+ canonicalVideoModelId(text(at(manifest, 'workload_plan', 'model_id'))) ===
+ VIDEO_MODELS.wan22.modelId;
requireValue(
at(matrix, 'schema_version') === '1.0.0' &&
- at(matrix, 'bundle_type') === 'h3_serving_smoke_matrix' &&
+ at(matrix, 'bundle_type') ===
+ (wan ? 'video_serving_smoke_matrix' : 'h3_serving_smoke_matrix') &&
['running', 'failed', 'complete'].includes(text(at(matrix, 'status'))) &&
Array.isArray(cells) &&
cells.length > 0 &&
@@ -59,17 +64,12 @@ export function servingCells(
'summary is not bound to the manifest',
);
const plan = at(matrix, 'plan');
- const devices = rows(at(matrix, 'gpu_uuids'));
requireValue(
- plan !== null &&
- canonical(plan) === canonical(at(manifest, 'workload_plan')) &&
- devices.length > 0 &&
- new Set(devices).size === devices.length &&
- devices.every((device) => typeof device === 'string' && device.startsWith('GPU-')),
- 'workload or GPU identity is missing or inconsistent',
+ plan !== null && canonical(plan) === canonical(at(manifest, 'workload_plan')),
+ 'workload identity is missing or inconsistent',
);
const seen = new Set();
- return cells.map((cell): ServingCell => {
+ return cells.map((cell): Pick => {
const concurrency = at(cell, 'concurrency');
requireValue(
typeof concurrency === 'number' && [1, 2, 4].includes(concurrency) && !seen.has(concurrency),
@@ -77,6 +77,33 @@ export function servingCells(
);
seen.add(concurrency);
const id = `c${concurrency}`;
+ requireValue(
+ ['not_started', 'running', 'failed', 'complete'].includes(text(at(cell, 'status'))) &&
+ typeof at(cell, 'verified') === 'boolean',
+ `${id} has an invalid execution status`,
+ );
+ return { id, concurrency, cell };
+ });
+}
+
+/** Read execution evidence with the full existing workload/hardware/media checks. */
+export function servingCells(
+ bundle: Pick,
+): ServingCell[] {
+ const planned = plannedServingCells(bundle);
+ const { documents, checksums, manifest } = bundle;
+ const matrix = documents.get('serving-smoke.json') ?? null;
+ const plan = at(matrix, 'plan');
+ const wan = canonicalVideoModelId(text(at(plan, 'model_id'))) === VIDEO_MODELS.wan22.modelId;
+ const devices = rows(at(matrix, 'gpu_uuids'));
+ if (planned.length > 0)
+ requireValue(
+ devices.length > 0 &&
+ new Set(devices).size === devices.length &&
+ devices.every((device) => typeof device === 'string' && device.startsWith('GPU-')),
+ 'GPU identity is missing or inconsistent',
+ );
+ return planned.map(({ id, concurrency, cell }): ServingCell => {
const root = `gpu/${id}`;
const runPath = `${root}/baseline/run.json`;
const jobPath = `${root}/gpu-job.json`;
@@ -98,11 +125,6 @@ export function servingCells(
const job = linked('receipt', jobPath);
const power = linked('power', powerPath);
const spec = documents.get(specPath) ?? null;
- requireValue(
- ['not_started', 'running', 'failed', 'complete'].includes(text(at(cell, 'status'))) &&
- typeof at(cell, 'verified') === 'boolean',
- `${id} has an invalid execution status`,
- );
if (at(cell, 'verified') === true)
requireValue(
run && job && spec && at(cell, 'status') === 'complete',
@@ -129,7 +151,7 @@ export function servingCells(
at(job, 'measurement_verified') === true &&
at(job, 'status') === 'complete' &&
at(job, 'cleanup_status') === 'clean' &&
- at(job, 'evidence_kind') === 'controlled_h3_gpu',
+ at(job, 'evidence_kind') === (wan ? 'controlled_video_gpu' : 'controlled_h3_gpu'),
`${id} does not contain verified, complete GPU execution`,
);
}
@@ -140,7 +162,9 @@ export function servingCells(
at(job, 'roles', 'baseline', 'run_sha256') === checksums.get(runPath) &&
at(run, 'bundle_type') === 'mvp_run' &&
at(run, 'bundle_version') === '0.1.0' &&
- ['operator_endpoint', 'live_h3'].includes(text(at(run, 'evidence_kind'))) &&
+ ['operator_endpoint', wan ? 'live_video' : 'live_h3'].includes(
+ text(at(run, 'evidence_kind')),
+ ) &&
canonical(at(run, 'plan')) === canonical(plan) &&
at(run, 'plan_sha256') === at(job, 'plan_sha256') &&
at(run, 'configuration', 'runtime_revision') === at(matrix, 'runtime', 'revision') &&
diff --git a/packages/app/src/components/video-benchmark/tradeoff.test.ts b/packages/app/src/components/video-benchmark/tradeoff.test.ts
index 9cac37178..d4fd64fe9 100644
--- a/packages/app/src/components/video-benchmark/tradeoff.test.ts
+++ b/packages/app/src/components/video-benchmark/tradeoff.test.ts
@@ -3,6 +3,7 @@ import { join } from 'node:path';
import { describe, expect, it } from 'vitest';
import {
tradeoffPoints,
+ workloadDurationSeconds,
tradeoffCurves,
latencyValue,
efficiencyValue,
@@ -373,3 +374,16 @@ it.skipIf(!process.env.H3_SERVING_ARTIFACT_DIR)(
expect(efficiencyValue(points[0], 'clipsGpu')).toBeCloseTo(15.0621776301);
},
);
+
+it('derives Wan frame duration without changing H3 requested duration or filling missing evidence', () => {
+ const plan = {
+ model_id: 'Wan-AI/Wan2.2-T2V-A14B-Diffusers',
+ generation: { frame_count: 81, fps: 16, duration_seconds: 4 },
+ };
+ expect(workloadDurationSeconds(plan)).toBe(81 / 16);
+ expect(workloadDurationSeconds({ ...plan, model_id: 'MiniMaxAI/MiniMax-H3' })).toBe(4);
+ expect(
+ workloadDurationSeconds({ ...plan, generation: { fps: 16, duration_seconds: 4 } }),
+ ).toBeNull();
+ expect(workloadDurationSeconds({ ...plan, generation: { frame_count: 81, fps: 0 } })).toBeNull();
+});
diff --git a/packages/app/src/components/video-benchmark/tradeoff.ts b/packages/app/src/components/video-benchmark/tradeoff.ts
index ffdaec7d3..c1924c8e8 100644
--- a/packages/app/src/components/video-benchmark/tradeoff.ts
+++ b/packages/app/src/components/video-benchmark/tradeoff.ts
@@ -1,5 +1,6 @@
import { at, entries, number, ROLES, rows, text, type Bundle, type Json } from './bundle';
import { servingCells } from './serving';
+import { canonicalVideoModelId, VIDEO_MODELS } from './models';
import { allocatedGpus } from './allocation';
import { powerLimitComparison } from './power-limit';
import { serverTimingSummary } from './server-timing';
@@ -38,6 +39,16 @@ const positive = (value: Json) => {
return n !== null && n > 0 ? n : null;
};
+/** Wan requests frame count and FPS; H3 retains its explicitly requested duration. */
+export function workloadDurationSeconds(plan: Json): number | null {
+ const generation = at(plan, 'generation');
+ if (canonicalVideoModelId(text(at(plan, 'model_id'))) !== VIDEO_MODELS.wan22.modelId)
+ return positive(at(generation, 'duration_seconds'));
+ const frames = positive(at(generation, 'frame_count'));
+ const fps = positive(at(generation, 'fps'));
+ return frames !== null && Number.isInteger(frames) && fps !== null ? frames / fps : null;
+}
+
function workloadInfo(plan: Json, identity: string, semantics: Json) {
const workload = Object.fromEntries(
entries(plan).filter(([key]) => !['plan_id', 'repetitions', 'warmup_runs'].includes(key)),
@@ -47,7 +58,8 @@ function workloadInfo(plan: Json, identity: string, semantics: Json) {
const completeWorkload =
text(at(plan, 'model_id')) &&
text(at(plan, 'model_revision')) &&
- ['width', 'height', 'duration_seconds', 'fps', 'num_inference_steps'].every(
+ workloadDurationSeconds(plan) !== null &&
+ ['width', 'height', 'fps', 'num_inference_steps'].every(
(key) => positive(at(generation, key)) !== null,
) &&
cases.length > 0 &&
@@ -55,7 +67,7 @@ function workloadInfo(plan: Json, identity: string, semantics: Json) {
const group = completeWorkload ? canonical({ plan: workload, semantics }) : `unknown:${identity}`;
const workloadLabel = [
`${number(at(generation, 'width')) ?? '?'} × ${number(at(generation, 'height')) ?? '?'}`,
- `${number(at(generation, 'duration_seconds')) ?? '?'} s`,
+ `${workloadDurationSeconds(plan) ?? '?'} s`,
`${number(at(generation, 'fps')) ?? '?'} fps`,
`${number(at(generation, 'num_inference_steps')) ?? '?'} steps`,
`${text(at(plan, 'model_id'))} @ ${text(at(plan, 'model_revision')).slice(0, 12)}`,
diff --git a/packages/app/src/components/video-benchmark/use-video-dashboard-state.ts b/packages/app/src/components/video-benchmark/use-video-dashboard-state.ts
index a072e8fb2..1d11c137e 100644
--- a/packages/app/src/components/video-benchmark/use-video-dashboard-state.ts
+++ b/packages/app/src/components/video-benchmark/use-video-dashboard-state.ts
@@ -1,3 +1,4 @@
+import { VIDEO_MODELS } from './models';
import { useCallback, useEffect, useRef, useState } from 'react';
import {
DEFAULT_VIDEO_DASHBOARD_STATE,
@@ -18,9 +19,27 @@ export function useVideoDashboardState() {
setState(initial);
}, []);
const update = useCallback((patch: Partial) => {
+ const modelChanged = patch.model !== undefined && patch.model !== latest.current.model;
const next = { ...latest.current, ...patch };
+ const url = new URL(location.href);
+ if (modelChanged) {
+ next.apiPrice = VIDEO_MODELS[next.model].apiReference?.pricePerVideoSecondUsd ?? null;
+ next.hidden = [];
+ next.qualityThreshold = null;
+ next.qualityMetric = 'prompt_adherence';
+ if (next.model === 'wan22' && next.y === 'quality') next.y = 'videosPerDollar';
+ for (const key of [
+ 'v_base',
+ 'v_cand',
+ 'v_case',
+ 'history-hardware',
+ 'history-concurrency',
+ 'history-query',
+ ])
+ url.searchParams.delete(key);
+ }
latest.current = next;
- history.replaceState(null, '', writeVideoDashboardState(new URL(location.href), next));
+ history.replaceState(null, '', writeVideoDashboardState(url, next));
setState(next);
}, []);
return { state, update };
diff --git a/packages/app/src/components/video-benchmark/use-video-points.ts b/packages/app/src/components/video-benchmark/use-video-points.ts
index d75bc55b0..ce6237330 100644
--- a/packages/app/src/components/video-benchmark/use-video-points.ts
+++ b/packages/app/src/components/video-benchmark/use-video-points.ts
@@ -1,13 +1,17 @@
'use client';
-import { useCallback, useEffect, useState } from 'react';
+import { useCallback, useEffect, useMemo, useState } from 'react';
import { VIDEO_HISTORY_MAX_PAGES, type VideoHistoryPage } from './history';
-import type { VideoPoint } from './metrics';
+import { videoModelHistory, type VideoModel } from './models';
import { videoPoints } from './points';
+import { videoServingEvidence } from './serving-evidence';
/** Load every published history page (bounded) and flatten it into chart points. */
-export function useVideoPoints() {
- const [points, setPoints] = useState([]);
+export function useVideoPoints(model: VideoModel = 'h3') {
+ const [history, setHistory] = useState([]);
+ const selected = useMemo(() => videoModelHistory(history, model), [history, model]);
+ const points = useMemo(() => videoPoints(selected), [selected]);
+ const servingEvidence = useMemo(() => videoServingEvidence(selected), [selected]);
const [loading, setLoading] = useState(true);
const [loadError, setLoadError] = useState(null);
const [replay, setReplay] = useState(false);
@@ -25,7 +29,7 @@ export function useVideoPoints() {
cache: 'no-store',
});
if (!response.ok) throw new Error(`Published history HTTP ${response.status}`);
- replayed ||= response.headers.get('x-videogenx-replay') === '1';
+ replayed ||= response.headers.has('x-videogenx-replay');
const data = (await response.json()) as VideoHistoryPage;
if (data.schemaVersion !== 1 || !Array.isArray(data.entries))
throw new Error('Unsupported published history projection');
@@ -33,7 +37,7 @@ export function useVideoPoints() {
if (data.nextPage === null) break;
}
if (controller.signal.aborted) return;
- setPoints(videoPoints(pages));
+ setHistory(pages);
setReplay(replayed);
})()
.catch((error: unknown) => {
@@ -46,5 +50,5 @@ export function useVideoPoints() {
return () => controller.abort();
}, [attempt]);
const retry = useCallback(() => setAttempt((n) => n + 1), []);
- return { points, loading, error: loadError, replay, retry };
+ return { points, servingEvidence, loading, error: loadError, replay, retry };
}
diff --git a/packages/app/src/components/video-benchmark/video-url-state.test.ts b/packages/app/src/components/video-benchmark/video-url-state.test.ts
index 1aa98e4be..42b812d55 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.test.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.test.ts
@@ -11,6 +11,36 @@ import {
} from './video-url-state';
describe('video dashboard URL state', () => {
+ it('round-trips one quality dimension and a reader threshold without changing other filters', () => {
+ const state = readVideoDashboardState(
+ '?v_y=quality&v_quality=audio_quality&v_qmin=3.5&v_hidden=h100',
+ );
+ expect(state).toMatchObject({
+ y: 'quality',
+ qualityMetric: 'audio_quality',
+ qualityThreshold: 3.5,
+ hidden: ['h100'],
+ });
+ const url = writeVideoDashboardState(
+ new URL('https://example.test/video?history-query=retained'),
+ state,
+ );
+ expect(readVideoDashboardState(url.search)).toEqual(state);
+ expect(url.searchParams.get('history-query')).toBe('retained');
+ for (const threshold of ['', 'NaN', '-1', '4.1', '5'])
+ expect(readVideoDashboardState(`?v_qmin=${threshold}`).qualityThreshold).toBeNull();
+ expect(readVideoDashboardState('?v_quality=psnr').qualityMetric).toBe('prompt_adherence');
+ });
+ it('round-trips a zero threshold and the canonical audio-content dimension', () => {
+ const state = readVideoDashboardState('?v_quality=audio_content&v_qmin=0');
+ expect(state).toMatchObject({ qualityMetric: 'audio_content', qualityThreshold: 0 });
+ const url = writeVideoDashboardState(new URL('https://example.test/video'), state);
+ expect(url.searchParams.get('v_qmin')).toBe('0');
+ expect(readVideoDashboardState(url.search)).toEqual(state);
+ expect(readVideoDashboardState('?v_quality=subject_consistency').qualityMetric).toBe(
+ 'prompt_adherence',
+ );
+ });
it('restores hidden hardware from shared links and omits an empty selection', () => {
const state = readVideoDashboardState('?v_hidden=h100,b200,h100,unknown&v_tier=r');
expect(state.hidden).toEqual(['b200', 'h100']);
@@ -46,6 +76,7 @@ describe('video dashboard URL state', () => {
'?v_x=p50Latency&v_y=kjPerVideo&v_tier=r&v_view=table&v_optimal=0&v_api=0.047',
),
).toEqual({
+ model: 'h3',
x: 'p50Latency',
y: 'kjPerVideo',
tier: 'r',
@@ -53,6 +84,8 @@ describe('video dashboard URL state', () => {
optimal: false,
apiPrice: 0.047,
hidden: [],
+ qualityMetric: 'prompt_adherence',
+ qualityThreshold: null,
});
expect([...X_METRICS]).toEqual(['p90Latency', 'p50Latency']);
expect([...Y_METRICS]).toEqual([
@@ -60,6 +93,7 @@ describe('video dashboard URL state', () => {
'dollarsPerVideo',
'videosPerGpuHour',
'kjPerVideo',
+ 'quality',
]);
for (const x of X_METRICS) expect(readVideoDashboardState(`?v_x=${x}`).x).toBe(x);
for (const y of Y_METRICS) expect(readVideoDashboardState(`?v_y=${y}`).y).toBe(y);
@@ -145,17 +179,37 @@ describe('video dashboard URL state', () => {
}).searchParams.has('v_api'),
).toBe(false);
});
- it('maps state to metric options: the cost tier and the API price, nothing else', () => {
+ it('maps state to metric options including the selected quality dimension', () => {
expect(metricOptions(DEFAULT_VIDEO_DASHBOARD_STATE)).toEqual({
tier: 'h',
apiPricePerVideoSecond: 0.08,
+ qualityMetric: 'prompt_adherence',
});
expect(metricOptions({ ...DEFAULT_VIDEO_DASHBOARD_STATE, tier: 'r', apiPrice: 0.05 })).toEqual({
tier: 'r',
apiPricePerVideoSecond: 0.05,
+ qualityMetric: 'prompt_adherence',
});
expect(
metricOptions({ ...DEFAULT_VIDEO_DASHBOARD_STATE, apiPrice: -1 }).apiPricePerVideoSecond,
).toBeNull();
});
});
+
+it('keeps model selection and model-specific price defaults in shared URLs', () => {
+ const wan = readVideoDashboardState('?v_model=wan22&v_api=invalid');
+ expect(wan).toMatchObject({ model: 'wan22', apiPrice: null });
+ const url = writeVideoDashboardState(new URL('https://example.test/video'), wan);
+ expect(url.search).toBe('?v_model=wan22');
+ expect(readVideoDashboardState(url.search)).toEqual(wan);
+ const custom = writeVideoDashboardState(url, { ...wan, apiPrice: 0.08 });
+ expect(custom.searchParams.get('v_api')).toBe('0.08');
+ expect(readVideoDashboardState(custom.search).apiPrice).toBe(0.08);
+ expect(readVideoDashboardState('?v_model=unknown')).toEqual(DEFAULT_VIDEO_DASHBOARD_STATE);
+});
+
+it('keeps H3 audio quality filters out of the Wan view', () => {
+ const state = readVideoDashboardState('?v_model=wan22&v_y=quality&v_qmin=3');
+ expect(state.y).toBe('videosPerDollar');
+ expect(state.qualityThreshold).toBeNull();
+});
diff --git a/packages/app/src/components/video-benchmark/video-url-state.ts b/packages/app/src/components/video-benchmark/video-url-state.ts
index 3dd228aeb..626f81ad6 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.ts
@@ -1,5 +1,7 @@
import { H3_API_REFERENCE } from './api-reference';
+import { VIDEO_MODELS, type VideoModel } from './models';
import { VIDEO_HARDWARE_ROSTER, type CostTier } from './hardware';
+import { QUALITY_METRICS, QUALITY_SCALE, type QualityMetricId } from './quality';
import {
COST_TIERS,
X_METRICS,
@@ -10,6 +12,7 @@ import {
} from './metrics';
export interface VideoDashboardState {
+ model: VideoModel;
x: XMetricId;
y: YMetricId;
tier: CostTier;
@@ -17,12 +20,17 @@ export interface VideoDashboardState {
/** Only each hardware's Pareto-optimal deployments; off, dominated deployments join, faded. */
optimal: boolean;
/** USD per video-second the API list price assumes; the dated reference unless the reader overrides it. */
- apiPrice: number;
+ apiPrice: number | null;
/** Hardware hidden from the chart, table and CSV. */
hidden: string[];
+ /** Separate rubric dimension; never an average of unrelated scores. */
+ qualityMetric: QualityMetricId;
+ /** Reader-selected filter, independent of the evaluator's frozen calibration rule. */
+ qualityThreshold: number | null;
}
export const DEFAULT_VIDEO_DASHBOARD_STATE: VideoDashboardState = {
+ model: 'h3',
x: 'p90Latency',
y: 'videosPerDollar',
tier: 'h',
@@ -30,6 +38,8 @@ export const DEFAULT_VIDEO_DASHBOARD_STATE: VideoDashboardState = {
optimal: true,
apiPrice: H3_API_REFERENCE.pricePerVideoSecondUsd,
hidden: [],
+ qualityMetric: 'prompt_adherence',
+ qualityThreshold: null,
};
const VIEWS: readonly VideoDashboardState['view'][] = ['chart', 'table'];
@@ -57,21 +67,45 @@ export function parseApiPrice(raw: string | number | null | undefined): number |
export const metricOptions = (state: VideoDashboardState): MetricOptions => ({
tier: state.tier,
apiPricePerVideoSecond: parseApiPrice(state.apiPrice),
+ qualityMetric: state.qualityMetric,
});
+export function parseQualityThreshold(raw: string | number | null | undefined): number | null {
+ if (raw === null || raw === undefined || String(raw).trim() === '') return null;
+ const value = Number(raw);
+ return Number.isFinite(value) && value >= QUALITY_SCALE.minimum && value <= QUALITY_SCALE.maximum
+ ? value
+ : null;
+}
+
/** Dashboard controls live under the `v_` prefix so the run/artifact/view params stay untouched. */
export function readVideoDashboardState(search: string): VideoDashboardState {
const p = new URLSearchParams(search);
const d = DEFAULT_VIDEO_DASHBOARD_STATE;
+ const model = pick(Object.keys(VIDEO_MODELS) as VideoModel[], p.get('v_model'), d.model);
return {
+ model,
x: pick(X_METRICS, p.get('v_x'), d.x),
- y: pick(Y_METRICS, p.get('v_y'), d.y),
+ y: pick(
+ model === 'h3' ? Y_METRICS : Y_METRICS.filter((id) => id !== 'quality'),
+ p.get('v_y'),
+ d.y,
+ ),
tier: pick(COST_TIERS, p.get('v_tier'), d.tier),
view: pick(VIEWS, p.get('v_view'), d.view),
// Same shape as the inference tab's `i_optimal`: on unless the URL says `0`.
optimal: p.get('v_optimal') !== '0',
- apiPrice: parseApiPrice(p.get('v_api')) ?? d.apiPrice,
+ apiPrice:
+ parseApiPrice(p.get('v_api')) ??
+ VIDEO_MODELS[model].apiReference?.pricePerVideoSecondUsd ??
+ null,
hidden: hiddenHardware(p.get('v_hidden')?.split(',') ?? []),
+ qualityMetric: pick(
+ Object.keys(QUALITY_METRICS) as QualityMetricId[],
+ p.get('v_quality'),
+ d.qualityMetric,
+ ),
+ qualityThreshold: model === 'h3' ? parseQualityThreshold(p.get('v_qmin')) : null,
};
}
@@ -81,13 +115,21 @@ export function writeVideoDashboardState(url: URL, state: VideoDashboardState):
const d = DEFAULT_VIDEO_DASHBOARD_STATE;
const set = (key: string, value: string | null) =>
value === null ? out.searchParams.delete(key) : out.searchParams.set(key, value);
+ set('v_model', state.model === d.model ? null : state.model);
set('v_x', state.x === d.x ? null : state.x);
set('v_y', state.y === d.y ? null : state.y);
set('v_tier', state.tier === d.tier ? null : state.tier);
set('v_view', state.view === d.view ? null : state.view);
set('v_optimal', state.optimal ? null : '0');
const apiPrice = parseApiPrice(state.apiPrice);
- set('v_api', apiPrice === null || apiPrice === d.apiPrice ? null : String(apiPrice));
+ set(
+ 'v_api',
+ apiPrice === null || apiPrice === VIDEO_MODELS[state.model].apiReference?.pricePerVideoSecondUsd
+ ? null
+ : String(apiPrice),
+ );
set('v_hidden', hiddenHardware(state.hidden).join(',') || null);
+ set('v_quality', state.qualityMetric === d.qualityMetric ? null : state.qualityMetric);
+ set('v_qmin', state.qualityThreshold === null ? null : String(state.qualityThreshold));
return out;
}
diff --git a/packages/app/src/lib/api-route-catalog.ts b/packages/app/src/lib/api-route-catalog.ts
index 4d90a386e..37e674b3a 100644
--- a/packages/app/src/lib/api-route-catalog.ts
+++ b/packages/app/src/lib/api-route-catalog.ts
@@ -289,10 +289,10 @@ export const apiRouteCatalog = [
method: 'GET',
classification: 'ui-artifact-read',
exclusionReason: {
- en: 'Hidden H3 viewer transport for live public CI runs, checksum-verified artifact ZIPs, and read-only published history (format=history). History projects existing immutable indexes without publishing media; these UI contracts are not a public data API.',
- zh: '供隐藏的 H3 查看器读取公开 CI 运行、校验和已验证的产物 ZIP,以及只读的已发布历史(format=history)。历史视图从既有不可变索引生成,不发布媒体;这些界面契约不作为公开数据 API。',
+ en: 'VideoGenX transport for live public CI runs, checksum-verified artifact ZIPs, and read-only published history (format=history). History projects existing immutable indexes without publishing media; these UI contracts are not a public data API.',
+ zh: '供 VideoGenX 读取公开 CI 运行、校验和已验证的产物 ZIP,以及只读的已发布历史(format=history)。历史视图从既有不可变索引生成,不发布媒体;这些界面契约不作为公开数据 API。',
},
- sourceSha256: 'ca3150209360f3943a0fd8afe4a8d8a7f4d20daf42929a09dae2b2b3178e0e44',
+ sourceSha256: 'a851738dc7fd1b85621bd9b374029293a7f14d6f5960693dde724089d88deb7f',
},
{
source: 'src/app/api/unofficial-run/route.ts',
@@ -813,17 +813,106 @@ export interface ApiContractSourceDigest {
* touching a route module. Digest changes require an explicit documentation review.
*/
export const apiContractSourceDigests = [
+ {
+ source: 'src/components/video-benchmark/tradeoff.ts',
+ sourceSha256: 'c639a3bd51ee9dea7c75c9a9b614fead3f4c8c0cc13b27518420e105ccc94d5a',
+ reviewArea: {
+ en: 'Video producer model identity, workload completeness and requested video duration.',
+ zh: '视频来源的模型身份、工作负载完整性与请求视频时长。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/bundle.ts',
+ sourceSha256: '193ac6cc3a3d75c535eac58b908c7cf542e2c75c9fc712817bb97d2503b98877',
+ reviewArea: {
+ en: 'Video producer model identity, workload completeness and requested video duration.',
+ zh: '视频来源的模型身份、工作负载完整性与请求视频时长。',
+ },
+ },
+
+ {
+ source: 'src/components/video-benchmark/serving.ts',
+ sourceSha256: '573cd689435332daa99b0873cbeae0fd419abb9dc0d300fdc723ef799f6b7ebb',
+ reviewArea: {
+ en: 'VideoGenX planned-cell accounting, missing request populations and chart-independent serving evidence.',
+ zh: 'VideoGenX 计划 cell 计数、缺失请求人口和独立于图表筛选的服务结果证据。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/serving-evidence.ts',
+ sourceSha256: '09ae664bcb7550c182224d8dc5991cea7ebaa121d10eec6fb679a01cfc20347a',
+ reviewArea: {
+ en: 'VideoGenX planned-cell accounting, missing request populations and chart-independent serving evidence.',
+ zh: 'VideoGenX 计划 cell 计数、缺失请求人口和独立于图表筛选的服务结果证据。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/frontier.ts',
+ sourceSha256: 'f3b27768c8c2cda497ee66276d8cd6c2a5ad65d354b54d65a74e93e861365288',
+ reviewArea: {
+ en: 'VideoGenX deployment, quality eligibility, source-bound evidence and chart/API/export parity.',
+ zh: 'VideoGenX 部署、质量资格、绑定来源的证据及图表/API/导出一致性。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/quality.ts',
+ sourceSha256: '335100c260ee5efa071266991e9d740776137bae9b06eb2647c1e21144a37b27',
+ reviewArea: {
+ en: 'VideoGenX deployment, quality eligibility, source-bound evidence and chart/API/export parity.',
+ zh: 'VideoGenX 部署、质量资格、绑定来源的证据及图表/API/导出一致性。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/observation-projection.ts',
+ sourceSha256: '6421482822ed21d110c20d38e696b6f4318c57218c9c7d748a1e609648d1def6',
+ reviewArea: {
+ en: 'VideoGenX deployment, quality eligibility, source-bound evidence and chart/API/export parity.',
+ zh: 'VideoGenX 部署、质量资格、绑定来源的证据及图表/API/导出一致性。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/deployment-contract.ts',
+ sourceSha256: 'c3b09850a76763d845a7288645121d898f629b99f94bf26b32e169195713d244',
+ reviewArea: {
+ en: 'VideoGenX deployment, quality eligibility, source-bound evidence and chart/API/export parity.',
+ zh: 'VideoGenX 部署、质量资格、绑定来源的证据及图表/API/导出一致性。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/csv.ts',
+ sourceSha256: '81aa9d652e22bc7bccc294861e2baeff8a7c0a1ff8abbba30c64074a1fc5bb81',
+ reviewArea: {
+ en: 'VideoGenX deployment, quality eligibility, source-bound evidence and chart/API/export parity.',
+ zh: 'VideoGenX 部署、质量资格、绑定来源的证据及图表/API/导出一致性。',
+ },
+ },
+ {
+ source: 'src/lib/video-replay.ts',
+ sourceSha256: 'd7b76c00ca37bba0842cd902ddf60efa6abebe0cdc864436aa5fae847320a7ea',
+ reviewArea: {
+ en: 'VideoGenX deployment, quality eligibility, source-bound evidence and chart/API/export parity.',
+ zh: 'VideoGenX 部署、质量资格、绑定来源的证据及图表/API/导出一致性。',
+ },
+ },
{
source: 'src/lib/views-api/video-dashboard.ts',
- sourceSha256: '62bbf123e8fd9fb8ceff3724558fc99b52e842433f96266b1be4d3ed5f438036',
+ sourceSha256: '763c4fc7f935fbb4f31bdacfce8922e10a3a64423f69aaff6bcbd0259891ae29',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
},
},
+ {
+ source: 'src/components/video-benchmark/models.ts',
+ sourceSha256: '25463950f479bf6881ee3a1547025581d5c1db00068374ef5080b32d321c9c7e',
+ reviewArea: {
+ en: 'Video model isolation and pricing defaults.',
+ zh: '视频模型隔离与默认参考价。',
+ },
+ },
{
source: 'src/components/video-benchmark/history.ts',
- sourceSha256: '4917bac6c0d272bda607697439322fd85e64683f4c63ad621e02101a8e923aae',
+ sourceSha256: 'acd386fbf65c7a56725d8110be759b6e6ccb68824954ac679b685cda6997fc71',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
@@ -831,7 +920,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/metrics.ts',
- sourceSha256: '9d5a4cd412ded8ebc3fb4a4c3b60b8fa9081e6393c901a8431a923b651f6590b',
+ sourceSha256: '92bc7c416e2aa27a549afed23c89da646b3556bd009f2c88bb32f6c70b33f6bf',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
@@ -839,7 +928,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/points.ts',
- sourceSha256: 'a7c5313843b44a3fed1dea989024b1be689fd4952d8c0f8119f19c41e1afaab7',
+ sourceSha256: '6070f544dad9e42c93d2b0b7293d33ae617be0a9680e2cd0ee2e7ea72bcb27f6',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
@@ -847,7 +936,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/plot.ts',
- sourceSha256: '50e15dd8ee90b9e96b8b1083294070270044abaf26f540be9cf17f594a3883e3',
+ sourceSha256: '31823e870d041cd887c3c55d4f6a04378b5f7c0a3ccf6a3a8186c3c87b71bc4c',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
@@ -855,7 +944,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/deployment.ts',
- sourceSha256: 'f7416efa7fc30edabdefa3802775ba2bbbdcbe106b1651a200922d30cc41430d',
+ sourceSha256: 'f5540a9465cfc3f3e722cb15902f0213e2507c48b0464ffb93452a0519d39e57',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
@@ -887,7 +976,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/video-url-state.ts',
- sourceSha256: 'deb6b936fdf5caf2562896ca8a96cb8a08fc5a61b3cde6dd38b866a9a3c27018',
+ sourceSha256: 'a9a521dd7376426d4884d9222144a6444a5f099be0b11cfd773bb27dd89423c7',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
@@ -1013,7 +1102,7 @@ export const apiContractSourceDigests = [
{
source: 'src/lib/views-api/registry.ts',
- sourceSha256: 'dc2c80873cb24d46d9ada5845ad159761b3b4a83314d9a698e14a0098d055457',
+ sourceSha256: '8accafb4fc05031e4456d0b21155f9b7864da0f7493e4c6ed520779c93253d82',
reviewArea: {
en: 'Dashboard read-only selector and calculation parity.',
zh: '仪表板只读接口的选择项与计算一致性。',
diff --git a/packages/app/src/lib/tab-meta-zh.ts b/packages/app/src/lib/tab-meta-zh.ts
index 4b580fbb5..d3410edfa 100644
--- a/packages/app/src/lib/tab-meta-zh.ts
+++ b/packages/app/src/lib/tab-meta-zh.ts
@@ -100,8 +100,8 @@ export const TAB_META_ZH: Record {
+ let directory: string;
+ beforeEach(async () => {
+ directory = await mkdtemp(join(tmpdir(), 'video-replay-'));
+ vi.stubEnv('NODE_ENV', 'development');
+ vi.stubEnv('VIDEOGENX_REPLAY_DIR', directory);
+ });
+ afterEach(async () => {
+ vi.unstubAllEnvs();
+ await rm(directory, { recursive: true });
+ });
+ it('serves a complete local history with an explicit replay marker and empty later pages', async () => {
+ const page = { schemaVersion: 1, entries: [{ id: '12.34' }], nextPage: null };
+ await writeFile(join(directory, 'history.json'), JSON.stringify(page));
+ const response = await readVideoReplay(new URLSearchParams('format=history'));
+ expect(response?.headers.get('X-VideoGenX-Replay')).toBe('retained');
+ expect(await response?.json()).toEqual(page);
+ const laterPage = await readVideoReplay(new URLSearchParams('format=history&page=2'));
+ expect(await laterPage?.json()).toEqual({ ...page, entries: [] });
+ });
+ it('is disabled in production even when the operator variable exists', async () => {
+ vi.stubEnv('NODE_ENV', 'production');
+ expect(await readVideoReplay(new URLSearchParams('format=history'))).toBeNull();
+ });
+ it('returns unavailable media without a network fallback or a publication', async () => {
+ const unavailable = await readVideoReplay(
+ new URLSearchParams('format=published&run=12&artifact=34'),
+ );
+ expect(unavailable?.status).toBe(204);
+ const invalid = await readVideoReplay(
+ new URLSearchParams('format=published&run=../../secret&artifact=34'),
+ );
+ expect(invalid?.status).toBe(400);
+ });
+ it('rejects an artifact whose identity differs from its filename', async () => {
+ await writeFile(
+ join(directory, '12.34.json'),
+ JSON.stringify({ storageVersion: 1, runId: '13', artifact: { id: 34 }, sources: [] }),
+ );
+ await expect(
+ readVideoReplay(new URLSearchParams('format=published&run=12&artifact=34')),
+ ).rejects.toThrow('identity mismatch');
+ });
+});
diff --git a/packages/app/src/lib/video-replay.ts b/packages/app/src/lib/video-replay.ts
new file mode 100644
index 000000000..753fa8063
--- /dev/null
+++ b/packages/app/src/lib/video-replay.ts
@@ -0,0 +1,55 @@
+import { readFile } from 'node:fs/promises';
+import { resolve } from 'node:path';
+
+import type { VideoHistoryPage } from '@/components/video-benchmark/history';
+import type { StoredArtifact } from '@/components/video-benchmark/stored';
+
+/** Local, retained measurements. The directory is operator-selected, never a URL parameter. */
+export async function readVideoReplay(query: URLSearchParams): Promise {
+ const directory = process.env.VIDEOGENX_REPLAY_DIR;
+ if (process.env.NODE_ENV !== 'development' || !directory) return null;
+ const headers = { 'Cache-Control': 'private, no-store', 'X-VideoGenX-Replay': 'retained' };
+ const format = query.get('format');
+ if (format === 'history') {
+ const page = JSON.parse(
+ await readFile(resolve(directory, 'history.json'), 'utf8'),
+ ) as VideoHistoryPage;
+ if (page.schemaVersion !== 1 || !Array.isArray(page.entries) || page.nextPage !== null)
+ throw new Error(
+ 'Invalid retained video history (expected a complete, single-page projection)',
+ );
+ return Response.json(
+ Number(query.get('page') ?? '1') === 1
+ ? page
+ : { schemaVersion: 1, entries: [], nextPage: null },
+ { headers },
+ );
+ }
+ if (format === 'published' || format === 'media') {
+ const run = query.get('run');
+ const artifact = query.get('artifact');
+ if (!run || !artifact || !/^[1-9]\d{0,19}$/u.test(run) || !/^[1-9]\d{0,19}$/u.test(artifact))
+ return Response.json(
+ { error: 'Invalid retained artifact identity' },
+ { status: 400, headers },
+ );
+ let body: string;
+ try {
+ body = await readFile(resolve(directory, `${run}.${artifact}.json`), 'utf8');
+ } catch (error) {
+ if (error && typeof error === 'object' && 'code' in error && error.code === 'ENOENT')
+ return new Response(null, { status: 204, headers });
+ throw error;
+ }
+ const saved = JSON.parse(body) as StoredArtifact;
+ if (
+ saved.storageVersion !== 1 ||
+ saved.runId !== run ||
+ saved.artifact.id !== Number(artifact) ||
+ !Array.isArray(saved.sources)
+ )
+ throw new Error('Retained video artifact identity mismatch');
+ return Response.json(saved, { headers });
+ }
+ return null;
+}
diff --git a/packages/app/src/lib/video-storage.test.ts b/packages/app/src/lib/video-storage.test.ts
index 62a7c32a3..aba06c50f 100644
--- a/packages/app/src/lib/video-storage.test.ts
+++ b/packages/app/src/lib/video-storage.test.ts
@@ -3,7 +3,12 @@ import { strToU8, zipSync } from 'fflate';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { head, put, list } from '@vercel/blob';
import type * as BlobSdk from '@vercel/blob';
-import { publishedVideoHistory, readStoredArtifact, storeVideoArtifact } from './video-storage';
+import {
+ publishedVideoHistory,
+ readStoredArtifact,
+ storedArtifacts,
+ storeVideoArtifact,
+} from './video-storage';
import { storedBundle, storedFidelityBundle } from '@/components/video-benchmark/stored';
import { fidelityFixture } from '@/components/video-benchmark/fidelity.fixture';
@@ -302,3 +307,25 @@ describe('published video history catalog', () => {
expect(put).not.toHaveBeenCalled();
});
});
+
+it('discovers generic serving artifacts through the same immutable catalog without writes', async () => {
+ vi.stubEnv('BLOB_READ_WRITE_TOKEN', 'synthetic-test-token');
+ const published = {
+ ...blob(10),
+ pathname: 'h3-video-media/v1/runs/10/video-serving-10-1_20.json',
+ };
+ vi.mocked(list).mockResolvedValue({ blobs: [published], hasMore: false, cursor: undefined });
+ vi.spyOn(globalThis, 'fetch').mockResolvedValue(
+ Response.json({
+ storageVersion: 1,
+ runId: '10',
+ artifact: { ...artifact, name: 'video-serving-10-1' },
+ sources: [],
+ }),
+ );
+ const artifacts = await storedArtifacts('10');
+ const page = await publishedVideoHistory(1);
+ expect(artifacts.map((a) => a.name)).toEqual(['video-serving-10-1']);
+ expect(page.entries.map((e) => e.artifact.name)).toEqual(['video-serving-10-1']);
+ expect(put).not.toHaveBeenCalled();
+});
diff --git a/packages/app/src/lib/video-storage.ts b/packages/app/src/lib/video-storage.ts
index 8a5e5ab05..0f4a03554 100644
--- a/packages/app/src/lib/video-storage.ts
+++ b/packages/app/src/lib/video-storage.ts
@@ -37,9 +37,10 @@ export async function storedArtifacts(runId: string): Promise {
do {
const page = await list({ prefix: runPrefix(runId), cursor });
for (const blob of page.blobs) {
- const match = /\/(?h3-(?:results|video|fidelity)-\d+-\d+)_(?\d+)\.json$/u.exec(
- blob.pathname,
- );
+ const match =
+ /\/(?(?:h3-(?:results|video|fidelity)|video-serving)-\d+-\d+)_(?\d+)\.json$/u.exec(
+ blob.pathname,
+ );
if (match?.groups)
result.push({
id: Number(match.groups.id),
@@ -259,7 +260,7 @@ export async function publishedVideoHistory(page: number): Promise[1-9]\d*)\/(?h3-(?:results|video|fidelity)-(?[1-9]\d*)-[1-9]\d*)_(?[1-9]\d*)\.json$/u.exec(
+ /^h3-video-media\/v1\/runs\/(?[1-9]\d*)\/(?(?:h3-(?:results|video|fidelity)|video-serving)-(?[1-9]\d*)-[1-9]\d*)_(?[1-9]\d*)\.json$/u.exec(
blob.pathname,
)?.groups;
if (!match || match.run !== match.producer) continue;
diff --git a/packages/app/src/lib/views-api/docs/extensions.ts b/packages/app/src/lib/views-api/docs/extensions.ts
index e6cb7b363..6de98d85f 100644
--- a/packages/app/src/lib/views-api/docs/extensions.ts
+++ b/packages/app/src/lib/views-api/docs/extensions.ts
@@ -3,6 +3,12 @@ import { API_BASE_URL } from '@/lib/api-documentation-base';
import { VIDEO_HISTORY_MAX_PAGES } from '@/components/video-benchmark/history';
import { text } from '@/lib/api-documentation-helpers';
import { VIEW_QUERY_PARAMS, type ReadonlyView } from '../registry';
+import {
+ videoPointSchema,
+ videoQualitySelectionSchema,
+ videoRowsSchema,
+ videoServingEvidenceSchema,
+} from './video';
const object: ApiSchema = { type: 'object', additionalProperties: true };
const objects: ApiSchema = { type: 'array', items: object };
@@ -334,13 +340,25 @@ const PARAMETER_NOTES: Record = {
'Video dashboard (default without run/artifact), compare (dashboard plus published matched-case records), or legacy discovery/results/tradeoff. run/artifact defaults to results. Dashboard v_* and legacy selectors cannot be mixed.',
'视频 dashboard(未指定 run/artifact 时默认)、compare(仪表板及已发布匹配用例记录),或原有 discovery/results/tradeoff。指定 run/artifact 时默认 results。v_* 仪表板选择项不能与原有参数混用。',
],
+ v_model: [
+ 'Video model: h3 (default) or wan22 (Wan2.2-T2V-A14B). Scopes results, serving evidence, history provenance and pricing. Wan sources use the canonical Wan-AI/Wan2.2-T2V-A14B-Diffusers identity (the earlier short ID remains accepted). No GPU measurements or quality qualification are implied by ingestion; quality axes and thresholds use the descriptive-performance defaults.',
+ '视频模型:h3(默认)或 wan22(Wan2.2-T2V-A14B)。分别筛选结果、服务记录、历史来源与价格。Wan 使用规范模型 ID Wan-AI/Wan2.2-T2V-A14B-Diffusers(兼容旧短 ID)。接入产物不代表已有 GPU 测量或通过质量验收;质量坐标轴与阈值回退至描述性能的默认值。',
+ ],
v_x: [
'Dashboard X metric: p90Latency (default) or p50Latency, in seconds. Invalid values use the UI default.',
'仪表板 X 轴指标:p90Latency(默认)或 p50Latency,单位秒。无效值按界面默认值处理。',
],
v_y: [
- 'Dashboard Y metric: videosPerDollar (default), dollarsPerVideo, videosPerGpuHour or kjPerVideo. Invalid values use the UI default.',
- '仪表板 Y 轴指标:videosPerDollar(默认)、dollarsPerVideo、videosPerGpuHour 或 kjPerVideo。无效值按界面默认值处理。',
+ 'Dashboard Y metric: videosPerDollar (default), dollarsPerVideo, videosPerGpuHour, kjPerVideo or quality. quality uses the selected v_quality dimension and calibrated eligible records only. Invalid values use the UI default.',
+ '仪表板 Y 轴指标:videosPerDollar(默认)、dollarsPerVideo、videosPerGpuHour、kjPerVideo 或 quality。quality 使用 v_quality 指定的维度,只显示已校准且符合条件的记录。无效值按界面默认值处理。',
+ ],
+ v_quality: [
+ 'Separate human rubric dimension: prompt_adherence (default), visual_fidelity, temporal_consistency, motion_plausibility, audio_quality, audio_content or av_sync. All preserve the original higher-is-better ordinal 0–4 ratings; no composite quality score. All seven critical dimensions must satisfy their frozen calibrated rules before quality-qualified admission.',
+ '独立人工评价维度:prompt_adherence(默认)、visual_fidelity、temporal_consistency、motion_plausibility、audio_quality、audio_content 或 av_sync。保留原始 0–4 级评分,越高越好,不合成为总分。七项关键维度均须满足已冻结并校准的规则,才能进入质量前沿。',
+ ],
+ v_qmin: [
+ 'Optional finite 0–4 reader threshold for v_quality. Filters calibrated pass records before Pareto selection in chart/table/CSV/API; it cannot relax the frozen protocol threshold. Missing/invalid values disable this extra filter; unjudged and uncalibrated records remain ineligible whenever quality is selected.',
+ 'v_quality 的可选筛选阈值,取 0–4 的有限数值。在图表、表格、CSV 和 API 计算 Pareto 前筛选已校准且通过质量判定的记录,不能放宽已冻结的协议阈值。缺失或无效值关闭该额外筛选;选择质量指标时,未评价和未校准记录仍不具备入选资格。',
],
v_tier: [
'TCO cost tier: h (owning, default) or r (renting), from the same hardware registry as the dashboard; invalid values use h.',
@@ -355,8 +373,8 @@ const PARAMETER_NOTES: Record = {
'除值恰为 0 外,仅保留每种硬件的 Pareto 部署。作用于图表和表格;排队 cell 始终不进入这两者。',
],
v_api: [
- 'Positive USD/video-second API list-price reference, rounded to four decimals; invalid values use the dated UI reference. Multiplies clip duration only, not TCO or chart efficiency.',
- '正数 API 视频秒参考价,单位 USD/video-second,四舍五入至四位小数;无效值回退至界面带日期的参考价。仅用于乘以视频时长,不影响 TCO 或图表效率。',
+ 'Positive USD/video-second API list-price reference, rounded to four decimals; invalid values use the selected model reference (H3: 0.08; Wan: null until supplied). Multiplies clip duration only, not TCO or chart efficiency.',
+ '正数 API 视频秒参考价,单位 USD/video-second,四舍五入至四位小数;无效值回退至所选模型参考价(H3:0.08;Wan:未提供时为 null)。仅用于乘以视频时长,不影响 TCO 或图表效率。',
],
v_hidden: [
'Comma-separated hidden hardware keys from the video roster; default empty, deduplicated and sorted, unknown keys ignored. Filters chart/table only, not KPI/Compare/Evidence.',
@@ -436,13 +454,35 @@ const NEW_VIEWS = {
'VideoGenX dashboard and published comparison evidence',
'VideoGenX 仪表板与已发布对比证据',
{
- cells: objects,
+ cells: { type: 'array', items: videoPointSchema },
+ quality: videoQualitySelectionSchema,
+ serving: videoServingEvidenceSchema,
metricDefinitions: object,
plot: object,
- rows: objects,
+ rows: videoRowsSchema,
kpis: objects,
comparison: object,
- provenance: objects,
+ provenance: {
+ type: 'array',
+ items: {
+ ...object,
+ properties: {
+ sources: {
+ type: 'array',
+ items: {
+ ...object,
+ properties: {
+ model: {
+ type: ['string', 'null'],
+ description:
+ 'Sealed source model identity, including preflight failures; null on legacy projections.',
+ },
+ },
+ },
+ },
+ },
+ },
+ },
workload: { type: ['string', 'null'] },
otherWorkloads: { type: 'integer', minimum: 0 },
coverage: {
@@ -476,14 +516,14 @@ export const operations: ApiOperation[] = Object.entries(NEW_VIEWS).map(
description: text(
`Read-only ${en.toLowerCase()} using the dashboard's source handlers and calculation helpers. Unknown and repeated query keys return 400. The response includes resolved params and preserves missing evidence. Renderer-only styling is not an API parameter.${
view === 'video'
- ? ' Default dashboard mode reuses published history → videoPoints → dashboardCells → metrics/plot/compare/evidence. It reads at most the same first five history pages as the UI, reports coverage/truncation, selects one canonical workload and keeps the shared sample floor. v_hidden affects chart/table only. view=compare additionally reads at most two already-published media artifacts, pairs cases with the UI helper and returns relative media paths without asset URLs; missing/failed media remains explicit. run/artifact or explicit discovery/results/tradeoff preserve the legacy contract. No date range, full-catalog completeness, power/quality qualification or causal bottleneck claim is implied. Local bundles and arbitrary URLs are excluded. Responses are no-store.'
+ ? ' Default dashboard mode reuses published history → videoPoints → dashboardCells → metrics/plot/compare/evidence. It reads at most the same first five history pages as the UI, reports coverage/truncation, selects one canonical workload and keeps the shared sample floor for charts. serving retains every loaded planned cell, including zero-attempt failures, before chart/workload/hardware/quality filters; its counts preserve nulls and qualitySloGoodput stays unavailable without joint request evidence. v_hidden affects chart/table only. view=compare additionally reads at most two already-published media artifacts, pairs cases with the UI helper and returns relative media paths without asset URLs; missing/failed media remains explicit. run/artifact or explicit discovery/results/tradeoff preserve the legacy contract. No date range, full-catalog completeness, power/quality qualification or causal bottleneck claim is implied. Local bundles and arbitrary URLs are excluded. Responses are no-store.'
: view === 'gpu-metrics'
? ' Live artifact reads are no-store; statistics use all chips and unsampled values, while chart rows respect selected GPU indices.'
: ''
}`,
`只读${zh},使用仪表板的数据读取和计算函数。未知或重复查询键返回 400;响应包含解析后的参数,保留缺失数据。仅影响样式的控件不作为 API 参数。${
view === 'video'
- ? ' 默认 dashboard 模式复用已发布历史 → videoPoints → dashboardCells → metrics/plot/compare/evidence。与界面一样最多读取前五页历史,返回覆盖范围和截断状态,选择一个 canonical workload 并应用相同样本门槛。v_hidden 只影响图表和表格。view=compare 额外读取最多两份已发布媒体产物,复用界面配对函数,仅返回相对媒体路径,不返回 asset URL;媒体缺失或读取失败会明确标记。run/artifact 或显式 discovery/results/tradeoff 保留原有契约。不代表日期区间、完整历史、功率/质量验收或瓶颈因果判断。不读取本地数据包或任意 URL。响应不缓存。'
+ ? ' 默认 dashboard 模式复用已发布历史 → videoPoints → dashboardCells → metrics/plot/compare/evidence。与界面一样最多读取前五页历史,返回覆盖范围和截断状态,选择一个 canonical workload 并应用相同样本门槛。serving 在图表、工作负载、硬件和质量筛选之前保留每个已加载的计划 cell,包括零尝试失败;计数保留未知值,没有逐请求联合证据时 qualitySloGoodput 保持不可用。v_hidden 只影响图表和表格。view=compare 额外读取最多两份已发布媒体产物,复用界面配对函数,仅返回相对媒体路径,不返回 asset URL;媒体缺失或读取失败会明确标记。run/artifact 或显式 discovery/results/tradeoff 保留原有契约。不代表日期区间、完整历史、功率/质量验收或瓶颈因果判断。不读取本地数据包或任意 URL。响应不缓存。'
: view === 'gpu-metrics'
? ' 实时产物读取不缓存;统计量使用所有芯片的未降采样值,图表行则按芯片索引筛选。'
: ''
diff --git a/packages/app/src/lib/views-api/docs/video.ts b/packages/app/src/lib/views-api/docs/video.ts
new file mode 100644
index 000000000..e753726ef
--- /dev/null
+++ b/packages/app/src/lib/views-api/docs/video.ts
@@ -0,0 +1,284 @@
+import { QUALITY_METRIC_IDS, QUALITY_SCALE } from '@/components/video-benchmark/quality';
+import type { ApiSchema } from '@/lib/api-documentation';
+
+const nullableText: ApiSchema = { type: ['string', 'null'] };
+const nullableHash: ApiSchema = { type: ['string', 'null'], pattern: '^[a-f0-9]{64}$' };
+const nullableScore: ApiSchema = {
+ type: ['number', 'null'],
+ minimum: QUALITY_SCALE.minimum,
+ maximum: QUALITY_SCALE.maximum,
+};
+
+const qualityMetric: ApiSchema = {
+ type: 'object',
+ properties: {
+ value: nullableScore,
+ status: {
+ type: 'string',
+ enum: ['unjudged', 'judged_unqualified', 'pass', 'fail', 'inconclusive', 'unassessable'],
+ },
+ direction: { type: 'string', enum: ['higher', 'lower'] },
+ evaluatorId: nullableText,
+ evaluatorVersion: nullableText,
+ evaluatorSha256: nullableHash,
+ samples: { type: ['integer', 'null'], minimum: 0 },
+ total: { type: ['integer', 'null'], minimum: 0 },
+ calibration: {
+ type: ['object', 'null'],
+ properties: {
+ status: { type: 'string', enum: ['uncalibrated', 'calibrated'] },
+ cohortId: nullableText,
+ threshold: nullableScore,
+ provenance: nullableText,
+ frozenAt: nullableText,
+ },
+ required: ['status', 'cohortId', 'threshold', 'provenance', 'frozenAt'],
+ additionalProperties: false,
+ },
+ },
+ required: [
+ 'value',
+ 'status',
+ 'direction',
+ 'evaluatorId',
+ 'evaluatorVersion',
+ 'evaluatorSha256',
+ 'samples',
+ 'total',
+ 'calibration',
+ ],
+ additionalProperties: false,
+};
+
+/** Raw judgments stay distinct from the plot's calibrated eligibility and derived quality value. */
+export const videoQualitySchema: ApiSchema = {
+ type: ['object', 'null'],
+ description:
+ 'Seven original H3 rubric dimensions on an explicit 0–4 scale; null means unjudged. All critical dimensions require complete coverage and calibrated frozen rules before frontier admission.',
+ properties: {
+ scale: { type: 'string', enum: [QUALITY_SCALE.unit] },
+ contractId: nullableText,
+ contractSha256: nullableHash,
+ rubricVersion: nullableText,
+ rubricSha256: nullableHash,
+ metrics: {
+ type: 'object',
+ properties: Object.fromEntries(QUALITY_METRIC_IDS.map((id) => [id, qualityMetric])),
+ additionalProperties: false,
+ },
+ },
+ required: ['scale', 'contractId', 'contractSha256', 'rubricVersion', 'rubricSha256', 'metrics'],
+ additionalProperties: false,
+};
+
+export const videoPointSchema: ApiSchema = {
+ type: 'object',
+ properties: {
+ quality: videoQualitySchema,
+ deployment: {
+ type: ['object', 'null'],
+ properties: {
+ gpusPerReplica: { type: ['integer', 'null'], minimum: 1 },
+ ring: { type: ['integer', 'null'], minimum: 1 },
+ cfg: { type: ['integer', 'null'], minimum: 1 },
+ offload: {
+ type: ['object', 'null'],
+ properties: Object.fromEntries(
+ ['ditCpu', 'ditLayerwise', 'textEncoderCpu', 'imageEncoderCpu', 'vaeCpu'].map((key) => [
+ key,
+ { type: ['boolean', 'null'] },
+ ]),
+ ),
+ additionalProperties: false,
+ },
+ encoderParallel: nullableText,
+ batchSize: { type: ['integer', 'null'], minimum: 1 },
+ maxBatchSize: { type: ['integer', 'null'], minimum: 1 },
+ batchDelayMs: { type: ['number', 'null'], minimum: 0 },
+ scheduling: nullableText,
+ engine: nullableText,
+ precision: nullableText,
+ acceleration: nullableText,
+ generationKey: nullableText,
+ configEvidence: nullableText,
+ },
+ additionalProperties: false,
+ },
+ hardwareHealth: {
+ type: ['object', 'null'],
+ properties: {
+ status: { type: 'string', enum: ['pass', 'fail', 'unknown'] },
+ reason: nullableText,
+ evidence: nullableText,
+ },
+ required: ['status', 'reason', 'evidence'],
+ additionalProperties: false,
+ },
+ provenance: {
+ type: ['object', 'null'],
+ properties: {
+ sourceId: { type: 'string' },
+ manifestSha256: nullableHash,
+ sourceSha: { type: 'string' },
+ artifactDigest: nullableText,
+ fidelity: nullableText,
+ calibration: nullableText,
+ releaseQualified: { type: ['boolean', 'null'] },
+ },
+ required: [
+ 'sourceId',
+ 'manifestSha256',
+ 'sourceSha',
+ 'artifactDigest',
+ 'fidelity',
+ 'calibration',
+ 'releaseQualified',
+ ],
+ additionalProperties: false,
+ },
+ },
+ additionalProperties: true,
+};
+
+export const videoRowsSchema: ApiSchema = {
+ type: 'array',
+ items: {
+ type: 'object',
+ properties: {
+ point: videoPointSchema,
+ metrics: { type: 'object', additionalProperties: { type: ['number', 'null'] } },
+ },
+ required: ['point', 'metrics'],
+ },
+};
+
+export const videoQualitySelectionSchema: ApiSchema = {
+ type: 'object',
+ properties: {
+ metric: { type: 'string', enum: QUALITY_METRIC_IDS },
+ direction: { type: 'string', enum: ['higher'] },
+ readerThreshold: nullableScore,
+ thresholdProvenance: nullableText,
+ active: { type: 'boolean' },
+ eligible: { type: 'integer', minimum: 0 },
+ exclusions: {
+ type: 'array',
+ items: {
+ type: 'object',
+ properties: {
+ id: { type: 'string' },
+ reasons: {
+ type: 'array',
+ items: {
+ type: 'string',
+ enum: [
+ 'unjudged',
+ 'not_qualified',
+ 'missing_protocol',
+ 'missing_evaluator',
+ 'incomplete_coverage',
+ 'uncalibrated',
+ 'invalid_value',
+ 'incompatible_direction',
+ 'below_threshold',
+ ],
+ },
+ },
+ },
+ required: ['id', 'reasons'],
+ },
+ },
+ metricDefinition: {
+ type: 'object',
+ properties: {
+ label: { type: 'string' },
+ labelZh: { type: 'string' },
+ polarity: { type: 'string', enum: ['higher'] },
+ },
+ required: ['label', 'labelZh', 'polarity'],
+ },
+ },
+ required: [
+ 'metric',
+ 'direction',
+ 'readerThreshold',
+ 'thresholdProvenance',
+ 'active',
+ 'eligible',
+ 'exclusions',
+ 'metricDefinition',
+ ],
+};
+
+/** All planned cells, before performance chart eligibility or reader filters. */
+export const videoServingEvidenceSchema: ApiSchema = {
+ type: 'array',
+ items: {
+ type: 'object',
+ properties: {
+ ...Object.fromEntries(
+ ['id', 'runId', 'sourceId', 'hardware', 'sourceSha', 'status'].map((key) => [
+ key,
+ { type: 'string' },
+ ]),
+ ),
+ ...Object.fromEntries(
+ ['cell', 'workloadKey', 'mode', 'error'].map((key) => [key, nullableText]),
+ ),
+ ...Object.fromEntries(
+ [
+ 'concurrency',
+ 'scheduled',
+ 'attempted',
+ 'completed',
+ 'failed',
+ 'timedOut',
+ 'notStarted',
+ 'valid',
+ 'unjudged',
+ 'legacyFailedSlots',
+ 'unfinished',
+ ].map((key) => [key, { type: ['integer', 'null'], minimum: 0 }]),
+ ),
+ artifactId: { type: 'integer', minimum: 1 },
+ deliveryDeadlineSeconds: { type: ['number', 'null'], minimum: 0 },
+ qualitySloGoodput: {
+ type: 'null',
+ description:
+ 'Unavailable without per-media calibrated quality and deadline outcomes; never inferred from separate marginal counts.',
+ },
+ provenance: {
+ type: 'string',
+ enum: ['request-ledger', 'cell-summary', 'legacy-projection', 'unavailable'],
+ },
+ },
+ required: [
+ 'id',
+ 'runId',
+ 'artifactId',
+ 'sourceId',
+ 'hardware',
+ 'sourceSha',
+ 'cell',
+ 'concurrency',
+ 'status',
+ 'workloadKey',
+ 'mode',
+ 'scheduled',
+ 'attempted',
+ 'completed',
+ 'failed',
+ 'timedOut',
+ 'notStarted',
+ 'valid',
+ 'unjudged',
+ 'legacyFailedSlots',
+ 'unfinished',
+ 'deliveryDeadlineSeconds',
+ 'qualitySloGoodput',
+ 'provenance',
+ 'error',
+ ],
+ additionalProperties: false,
+ },
+};
diff --git a/packages/app/src/lib/views-api/registry.test.ts b/packages/app/src/lib/views-api/registry.test.ts
index 1ce5e796e..533ea4552 100644
--- a/packages/app/src/lib/views-api/registry.test.ts
+++ b/packages/app/src/lib/views-api/registry.test.ts
@@ -17,6 +17,34 @@ describe('public view contract coverage', () => {
expect(operation.responses['204']).not.toHaveProperty('content');
expect(operation.responses).toHaveProperty('503');
});
+ it('exposes quality filter parameters and nullable per-dimension evidence in OpenAPI', () => {
+ const operation = apiOperations.find((op) => op.path === '/api/v1/views/video')!;
+ expect(operation.parameters.map((parameter) => parameter.name)).toEqual(
+ expect.arrayContaining(['v_quality', 'v_qmin']),
+ );
+ const schema = operation.responses.find((response) => response.status === '200')!.schema;
+ expect(schema.properties?.quality?.properties?.readerThreshold).toMatchObject({
+ type: ['number', 'null'],
+ minimum: 0,
+ maximum: 4,
+ });
+ expect(schema.properties?.cells?.items?.properties?.quality).toMatchObject({
+ type: ['object', 'null'],
+ properties: {
+ scale: { type: 'string', enum: ['ordinal_0_to_4'] },
+ metrics: {
+ properties: {
+ audio_quality: {
+ properties: {
+ value: { type: ['number', 'null'] },
+ evaluatorSha256: { type: ['string', 'null'] },
+ },
+ },
+ },
+ },
+ },
+ });
+ });
it('accounts for every visible, hidden and feature-gated dashboard route', () => {
expect(Object.keys(DASHBOARD_API_COVERAGE).sort()).toEqual([...DASHBOARD_ROUTE_KEYS].sort());
for (const coverage of Object.values(DASHBOARD_API_COVERAGE)) {
diff --git a/packages/app/src/lib/views-api/registry.ts b/packages/app/src/lib/views-api/registry.ts
index eec16d56f..d801af292 100644
--- a/packages/app/src/lib/views-api/registry.ts
+++ b/packages/app/src/lib/views-api/registry.ts
@@ -232,8 +232,11 @@ export const VIEW_QUERY_PARAMS = {
'selected',
'slot',
'source',
+ 'v_model',
'v_x',
'v_y',
+ 'v_quality',
+ 'v_qmin',
'v_tier',
'v_view',
'v_optimal',
diff --git a/packages/app/src/lib/views-api/video-dashboard.test.ts b/packages/app/src/lib/views-api/video-dashboard.test.ts
index 6652d1047..4fd309f4b 100644
--- a/packages/app/src/lib/views-api/video-dashboard.test.ts
+++ b/packages/app/src/lib/views-api/video-dashboard.test.ts
@@ -1,9 +1,103 @@
import { describe, expect, it } from 'vitest';
-import type { VideoHistoryPage } from '@/components/video-benchmark/history';
+import { wanServingFixture } from '@/components/video-benchmark/serving.fixture';
+import { videoHistoryEntry, type VideoHistoryPage } from '@/components/video-benchmark/history';
import fixture from '../../../cypress/fixtures/api/video-history.json';
import { videoDashboardProjection } from './video-dashboard';
+import { videoCsv } from '@/components/video-benchmark/csv';
+import { readVideoDashboardState } from '@/components/video-benchmark/video-url-state';
describe('VideoGenX public metadata projection', () => {
+ it('retains zero-attempt failures and unjudged success counts before chart filters', () => {
+ // Controlled outcome evidence; these are not new benchmark measurements.
+ const page = structuredClone(fixture) as unknown as VideoHistoryPage;
+ const source = page.entries
+ .flatMap((entry) => entry.sources)
+ .find((item) => item.hardware === 'H200')!;
+ const counts = {
+ cell: 'c1',
+ concurrency: 1,
+ status: 'complete',
+ workloadKey: null,
+ mode: 'closed-loop',
+ scheduled: 20,
+ attempted: 20,
+ completed: 20,
+ failed: 0,
+ timedOut: 0,
+ notStarted: 0,
+ valid: 20,
+ unjudged: 20,
+ legacyFailedSlots: 0,
+ unfinished: 0,
+ deliveryDeadlineSeconds: null,
+ qualitySloGoodput: null,
+ provenance: 'request-ledger' as const,
+ };
+ source.serving = [counts];
+ page.entries[0].sources.push({
+ ...source,
+ id: 'amd-not-started',
+ hardware: 'MI355X',
+ observations: [],
+ serving: [
+ {
+ ...counts,
+ status: 'failed',
+ attempted: 0,
+ completed: 0,
+ valid: 0,
+ unjudged: 0,
+ notStarted: 20,
+ legacyFailedSlots: 20,
+ },
+ ],
+ });
+ const result = videoDashboardProjection([page], 'v_y=quality&v_qmin=4&v_hidden=h200,mi355x');
+ expect(result.plot.plotted).toEqual([]);
+ expect(result.serving.find((row) => row.sourceId === 'amd-not-started')).toMatchObject({
+ scheduled: 20,
+ attempted: 0,
+ failed: 0,
+ notStarted: 20,
+ qualitySloGoodput: null,
+ });
+ expect(
+ result.serving.find((row) => row.sourceId === source.id && row.cell === 'c1'),
+ ).toMatchObject({
+ valid: 20,
+ unjudged: 20,
+ qualitySloGoodput: null,
+ });
+ });
+
+ it('shares quality eligibility, nulls and selection with the exported CSV', () => {
+ const page = structuredClone(fixture) as unknown as VideoHistoryPage;
+ for (const search of [
+ 'v_y=quality',
+ 'v_y=videosPerGpuHour&v_qmin=4',
+ 'v_y=quality&v_optimal=0',
+ ]) {
+ const result = videoDashboardProjection([page], search);
+ expect(result.quality.eligible).toBe(0);
+ expect(result.plot.plotted).toEqual([]);
+ expect(result.rows).toEqual([]);
+ expect(result.quality.exclusions.every((r) => r.reasons.includes('unjudged'))).toBe(true);
+ const csv = videoCsv(result.cells, readVideoDashboardState(search));
+ expect(csv.trim().split('\n')).toHaveLength(1);
+ expect(csv).toContain('reader_quality_threshold');
+ }
+ const search = 'v_y=videosPerGpuHour&v_hidden=h100&v_optimal=0';
+ const result = videoDashboardProjection([page], search);
+ const csv = videoCsv(result.cells, readVideoDashboardState(search));
+ expect(csv.trim().split('\n')).toHaveLength(result.rows.length + 1);
+ for (const row of result.rows) {
+ expect(csv).toContain(row.point.id);
+ expect(csv).toContain(String(row.metrics.videosPerGpuHour));
+ expect(row.point.provenance?.manifestSha256).toBeTruthy();
+ }
+ expect(csv).not.toContain('NVIDIA H100');
+ expect(result.plot.plotted.map((p) => p.id)).toEqual(result.rows.map((r) => r.point.id));
+ });
it('keeps an empty catalog unavailable rather than synthesizing zero metrics or comparison evidence', () => {
const result = videoDashboardProjection([], 'v_hidden=h100,unknown&v_api=0');
expect(result.workload).toBeNull();
@@ -37,3 +131,130 @@ describe('VideoGenX public metadata projection', () => {
expect(result.evidence.scaling).toHaveLength(1);
});
});
+
+it('separates Wan results, pricing and provenance from H3 without inventing missing data', () => {
+ const page = structuredClone(fixture) as unknown as VideoHistoryPage;
+ const empty = videoDashboardProjection([page], 'v_model=wan22');
+ expect(empty.params).toMatchObject({ model: 'wan22', apiPrice: null });
+ for (const key of ['cells', 'rows', 'kpis', 'serving', 'provenance'] as const)
+ expect(empty[key]).toEqual([]);
+ const original = videoDashboardProjection([page], '');
+ // Synthetic model identity ONLY for isolation regression testing, never a published measurement.
+ const source = structuredClone(page.entries[0].sources.find((s) => s.observations.length)!);
+ source.id = 'synthetic-wan';
+ source.observations[0].quality = {
+ scale: 'ordinal_0_to_4',
+ contractId: 'h3-only',
+ contractSha256: null,
+ rubricVersion: null,
+ rubricSha256: null,
+ metrics: {},
+ };
+ source.model = 'Wan-AI/Wan2.2-T2V-A14B';
+ source.observations = source.observations.map((o) => ({
+ ...o,
+ model: source.model!,
+ id: `wan-${o.id}`,
+ workload: `Wan test ${o.workload}`,
+ workloadKey: `wan-${o.workloadKey}`,
+ }));
+ page.entries[0].sources.push(source);
+ const wan = videoDashboardProjection([page], 'v_model=wan22');
+ expect(wan.cells.length).toBeGreaterThan(0);
+ expect(wan.cells.every((point) => point.model === source.model)).toBe(true);
+ expect(wan.cells.every((point) => point.quality === null)).toBe(true);
+ expect(wan.quality.eligible).toBe(0);
+ expect(wan.rows.every((row) => row.metrics.apiPricePerVideo === null)).toBe(true);
+ expect(wan.provenance.flatMap((entry) => entry.sources.map((s) => s.id))).toEqual([
+ 'synthetic-wan',
+ ]);
+ expect(videoDashboardProjection([page], '').cells).toEqual(original.cells);
+ source.observations = [];
+ expect(videoDashboardProjection([page], 'v_model=wan22').serving.length).toBeGreaterThan(0);
+ expect(videoDashboardProjection([page], '').serving).toEqual(original.serving);
+});
+
+it('excludes ambiguous source identities instead of mixing models', () => {
+ const page = structuredClone(fixture) as unknown as VideoHistoryPage;
+ const source = page.entries[0].sources.find((s) => s.observations.length)!;
+ source.model = 'Wan-AI/Wan2.2-T2V-A14B';
+ for (const query of ['', 'v_model=wan22']) {
+ const ids = videoDashboardProjection([page], query).provenance.flatMap((e) =>
+ e.sources.map((s) => s.id),
+ );
+ expect(ids).not.toContain(source.id);
+ }
+ delete source.model;
+ source.observations.push({ ...source.observations[0], model: 'Wan-AI/Wan2.2-T2V-A14B' });
+ for (const query of ['', 'v_model=wan22']) {
+ const ids = videoDashboardProjection([page], query).provenance.flatMap((e) =>
+ e.sources.map((s) => s.id),
+ );
+ expect(ids).not.toContain(source.id);
+ }
+});
+
+it('reads generic Wan producer success and preflight failures through the shared history projection', () => {
+ const producer = wanServingFixture();
+ producer.documents.set('manifest.json', producer.manifest);
+ producer.documents.set('ci.json', producer.ci);
+ producer.checksums.set('manifest.json', 'a'.repeat(64));
+ const project = () =>
+ videoHistoryEntry(
+ {
+ storageVersion: 1,
+ runId: '123',
+ artifact: { id: 40, name: 'video-serving-123-1', expired: false, size_in_bytes: 100 },
+ sources: [
+ {
+ id: '123',
+ documents: [...producer.documents],
+ checksums: [...producer.checksums],
+ assets: [],
+ texts: [],
+ },
+ ],
+ },
+ null,
+ );
+ const pages = () => [{ schemaVersion: 1 as const, entries: [project()], nextPage: null }];
+ const success = videoDashboardProjection(pages(), 'v_model=wan22');
+ expect(success.cells).toHaveLength(3);
+ expect(success.serving[0]).toMatchObject({
+ scheduled: 20,
+ valid: 20,
+ unjudged: 20,
+ qualitySloGoodput: null,
+ });
+ expect(success.cells[0].model).toBe('Wan-AI/Wan2.2-T2V-A14B-Diffusers');
+ expect(videoDashboardProjection(pages(), '').serving).toEqual([]);
+ const matrix = producer.documents.get('serving-smoke.json');
+ Object.assign(matrix!, {
+ gpu_uuids: [],
+ cells: [
+ {
+ concurrency: 1,
+ status: 'failed',
+ verified: false,
+ completion: {
+ scheduled: 20,
+ attempted: 0,
+ completed: 0,
+ valid: 0,
+ failed: 20,
+ not_started: 20,
+ },
+ },
+ ],
+ });
+ const failure = videoDashboardProjection(pages(), 'v_model=wan22');
+ expect(failure.cells).toEqual([]);
+ expect(failure.serving[0]).toMatchObject({
+ scheduled: 20,
+ attempted: 0,
+ notStarted: 20,
+ failed: 0,
+ qualitySloGoodput: null,
+ });
+ expect(failure.provenance[0].sources[0].model).toBe('Wan-AI/Wan2.2-T2V-A14B-Diffusers');
+});
diff --git a/packages/app/src/lib/views-api/video-dashboard.ts b/packages/app/src/lib/views-api/video-dashboard.ts
index 82810d4d6..6a1a7698e 100644
--- a/packages/app/src/lib/views-api/video-dashboard.ts
+++ b/packages/app/src/lib/views-api/video-dashboard.ts
@@ -1,3 +1,4 @@
+import { videoServingEvidence } from '@/components/video-benchmark/serving-evidence';
import { compareMetrics } from '@/components/video-benchmark/compare';
import {
readVideoCompareSelection,
@@ -12,7 +13,7 @@ import {
powerUtilization,
scalingVsSpec,
} from '@/components/video-benchmark/evidence';
-import { VIDEO_HARDWARE_ROSTER } from '@/components/video-benchmark/hardware';
+import { videoModelHistory, videoModelHardware } from '@/components/video-benchmark/models';
import type { VideoHistoryPage } from '@/components/video-benchmark/history';
import {
metricValue,
@@ -22,6 +23,7 @@ import {
} from '@/components/video-benchmark/metrics';
import { listedVideoCells, plotVideoPoints } from '@/components/video-benchmark/plot';
import { dashboardCells, videoPoints } from '@/components/video-benchmark/points';
+import { QUALITY_METRICS, qualityEligibility } from '@/components/video-benchmark/quality';
import {
metricOptions,
readVideoDashboardState,
@@ -30,6 +32,7 @@ import {
/** Public metadata and the dashboard's existing pure calculations; no bundle or asset URLs. */
export function videoDashboardProjection(pages: VideoHistoryPage[], search: string) {
const state = readVideoDashboardState(search);
+ pages = videoModelHistory(pages, state.model);
const { cells, workload, otherWorkloads } = dashboardCells(videoPoints(pages));
const options = metricOptions(state);
const hidden = new Set(state.hidden);
@@ -40,6 +43,10 @@ export function videoDashboardProjection(pages: VideoHistoryPage[], search: stri
const pair = resolveCompareSelection(readVideoCompareSelection(search), cells);
const power = powerUtilization(cells);
const plateau = concurrencyPlateau(cells);
+ const qualityResults = cells.map((p) => ({
+ id: p.id,
+ ...qualityEligibility(p, { metric: state.qualityMetric, threshold: state.qualityThreshold }),
+ }));
return {
params: {
...state,
@@ -49,6 +56,22 @@ export function videoDashboardProjection(pages: VideoHistoryPage[], search: stri
},
workload,
otherWorkloads,
+ serving: videoServingEvidence(pages),
+ quality: {
+ metric: state.qualityMetric,
+ direction: QUALITY_METRICS[state.qualityMetric].polarity,
+ readerThreshold: state.qualityThreshold,
+ thresholdProvenance:
+ state.qualityThreshold === null
+ ? null
+ : 'reader-selected URL; frozen evaluator rule still required',
+ active: state.y === 'quality' || state.qualityThreshold !== null,
+ eligible: qualityResults.filter((r) => r.eligible).length,
+ exclusions: qualityResults
+ .filter((r) => !r.eligible)
+ .map(({ id, reasons }) => ({ id, reasons })),
+ metricDefinition: QUALITY_METRICS[state.qualityMetric],
+ },
cells,
metricDefinitions: VIDEO_METRICS,
// Color is renderer state; use the exact plot model with an empty color.
@@ -57,7 +80,7 @@ export function videoDashboardProjection(pages: VideoHistoryPage[], search: stri
point,
metrics: metrics(point),
})),
- kpis: VIDEO_HARDWARE_ROSTER.map(({ key }) => {
+ kpis: videoModelHardware(state.model, cells).map(({ key }) => {
const point = leadCell(cells, key, options);
return { hardwareKey: key, point: point ?? null, metrics: point ? metrics(point) : null };
}),
@@ -85,6 +108,7 @@ export function videoDashboardProjection(pages: VideoHistoryPage[], search: stri
unavailable: entry.error !== null,
sources: entry.sources.map((source) => ({
id: source.id,
+ model: source.model ?? null,
sha256: source.sha256,
sourceSha: source.sourceSha,
observedAt: source.observedAt,
diff --git a/packages/skills/skills/inferencex-api/integrity.json b/packages/skills/skills/inferencex-api/integrity.json
index 8f3e47dc0..f951f3669 100644
--- a/packages/skills/skills/inferencex-api/integrity.json
+++ b/packages/skills/skills/inferencex-api/integrity.json
@@ -8,7 +8,7 @@
"references/cli-contract.md": "fa44faa38d889b4fbdee5ba42752b47758ee3706fab150513bd4e6db87a86cb0",
"references/cli.md": "96b228f34cb3600f4548f4dc84df8506531747286763c56ca834c77bee05e1eb",
"references/collectivex.md": "eb794f9c28d4a27bec4db80c42c4685ff3b1d204fd9b12a6788511fb258a789f",
- "references/dashboard-views.md": "8684217159dac8911438535b812d0df7a0af7ce27647949ddb8d203fda7aef95",
+ "references/dashboard-views.md": "16546ceac76cf220500afce0e83db1c5c59746b30e423ecc6f85912bf4e02251",
"references/offline-exports.md": "95aa565dcd4c9e592159baa560a9a58217bc61e395de1c6daf0576795c7f4ec9",
"references/powerx.md": "cf8adcc5dfe395c5fb659908819980a872475f862f22b723815af43d363cedad",
"references/provenance.md": "da4e9d078b31f234727706593f77ca9d5fdac611921783aaa09b5741de58b69a",
diff --git a/packages/skills/skills/inferencex-api/references/dashboard-views.md b/packages/skills/skills/inferencex-api/references/dashboard-views.md
index 207bf85a9..e2f2515cc 100644
--- a/packages/skills/skills/inferencex-api/references/dashboard-views.md
+++ b/packages/skills/skills/inferencex-api/references/dashboard-views.md
@@ -66,13 +66,30 @@ which controls belong together.
With no `run`/`artifact`, `/api/v1/views/video` returns the current dashboard's
published-history projection, not CI discovery. Copy its URL selectors directly:
-`v_x`, `v_y`, `v_tier`, `v_optimal`, `v_api`, `v_hidden`, `v_base`, `v_cand`, `v_case`.
+`v_x`, `v_y`, `v_quality`, `v_qmin`, `v_tier`, `v_optimal`, `v_api`, `v_hidden`, `v_base`, `v_cand`, `v_case`.
`v_view=chart|table` is presentation only. Read resolved `params`; malformed values
use the same defaults as the UI. Unknown/repeated query names still return 400.
- Defaults: P90 seconds vs videos/USD TCO, owning tier `h`, optimal deployments
only; `r` selects renting. `v_optimal=0` includes dominated deployments. Queued
client-concurrency cells stay in evidence, outside chart/table.
+- Serving outcomes: inspect `serving` even when `rows` is empty. It retains every planned cell in the loaded pages before chart/workload/hardware/quality filters, including zero-attempt failures. `failed` counts attempted failures; `timedOut` is a subset, `notStarted` is separate, and `legacyFailedSlots` preserves the older aggregate. Unknown counts remain null. `unjudged` requires sufficient clip/request evidence; `qualitySloGoodput` is null without per-request quality and deadline joins.
+- Quality: `v_y=quality` plots one `v_quality` dimension against latency;
+ `v_qmin=4` adds a reader threshold before frontier selection on any Y axis.
+ The seven dimension IDs are `prompt_adherence` (default), `visual_fidelity`,
+ `temporal_consistency`, `motion_plausibility`, `audio_quality`, `audio_content`, `av_sync`.
+ They preserve separate higher-is-better human 0–4 ratings; never combine them
+ into one score. Require `quality.scale=ordinal_0_to_4` and all seven critical
+ dimensions to pass their own frozen calibrated rules. Legacy 1–5 or missing
+ scale declarations are not converted. These IDs retain the original rubric,
+ using registry `human.absolute_dimension_rating` version `0.2.0-draft`.
+ Read each point's nullable `quality` contract/rubric/evaluator identities,
+ per-dimension raw value/status, assessed/total sample coverage, calibration
+ cohort and frozen threshold provenance. Only complete-coverage calibrated
+ passes qualify. A reader threshold cannot relax the frozen rule; a raw
+ `judged_unqualified` score remains visible evidence but cannot enter a frontier.
+ Chart, table, CSV and API select the same eligible observations. Existing
+ unjudged data produces an empty quality view, not zero scores.
- `v_hidden` is a comma-separated roster-key list (for example `h100,mi355x`),
default empty. It filters chart/table only; KPI/Compare/Evidence keep their
original scope. Unknown keys are ignored, remaining keys are sorted/deduplicated.
@@ -99,7 +116,7 @@ use the same defaults as the UI. Unknown/repeated query names still return 400.
Legacy selectors and `v_*` selectors cannot be mixed. Legacy missing artifacts
return 204; dashboard mode returns its empty/partial projection and coverage.
-Example (check deployed OpenAPI availability first; no authentication or write):
+Example: apply a reader quality threshold to measured per-GPU throughput. Check deployed OpenAPI availability first; unjudged retained data returns empty rows. No authentication or write:
```js
const url = new URL('https://inferencex.semianalysis.com/api/v1/views/video');
@@ -107,6 +124,8 @@ url.search = new URLSearchParams({
view: 'compare',
v_x: 'p50Latency',
v_y: 'videosPerGpuHour',
+ v_quality: 'prompt_adherence',
+ v_qmin: '4',
v_tier: 'r',
v_optimal: '0',
v_api: '0.08',
@@ -122,6 +141,7 @@ console.log(
JSON.stringify({
params: data.params,
coverage: data.coverage,
+ quality: data.quality,
rows: data.rows,
comparison: data.comparison,
provenance: data.provenance,
@@ -129,6 +149,8 @@ console.log(
);
```
+Compare deployment frontiers only within the returned workload/generation and quality-evaluator cohorts. Keep single measurements as points; connecting measured frontier points is not interpolation. Hardware-health failures and unknown batching capacity are excluded from normal rankings.
+
Measured ratios and uncalibrated media similarity do not qualify visual quality,
energy claims or a causal compute/memory bottleneck. Preserve source IDs, seals,
execution/publication times and coverage alongside exported values.
@@ -186,3 +208,31 @@ update its read-only API in the same PR. Reuse the UI's pure transforms, test
selector effects and source semantics, and update OpenAPI, the route catalog,
coverage inventory and this existing npm package. Hidden navigation and feature
flags do not make public data sensitive.
+
+### Local multi-model foundation
+
+`/video?v_model=wan22` and `/api/v1/views/video?v_model=wan22` select Wan2.2-T2V-A14B;
+`h3` is the default. Model filtering precedes workload selection and applies to charts,
+tables, exports, serving evidence and history provenance. Switching models resets custom
+pricing, hidden hardware and comparison/history selections. H3 retains its dated $0.08/video-second
+reference; Wan's API price is null unless the reader supplies `v_api`. Missing results remain
+empty. The serving reader accepts `video-serving--` artifacts with
+`video_serving_smoke_matrix`, `controlled_video_gpu` and `live_video` evidence while preserving
+legacy H3 contracts. Evidence tags must agree with the selected model; `operator_endpoint` request records remain valid under either model's verified supervisor. Wan request duration is `frame_count / fps`; H3 keeps its explicitly requested duration. Wan's canonical model ID is `Wan-AI/Wan2.2-T2V-A14B-Diffusers`;
+the previous `Wan-AI/Wan2.2-T2V-A14B` remains a selection alias, not permission to pool unequal workload keys.
+`manifest.workload_plan.model_id` supplies source-level identity even before generation;
+a contradictory optional result is rejected. API provenance returns nullable source `model`.
+A sealed initial serving summary supplies planned/not-started counts; a manifest alone cannot infer them.
+This reader does not itself establish GPU measurements, quality qualification or Trainium support.
+Only legacy `h3-*` artifacts without model identity use the H3 fallback; unidentified generic artifacts do not enter either model projection.
+Ambiguous mixed-model sources are excluded. H3's seven-dimension quality policy is unchanged;
+Wan quality and quality/SLO goodput stay null until a separate video-only quality contract is supported.
+
+Wan serving 接入沿用既有目录和校验流程,接受 `video-serving--`、
+`video_serving_smoke_matrix`、`controlled_video_gpu` 和 `live_video`,同时兼容 H3。执行证据类型须与模型一致;经对应模型 supervisor 验证的请求记录仍可使用 `operator_endpoint`。Wan 的请求时长按 `frame_count / fps` 计算,H3 保留显式请求时长。
+规范模型 ID 为 `Wan-AI/Wan2.2-T2V-A14B-Diffusers`,旧的 `Wan-AI/Wan2.2-T2V-A14B`
+仅作为模型选择的别名,不会合并不同的工作负载。来源身份取自已封存的
+`manifest.workload_plan.model_id`;可选结果中的模型与之冲突时会拒绝该结果。
+公开 API 的 provenance 保留可为空的来源 `model`。只有旧 `h3-*` 产物可在模型身份缺失时归入 H3;未知模型的通用产物不会进入任一模型投影。预检失败的计划数与未启动数
+必须由初始 serving summary 明确记录,不能只凭 manifest 推导。接入成功不代表
+已有 GPU 测量、通过质量验收或支持 Trainium;Wan 的质量与质量/SLO goodput 仍为 null。
diff --git a/packages/skills/test/dashboard-views.test.mjs b/packages/skills/test/dashboard-views.test.mjs
index dd5b19338..d05e41159 100644
--- a/packages/skills/test/dashboard-views.test.mjs
+++ b/packages/skills/test/dashboard-views.test.mjs
@@ -37,6 +37,8 @@ test('VideoGenX skill example uses documented selectors and preserves partial co
view: 'compare',
v_x: 'p50Latency',
v_y: 'videosPerGpuHour',
+ v_quality: 'prompt_adherence',
+ v_qmin: '4',
v_tier: 'r',
v_optimal: '0',
v_api: '0.08',
@@ -48,6 +50,32 @@ test('VideoGenX skill example uses documented selectors and preserves partial co
assert.deepEqual(output, [data]);
});
+test('VideoGenX quality example preserves an empty unqualified frontier and its missing measurements', async () => {
+ const output = [];
+ const data = {
+ params: { qualityMetric: 'prompt_adherence', qualityThreshold: 4 },
+ coverage: { pagesRead: 1, maxPages: 5, nextPage: null, truncated: false },
+ quality: {
+ metric: 'prompt_adherence',
+ direction: 'higher',
+ readerThreshold: 4,
+ thresholdProvenance: 'reader-selected URL; frozen evaluator rule still required',
+ active: true,
+ eligible: 0,
+ exclusions: [{ id: 'source:c1', reasons: ['unjudged'] }],
+ },
+ rows: [],
+ comparison: { cases: { status: 'not-published', selected: null } },
+ provenance: [{ runId: '123', artifactId: 456, publishedAt: null }],
+ };
+ await example(() => Promise.resolve(Response.json(data)), {
+ log: (text) => output.push(JSON.parse(text)),
+ });
+ assert.deepEqual(output, [data]);
+ assert.equal(output[0].rows.length, 0);
+ assert.equal(output[0].provenance[0].publishedAt, null);
+});
+
test('VideoGenX skill example fails on an HTTP error instead of printing empty successful evidence', async () => {
const output = [];
await assert.rejects(
From 6bcddb0abb019f3e39a7a804f5cd6d1c8ea6ddfc Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Tue, 15 Sep 2026 16:59:38 -0700
Subject: [PATCH 048/104] feat: add read-only H3 performance history
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增只读 H3 性能历史。复用已发布产物索引,保留原始执行与导出身份、失败和资格状态,提供英中筛选与原结果直链,并以保留数据验证桌面和移动端交互。未创建新的性能测量或发布结果。
---
docs/index.md | 1 +
docs/video-history.md | 31 ++
.../cypress/component/video-ci-runs.cy.tsx | 70 +++
packages/app/cypress/e2e/navigation.cy.ts | 35 +-
.../app/cypress/fixtures/api/_manifest.json | 7 +
.../cypress/fixtures/api/video-history.json | 361 ++++++++++++++++
.../app/src/app/api/video-runs/route.test.ts | 14 +
packages/app/src/app/api/video-runs/route.ts | 34 +-
.../video-benchmark/VideoCIRuns.tsx | 39 +-
.../video-benchmark/VideoHistory.tsx | 399 ++++++++++++++++++
.../video-benchmark/history.test.ts | 86 ++++
.../src/components/video-benchmark/history.ts | 146 +++++++
packages/app/src/lib/api/api-route-catalog.ts | 6 +-
.../app/src/lib/video/video-storage.test.ts | 55 ++-
packages/app/src/lib/video/video-storage.ts | 57 +++
15 files changed, 1321 insertions(+), 20 deletions(-)
create mode 100644 docs/video-history.md
create mode 100644 packages/app/cypress/fixtures/api/video-history.json
create mode 100644 packages/app/src/components/video-benchmark/VideoHistory.tsx
create mode 100644 packages/app/src/components/video-benchmark/history.test.ts
create mode 100644 packages/app/src/components/video-benchmark/history.ts
diff --git a/docs/index.md b/docs/index.md
index 80256044e..c237c2836 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -22,6 +22,7 @@ Design rationale and non-obvious conventions. See [CLAUDE.md](../CLAUDE.md) for
- [Architecture](./architecture.md) — Why client-first, route navigation, URL state, provider nesting, server-side caching (unstable_cache + blob), in-memory client cache, color system, analytics enforcement
- [D3 Charts](./d3-charts.md) — Why 4 effects, in-place mutation, refs for zoom, rAF throttling, HTML tooltips, Pareto directions, gradient labels
+- [Video History](./video-history.md) — Read-only published H3 catalog, metric boundaries, sharing, and local retained-data replay
- [Data Pipeline](./data-pipeline.md) — DB schema reasoning, ETL design, transform pipeline, spline method choice, normalizer resolution order (model/GPU/framework)
- [Pitfalls](./pitfalls.md) — Failure modes: token type consistency, schema evolution, empty objects, zoom loss, stale closures, disaggregated metrics, negative splines, date stamping, ref stability, cost inheritance
- [GPU Specs](./gpu-specs.md) — Unit conventions, topology invariants, SVG layout rationale, hardware gotchas
diff --git a/docs/video-history.md b/docs/video-history.md
new file mode 100644
index 000000000..0240ea047
--- /dev/null
+++ b/docs/video-history.md
@@ -0,0 +1,31 @@
+# Video performance history
+
+`/video` and `/zh/video` default to **Performance history**. Explicit run/artifact/source/cell URLs retain the existing video viewer. `?view=results` opens the CI browser; `?view=history` restores history. History filters use `history-hardware`, `history-concurrency`, and `history-query` in the URL.
+
+## Read path
+
+`GET /api/video-runs?format=history&page=1` returns a versioned UI projection of existing published H3 indexes. It lists `h3-video-media/v1/runs/` metadata, validates pathname identities, sorts by index publication time (artifact ID breaks ties), then reads at most ten indexes for one page. It neither downloads media nor calls the publication path. The repository visibility check still applies. This UI transport is not a stable public benchmark API.
+
+The projection groups all cells under the original source inside one artifact entry. It reuses `storedBundle`, `servingCells`, `storedFidelityBundle`, and the existing tradeoff calculations. Invalid or unavailable indexes remain explicit error entries. Original execution time comes from `ci.started_at`; index publication time is separate and must never be substituted for execution time. Original run IDs and export run IDs remain distinct.
+
+## Evidence boundaries
+
+- Only descriptive observations are shown: this version has no selected matched baseline and computes no before/after delta.
+- Valid/completed/scheduled/failed counts stay separate. Missing or invalid metrics stay null. P90 retains the existing per-cell ten-sample display floor.
+- Latency and throughput use the submission-to-downloaded-media window. Energy uses the recorded generation window and participating GPU boards. Board energy is not facility energy.
+- Fidelity, calibration and release qualification are displayed independently. Stored/published does not mean qualified.
+- Filters apply to loaded pages. The user can load older pages without losing already loaded entries. Global execution-time sorting and an editorial change/PR catalog require a later materialized catalog; the current implementation scans index metadata only, never all full indexes.
+
+## Local replay
+
+`E2E_FIXTURES=1` serves `cypress/fixtures/api/video-history.json` through the existing fixture loader and checksum manifest. The fixture is a metadata-only projection of retained H100/H200/B200 observations and two fidelity artifacts; it contains no infrastructure paths or video bytes. Unknown publication timestamps remain null. The response header `X-VideoGenX-Replay: 1` causes a visible replay notice. These are historical retained observations, not newly measured results or a new publication.
+
+## 中文说明
+
+`/video` 与 `/zh/video` 默认打开“性能历史”。原有 run/artifact/source/cell 链接仍打开对应结果;`?view=results` 进入 CI 浏览器。历史筛选条件保存在 URL,刷新后恢复。
+
+历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。
+
+当前展示观测值,未选择匹配基线,也不计算 before/after。延迟、吞吐量使用提交到下载完成的窗口;板卡能耗使用记录的生成窗口。保真度、阈值校准、发布验收单独展示。筛选仅作用于已加载的页面,可继续加载较早结果。
+
+`E2E_FIXTURES=1` 使用保留结果的脱敏元数据回放,遵循现有 fixture 校验和清单,并显示回放提示。未知发布时间保持为空;这不是新测量或新发布。
diff --git a/packages/app/cypress/component/video-ci-runs.cy.tsx b/packages/app/cypress/component/video-ci-runs.cy.tsx
index aaf4429ac..f6d9d9f72 100644
--- a/packages/app/cypress/component/video-ci-runs.cy.tsx
+++ b/packages/app/cypress/component/video-ci-runs.cy.tsx
@@ -2,12 +2,82 @@ import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.share
import VideoCIRuns from '@/components/video-benchmark/VideoCIRuns';
import ResultPower from '@/components/video-benchmark/ResultPower';
import VideoSelect from '@/components/video-benchmark/VideoSelect';
+import { videoHistoryEntry } from '@/components/video-benchmark/history';
import { servingArtifact, videoRun as run } from '../support/video-artifacts';
describe('H3 automatic CI viewer (synthetic API fixtures)', () => {
beforeEach(() => {
cy.intercept('GET', '**/api/video-runs*format=media', { statusCode: 204 });
+ cy.window().then((win) =>
+ win.history.replaceState(null, '', `${win.location.pathname}?view=results`),
+ );
+ });
+ it('defaults to published history and keeps filters and source selection in the shared URL', () => {
+ const entry = videoHistoryEntry(servingArtifact(), '2026-09-09T00:00:00Z');
cy.window().then((win) => win.history.replaceState(null, '', win.location.pathname));
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', {
+ schemaVersion: 1,
+ entries: [entry],
+ nextPage: null,
+ }).as('history');
+ cy.intercept('GET', '/api/video-runs?page=1', () => {
+ throw new Error('Published discovery must not scan recent Actions');
+ });
+ cy.intercept('GET', '/api/video-runs?run=123', {
+ run: run(123, 'success'),
+ artifacts: [entry.artifact],
+ });
+ cy.intercept('GET', '**/api/video-runs*format=media', servingArtifact());
+ cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
+ cy.mount(
+
+
+ ,
+ );
+ cy.wait('@history');
+ cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
+ cy.get('[data-testid="video-history"]').should('contain', 'no matched version baseline');
+ cy.get('[aria-label="Client concurrency"]').click();
+ cy.contains('[role="option"]', 'C4').click();
+ cy.get('[data-testid="video-history-observation"]')
+ .should('have.length', 1)
+ .and('contain', '300 / —');
+ cy.location('search').should('contain', 'history-concurrency=4');
+ cy.get('[data-testid="video-history-observation"] button').click();
+ cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C4');
+ cy.location('search').should('contain', 'cell=c4').and('contain', 'history-concurrency=4');
+ cy.contains('button', 'Performance history').click();
+ cy.get('[data-testid="video-history-observation"]').should('have.length', 1);
+ });
+ it('renders retained metrics and missing data in Chinese within a mobile viewport', () => {
+ cy.viewport(390, 844);
+ const entry = videoHistoryEntry(servingArtifact(), '2026-09-09T00:00:00Z');
+ cy.window().then((win) =>
+ win.history.replaceState(
+ null,
+ '',
+ `${win.location.pathname}?view=history&history-concurrency=1`,
+ ),
+ );
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', {
+ schemaVersion: 1,
+ entries: [entry],
+ nextPage: null,
+ });
+ cy.mount(
+
+
+ ,
+ );
+ cy.get('[data-testid="video-history-observation"]')
+ .should('have.length', 1)
+ .and('contain', '120 / —')
+ .and('contain', '168')
+ .and('contain', '已完成');
+ cy.contains('尚未选择匹配的版本基线').should('be.visible');
+ cy.get('[data-testid="video-history"]').then(($history) =>
+ expect($history[0].getBoundingClientRect().right).to.be.at.most(390),
+ );
});
it('keeps an open long-label menu within mobile bounds and supports keyboard selection', () => {
cy.viewport(390, 844);
diff --git a/packages/app/cypress/e2e/navigation.cy.ts b/packages/app/cypress/e2e/navigation.cy.ts
index 9f032c21d..1c535d425 100644
--- a/packages/app/cypress/e2e/navigation.cy.ts
+++ b/packages/app/cypress/e2e/navigation.cy.ts
@@ -1,5 +1,6 @@
import { SUPPLEMENTAL_BENCHMARK_ROWS } from '../../src/lib/benchmarks/supplemental-benchmarks';
import { OVERLAY_RUN_ID, OVERLAY_RUN_URL } from '../support/overlay-fixtures';
+import { videoHistoryEntry } from '../../src/components/video-benchmark/history';
import { servingArtifact, videoRun } from '../support/video-artifacts';
const datum = (el: Element) => (el as Element & { __data__: { x: number; y: number } }).__data__;
@@ -373,6 +374,34 @@ describe('TPUv7 results', { testIsolation: true }, () => {
describe('H3 video artifact viewer', () => {
beforeEach(() => {
cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null });
+ cy.intercept('GET', '/api/video-runs?format=history&page=*', {
+ schemaVersion: 1,
+ entries: [],
+ nextPage: null,
+ });
+ });
+ it('opens old published entries by default and restores history filters after reload', () => {
+ const entry = videoHistoryEntry(servingArtifact(), '2026-09-09T00:00:00Z');
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', {
+ schemaVersion: 1,
+ entries: [entry],
+ nextPage: null,
+ }).as('history');
+ cy.visit('/video');
+ cy.wait('@history');
+ cy.get('[data-testid="video-history"] h1').should('contain', 'Performance history');
+ cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
+ cy.get('[aria-label="Client concurrency"]').click();
+ cy.contains('[role="option"]', 'C2').click();
+ cy.get('[data-testid="video-history-observation"]')
+ .should('have.length', 1)
+ .and('contain', 'C2');
+ cy.reload();
+ cy.get('[data-testid="video-history-observation"]')
+ .should('have.length', 1)
+ .and('contain', 'C2')
+ .and('contain', '240 / —');
+ cy.location('search').should('contain', 'history-concurrency=2');
});
it('shares a comparison built by opening two CI runs through the page', () => {
for (const saved of [
@@ -449,7 +478,7 @@ describe('H3 video artifact viewer', () => {
});
it('uses the shared unlock for navigation and keeps an empty viewer free of sample results', () => {
cy.viewport(1440, 1000);
- cy.visit('/video', {
+ cy.visit('/video?view=results', {
onBeforeLoad(win) {
win.localStorage.removeItem('inferencex-feature-gate');
},
@@ -463,14 +492,14 @@ describe('H3 video artifact viewer', () => {
cy.get('head meta[name="robots"]').should('have.attr', 'content', 'noindex, nofollow');
});
it('shows a recoverable load error and the Chinese empty state', () => {
- cy.visit('/video');
+ cy.visit('/video?view=results');
cy.contains('summary', 'Local artifact tools').click();
cy.get('[data-testid="video-benchmark"]').contains('summary', 'Manifest URL').click();
cy.get('input[aria-label="Manifest URL"]').type('https://example.com/wrong.json');
cy.contains('button', 'Load manifest').click();
cy.get('[role="alert"]').should('contain', 'Could not load this bundle');
cy.get('video[data-role]').should('not.exist');
- cy.visit('/zh/video');
+ cy.visit('/zh/video?view=results');
cy.get('[data-testid="video-ci-runs"]').should('contain', '本页 GitHub 历史中没有 H3 运行');
cy.get('head meta[name="robots"]').should('have.attr', 'content', 'noindex, nofollow');
});
diff --git a/packages/app/cypress/fixtures/api/_manifest.json b/packages/app/cypress/fixtures/api/_manifest.json
index d86edd3b9..5eba3a24d 100644
--- a/packages/app/cypress/fixtures/api/_manifest.json
+++ b/packages/app/cypress/fixtures/api/_manifest.json
@@ -99,6 +99,13 @@
"sha256": "f28d2220e5246ad70113e38e49394bc7a0bfe9afba8cedf08b90e39042e53357",
"source": null,
"topLevel": "object"
+ },
+ "video-history": {
+ "bytes": 14506,
+ "capturedAt": "2026-09-15T23:50:12.033Z",
+ "sha256": "278dbafd690465ea01d0a05b6c972751a1a2a277a6d1b43362407abd7d42ed2c",
+ "source": "Retained public H3 metadata replay from original runs; publication time unavailable. No new benchmark or publication.",
+ "topLevel": "object"
}
}
}
diff --git a/packages/app/cypress/fixtures/api/video-history.json b/packages/app/cypress/fixtures/api/video-history.json
new file mode 100644
index 000000000..45be3d3fe
--- /dev/null
+++ b/packages/app/cypress/fixtures/api/video-history.json
@@ -0,0 +1,361 @@
+{
+ "schemaVersion": 1,
+ "entries": [
+ {
+ "id": "34336635063.10103071687",
+ "runId": "34336635063",
+ "artifact": {
+ "id": 10103071687,
+ "name": "h3-video-34336635063-1",
+ "expired": false,
+ "size_in_bytes": 118562850,
+ "digest": "sha256:575c0016fa96f9fa080706285611509db6f2d72be5f8ffd0248cda3b91f2de42",
+ "stored": true
+ },
+ "publishedAt": null,
+ "sources": [
+ {
+ "id": "34336635063",
+ "sha256": "7df99e50c015669f4dd9ef62549317870f197cfe0fc5d163cf8bf0fb3b88dd5e",
+ "sourceSha": "25de33c57f5c2ac0189c3f3a8de396057266dfb9",
+ "hardware": "H100",
+ "execution": "complete",
+ "observedAt": "2026-09-09T09:47:33.704519+00:00",
+ "kind": "observation",
+ "observations": [
+ {
+ "id": "7df99e50c015669f4dd9ef62549317870f197cfe0fc5d163cf8bf0fb3b88dd5e:c1",
+ "cell": "c1",
+ "hardware": "NVIDIA H100 80GB HBM3",
+ "concurrency": 1,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 20,
+ "completed": 20,
+ "scheduled": 20,
+ "failed": 0,
+ "samples": 20,
+ "p50": 167.33339739358053,
+ "p90": 168.11354550393298,
+ "clipsGpuHour": 5.3741390883412175,
+ "energyKj": 431.14963489170344
+ },
+ {
+ "id": "7df99e50c015669f4dd9ef62549317870f197cfe0fc5d163cf8bf0fb3b88dd5e:c2",
+ "cell": "c2",
+ "hardware": "NVIDIA H100 80GB HBM3",
+ "concurrency": 2,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 20,
+ "completed": 20,
+ "scheduled": 20,
+ "failed": 0,
+ "samples": 20,
+ "p50": 334.78318604291417,
+ "p90": 336.9140758761205,
+ "clipsGpuHour": 5.368742995784034,
+ "energyKj": 431.32628015924786
+ }
+ ],
+ "fidelity": null,
+ "calibration": null,
+ "releaseQualified": false,
+ "error": null
+ }
+ ],
+ "error": null
+ },
+ {
+ "id": "34344378350.10106004321",
+ "runId": "34344378350",
+ "artifact": {
+ "id": 10106004321,
+ "name": "h3-video-34344378350-1",
+ "expired": false,
+ "size_in_bytes": 61499259,
+ "digest": "sha256:a0bd28cc430c443c1be086bb33f16636a04e51acb0d92f554228e1f1b7409329",
+ "stored": true
+ },
+ "publishedAt": null,
+ "sources": [
+ {
+ "id": "34344378350",
+ "sha256": "98206c73d05226c162cad14f456d7671640cbd1d090945f456f5427713fdde7f",
+ "sourceSha": "b04b09c505cfec39f71a7971b28c8af6c93882c9",
+ "hardware": "H100",
+ "execution": "complete",
+ "observedAt": "2026-09-09T12:11:43.125736+00:00",
+ "kind": "observation",
+ "observations": [
+ {
+ "id": "98206c73d05226c162cad14f456d7671640cbd1d090945f456f5427713fdde7f:c4",
+ "cell": "c4",
+ "hardware": "NVIDIA H100 80GB HBM3",
+ "concurrency": 4,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 20,
+ "completed": 20,
+ "scheduled": 20,
+ "failed": 0,
+ "samples": 20,
+ "p50": 669.2438137787394,
+ "p90": 673.7058754772879,
+ "clipsGpuHour": 5.368345559881099,
+ "energyKj": 430.80324425396446
+ }
+ ],
+ "fidelity": null,
+ "calibration": null,
+ "releaseQualified": false,
+ "error": null
+ }
+ ],
+ "error": null
+ },
+ {
+ "id": "34342452354.10107476604",
+ "runId": "34342452354",
+ "artifact": {
+ "id": 10107476604,
+ "name": "h3-video-34342452354-1",
+ "expired": false,
+ "size_in_bytes": 175903798,
+ "digest": "sha256:ac85510c000f69098db37149ae56b48964563c7a1dc4b26a31f71317b8b3599a",
+ "stored": true
+ },
+ "publishedAt": null,
+ "sources": [
+ {
+ "id": "34342452354",
+ "sha256": "ad62f1b44954b9733cb513b7dd1d54c224759a20956d9a1f257b190ce8d4da35",
+ "sourceSha": "6ea0bf8750d97b2f89a913536dd0dc4aad5bf74e",
+ "hardware": "H200",
+ "execution": "complete",
+ "observedAt": "2026-09-09T10:52:07.062086+00:00",
+ "kind": "observation",
+ "observations": [
+ {
+ "id": "ad62f1b44954b9733cb513b7dd1d54c224759a20956d9a1f257b190ce8d4da35:c1",
+ "cell": "c1",
+ "hardware": "NVIDIA H200",
+ "concurrency": 1,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 20,
+ "completed": 20,
+ "scheduled": 20,
+ "failed": 0,
+ "samples": 20,
+ "p50": 150.61379817902343,
+ "p90": 151.10486977093387,
+ "clipsGpuHour": 5.973235869122123,
+ "energyKj": 410.954300515549
+ },
+ {
+ "id": "ad62f1b44954b9733cb513b7dd1d54c224759a20956d9a1f257b190ce8d4da35:c2",
+ "cell": "c2",
+ "hardware": "NVIDIA H200",
+ "concurrency": 2,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 20,
+ "completed": 20,
+ "scheduled": 20,
+ "failed": 0,
+ "samples": 20,
+ "p50": 300.09254947002046,
+ "p90": 300.1774324030848,
+ "clipsGpuHour": 5.997056099146397,
+ "energyKj": 409.91272507134966
+ },
+ {
+ "id": "ad62f1b44954b9733cb513b7dd1d54c224759a20956d9a1f257b190ce8d4da35:c4",
+ "cell": "c4",
+ "hardware": "NVIDIA H200",
+ "concurrency": 4,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 20,
+ "completed": 20,
+ "scheduled": 20,
+ "failed": 0,
+ "samples": 20,
+ "p50": 601.2122122829896,
+ "p90": 601.8977232379839,
+ "clipsGpuHour": 5.986775861646954,
+ "energyKj": 413.58283766782114
+ }
+ ],
+ "fidelity": null,
+ "calibration": null,
+ "releaseQualified": false,
+ "error": null
+ }
+ ],
+ "error": null
+ },
+ {
+ "id": "34341996789.10104690935",
+ "runId": "34341996789",
+ "artifact": {
+ "id": 10104690935,
+ "name": "h3-video-34341996789-1",
+ "expired": false,
+ "size_in_bytes": 163563283,
+ "digest": "sha256:6b05cafd4c014e02c904f65c0e0d2f3d9a5b541ddc4f030372ed08d4a588c002",
+ "stored": true
+ },
+ "publishedAt": null,
+ "sources": [
+ {
+ "id": "34341996789",
+ "sha256": "ab90da9236114cd13de833a364159b8f84e69060de888f3e813635d5b7b26b82",
+ "sourceSha": "6ea0bf8750d97b2f89a913536dd0dc4aad5bf74e",
+ "hardware": "B200",
+ "execution": "complete",
+ "observedAt": "2026-09-09T10:47:03.922884+00:00",
+ "kind": "observation",
+ "observations": [
+ {
+ "id": "ab90da9236114cd13de833a364159b8f84e69060de888f3e813635d5b7b26b82:c1",
+ "cell": "c1",
+ "hardware": "NVIDIA B200",
+ "concurrency": 1,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 20,
+ "completed": 20,
+ "scheduled": 20,
+ "failed": 0,
+ "samples": 20,
+ "p50": 77.94495720259147,
+ "p90": 78.31597462110221,
+ "clipsGpuHour": 11.52605424609145,
+ "energyKj": 301.08754501100987
+ },
+ {
+ "id": "ab90da9236114cd13de833a364159b8f84e69060de888f3e813635d5b7b26b82:c2",
+ "cell": "c2",
+ "hardware": "NVIDIA B200",
+ "concurrency": 2,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 20,
+ "completed": 20,
+ "scheduled": 20,
+ "failed": 0,
+ "samples": 20,
+ "p50": 153.6016560649732,
+ "p90": 154.1683327689534,
+ "clipsGpuHour": 11.691563929313219,
+ "energyKj": 300.10551714629605
+ },
+ {
+ "id": "ab90da9236114cd13de833a364159b8f84e69060de888f3e813635d5b7b26b82:c4",
+ "cell": "c4",
+ "hardware": "NVIDIA B200",
+ "concurrency": 4,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 20,
+ "completed": 20,
+ "scheduled": 20,
+ "failed": 0,
+ "samples": 20,
+ "p50": 307.28381997847464,
+ "p90": 308.79631440097,
+ "clipsGpuHour": 11.69172635792307,
+ "energyKj": 299.96858693604275
+ }
+ ],
+ "fidelity": null,
+ "calibration": null,
+ "releaseQualified": false,
+ "error": null
+ }
+ ],
+ "error": null
+ },
+ {
+ "id": "34410724145.10127189553",
+ "runId": "34410724145",
+ "artifact": {
+ "id": 10127189553,
+ "name": "h3-fidelity-34410724145-1",
+ "expired": false,
+ "size_in_bytes": 47838865,
+ "digest": "sha256:e8f364dae253274e954003fd06b177b17215381520bbc5924a10607839873479",
+ "stored": true
+ },
+ "publishedAt": null,
+ "sources": [
+ {
+ "id": "34410724145",
+ "sha256": "c40cc39acd26f046f84b307d7f771ed38f28d96ba21860d6679bba7ba3e7cf29",
+ "sourceSha": "df5e5cd434ef262cac029925d8782e4290ea6d16",
+ "hardware": "",
+ "execution": "",
+ "observedAt": null,
+ "kind": "fidelity",
+ "observations": [],
+ "fidelity": "fail",
+ "calibration": "uncalibrated",
+ "releaseQualified": false,
+ "error": null
+ }
+ ],
+ "error": null
+ },
+ {
+ "id": "34410729828.10127190894",
+ "runId": "34410729828",
+ "artifact": {
+ "id": 10127190894,
+ "name": "h3-fidelity-34410729828-1",
+ "expired": false,
+ "size_in_bytes": 47585397,
+ "digest": "sha256:bb701c77431bb999181d74cb99e4d957da13a6ff45ba927c3f89cf5add49ef69",
+ "stored": true
+ },
+ "publishedAt": null,
+ "sources": [
+ {
+ "id": "34410729828",
+ "sha256": "c2f6a036328e4b90fa1b364b16ca10353baa7eb2fef2d71571a1ab1465fc5382",
+ "sourceSha": "df5e5cd434ef262cac029925d8782e4290ea6d16",
+ "hardware": "",
+ "execution": "",
+ "observedAt": null,
+ "kind": "fidelity",
+ "observations": [],
+ "fidelity": "fail",
+ "calibration": "uncalibrated",
+ "releaseQualified": false,
+ "error": null
+ }
+ ],
+ "error": null
+ }
+ ],
+ "nextPage": null
+}
diff --git a/packages/app/src/app/api/video-runs/route.test.ts b/packages/app/src/app/api/video-runs/route.test.ts
index ebaa13fc1..2b0a70ebd 100644
--- a/packages/app/src/app/api/video-runs/route.test.ts
+++ b/packages/app/src/app/api/video-runs/route.test.ts
@@ -2,6 +2,7 @@ import { NextRequest } from 'next/server';
import { afterEach, describe, expect, it, vi } from 'vitest';
import { GET } from './route';
import {
+ publishedVideoHistory,
readStoredArtifact,
storedArtifacts,
storeVideoArtifact,
@@ -10,6 +11,9 @@ import {
vi.mock('@/lib/video/video-storage', () => ({
videoStorageEnabled: vi.fn(() => false),
+ publishedVideoHistory: vi.fn(() =>
+ Promise.resolve({ schemaVersion: 1, entries: [], nextPage: null }),
+ ),
storedArtifacts: vi.fn(() => Promise.resolve([])),
readStoredArtifact: vi.fn(),
storeVideoArtifact: vi.fn(),
@@ -22,6 +26,7 @@ afterEach(() => {
fetchMock.mockReset();
vi.mocked(videoStorageEnabled).mockReturnValue(false);
vi.mocked(storedArtifacts).mockResolvedValue([]);
+ vi.mocked(publishedVideoHistory).mockClear();
vi.mocked(readStoredArtifact).mockReset();
vi.mocked(storeVideoArtifact).mockClear();
vi.unstubAllEnvs();
@@ -29,6 +34,15 @@ afterEach(() => {
});
describe('H3 CI artifact access', () => {
+ it('discovers old published results without scanning unrelated recent Actions or publishing', async () => {
+ fetchMock.mockResolvedValueOnce(response({ private: false }));
+ const result = await GET(request('?format=history&page=2'));
+ expect(await result.json()).toEqual({ schemaVersion: 1, entries: [], nextPage: null });
+ expect(publishedVideoHistory).toHaveBeenCalledWith(2);
+ expect(fetchMock).toHaveBeenCalledTimes(1);
+ expect(storeVideoArtifact).not.toHaveBeenCalled();
+ });
+
it('discovers benchmark runs without including branch-named unit jobs', async () => {
fetchMock.mockResolvedValueOnce(response({ private: false })).mockResolvedValueOnce(
response({
diff --git a/packages/app/src/app/api/video-runs/route.ts b/packages/app/src/app/api/video-runs/route.ts
index ba187eddc..87a4e89e2 100644
--- a/packages/app/src/app/api/video-runs/route.ts
+++ b/packages/app/src/app/api/video-runs/route.ts
@@ -6,7 +6,10 @@ import {
SITE_URL,
} from '@semianalysisai/inferencex-constants';
import { getGithubToken } from '@/lib/github/github-artifacts';
+import { loadFixture } from '@/lib/testing/test-fixtures';
+import type { VideoHistoryPage } from '@/components/video-benchmark/history';
import {
+ publishedVideoHistory,
readStoredArtifact,
storedArtifacts,
storeVideoArtifact,
@@ -38,13 +41,26 @@ export async function GET(request: NextRequest) {
const runId = query.get('run');
const artifactId = query.get('artifact');
const page = query.get('page') ?? '1';
+ const history = query.get('format') === 'history';
const publishedOnly = query.get('format') === 'published';
const media = query.get('format') === 'media' || publishedOnly;
- if ((runId && !id(runId)) || (artifactId && (!runId || !id(artifactId))) || !id(page))
+ if (
+ (runId && !id(runId)) ||
+ (artifactId && (!runId || !id(artifactId))) ||
+ !id(page) ||
+ (history && (runId || artifactId || !Number.isSafeInteger(Number(page))))
+ )
return NextResponse.json(
{ error: 'Invalid CI run, artifact or page' },
{ status: 400, headers },
);
+ if (history && process.env.E2E_FIXTURES === '1') {
+ const fixture = loadFixture('video-history');
+ return NextResponse.json(
+ Number(page) === 1 ? fixture : { schemaVersion: 1, entries: [], nextPage: null },
+ { headers: { ...headers, 'X-VideoGenX-Replay': '1' } },
+ );
+ }
const deadline = AbortSignal.timeout(270000);
try {
if (
@@ -54,6 +70,7 @@ export async function GET(request: NextRequest) {
) {
// Production checks repository visibility; local reads must never publish on a cache miss.
const url = new URL('/api/video-runs', SITE_URL);
+ if (history) url.searchParams.set('format', 'history');
if (runId) url.searchParams.set('run', runId);
if (artifactId) {
url.searchParams.set('artifact', artifactId);
@@ -82,9 +99,11 @@ export async function GET(request: NextRequest) {
)
throw new Error('Published artifact identity mismatch');
} else if (
- runId
- ? String(data.run?.id) !== runId || !Array.isArray(data.artifacts)
- : !Array.isArray(data.runs)
+ history
+ ? data.schemaVersion !== 1 || !Array.isArray(data.entries)
+ : runId
+ ? String(data.run?.id) !== runId || !Array.isArray(data.artifacts)
+ : !Array.isArray(data.runs)
) {
throw new Error('Published run identity mismatch');
}
@@ -99,6 +118,7 @@ export async function GET(request: NextRequest) {
{ error: 'Public H3 repository unavailable' },
{ status: 503, headers },
);
+ if (history) return NextResponse.json(await publishedVideoHistory(Number(page)), { headers });
if (artifactId) {
if (media && !videoStorageEnabled()) return new Response(null, { status: 204, headers });
if (media) {
@@ -207,7 +227,11 @@ export async function GET(request: NextRequest) {
);
} catch {
return NextResponse.json(
- { error: 'GitHub is unavailable; retry shortly' },
+ {
+ error: history
+ ? 'Published video history is unavailable; retry shortly'
+ : 'GitHub is unavailable; retry shortly',
+ },
{ status: 502, headers },
);
}
diff --git a/packages/app/src/components/video-benchmark/VideoCIRuns.tsx b/packages/app/src/components/video-benchmark/VideoCIRuns.tsx
index ac7ef99e0..ca08735a9 100644
--- a/packages/app/src/components/video-benchmark/VideoCIRuns.tsx
+++ b/packages/app/src/components/video-benchmark/VideoCIRuns.tsx
@@ -8,6 +8,7 @@ import { Skeleton } from '@/components/ui/skeleton';
import { Input } from '@/components/ui/input';
import { useLocale } from '@/lib/i18n/use-locale';
import VideoBenchmark from './VideoBenchmark';
+import VideoHistory from './VideoHistory';
import FidelityResults from './FidelityResults';
import VideoSelect from './VideoSelect';
import { servingCells } from './serving';
@@ -23,6 +24,7 @@ const STRINGS = {
title: 'H3 video benchmark',
results: 'Videos & result',
tradeoffs: 'Hardware tradeoffs',
+ history: 'Performance history',
view: 'Benchmark view',
preparing: 'Loading results and preparing media. The first publication of a run takes longer.',
downloading: 'Downloading CI archive',
@@ -53,6 +55,7 @@ const STRINGS = {
title: 'H3 视频基准测试',
results: '视频与结果',
tradeoffs: '硬件延迟与效率权衡',
+ history: '性能历史',
view: '基准测试视图',
preparing: '正在加载结果并准备媒体。首次发布该运行的产物需要更多时间。',
downloading: '正在下载 CI 产物',
@@ -92,9 +95,11 @@ function share(runId: number, artifactId?: number, source?: string, cell?: strin
const url = new URL(location.href);
const view = url.searchParams.get('view');
const comparison = url.searchParams.get('compare');
+ const historyFilters = [...url.searchParams].filter(([key]) => key.startsWith('history-'));
url.search = '';
- if (view === 'tradeoff') url.searchParams.set('view', view);
+ if (view === 'tradeoff' || view === 'history') url.searchParams.set('view', view);
if (comparison) url.searchParams.set('compare', comparison);
+ for (const [key, value] of historyFilters) url.searchParams.set(key, value);
url.searchParams.set('run', String(runId));
if (artifactId) url.searchParams.set('artifact', String(artifactId));
if (source) url.searchParams.set('source', source);
@@ -124,7 +129,7 @@ export default function VideoCIRuns() {
const [direct, setDirect] = useState('');
const [manual, setManual] = useState(false);
const [cellId, setCellId] = useState('');
- const [view, setView] = useState('results');
+ const [view, setView] = useState('');
const [compared, setCompared] = useState([]);
const [comparisonLoading, setComparisonLoading] = useState(false);
const [comparisonError, setComparisonError] = useState(false);
@@ -132,7 +137,7 @@ export default function VideoCIRuns() {
const changeView = (value: string) => {
setView(value);
const url = new URL(location.href);
- if (value === 'tradeoff') url.searchParams.set('view', 'tradeoff');
+ if (value === 'tradeoff' || value === 'history') url.searchParams.set('view', value);
else url.searchParams.delete('view');
history.replaceState(null, '', url);
};
@@ -399,12 +404,14 @@ export default function VideoCIRuns() {
}
useEffect(() => {
const params = new URLSearchParams(location.search);
- if (params.get('view') === 'tradeoff') setView('tradeoff');
+ const initialView = params.get('view') ?? (params.has('run') ? 'results' : 'history');
+ setView(['history', 'tradeoff'].includes(initialView) ? initialView : 'results');
if (params.has('compare')) void restoreComparison();
const directRun = params.get('run');
if (directRun)
void selectRun(directRun, params.get('artifact'), params.get('source'), params.get('cell'));
- else void list(1, true);
+ else if (initialView === 'results') void list(1, true);
+
return () => {
request.current++;
download.current?.abort();
@@ -415,7 +422,7 @@ export default function VideoCIRuns() {
const selectedSource = sources.find((item) => item.id === sourceId);
return (
-
+
{s.title}
@@ -560,10 +567,20 @@ export default function VideoCIRuns() {
changeView('results')}
+ onClick={() => {
+ changeView('results');
+ if (!run) void list(1, true);
+ }}
>
{s.results}
+ changeView('history')}
+ >
+ {s.history}
+
+ {view === 'history' && (
+ {
+ changeView('results');
+ void selectRun(runId, artifactId, source, cell);
+ }}
+ />
+ )}
{comparisonLoading && (
diff --git a/packages/app/src/components/video-benchmark/VideoHistory.tsx b/packages/app/src/components/video-benchmark/VideoHistory.tsx
new file mode 100644
index 000000000..f61eb103a
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoHistory.tsx
@@ -0,0 +1,399 @@
+'use client';
+
+import { useEffect, useState } from 'react';
+import { Button } from '@/components/ui/button';
+import { Card } from '@/components/ui/card';
+import { Heading } from '@/components/ui/heading';
+import { Input } from '@/components/ui/input';
+import { useLocale } from '@/lib/i18n/use-locale';
+import { track } from '@/lib/analytics/analytics';
+import VideoSelect from './VideoSelect';
+import type { VideoHistoryEntry, VideoHistoryPage } from './history';
+
+const STRINGS = {
+ en: {
+ title: 'Performance history',
+ intro:
+ 'Published H3 results, including older runs. Each entry keeps its original execution and artifact identity.',
+ note: 'Recorded observations only; no matched version baseline has been selected. Media validity does not establish perceptual quality or serving capacity.',
+ order:
+ 'Newest publication first. Execution time is shown separately; re-exporting a result does not make it a new measurement.',
+ loading: 'Loading published results…',
+ error: 'Could not load published history.',
+ retry: 'Retry',
+ older: 'More published results',
+ empty: 'No matching entries among the loaded results.',
+ loaded: 'Filters apply to loaded entries. Load more published results to search older pages.',
+ all: 'All',
+ hardware: 'Hardware',
+ concurrency: 'Client concurrency',
+ workload: 'Search workload or runtime',
+ published: 'Published',
+ execution: 'Original execution',
+ source: 'Source run',
+ sourceSha: 'Source SHA',
+ exporter: 'Artifact run',
+ observation: 'Recorded observation',
+ fidelity: 'Paired fidelity',
+ calibration: 'Calibration',
+ qualification: 'Release qualification',
+ no: 'Not qualified',
+ yes: 'Qualified by recorded policy',
+ unavailable: 'Unavailable',
+ details: 'Evidence and limitations',
+ counts: 'Valid / completed / scheduled',
+ failed: 'Failed',
+ latency: 'Client-ready latency (s)',
+ p50: 'P50',
+ p90: 'P90',
+ throughput: 'Valid clips / GPU-hour',
+ energy: 'GPU-board kJ / valid clip',
+ status: 'Execution',
+ open: 'Open result',
+ missing:
+ '— means unavailable, invalid or insufficient samples. P90 requires at least 10 valid samples per cell.',
+ metricNote:
+ 'Latency and throughput cover submission to downloaded media. Energy uses the recorded generation window and participating GPU boards; lower is better. Failed attempts remain in the recorded measurement window.',
+ samples: 'Valid latency samples',
+ replay: 'Retained-data replay for local verification; no new measurements or publication.',
+ },
+ zh: {
+ title: '性能历史',
+ intro: '查看已发布的 H3 结果,包括较早运行;每条记录保留原始执行与产物标识。',
+ note: '当前仅展示观测值,尚未选择匹配的版本基线。媒体有效性不代表感知质量或服务容量已通过验收。',
+ order: '按发布时间从新到旧排列。执行时间单独列出;重新导出不代表重新测量。',
+ loading: '正在加载已发布结果…',
+ error: '无法加载性能历史。',
+ retry: '重试',
+ older: '更多已发布结果',
+ empty: '已加载的结果中暂无匹配记录。',
+ loaded: '筛选仅作用于已加载的记录;查看更早页面请加载更多已发布结果。',
+ all: '全部',
+ hardware: '硬件',
+ concurrency: '客户端并发数',
+ workload: '搜索工作负载或运行时版本',
+ published: '发布时间',
+ execution: '原始执行时间',
+ source: '原始运行',
+ sourceSha: '源码 SHA',
+ exporter: '产物运行',
+ observation: '观测记录',
+ fidelity: '成对保真度',
+ calibration: '阈值校准',
+ qualification: '发布验收',
+ no: '未经验证',
+ yes: '已按记录策略通过',
+ unavailable: '无数据',
+ details: '证据与局限',
+ counts: '有效 / 已完成 / 计划',
+ failed: '失败',
+ latency: '客户端就绪延迟(秒)',
+ p50: 'P50',
+ p90: 'P90',
+ throughput: '有效视频数 / GPU 小时',
+ energy: '每有效视频 GPU 板卡能耗(kJ)',
+ status: '执行状态',
+ open: '打开结果',
+ missing: '— 表示无数据、数据无效或样本不足。每个配置至少有 10 个有效样本才显示 P90。',
+ metricNote:
+ '延迟与吞吐量涵盖提交到媒体下载完成。能耗使用记录的生成时间窗口,按参与计算的 GPU 板卡统计,越低越好;失败尝试的耗时仍计入对应测量窗口。',
+ samples: '有效延迟样本数',
+ replay: '本地验证使用保留数据回放,未重新测量或发布。',
+ },
+};
+const STATUS: Record = {
+ complete: { en: 'Complete', zh: '已完成' },
+ completed: { en: 'Complete', zh: '已完成' },
+ running: { en: 'Running', zh: '运行中' },
+ not_started: { en: 'Not started', zh: '未开始' },
+ interrupted: { en: 'Interrupted', zh: '已中断' },
+ failed: { en: 'Failed', zh: '失败' },
+ fail: { en: 'Failed', zh: '未通过' },
+ pass: { en: 'Passed', zh: '已通过' },
+ inconclusive: { en: 'Inconclusive', zh: '无法判定' },
+ uncalibrated: { en: 'Uncalibrated', zh: '未校准' },
+ calibrated: { en: 'Calibrated', zh: '已校准' },
+};
+const fmt = (value: number | null) =>
+ value === null ? '—' : value.toLocaleString('en-US', { maximumFractionDigits: 3 });
+const date = (value: string | null) =>
+ value ? `${value.slice(0, 10)} ${value.slice(11, 16)} UTC` : '—';
+
+const filter = (key: string, value: string, setter: (value: string) => void) => {
+ setter(value);
+ const url = new URL(location.href);
+ if (value) url.searchParams.set(`history-${key}`, value);
+ else url.searchParams.delete(`history-${key}`);
+ history.replaceState(null, '', url);
+ track('video_history_filter_changed', { filter: key });
+};
+
+export default function VideoHistory({
+ onOpen,
+}: {
+ onOpen: (run: string, artifact: string, source?: string, cell?: string) => void;
+}) {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const status = (value: string | null) =>
+ value ? (STATUS[value]?.[locale] ?? value) : s.unavailable;
+ const [entries, setEntries] = useState([]);
+ const [nextPage, setNextPage] = useState(1);
+ const [loading, setLoading] = useState(false);
+ const [error, setError] = useState(false);
+ const [replay, setReplay] = useState(false);
+ const [hardware, setHardware] = useState('');
+ const [concurrency, setConcurrency] = useState('');
+ const [query, setQuery] = useState('');
+ async function load(page: number, signal?: AbortSignal) {
+ setLoading(true);
+ setError(false);
+ try {
+ const response = await fetch(`/api/video-runs?format=history&page=${page}`, {
+ signal,
+ cache: 'no-store',
+ });
+ const data: VideoHistoryPage = await response.json();
+ if (!response.ok || data.schemaVersion !== 1 || !Array.isArray(data.entries))
+ throw new Error('History unavailable');
+ if (signal?.aborted) return;
+ setEntries((old) =>
+ page === 1
+ ? data.entries
+ : [...old, ...data.entries.filter((entry) => !old.some((item) => item.id === entry.id))],
+ );
+ setNextPage(data.nextPage);
+ setReplay(response.headers.get('x-videogenx-replay') === '1');
+ } catch {
+ if (!signal?.aborted) setError(true);
+ } finally {
+ if (!signal?.aborted) setLoading(false);
+ }
+ }
+ useEffect(() => {
+ const params = new URLSearchParams(location.search);
+ setHardware(params.get('history-hardware') ?? '');
+ setConcurrency(params.get('history-concurrency') ?? '');
+ setQuery(params.get('history-query') ?? '');
+ const controller = new AbortController();
+ void load(1, controller.signal);
+ return () => controller.abort();
+ }, []);
+ const observations = entries.flatMap((entry) =>
+ entry.sources.flatMap((source) => source.observations),
+ );
+ const visible = entries.flatMap((entry) => {
+ const sources = entry.sources.flatMap((source) => {
+ const selected = source.observations.filter(
+ (point) =>
+ (!hardware || point.hardware === hardware) &&
+ (!concurrency || String(point.concurrency) === concurrency) &&
+ (!query ||
+ `${point.workload} ${point.runtime}`.toLowerCase().includes(query.toLowerCase())),
+ );
+ return selected.length > 0 ||
+ (source.observations.length === 0 && !hardware && !concurrency && !query)
+ ? [{ ...source, observations: selected }]
+ : [];
+ });
+ return sources.length > 0 || (entry.error && !hardware && !concurrency && !query)
+ ? [{ ...entry, sources }]
+ : [];
+ });
+ return (
+
+
+
+ {s.title}
+
+
{s.intro}
+
{s.order}
+ {replay && (
+
+ {s.replay}
+
+ )}
+
+
+ filter('hardware', value === 'all' ? '' : value, setHardware)}
+ options={[
+ { value: 'all', label: s.all },
+ ...[...new Set(observations.map((point) => point.hardware).filter(Boolean))]
+ .sort()
+ .map((value) => ({ value, label: value })),
+ ]}
+ />
+
+ filter('concurrency', value === 'all' ? '' : value, setConcurrency)
+ }
+ options={[
+ { value: 'all', label: s.all },
+ ...[
+ ...new Set(
+ observations.map((point) => point.concurrency).filter((value) => value !== null),
+ ),
+ ]
+ .sort((a, b) => a - b)
+ .map((value) => ({ value: String(value), label: `C${value}` })),
+ ]}
+ />
+
+ {s.workload}
+ filter('query', event.target.value, setQuery)}
+ />
+
+
+ {s.loaded}
+ {s.note}
+ {!loading && !error && visible.length === 0 && {s.empty}
}
+ {visible.map((entry) => (
+
+
+ {entry.error && {entry.error}
}
+ {entry.sources.map((source) => (
+
+
+
+
{source.kind === 'fidelity' ? s.fidelity : s.observation} ·{' '}
+ {s.source} #{source.id}
+ {source.hardware && ` · ${source.hardware}`}
+
+ {s.execution}: {date(source.observedAt)}
+
+
+
onOpen(entry.runId, String(entry.artifact.id), source.id)}
+ >
+ {s.open}
+
+
+
+ {s.status}: {status(source.execution)} · {s.fidelity}: {status(source.fidelity)} ·{' '}
+ {s.calibration}: {status(source.calibration)} · {s.qualification}:{' '}
+ {source.releaseQualified === null
+ ? s.unavailable
+ : source.releaseQualified
+ ? s.yes
+ : s.no}
+
+ {source.error && (
+
+ {source.error}
+
+ )}
+ {source.observations.length > 0 && (
+
+
+
+
+ {s.hardware} / C
+ {s.counts}
+ {s.status}
+
+ {s.latency}
+
+ {s.p50} / {s.p90}
+
+ {s.throughput}
+ {s.energy}
+
+
+
+ {source.observations.map((point) => (
+
+
+
+ onOpen(
+ entry.runId,
+ String(entry.artifact.id),
+ source.id,
+ point.cell ?? undefined,
+ )
+ }
+ >
+ {point.hardware || s.unavailable} · C{point.concurrency ?? '—'}
+
+
+ {point.runtime.slice(0, 12) || '—'}
+
+
+
+ {fmt(point.valid)} / {fmt(point.completed)} / {fmt(point.scheduled)}
+
+ {s.failed}: {fmt(point.failed)}
+
+
+ {status(point.status)}
+
+ {fmt(point.p50)} / {fmt(point.p90)}
+ n={point.samples}
+
+ {fmt(point.clipsGpuHour)}
+ {fmt(point.energyKj)}
+
+ ))}
+
+
+
+ )}
+
+ {s.details}
+
+
{s.missing}
+
{s.metricNote}
+
{source.observations[0]?.workload}
+
+ {s.sourceSha}: {source.sourceSha || '—'}
+
+
SHA256: {source.sha256 ?? '—'}
+
+
+
+ ))}
+
+ ))}
+ {loading && {s.loading}
}
+ {error && (
+
+
{s.error}
+
void load(nextPage ?? 1)}>
+ {s.retry}
+
+
+ )}
+ {nextPage && !loading && !error && (
+ void load(nextPage)}>
+ {s.older}
+
+ )}
+
+ );
+}
diff --git a/packages/app/src/components/video-benchmark/history.test.ts b/packages/app/src/components/video-benchmark/history.test.ts
new file mode 100644
index 000000000..58b770230
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/history.test.ts
@@ -0,0 +1,86 @@
+import { describe, expect, it } from 'vitest';
+import { servingFixture } from './serving.fixture';
+import { at, entries } from './bundle';
+import { videoHistoryEntry } from './history';
+import type { StoredArtifact } from './stored';
+
+function saved(): StoredArtifact {
+ const fixture = servingFixture();
+ fixture.documents.set('manifest.json', fixture.manifest);
+ fixture.documents.set('ci.json', {
+ ...Object.fromEntries(entries(fixture.ci)),
+ started_at: '2026-09-09T01:00:00Z',
+ release_qualified: false,
+ });
+ fixture.checksums.set('manifest.json', 'a'.repeat(64));
+ return {
+ storageVersion: 1,
+ runId: '123',
+ artifact: { id: 40, name: 'h3-video-123-1', expired: false, size_in_bytes: 100 },
+ sources: [
+ {
+ id: '123',
+ documents: [...fixture.documents],
+ checksums: [...fixture.checksums],
+ assets: [],
+ texts: [],
+ },
+ ],
+ };
+}
+describe('video history projection', () => {
+ it('groups concurrency cells under their original source without promoting smoke to qualification', () => {
+ const entry = videoHistoryEntry(saved(), '2026-09-12T00:00:00Z');
+ expect(entry.id).toBe('123.40');
+ expect(entry.sources).toHaveLength(1);
+ const source = entry.sources[0];
+ expect(source.observedAt).toBe('2026-09-09T01:00:00Z');
+ expect(source.releaseQualified).toBe(false);
+ expect(
+ source.observations.map((point) => [
+ point.concurrency,
+ point.p50,
+ point.p90,
+ point.clipsGpuHour,
+ point.energyKj,
+ ]),
+ ).toEqual([
+ [1, 120, null, 15, 168],
+ [2, 240, null, 15, 168],
+ [4, 300, null, 15, 168],
+ ]);
+ });
+ it('preserves failed cells and null power without inventing zero-valued performance', () => {
+ const artifact = saved();
+ const source = artifact.sources[0];
+ const docs = new Map(source.documents);
+ const matrix = docs.get('serving-smoke.json');
+ const cell = at(matrix, 'cells', 2);
+ Object.assign(cell!, {
+ verified: false,
+ status: 'failed',
+ run: null,
+ receipt: null,
+ power: null,
+ });
+ const entry = videoHistoryEntry(artifact, null);
+ expect(entry.sources[0].error).toBeNull();
+ expect(entry.sources[0].observations[2]).toMatchObject({
+ status: 'failed',
+ p50: null,
+ p90: null,
+ clipsGpuHour: null,
+ energyKj: null,
+ });
+ });
+ it('retains source provenance and failure when a new artifact contract is unsupported', () => {
+ const artifact = saved();
+ const matrix = new Map(artifact.sources[0].documents).get('serving-smoke.json');
+ Object.assign(matrix!, { schema_version: '9.0.0' });
+ const source = videoHistoryEntry(artifact, null).sources[0];
+ expect(source.error).toContain('unsupported matrix contract');
+ expect(source.observations).toEqual([]);
+ expect(source.observedAt).toBe('2026-09-09T01:00:00Z');
+ expect(source.sourceSha).toBe('c'.repeat(40));
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/history.ts b/packages/app/src/components/video-benchmark/history.ts
new file mode 100644
index 000000000..fac1eef34
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/history.ts
@@ -0,0 +1,146 @@
+import { at, number, text } from './bundle';
+import type { CIArtifact } from './archive';
+import { storedBundle, storedFidelityBundle, type StoredArtifact } from './stored';
+import { servingCells } from './serving';
+import { efficiencyValue, latencyValue, tradeoffPoints } from './tradeoff';
+
+export interface VideoHistoryObservation {
+ id: string;
+ cell: string | null;
+ hardware: string;
+ concurrency: number | null;
+ runtime: string;
+ workload: string;
+ model: string;
+ status: string;
+ valid: number | null;
+ completed: number | null;
+ scheduled: number | null;
+ failed: number | null;
+ samples: number;
+ p50: number | null;
+ p90: number | null;
+ clipsGpuHour: number | null;
+ energyKj: number | null;
+}
+export interface VideoHistorySource {
+ id: string;
+ sha256: string | null;
+ sourceSha: string;
+ hardware: string;
+ execution: string;
+ observedAt: string | null;
+ kind: 'observation' | 'fidelity';
+ observations: VideoHistoryObservation[];
+ fidelity: string | null;
+ calibration: string | null;
+ releaseQualified: boolean | null;
+ error: string | null;
+}
+export interface VideoHistoryEntry {
+ id: string;
+ runId: string;
+ artifact: CIArtifact;
+ publishedAt: string | null;
+ sources: VideoHistorySource[];
+ error: string | null;
+}
+export interface VideoHistoryPage {
+ schemaVersion: 1;
+ entries: VideoHistoryEntry[];
+ nextPage: number | null;
+}
+
+/** A read-only projection of published H3 artifacts, not a new benchmark result contract. */
+export function videoHistoryEntry(
+ saved: StoredArtifact,
+ publishedAt: string | null,
+): VideoHistoryEntry {
+ const sources = saved.sources.map((source): VideoHistorySource => {
+ const result: VideoHistorySource = {
+ id: source.id,
+ sha256: null,
+ sourceSha: '',
+ hardware: '',
+ execution: '',
+ observedAt: null,
+ kind: source.kind === 'fidelity' ? 'fidelity' : 'observation',
+ observations: [],
+ fidelity: null,
+ calibration: null,
+ releaseQualified: null,
+ error: null,
+ };
+ try {
+ if (source.kind === 'fidelity') {
+ const bundle = storedFidelityBundle(source);
+ const comparison = bundle.comparison;
+ result.sha256 = bundle.comparisonSha256;
+ result.sourceSha = text(at(comparison, 'producer', 'git_commit'));
+ result.fidelity = text(at(comparison, 'overall_status')) || null;
+ result.calibration = text(at(comparison, 'policy', 'calibration_status')) || null;
+ const qualified = at(comparison, 'release_qualified');
+ result.releaseQualified = typeof qualified === 'boolean' ? qualified : null;
+ } else {
+ const bundle = storedBundle(source);
+ result.sha256 = bundle.manifestSha256;
+ result.sourceSha = text(at(bundle.manifest, 'git_commit'));
+ result.observedAt = text(at(bundle.ci, 'started_at')) || null;
+ result.hardware = text(at(bundle.ci, 'site', 'gpu_model'));
+ result.execution = text(at(bundle.ci, 'phase'));
+ result.fidelity = text(at(bundle.result, 'paired_fidelity', 'overall_status')) || null;
+ result.calibration =
+ text(at(bundle.result, 'policy', 'calibration_status')) ||
+ text(at(bundle.report, 'policy', 'calibration_status')) ||
+ null;
+ const qualified = at(bundle.ci, 'release_qualified');
+ result.releaseQualified = typeof qualified === 'boolean' ? qualified : null;
+ const cells = servingCells(bundle);
+ result.observations = tradeoffPoints({
+ bundle,
+ exportRun: saved.runId,
+ artifact: String(saved.artifact.id),
+ }).map((point) => {
+ const cell = cells.find((item) => item.id === point.cellId);
+ return {
+ id: point.id,
+ cell: point.cellId ?? null,
+ hardware: point.hardware || text(at(bundle.ci, 'site', 'gpu_model')),
+ concurrency: point.concurrency,
+ runtime: point.revision,
+ workload: point.workloadLabel,
+ model: point.model,
+ status: cell ? text(at(cell.cell, 'status')) : text(at(bundle.ci, 'phase')),
+ valid: point.valid,
+ completed: point.completed,
+ scheduled: point.scheduled ?? number(at(cell?.cell, 'completion', 'scheduled')),
+ failed: point.failed ?? number(at(cell?.cell, 'completion', 'failed')),
+ samples: point.latencies.length,
+ p50: latencyValue(point, 'median'),
+ p90: latencyValue(point, 'p90'),
+ clipsGpuHour: efficiencyValue(point, 'clipsGpu'),
+ energyKj: point.energy === null ? null : point.energy / 1000,
+ };
+ });
+ }
+ } catch (error) {
+ result.error = error instanceof Error ? error.message : String(error);
+ }
+ return result;
+ });
+ return {
+ id: `${saved.runId}.${saved.artifact.id}`,
+ runId: saved.runId,
+ artifact: {
+ id: saved.artifact.id,
+ name: saved.artifact.name,
+ expired: saved.artifact.expired,
+ size_in_bytes: saved.artifact.size_in_bytes,
+ digest: saved.artifact.digest,
+ stored: true,
+ },
+ publishedAt,
+ sources,
+ error: sources.length === 0 ? 'Published artifact has no sources' : null,
+ };
+}
diff --git a/packages/app/src/lib/api/api-route-catalog.ts b/packages/app/src/lib/api/api-route-catalog.ts
index ea0b8e0a6..e50f1f8ea 100644
--- a/packages/app/src/lib/api/api-route-catalog.ts
+++ b/packages/app/src/lib/api/api-route-catalog.ts
@@ -615,10 +615,10 @@ export const apiRouteCatalog = [
method: 'GET',
classification: 'ui-artifact-read',
exclusionReason: {
- en: 'Hidden H3 viewer transport for live public CI runs and checksum-verified artifact ZIPs; uses the backend result contract rather than a published data API.',
- zh: '供隐藏的 H3 查看器实时读取公开 CI 运行及校验和已验证的产物 ZIP;依赖后端结果契约,不作为公开数据 API 发布。',
+ en: 'Hidden H3 viewer transport for live public CI runs, checksum-verified artifact ZIPs, and read-only published history (format=history). History projects existing immutable indexes without publishing media; these UI contracts are not a public data API.',
+ zh: '供隐藏的 H3 查看器读取公开 CI 运行、校验和已验证的产物 ZIP,以及只读的已发布历史(format=history)。历史视图从既有不可变索引生成,不发布媒体;这些界面契约不作为公开数据 API。',
},
- sourceSha256: '74f786c85bf1289a2b4ca50e7ea240a71d775ee6dd62558461bbb0dec8ec2ca3',
+ sourceSha256: '0ae586743620bbd78125d9a5326d132b51258d73cab6bbb91f59df13440ac52b',
},
{
source: 'src/app/api/unofficial-run/route.ts',
diff --git a/packages/app/src/lib/video/video-storage.test.ts b/packages/app/src/lib/video/video-storage.test.ts
index 0f53dacee..62a7c32a3 100644
--- a/packages/app/src/lib/video/video-storage.test.ts
+++ b/packages/app/src/lib/video/video-storage.test.ts
@@ -1,14 +1,15 @@
import { createHash } from 'node:crypto';
import { strToU8, zipSync } from 'fflate';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
-import { head, put } from '@vercel/blob';
+import { head, put, list } from '@vercel/blob';
import type * as BlobSdk from '@vercel/blob';
-import { readStoredArtifact, storeVideoArtifact } from './video-storage';
+import { publishedVideoHistory, readStoredArtifact, storeVideoArtifact } from './video-storage';
import { storedBundle, storedFidelityBundle } from '@/components/video-benchmark/stored';
import { fidelityFixture } from '@/components/video-benchmark/fidelity.fixture';
vi.mock('@vercel/blob', async (original) => ({
...(await original()),
+ list: vi.fn(),
head: vi.fn((path: string) =>
Promise.resolve({
url: `https://test.public.blob.vercel-storage.com/${path}`,
@@ -251,3 +252,53 @@ describe('persistent H3 media', () => {
expect(put).not.toHaveBeenCalled();
});
});
+
+const blob = (id: number) => ({
+ pathname: `h3-video-media/v1/runs/${id}/h3-video-${id}-1_${id}.json`,
+ url: `https://test.public.blob.vercel-storage.com/${id}`,
+ downloadUrl: '',
+ size: 1,
+ etag: 'synthetic',
+ uploadedAt: new Date(`2026-09-${String(id).padStart(2, '0')}T00:00:00Z`),
+});
+
+describe('published video history catalog', () => {
+ it('lists every index page, orders by publication date, and reads only ten indexes without media writes', async () => {
+ vi.stubEnv('BLOB_READ_WRITE_TOKEN', 'synthetic-test-token');
+ vi.mocked(list)
+ .mockResolvedValueOnce({ blobs: [blob(1)], hasMore: true, cursor: 'next' })
+ .mockResolvedValueOnce({
+ blobs: Array.from({ length: 11 }, (_, i) => blob(12 - i)),
+ hasMore: false,
+ cursor: undefined,
+ });
+ const fetcher = vi.spyOn(globalThis, 'fetch').mockImplementation((url) => {
+ const id = String(url).split('/').at(-1)!;
+ return Promise.resolve(
+ Response.json({
+ storageVersion: 1,
+ runId: id,
+ artifact: { id: Number(id), name: `h3-video-${id}-1`, expired: false, size_in_bytes: 1 },
+ sources: [],
+ }),
+ );
+ });
+ const page = await publishedVideoHistory(1);
+ expect(page.entries.map((entry) => entry.runId)).toEqual([
+ '12',
+ '11',
+ '10',
+ '9',
+ '8',
+ '7',
+ '6',
+ '5',
+ '4',
+ '3',
+ ]);
+ expect(page.nextPage).toBe(2);
+ expect(fetcher).toHaveBeenCalledTimes(10);
+ expect(list).toHaveBeenLastCalledWith({ prefix: 'h3-video-media/v1/runs/', cursor: 'next' });
+ expect(put).not.toHaveBeenCalled();
+ });
+});
diff --git a/packages/app/src/lib/video/video-storage.ts b/packages/app/src/lib/video/video-storage.ts
index 624d43696..8a5e5ab05 100644
--- a/packages/app/src/lib/video/video-storage.ts
+++ b/packages/app/src/lib/video/video-storage.ts
@@ -16,6 +16,11 @@ import {
type StoredSource,
} from '@/components/video-benchmark/stored';
import { servingCells } from '@/components/video-benchmark/serving';
+import {
+ videoHistoryEntry,
+ type VideoHistoryEntry,
+ type VideoHistoryPage,
+} from '@/components/video-benchmark/history';
// Media must survive the dashboard cache's prefix-wide purge.
const PREFIX = 'h3-video-media/v1';
@@ -243,3 +248,55 @@ export async function storeVideoArtifact(
);
return result;
}
+
+/** Read existing immutable indexes only. This path never uploads an artifact or media. */
+export async function publishedVideoHistory(page: number): Promise {
+ if (!videoStorageEnabled()) return { schemaVersion: 1, entries: [], nextPage: null };
+ const indexes: { runId: string; artifact: CIArtifact; publishedAt: string }[] = [];
+ let cursor: string | undefined;
+ // ponytail: scan index metadata; add a materialized catalog if the published inventory grows large.
+ do {
+ const batch = await list({ prefix: `${PREFIX}/runs/`, cursor });
+ for (const blob of batch.blobs) {
+ const match =
+ /^h3-video-media\/v1\/runs\/(?[1-9]\d*)\/(?h3-(?:results|video|fidelity)-(?[1-9]\d*)-[1-9]\d*)_(?[1-9]\d*)\.json$/u.exec(
+ blob.pathname,
+ )?.groups;
+ if (!match || match.run !== match.producer) continue;
+ indexes.push({
+ runId: match.run,
+ publishedAt: blob.uploadedAt.toISOString(),
+ artifact: {
+ id: Number(match.artifact),
+ name: match.name,
+ expired: false,
+ size_in_bytes: 0,
+ stored: true,
+ indexUrl: blob.url,
+ },
+ });
+ }
+ cursor = batch.hasMore ? batch.cursor : undefined;
+ } while (cursor);
+ indexes.sort(
+ (a, b) => b.publishedAt.localeCompare(a.publishedAt) || b.artifact.id - a.artifact.id,
+ );
+ const size = 10;
+ const entries = await Promise.all(
+ indexes.slice((page - 1) * size, page * size).map(async (index): Promise => {
+ try {
+ const saved = await readStoredArtifact(index.runId, index.artifact);
+ if (!saved) throw new Error('Published artifact unavailable');
+ return videoHistoryEntry(saved, index.publishedAt);
+ } catch (error) {
+ return {
+ id: `${index.runId}.${index.artifact.id}`,
+ ...index,
+ sources: [],
+ error: error instanceof Error ? error.message : String(error),
+ };
+ }
+ }),
+ );
+ return { schemaVersion: 1, entries, nextPage: page * size < indexes.length ? page + 1 : null };
+}
From 25299d4b27e2b565fc86c5f9c5ab9f0f640ec369 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Tue, 15 Sep 2026 19:03:50 -0700
Subject: [PATCH 049/104] fix: open published H3 results from the video tab
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Open the first readable published artifact when Results has no selection.
Preserve the selected run, artifact, source and cell across refresh, retry
and reload, and cancel stale selection when returning to History.
中文:修复视频页的已发布 H3 结果入口。
未选择运行时读取已发布产物;刷新、重试和重新加载时保留运行、
产物、原始运行和并发配置,返回性能历史时取消过期选择。
---
docs/video-history.md | 4 +-
packages/app/component-timings.json | 54 ++++++
.../cypress/component/video-ci-runs.cy.tsx | 11 +-
.../component/video-results-navigation.cy.tsx | 165 ++++++++++++++++++
packages/app/cypress/e2e/navigation.cy.ts | 31 ++++
.../video-benchmark/VideoCIRuns.tsx | 106 +++++++++--
6 files changed, 349 insertions(+), 22 deletions(-)
create mode 100644 packages/app/cypress/component/video-results-navigation.cy.tsx
diff --git a/docs/video-history.md b/docs/video-history.md
index 0240ea047..c3a86e9a5 100644
--- a/docs/video-history.md
+++ b/docs/video-history.md
@@ -1,6 +1,6 @@
# Video performance history
-`/video` and `/zh/video` default to **Performance history**. Explicit run/artifact/source/cell URLs retain the existing video viewer. `?view=results` opens the CI browser; `?view=history` restores history. History filters use `history-hardware`, `history-concurrency`, and `history-query` in the URL.
+`/video` and `/zh/video` default to **Performance history**. Explicit run/artifact/source/cell URLs retain the existing video viewer. `?view=results` opens the first readable artifact/source from the newest published page; `?view=history` restores history. History filters use `history-hardware`, `history-concurrency`, and `history-query` in the URL. Videos & result follows the same published-first path when no run is selected; empty or failed reads show a recoverable message. Browse CI runs explicitly opens legacy Actions discovery. Returning to History cancels pending result selection; Refresh and reload preserve the selected artifact/source/cell.
## Read path
@@ -22,7 +22,7 @@ The projection groups all cells under the original source inside one artifact en
## 中文说明
-`/video` 与 `/zh/video` 默认打开“性能历史”。原有 run/artifact/source/cell 链接仍打开对应结果;`?view=results` 进入 CI 浏览器。历史筛选条件保存在 URL,刷新后恢复。
+`/video` 与 `/zh/video` 默认打开“性能历史”。原有 run/artifact/source/cell 链接仍打开对应结果;`?view=results` 打开最新发布页面中首个可读取的产物与原始运行;未选择运行时,“视频与结果”也使用该入口。空列表或读取失败会显示可恢复的提示;只有点击“浏览 CI 运行”才扫描 GitHub Actions。返回性能历史会取消正在进行的结果选择;刷新和重新加载保留产物、原始运行及并发配置。历史筛选条件保存在 URL,刷新后恢复。
历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。
diff --git a/packages/app/component-timings.json b/packages/app/component-timings.json
index 943d5cdd4..c7ffc5df7 100644
--- a/packages/app/component-timings.json
+++ b/packages/app/component-timings.json
@@ -3631,6 +3631,60 @@
}
]
},
+ {
+ "spec": "cypress/component/video-results-navigation.cy.tsx",
+ "duration": 1708,
+ "tests": [
+ {
+ "title": [
+ "Published video result navigation",
+ "opens published videos from History when recent Actions contain no H3 runs"
+ ],
+ "duration": 359,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Published video result navigation",
+ "shows the Chinese published empty state and scans CI only after an explicit request"
+ ],
+ "duration": 473,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Published video result navigation",
+ "retries a failed published read and skips unreadable sources without scanning CI"
+ ],
+ "duration": 136,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Published video result navigation",
+ "does not select a stale published response after returning to History"
+ ],
+ "duration": 148,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Published video result navigation",
+ "retries the shared C4 selection after a refresh metadata failure"
+ ],
+ "duration": 311,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Published video result navigation",
+ "resumes the selected artifact when media loading was cancelled by returning to History"
+ ],
+ "duration": 250,
+ "attempts": 1
+ }
+ ]
+ },
{
"spec": "cypress/component/video-serving-results.cy.tsx",
"duration": 2301,
diff --git a/packages/app/cypress/component/video-ci-runs.cy.tsx b/packages/app/cypress/component/video-ci-runs.cy.tsx
index f6d9d9f72..86d176e78 100644
--- a/packages/app/cypress/component/video-ci-runs.cy.tsx
+++ b/packages/app/cypress/component/video-ci-runs.cy.tsx
@@ -8,6 +8,11 @@ import { servingArtifact, videoRun as run } from '../support/video-artifacts';
describe('H3 automatic CI viewer (synthetic API fixtures)', () => {
beforeEach(() => {
cy.intercept('GET', '**/api/video-runs*format=media', { statusCode: 204 });
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', {
+ schemaVersion: 1,
+ entries: [],
+ nextPage: null,
+ });
cy.window().then((win) =>
win.history.replaceState(null, '', `${win.location.pathname}?view=results`),
);
@@ -108,7 +113,7 @@ describe('H3 automatic CI viewer (synthetic API fixtures)', () => {
cy.get('[role="listbox"]').should('not.exist');
cy.get('[role="combobox"]').should('have.focus');
});
- it('loads the newest run automatically and switches to a failed run without inventing media', () => {
+ it('browses CI runs explicitly and switches to a failed run without inventing media', () => {
cy.intercept('GET', '/api/video-runs?page=1', {
runs: [run(20, 'success'), run(10, 'failure')],
nextPage: null,
@@ -124,6 +129,7 @@ describe('H3 automatic CI viewer (synthetic API fixtures)', () => {
,
);
+ cy.contains('button', 'Browse CI runs').click();
cy.wait('@latest');
cy.contains('No result artifact for this run yet').should('be.visible');
cy.get('[role="combobox"][aria-label="CI run"]').click();
@@ -282,6 +288,7 @@ describe('H3 automatic CI viewer (synthetic API fixtures)', () => {
,
);
+ cy.contains('button', 'Browse CI runs').click();
cy.wrap(null).should(() => expect(releaseList).to.be.a('function'));
cy.contains('summary', 'Run details and artifact selection').click();
cy.get('input[aria-label="GitHub run ID"]').type('30');
@@ -353,6 +360,7 @@ describe('H3 automatic CI viewer (synthetic API fixtures)', () => {
,
);
+ cy.contains('button', 'Browse CI runs').click();
cy.get('[data-testid="result-summary"]')
.should('contain', 'Media stored for direct playback')
.and('contain', 'uncalibrated');
@@ -466,6 +474,7 @@ describe('H3 automatic CI viewer (synthetic API fixtures)', () => {
,
);
+ cy.contains('button', 'Browse CI runs').click();
cy.get('[role="alert"]').should('contain', 'Expired');
cy.get('video').should('not.exist');
cy.get('[role="combobox"][aria-label="Result artifact"]').should(
diff --git a/packages/app/cypress/component/video-results-navigation.cy.tsx b/packages/app/cypress/component/video-results-navigation.cy.tsx
new file mode 100644
index 000000000..d996c7360
--- /dev/null
+++ b/packages/app/cypress/component/video-results-navigation.cy.tsx
@@ -0,0 +1,165 @@
+import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
+import VideoCIRuns from '@/components/video-benchmark/VideoCIRuns';
+import { videoHistoryEntry } from '@/components/video-benchmark/history';
+import { servingArtifact, videoRun } from '../support/video-artifacts';
+
+describe('Published video result navigation', () => {
+ const saved = servingArtifact();
+ const page = { schemaVersion: 1, entries: [videoHistoryEntry(saved, null)], nextPage: null };
+ beforeEach(() => {
+ cy.window().then((win) =>
+ win.history.replaceState(null, '', `${win.location.pathname}?view=results`),
+ );
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', page).as('published');
+ cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null }).as('recent');
+ cy.intercept('GET', '/api/video-runs?run=123', {
+ run: videoRun(123, 'success'),
+ artifacts: [saved.artifact],
+ }).as('run');
+ cy.intercept('GET', '**/api/video-runs*format=media', saved).as('media');
+ cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
+ });
+ it('opens published videos from History when recent Actions contain no H3 runs', () => {
+ cy.window().then((win) => win.history.replaceState(null, '', win.location.pathname));
+ cy.mount(
+
+
+ ,
+ );
+ cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
+ cy.contains('button', 'Videos & result').click();
+ cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C1');
+ cy.location('search').should('contain', 'view=results').and('contain', 'run=123');
+ cy.get('@recent.all').should('have.length', 0);
+ });
+ it('shows the Chinese published empty state and scans CI only after an explicit request', () => {
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', {
+ schemaVersion: 1,
+ entries: [],
+ nextPage: null,
+ });
+ cy.mount(
+
+
+ ,
+ );
+ cy.contains('最新发布页面中没有可读取的结果').should('be.visible');
+ cy.get('@recent.all').should('have.length', 0);
+ cy.contains('button', '浏览 CI 运行').click();
+ cy.wait('@recent');
+ cy.contains('本页 GitHub 历史中没有 H3 运行').should('be.visible');
+ cy.contains('button', '性能历史').should('be.enabled');
+ cy.location('search').should('contain', 'view=results');
+ cy.contains('button', '视频与结果').click();
+ cy.contains('最新发布页面中没有可读取的结果').should('be.visible');
+ cy.contains('button', '浏览 CI 运行').should('be.enabled');
+ });
+ it('retries a failed published read and skips unreadable sources without scanning CI', () => {
+ let reads = 0;
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', (req) => {
+ if (++reads === 1) req.reply({ statusCode: 503, body: { error: 'Unavailable' } });
+ else
+ req.reply({
+ ...page,
+ entries: [
+ { ...page.entries[0], error: 'Unreadable index', sources: [] },
+ ...page.entries,
+ ],
+ });
+ });
+ cy.mount(
+
+
+ ,
+ );
+ cy.get('[role="alert"]').should('contain', 'Could not load published results');
+ cy.contains('button', 'Retry').click();
+ cy.get('[data-testid="serving-selected-metrics"]').should('be.visible');
+ cy.get('@recent.all').should('have.length', 0);
+ });
+ it('does not select a stale published response after returning to History', () => {
+ let release: (() => void) | undefined;
+ cy.window().then((win) => {
+ const fetch = win.fetch.bind(win);
+ let first = true;
+ cy.stub(win, 'fetch').callsFake((input: RequestInfo | URL, init?: RequestInit) => {
+ if (String(input).includes('format=history') && first) {
+ first = false;
+ return new Promise((resolve) => {
+ release = () => resolve(Response.json(page));
+ });
+ }
+ return fetch(input, init);
+ });
+ });
+ cy.mount(
+
+
+ ,
+ );
+ cy.wrap(null).should(() => expect(release).to.be.a('function'));
+ cy.contains('button', 'Performance history').click();
+ cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
+ cy.then(() => release?.());
+ cy.get('@run.all').should('have.length', 0);
+ cy.location('search').should('contain', 'view=history').and('not.contain', 'run=');
+ cy.contains('button', 'Performance history').should('have.attr', 'aria-pressed', 'true');
+ });
+ it('retries the shared C4 selection after a refresh metadata failure', () => {
+ cy.window().then((win) =>
+ win.history.replaceState(
+ null,
+ '',
+ `${win.location.pathname}?view=results&run=123&artifact=40&source=123&cell=c4`,
+ ),
+ );
+ let reads = 0;
+ cy.intercept('GET', '/api/video-runs?run=123', (req) => {
+ if (++reads === 2) req.reply({ statusCode: 503, body: { error: 'CI run unavailable' } });
+ else req.reply({ run: videoRun(123, 'success'), artifacts: [saved.artifact] });
+ });
+ cy.mount(
+
+
+ ,
+ );
+ cy.get('[data-testid="serving-selected-metrics"]').should('contain', 'C4');
+ cy.contains('button', 'Refresh').click();
+ cy.get('[role="alert"]').should('contain', 'CI run unavailable');
+ cy.contains('button', 'Retry').click();
+ cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C4');
+ cy.get('@published.all').should('have.length', 0);
+ cy.location('search').should('contain', 'cell=c4');
+ });
+ it('resumes the selected artifact when media loading was cancelled by returning to History', () => {
+ let release: (() => void) | undefined;
+ cy.window().then((win) => {
+ const fetch = win.fetch.bind(win);
+ let first = true;
+ cy.stub(win, 'fetch').callsFake((input: RequestInfo | URL, init?: RequestInit) => {
+ if (String(input).includes('format=media') && first) {
+ first = false;
+ return new Promise((resolve) => {
+ release = () => resolve(Response.json(saved));
+ });
+ }
+ return fetch(input, init);
+ });
+ });
+ cy.mount(
+
+
+ ,
+ );
+ cy.wait('@run');
+ cy.get('[aria-label="CI run"]').should('contain', '#123');
+ cy.contains('button', 'Performance history').click();
+ cy.then(() => release?.());
+ cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
+ cy.contains('button', 'Performance history').should('have.attr', 'aria-pressed', 'true');
+ cy.contains('button', 'Videos & result').click();
+ cy.get('[data-testid="serving-selected-metrics"]').should('be.visible');
+ cy.get('@media.all').should('have.length', 1);
+ cy.get('@recent.all').should('have.length', 0);
+ });
+});
diff --git a/packages/app/cypress/e2e/navigation.cy.ts b/packages/app/cypress/e2e/navigation.cy.ts
index 1c535d425..192491633 100644
--- a/packages/app/cypress/e2e/navigation.cy.ts
+++ b/packages/app/cypress/e2e/navigation.cy.ts
@@ -403,6 +403,35 @@ describe('H3 video artifact viewer', () => {
.and('contain', '240 / —');
cy.location('search').should('contain', 'history-concurrency=2');
});
+ it('opens the first published result directly and preserves the selection on refresh and reload', () => {
+ const saved = servingArtifact();
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', {
+ schemaVersion: 1,
+ entries: [videoHistoryEntry(saved, null)],
+ nextPage: null,
+ }).as('published');
+ cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null }).as('recent');
+ cy.intercept('GET', '/api/video-runs?run=123', {
+ run: videoRun(123, 'success'),
+ artifacts: [saved.artifact],
+ }).as('run');
+ cy.intercept('GET', '**/api/video-runs*format=media', saved);
+ cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
+ cy.visit('/video?view=results');
+ cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C1');
+ cy.contains('[data-testid="serving-matrix"] button', 'C4').click();
+ cy.get('@published.all').then((requests) => {
+ const initialReads = requests.length;
+ cy.contains('button', 'Refresh').click();
+ cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C4');
+ cy.get('@published.all').should('have.length', initialReads);
+ });
+ cy.location('search').should('contain', 'view=results').and('contain', 'cell=c4');
+ cy.reload();
+ cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C4');
+ cy.contains('button', 'Videos & result').should('have.attr', 'aria-pressed', 'true');
+ cy.get('@recent.all').should('have.length', 0);
+ });
it('shares a comparison built by opening two CI runs through the page', () => {
for (const saved of [
servingArtifact(123, 40, 'NVIDIA H200'),
@@ -483,6 +512,7 @@ describe('H3 video artifact viewer', () => {
win.localStorage.removeItem('inferencex-feature-gate');
},
});
+ cy.contains('button', 'Browse CI runs').click();
cy.get('[data-testid="video-ci-runs"]').should('contain', 'No H3 runs in this page');
cy.get('video[data-role]').should('not.exist');
cy.get('[data-testid="tab-trigger-hidden"]').should('not.exist');
@@ -500,6 +530,7 @@ describe('H3 video artifact viewer', () => {
cy.get('[role="alert"]').should('contain', 'Could not load this bundle');
cy.get('video[data-role]').should('not.exist');
cy.visit('/zh/video?view=results');
+ cy.contains('button', '浏览 CI 运行').click();
cy.get('[data-testid="video-ci-runs"]').should('contain', '本页 GitHub 历史中没有 H3 运行');
cy.get('head meta[name="robots"]').should('have.attr', 'content', 'noindex, nofollow');
});
diff --git a/packages/app/src/components/video-benchmark/VideoCIRuns.tsx b/packages/app/src/components/video-benchmark/VideoCIRuns.tsx
index ca08735a9..90f3480d1 100644
--- a/packages/app/src/components/video-benchmark/VideoCIRuns.tsx
+++ b/packages/app/src/components/video-benchmark/VideoCIRuns.tsx
@@ -9,6 +9,7 @@ import { Input } from '@/components/ui/input';
import { useLocale } from '@/lib/i18n/use-locale';
import VideoBenchmark from './VideoBenchmark';
import VideoHistory from './VideoHistory';
+import type { VideoHistoryPage } from './history';
import FidelityResults from './FidelityResults';
import VideoSelect from './VideoSelect';
import { servingCells } from './serving';
@@ -29,7 +30,11 @@ const STRINGS = {
preparing: 'Loading results and preparing media. The first publication of a run takes longer.',
downloading: 'Downloading CI archive',
advanced: 'Run details and artifact selection',
- error: 'Could not load CI results',
+ error: 'Could not load results',
+ publishedLoading: 'Loading the newest published result…',
+ publishedEmpty:
+ 'No readable result in the newest published page. Open Performance history for more published results, or browse CI runs.',
+ publishedError: 'Could not load published results. Retry or browse CI runs.',
details: 'Technical details',
select: 'CI run',
refresh: 'Refresh',
@@ -60,7 +65,11 @@ const STRINGS = {
preparing: '正在加载结果并准备媒体。首次发布该运行的产物需要更多时间。',
downloading: '正在下载 CI 产物',
advanced: '运行详情与产物选择',
- error: '无法加载 CI 结果',
+ error: '无法加载结果',
+ publishedLoading: '正在加载最新的已发布结果…',
+ publishedEmpty:
+ '最新发布页面中没有可读取的结果。可在性能历史中查看其他已发布结果,或浏览 CI 运行。',
+ publishedError: '无法加载已发布结果。请重试,或浏览 CI 运行。',
details: '技术详情',
select: 'CI 运行',
refresh: '刷新',
@@ -97,7 +106,8 @@ function share(runId: number, artifactId?: number, source?: string, cell?: strin
const comparison = url.searchParams.get('compare');
const historyFilters = [...url.searchParams].filter(([key]) => key.startsWith('history-'));
url.search = '';
- if (view === 'tradeoff' || view === 'history') url.searchParams.set('view', view);
+ if (view === 'tradeoff' || view === 'history' || view === 'results')
+ url.searchParams.set('view', view);
if (comparison) url.searchParams.set('compare', comparison);
for (const [key, value] of historyFilters) url.searchParams.set(key, value);
url.searchParams.set('run', String(runId));
@@ -130,15 +140,21 @@ export default function VideoCIRuns() {
const [manual, setManual] = useState(false);
const [cellId, setCellId] = useState('');
const [view, setView] = useState('');
+ const [browsing, setBrowsing] = useState(false);
const [compared, setCompared] = useState([]);
const [comparisonLoading, setComparisonLoading] = useState(false);
const [comparisonError, setComparisonError] = useState(false);
const comparisonDownload = useRef(null);
const changeView = (value: string) => {
+ if (value === 'history') {
+ request.current++;
+ download.current?.abort();
+ setLoading(false);
+ setProgress('');
+ }
setView(value);
const url = new URL(location.href);
- if (value === 'tradeoff' || value === 'history') url.searchParams.set('view', value);
- else url.searchParams.delete('view');
+ url.searchParams.set('view', value);
history.replaceState(null, '', url);
};
const collect = useCallback((bundle: Bundle, exportRun: string, artifactId: string) => {
@@ -310,6 +326,7 @@ export default function VideoCIRuns() {
setError('');
setRun(null);
setCellId(selectedCell ?? '');
+ setSourceId(source ?? '');
setSources([]);
setArtifact(null);
setArtifacts([]);
@@ -357,15 +374,68 @@ export default function VideoCIRuns() {
if (current === request.current) setLoading(false);
}
}
+ async function openPublished() {
+ const current = ++request.current;
+ download.current?.abort();
+ const controller = new AbortController();
+ download.current = controller;
+ setBrowsing(false);
+ setNextPage(1);
+ setRun(null);
+ setRuns([]);
+ setArtifact(null);
+ setArtifacts([]);
+ setSources([]);
+ setLoading(true);
+ setProgress(s.publishedLoading);
+ setError('');
+ try {
+ const data: VideoHistoryPage = await json(
+ '/api/video-runs?format=history&page=1',
+ controller.signal,
+ );
+ if (current !== request.current) return;
+ if (data.schemaVersion !== 1 || !Array.isArray(data.entries))
+ throw new Error('Invalid published history');
+ const entry = data.entries.find(
+ (item) => !item.error && item.sources.some((source) => !source.error),
+ );
+ const source = entry?.sources.find((item) => !item.error);
+ if (entry && source)
+ await selectRun(
+ entry.runId,
+ String(entry.artifact.id),
+ source.id,
+ source.observations[0]?.cell,
+ );
+ } catch {
+ if (current === request.current) setError(s.publishedError);
+ } finally {
+ if (current === request.current) setLoading(false);
+ }
+ }
+ function openResults() {
+ if (run)
+ return selectRun(String(run.id), artifact ? String(artifact.id) : null, sourceId, cellId);
+ const params = new URLSearchParams(location.search);
+ const selected = params.get('run');
+ return selected
+ ? selectRun(selected, params.get('artifact'), params.get('source'), params.get('cell'))
+ : openPublished();
+ }
async function list(page: number, auto = false) {
const current = ++request.current;
download.current?.abort();
+ const controller = new AbortController();
+ download.current = controller;
setLoading(true);
setProgress('');
setError('');
+ setBrowsing(true);
try {
const data: { runs: CIRun[]; nextPage: number | null } = await json(
`/api/video-runs?page=${page}`,
+ controller.signal,
);
if (current !== request.current) return;
setRuns((old) =>
@@ -410,7 +480,7 @@ export default function VideoCIRuns() {
const directRun = params.get('run');
if (directRun)
void selectRun(directRun, params.get('artifact'), params.get('source'), params.get('cell'));
- else if (initialView === 'results') void list(1, true);
+ else if (initialView === 'results') void openPublished();
return () => {
request.current++;
@@ -432,7 +502,7 @@ export default function VideoCIRuns() {
className="min-w-0 flex-1 sm:flex-none"
variant="outline"
disabled={loading}
- onClick={() => void list(1, true)}
+ onClick={() => void openResults()}
>
{s.refresh}
@@ -441,7 +511,7 @@ export default function VideoCIRuns() {
className="min-w-0 flex-1 sm:flex-none"
variant="outline"
disabled={loading}
- onClick={() => void list(nextPage)}
+ onClick={() => void list(nextPage, !run)}
>
{nextPage === 1 ? s.browse : s.older}
@@ -480,7 +550,9 @@ export default function VideoCIRuns() {
{run.name}
)}
- {runs.length === 0 && !loading &&
{s.empty}
}
+ {runs.length === 0 && !loading && !loadError && (
+
{browsing ? s.empty : s.publishedEmpty}
+ )}
{s.advanced}
{s.note}
@@ -542,14 +614,7 @@ export default function VideoCIRuns() {
{s.details}
{loadError}
-
- run
- ? void selectRun(String(run.id), artifact ? String(artifact.id) : null)
- : void list(1, true)
- }
- >
+ void openResults()}>
{s.retry}
@@ -569,7 +634,7 @@ export default function VideoCIRuns() {
aria-pressed={view === 'results'}
onClick={() => {
changeView('results');
- if (!run) void list(1, true);
+ if (!run || sources.length === 0) void openResults();
}}
>
{s.results}
@@ -648,7 +713,10 @@ export default function VideoCIRuns() {
if (run && artifact) share(run.id, artifact.id, sourceId, id);
}}
onLoaded={collectLoaded}
- onError={() => changeView('results')}
+ onError={() => {
+ if (new URLSearchParams(location.search).get('view') !== 'history')
+ changeView('results');
+ }}
/>
)}
From 076a6ee151144c21576d35e85dbb6c16e8a9ef91 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 19:53:33 -0700
Subject: [PATCH 050/104] feat: map H3 artifact hardware to HW_REGISTRY keys
and TCO tiers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:将 H3 产物中的 GPU 名称映射到 HW_REGISTRY 键、标签、排序和 TCO 分档单价,并加入含 MI355X 不可用原因的固定硬件名单。
---
.../video-benchmark/hardware.test.ts | 45 +++++++++++++++
.../components/video-benchmark/hardware.ts | 57 +++++++++++++++++++
2 files changed, 102 insertions(+)
create mode 100644 packages/app/src/components/video-benchmark/hardware.test.ts
create mode 100644 packages/app/src/components/video-benchmark/hardware.ts
diff --git a/packages/app/src/components/video-benchmark/hardware.test.ts b/packages/app/src/components/video-benchmark/hardware.test.ts
new file mode 100644
index 000000000..fb3e1dc42
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/hardware.test.ts
@@ -0,0 +1,45 @@
+import { describe, expect, it } from 'vitest';
+import {
+ costPerGpuHour,
+ hardwareKey,
+ hardwareLabel,
+ hardwareSort,
+ VIDEO_HARDWARE_ROSTER,
+} from './hardware';
+
+describe('video hardware mapping', () => {
+ it('maps artifact device names to HW_REGISTRY keys', () => {
+ expect(hardwareKey('NVIDIA H100 80GB HBM3')).toBe('h100');
+ expect(hardwareKey('NVIDIA H200')).toBe('h200');
+ expect(hardwareKey('NVIDIA B200')).toBe('b200');
+ expect(hardwareKey('MI355X')).toBe('mi355x');
+ expect(hardwareKey('AMD Instinct MI355X OAM')).toBe('mi355x');
+ expect(hardwareKey('NVIDIA GB200')).toBe('gb200');
+ expect(hardwareKey('')).toBeNull();
+ expect(hardwareKey('Synthetic GPU')).toBeNull();
+ });
+ it('does not confuse H100 with H1000-style names or MI300X with MI355X', () => {
+ expect(hardwareKey('NVIDIA H1000')).toBeNull();
+ expect(hardwareKey('AMD Instinct MI300X')).toBe('mi300x');
+ });
+ it('exposes label, sort and TCO tiers from HW_REGISTRY', () => {
+ expect(hardwareLabel('h200')).toBe('H200');
+ expect(hardwareLabel('unknown')).toBe('unknown');
+ expect(hardwareSort('b200')).toBeLessThan(hardwareSort('h100'));
+ expect(costPerGpuHour('h200', 'h')).toBe(1.22);
+ expect(costPerGpuHour('h200', 'r')).toBe(2.9);
+ expect(costPerGpuHour('unknown', 'h')).toBeNull();
+ });
+ it('keeps MI355X in the campaign roster as unavailable with its failed run', () => {
+ const mi355x = VIDEO_HARDWARE_ROSTER.find((item) => item.key === 'mi355x');
+ expect(mi355x?.unavailable?.runUrl).toBe(
+ 'https://github.com/SemiAnalysisAI/InferenceX/actions/runs/34411615416',
+ );
+ expect(VIDEO_HARDWARE_ROSTER.map((item) => item.key)).toEqual([
+ 'b200',
+ 'mi355x',
+ 'h200',
+ 'h100',
+ ]);
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/hardware.ts b/packages/app/src/components/video-benchmark/hardware.ts
new file mode 100644
index 000000000..36a4b14b5
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/hardware.ts
@@ -0,0 +1,57 @@
+import { HW_REGISTRY } from '@semianalysisai/inferencex-constants';
+
+/** `h` = Owning at Large Hyperscaler Volume, `r` = Rent - 3 Year Commit (HW_REGISTRY costh/costr). */
+export type CostTier = 'h' | 'r';
+
+/** Registry keys that can appear as a whole token in an artifact GPU name, longest first. */
+const TOKENS = Object.keys(HW_REGISTRY)
+ .filter((key) => /^(?:h|b|gb|mi)\d/u.test(key))
+ .toSorted((a, b) => b.length - a.length);
+
+/** Map a raw device name (`NVIDIA H100 80GB HBM3`, `MI355X`) to a HW_REGISTRY key. */
+export function hardwareKey(name: string): string | null {
+ const lower = name.toLowerCase();
+ for (const key of TOKENS) {
+ if (new RegExp(`(?:^|[^a-z0-9])${key}(?![a-z0-9])`, 'u').test(lower)) return key;
+ }
+ return null;
+}
+
+export const hardwareLabel = (key: string): string => HW_REGISTRY[key]?.label ?? key;
+
+export const hardwareSort = (key: string): number =>
+ HW_REGISTRY[key]?.sort ?? Number.MAX_SAFE_INTEGER;
+
+export function costPerGpuHour(key: string, tier: CostTier): number | null {
+ const entry = HW_REGISTRY[key];
+ if (!entry) return null;
+ const value = tier === 'h' ? entry.costh : entry.costr;
+ return Number.isFinite(value) && value > 0 ? value : null;
+}
+
+export interface VideoHardwareRosterEntry {
+ key: string;
+ /** Present when the campaign targeted this hardware but no valid observation exists. */
+ unavailable?: { en: string; zh: string; runUrl: string };
+}
+
+/**
+ * Hardware the frozen H3 campaign targets. Hardware without a published
+ * observation still renders as an unavailable legend/table row so a missing
+ * result is never mistaken for an omission. Sorted by HW_REGISTRY order.
+ */
+export const VIDEO_HARDWARE_ROSTER: readonly VideoHardwareRosterEntry[] = (
+ [
+ { key: 'h100' },
+ { key: 'h200' },
+ { key: 'b200' },
+ {
+ key: 'mi355x',
+ unavailable: {
+ en: 'No valid published run yet: the 2026-09-09 attempt failed before generation (AMD SMI parser).',
+ zh: '尚无有效的已发布运行:2026-09-09 的尝试在生成前失败(AMD SMI 解析器)。',
+ runUrl: 'https://github.com/SemiAnalysisAI/InferenceX/actions/runs/34411615416',
+ },
+ },
+ ] satisfies VideoHardwareRosterEntry[]
+).toSorted((a, b) => hardwareSort(a.key) - hardwareSort(b.key));
From c66febc8fe2224ed105d47fdd61650a913f23e04 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 19:53:44 -0700
Subject: [PATCH 051/104] feat: add video benchmark metric registry with TCO
tiers and GPU basis
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增视频基准指标注册表:出片时间、生成速度、每 GPU 小时视频数、每美元 TCO 视频数、每条视频成本与能耗、功率上限占比;支持成本分档与参与/已分配 GPU 口径,缺失值一律为 null。
---
.../video-benchmark/metrics.test.ts | 107 +++++++
.../src/components/video-benchmark/metrics.ts | 271 ++++++++++++++++++
2 files changed, 378 insertions(+)
create mode 100644 packages/app/src/components/video-benchmark/metrics.test.ts
create mode 100644 packages/app/src/components/video-benchmark/metrics.ts
diff --git a/packages/app/src/components/video-benchmark/metrics.test.ts b/packages/app/src/components/video-benchmark/metrics.test.ts
new file mode 100644
index 000000000..2d427d0d5
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/metrics.test.ts
@@ -0,0 +1,107 @@
+import { describe, expect, it } from 'vitest';
+import { formatMetric, metricLabel, metricValue, type VideoPoint } from './metrics';
+
+// H200 and H100 C1 cells from the retained 2026-09-09 serving-smoke artifacts.
+const h200: VideoPoint = {
+ id: '34342452354.10107476604:c1',
+ runId: '34342452354',
+ artifactId: 10107476604,
+ cell: 'c1',
+ hardwareKey: 'h200',
+ hardwareName: 'NVIDIA H200',
+ runtime: '71de97b264b04dcd514cf904003028aefe9775c8',
+ concurrency: 1,
+ participating: 4,
+ allocated: 4,
+ valid: 20,
+ completed: 20,
+ scheduled: 20,
+ failed: 0,
+ samples: 20,
+ p50: 150.61379817902343,
+ p90: 151.10486977093387,
+ wallSeconds: 3013.44202613004,
+ durationSeconds: 8,
+ frameCount: 192,
+ energyKj: 410.954300515549,
+ avgPowerW: 2727.484797810607,
+ enforcedLimitW: 2800,
+ server: { tp: 2, ulysses: 2, attention: 'auto' },
+ status: 'complete',
+ observedAt: '2026-09-09T10:00:00Z',
+};
+const h100: VideoPoint = {
+ ...h200,
+ id: 'x',
+ hardwareKey: 'h100',
+ hardwareName: 'NVIDIA H100 80GB HBM3',
+ p50: 167.33339739358053,
+ p90: 168.11354550393298,
+ wallSeconds: 3349.37367718108,
+ allocated: 8,
+ energyKj: 431.14963489170344,
+ avgPowerW: 2574.550733165641,
+};
+const opts = { tier: 'h', basis: 'participating' } as const;
+
+describe('video metrics', () => {
+ it('derives throughput per GPU-hour from valid clips, wall time and participating GPUs', () => {
+ expect(metricValue(h200, 'videosPerGpuHour', opts)).toBeCloseTo(5.9732, 3);
+ expect(metricValue(h200, 'videoSecondsPerGpuHour', opts)).toBeCloseTo(47.786, 2);
+ });
+ it('switches the denominator to allocated GPUs on request', () => {
+ expect(metricValue(h100, 'videosPerGpuHour', opts)).toBeCloseTo(5.3741, 3);
+ expect(metricValue(h100, 'videosPerGpuHour', { ...opts, basis: 'allocated' })).toBeCloseTo(
+ 2.687,
+ 3,
+ );
+ });
+ it('prices videos with HW_REGISTRY tiers', () => {
+ expect(metricValue(h200, 'videosPerDollar', opts)).toBeCloseTo(4.896, 2);
+ expect(metricValue(h200, 'dollarsPerVideo', opts)).toBeCloseTo(0.2042, 3);
+ expect(metricValue(h200, 'dollarsPerVideo', { ...opts, tier: 'r' })).toBeCloseTo(0.4855, 3);
+ expect(metricValue(h200, 'dollarsPerVideoSecond', opts)).toBeCloseTo(0.02553, 4);
+ expect(metricValue(h100, 'dollarsPerVideo', { ...opts, basis: 'allocated' })).toBeCloseTo(
+ 0.4354,
+ 3,
+ );
+ });
+ it('exposes latency, generation speed, energy and power ratios', () => {
+ expect(metricValue(h200, 'p90Latency', opts)).toBeCloseTo(151.105, 3);
+ expect(metricValue(h200, 'p50Latency', opts)).toBeCloseTo(150.614, 3);
+ expect(metricValue(h200, 'genSpeed', opts)).toBeCloseTo(192 / 150.61379817902343, 6);
+ expect(metricValue(h200, 'kjPerVideo', opts)).toBeCloseTo(410.954, 2);
+ expect(metricValue(h200, 'videosPerKwh', opts)).toBeCloseTo(8.76, 2);
+ expect(metricValue(h200, 'powerPctCap', opts)).toBeCloseTo(97.41, 1);
+ });
+ it('returns null instead of zero for missing inputs', () => {
+ const broken: VideoPoint = {
+ ...h200,
+ hardwareKey: null,
+ energyKj: null,
+ valid: 0,
+ wallSeconds: null,
+ enforcedLimitW: null,
+ };
+ expect(metricValue(broken, 'videosPerDollar', opts)).toBeNull();
+ expect(metricValue(broken, 'videosPerGpuHour', opts)).toBeNull();
+ expect(metricValue(broken, 'kjPerVideo', opts)).toBeNull();
+ expect(metricValue(broken, 'videosPerKwh', opts)).toBeNull();
+ expect(metricValue(broken, 'powerPctCap', opts)).toBeNull();
+ expect(metricValue({ ...h200, samples: 9 }, 'p90Latency', opts)).toBeNull();
+ expect(metricValue({ ...h200, participating: null }, 'videosPerGpuHour', opts)).toBeNull();
+ });
+ it('labels tiered metrics with the cost tier and formats by metric', () => {
+ expect(metricLabel('videosPerDollar', 'en', opts)).toBe(
+ 'Videos per $1 TCO (Owning at Large Hyperscaler Volume)',
+ );
+ expect(metricLabel('videosPerDollar', 'zh', { ...opts, tier: 'r' })).toBe(
+ '每 1 美元 TCO 生成视频数(租赁 - 3 年承诺)',
+ );
+ expect(metricLabel('p90Latency', 'en', opts)).toBe('P90 time to video (s)');
+ expect(formatMetric(0.20419, 'dollarsPerVideo')).toBe('$0.204');
+ expect(formatMetric(null, 'kjPerVideo')).toBe('—');
+ expect(formatMetric(151.10486, 'p90Latency')).toBe('151.1');
+ expect(formatMetric(1234.5, 'videoSecondsPerGpuHour')).toBe('1,234.5');
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/metrics.ts b/packages/app/src/components/video-benchmark/metrics.ts
new file mode 100644
index 000000000..f0ab62b04
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/metrics.ts
@@ -0,0 +1,271 @@
+import { costPerGpuHour, type CostTier } from './hardware';
+
+/** Denominator for per-GPU metrics: boards that generated the clip vs. boards the job reserved. */
+export type GpuBasis = 'participating' | 'allocated';
+
+/** One published serving cell (hardware × client concurrency) flattened for the dashboard. */
+export interface VideoPoint {
+ id: string;
+ runId: string;
+ artifactId: number;
+ cell: string | null;
+ hardwareKey: string | null;
+ hardwareName: string;
+ runtime: string;
+ concurrency: number | null;
+ participating: number | null;
+ allocated: number | null;
+ valid: number | null;
+ completed: number | null;
+ scheduled: number | null;
+ failed: number | null;
+ samples: number;
+ p50: number | null;
+ p90: number | null;
+ wallSeconds: number | null;
+ durationSeconds: number | null;
+ frameCount: number | null;
+ /** GPU-board kJ per valid clip over the recorded generation window; null when power is invalid. */
+ energyKj: number | null;
+ /** Sum of participating boards' time-weighted mean W. */
+ avgPowerW: number | null;
+ /** Sum of the same boards' recorded enforced limits; null when a limit was not recorded. */
+ enforcedLimitW: number | null;
+ server: { tp: number | null; ulysses: number | null; attention: string | null } | null;
+ status: string;
+ observedAt: string | null;
+}
+
+export type XMetricId = 'p90Latency' | 'p50Latency' | 'genSpeed';
+export type YMetricId =
+ | 'videosPerDollar'
+ | 'videosPerGpuHour'
+ | 'videoSecondsPerGpuHour'
+ | 'dollarsPerVideo'
+ | 'kjPerVideo'
+ | 'videosPerKwh';
+export type MetricId = XMetricId | YMetricId | 'powerPctCap' | 'dollarsPerVideoSecond';
+
+export interface MetricOptions {
+ tier: CostTier;
+ basis: GpuBasis;
+}
+
+interface MetricDefinition {
+ label: string;
+ labelZh: string;
+ unit: string;
+ polarity: 'higher' | 'lower';
+ digits: number;
+ /** Label gets the cost tier appended. */
+ tiered?: boolean;
+ /** Prefix a dollar sign when formatting. */
+ currency?: boolean;
+}
+
+export const X_METRICS: readonly XMetricId[] = ['p90Latency', 'p50Latency', 'genSpeed'];
+export const Y_METRICS: readonly YMetricId[] = [
+ 'videosPerDollar',
+ 'videosPerGpuHour',
+ 'videoSecondsPerGpuHour',
+ 'dollarsPerVideo',
+ 'kjPerVideo',
+ 'videosPerKwh',
+];
+export const COST_TIERS: readonly CostTier[] = ['h', 'r'];
+
+/** Same tier names the inference calculator uses for HW_REGISTRY costh/costr. */
+export const TIER_LABELS: Record = {
+ h: { en: 'Owning at Large Hyperscaler Volume', zh: 'Hyperscaler 自有设备' },
+ r: { en: 'Rent - 3 Year Commit', zh: '租赁 - 3 年承诺' },
+};
+
+export const VIDEO_METRICS: Record = {
+ p90Latency: {
+ label: 'P90 time to video (s)',
+ labelZh: 'P90 出片时间(s)',
+ unit: 's',
+ polarity: 'lower',
+ digits: 1,
+ },
+ p50Latency: {
+ label: 'P50 time to video (s)',
+ labelZh: 'P50 出片时间(s)',
+ unit: 's',
+ polarity: 'lower',
+ digits: 1,
+ },
+ genSpeed: {
+ label: 'Generation speed (frames/s per request)',
+ labelZh: '生成速度(每请求 frames/s)',
+ unit: 'frames/s',
+ polarity: 'higher',
+ digits: 2,
+ },
+ videosPerDollar: {
+ label: 'Videos per $1 TCO',
+ labelZh: '每 1 美元 TCO 生成视频数',
+ unit: 'videos/$',
+ polarity: 'higher',
+ digits: 2,
+ tiered: true,
+ },
+ videosPerGpuHour: {
+ label: 'Videos per GPU-hour',
+ labelZh: '每 GPU 小时视频数',
+ unit: 'videos/GPU-hr',
+ polarity: 'higher',
+ digits: 2,
+ },
+ videoSecondsPerGpuHour: {
+ label: 'Video seconds per GPU-hour',
+ labelZh: '每 GPU 小时生成视频秒数',
+ unit: 'video-s/GPU-hr',
+ polarity: 'higher',
+ digits: 1,
+ },
+ dollarsPerVideo: {
+ label: 'TCO cost per video',
+ labelZh: '每条视频 TCO 成本',
+ unit: '$/video',
+ polarity: 'lower',
+ digits: 3,
+ tiered: true,
+ currency: true,
+ },
+ dollarsPerVideoSecond: {
+ label: 'TCO cost per video-second',
+ labelZh: '每视频秒 TCO 成本',
+ unit: '$/video-s',
+ polarity: 'lower',
+ digits: 4,
+ tiered: true,
+ currency: true,
+ },
+ kjPerVideo: {
+ label: 'GPU-board energy per video (kJ)',
+ labelZh: '每条视频 GPU 板卡能耗(kJ)',
+ unit: 'kJ/video',
+ polarity: 'lower',
+ digits: 1,
+ },
+ videosPerKwh: {
+ label: 'Videos per GPU-board kWh',
+ labelZh: '每 GPU 板卡 kWh 视频数',
+ unit: 'videos/kWh',
+ polarity: 'higher',
+ digits: 2,
+ },
+ powerPctCap: {
+ label: 'Mean board power / enforced limit (%)',
+ labelZh: '板卡平均功率 / 生效功率上限(%)',
+ unit: '%',
+ polarity: 'higher',
+ digits: 1,
+ },
+};
+
+const finite = (n: number | null | undefined): n is number =>
+ typeof n === 'number' && Number.isFinite(n);
+const positive = (n: number | null | undefined): n is number => finite(n) && n > 0;
+
+function gpus(point: VideoPoint, basis: GpuBasis): number | null {
+ const n = basis === 'allocated' ? point.allocated : point.participating;
+ return positive(n) && Number.isSafeInteger(n) ? n : null;
+}
+
+function videosPerGpuHour(point: VideoPoint, basis: GpuBasis): number | null {
+ const n = gpus(point, basis);
+ if (!positive(point.valid) || !positive(point.wallSeconds) || n === null) return null;
+ return (point.valid * 3600) / (point.wallSeconds * n);
+}
+
+function dollarsPerVideo(point: VideoPoint, options: MetricOptions): number | null {
+ const rate = videosPerGpuHour(point, options.basis);
+ const cost = point.hardwareKey ? costPerGpuHour(point.hardwareKey, options.tier) : null;
+ return rate !== null && cost !== null ? cost / rate : null;
+}
+
+/** Every formula returns null (never 0) when an input is missing or invalid. */
+export function metricValue(
+ point: VideoPoint,
+ id: MetricId,
+ options: MetricOptions,
+): number | null {
+ let value: number | null = null;
+ switch (id) {
+ case 'p90Latency': {
+ // Same display floor as the run views: P90 needs at least ten valid samples.
+ value = point.samples >= 10 ? point.p90 : null;
+ break;
+ }
+ case 'p50Latency': {
+ value = point.p50;
+ break;
+ }
+ case 'genSpeed': {
+ value =
+ positive(point.frameCount) && positive(point.p50) ? point.frameCount / point.p50 : null;
+ break;
+ }
+ case 'videosPerGpuHour': {
+ value = videosPerGpuHour(point, options.basis);
+ break;
+ }
+ case 'videoSecondsPerGpuHour': {
+ const rate = videosPerGpuHour(point, options.basis);
+ value =
+ rate !== null && positive(point.durationSeconds) ? rate * point.durationSeconds : null;
+ break;
+ }
+ case 'videosPerDollar': {
+ const cost = dollarsPerVideo(point, options);
+ value = cost === null ? null : 1 / cost;
+ break;
+ }
+ case 'dollarsPerVideo': {
+ value = dollarsPerVideo(point, options);
+ break;
+ }
+ case 'dollarsPerVideoSecond': {
+ const cost = dollarsPerVideo(point, options);
+ value =
+ cost !== null && positive(point.durationSeconds) ? cost / point.durationSeconds : null;
+ break;
+ }
+ case 'kjPerVideo': {
+ value = positive(point.energyKj) ? point.energyKj : null;
+ break;
+ }
+ case 'videosPerKwh': {
+ value = positive(point.energyKj) ? 3600 / point.energyKj : null;
+ break;
+ }
+ case 'powerPctCap': {
+ value =
+ positive(point.avgPowerW) && positive(point.enforcedLimitW)
+ ? (point.avgPowerW / point.enforcedLimitW) * 100
+ : null;
+ break;
+ }
+ }
+ return finite(value) ? value : null;
+}
+
+export function metricLabel(id: MetricId, locale: 'en' | 'zh', options: MetricOptions): string {
+ const def = VIDEO_METRICS[id];
+ const base = locale === 'zh' ? def.labelZh : def.label;
+ if (!def.tiered) return base;
+ const tier = TIER_LABELS[options.tier][locale];
+ return locale === 'zh' ? `${base}(${tier})` : `${base} (${tier})`;
+}
+
+export function formatMetric(value: number | null, id: MetricId): string {
+ if (value === null) return '—';
+ const def = VIDEO_METRICS[id];
+ const text = value.toLocaleString('en-US', {
+ minimumFractionDigits: def.currency ? def.digits : 0,
+ maximumFractionDigits: def.digits,
+ });
+ return def.currency ? `$${text}` : text;
+}
From 8d7974f0eff92a9a15b75ba33df4ca5249c88442 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 19:53:54 -0700
Subject: [PATCH 052/104] feat: add direction-aware Pareto frontier for video
hardware points
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增支持坐标轴方向声明的 Pareto 前沿计算,复用 inference 图的前沿算法。
---
.../video-benchmark/frontier.test.ts | 40 +++++++++++++++++++
.../components/video-benchmark/frontier.ts | 24 +++++++++++
2 files changed, 64 insertions(+)
create mode 100644 packages/app/src/components/video-benchmark/frontier.test.ts
create mode 100644 packages/app/src/components/video-benchmark/frontier.ts
diff --git a/packages/app/src/components/video-benchmark/frontier.test.ts b/packages/app/src/components/video-benchmark/frontier.test.ts
new file mode 100644
index 000000000..6d3215a02
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/frontier.test.ts
@@ -0,0 +1,40 @@
+import { describe, expect, it } from 'vitest';
+import { paretoFrontier } from './frontier';
+
+const b200 = { id: 'b200', x: 78.3, y: 6.66 };
+const h200 = { id: 'h200', x: 151.1, y: 4.9 };
+const h100 = { id: 'h100', x: 168.1, y: 4.59 };
+
+describe('paretoFrontier', () => {
+ it('keeps only the dominating point when one hardware is faster and more efficient', () => {
+ expect(paretoFrontier([h100, h200, b200], 'lower', 'higher').map((p) => p.id)).toEqual([
+ 'b200',
+ ]);
+ });
+ it('keeps a slower but more efficient point on a lower/higher frontier, sorted by x', () => {
+ const cheapSlow = { id: 'slow', x: 400, y: 9 };
+ expect(
+ paretoFrontier([cheapSlow, h100, h200, b200], 'lower', 'higher').map((p) => p.id),
+ ).toEqual(['b200', 'slow']);
+ });
+ it('handles higher/higher (generation speed vs efficiency)', () => {
+ const fast = { id: 'fast', x: 2.46, y: 6.66 };
+ const mid = { id: 'mid', x: 1.27, y: 4.9 };
+ const midEfficient = { id: 'midEff', x: 1.2, y: 7 };
+ expect(paretoFrontier([fast, mid, midEfficient], 'higher', 'higher').map((p) => p.id)).toEqual([
+ 'midEff',
+ 'fast',
+ ]);
+ });
+ it('handles lower/lower (time to video vs $/video)', () => {
+ const cost = [
+ { id: 'b200', x: 78.3, y: 0.15 },
+ { id: 'h200', x: 151.1, y: 0.204 },
+ { id: 'cheap', x: 300, y: 0.1 },
+ ];
+ expect(paretoFrontier(cost, 'lower', 'lower').map((p) => p.id)).toEqual(['b200', 'cheap']);
+ });
+ it('returns an empty frontier for no points', () => {
+ expect(paretoFrontier([], 'lower', 'higher')).toEqual([]);
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/frontier.ts b/packages/app/src/components/video-benchmark/frontier.ts
new file mode 100644
index 000000000..102adf9cd
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/frontier.ts
@@ -0,0 +1,24 @@
+import { paretoFrontUpperLeft } from '@/components/calculator/interpolation';
+
+type Better = 'lower' | 'higher';
+
+/**
+ * Non-dominated set for two axes with declared directions. `paretoFrontUpperLeft`
+ * keeps the points no other point beats on both a larger x and a larger y, so a
+ * lower-is-better axis is fed negated. The same hull code therefore serves
+ * time-to-video vs efficiency, generation speed vs efficiency and time-to-video
+ * vs cost. Result is sorted by ascending x.
+ */
+export function paretoFrontier(
+ points: T[],
+ xBetter: Better,
+ yBetter: Better,
+): T[] {
+ const sx = xBetter === 'higher' ? 1 : -1;
+ const sy = yBetter === 'higher' ? 1 : -1;
+ return paretoFrontUpperLeft(
+ points,
+ (p) => sx * p.x,
+ (p) => sy * p.y,
+ ).toSorted((a, b) => a.x - b.x);
+}
From 9b38e5c4127e14ed50b328c2b43c25eb766ac827 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 19:54:04 -0700
Subject: [PATCH 053/104] feat: add v_ URL state for the video hardware
dashboard
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:为视频硬件仪表板新增 v_ 前缀的 URL 状态读写:坐标轴、成本分档、GPU 口径、排队尾迹、仅最优、图表/表格视图;默认值不写入 URL。
---
.../video-benchmark/video-url-state.test.ts | 47 +++++++++++++
.../video-benchmark/video-url-state.ts | 68 +++++++++++++++++++
2 files changed, 115 insertions(+)
create mode 100644 packages/app/src/components/video-benchmark/video-url-state.test.ts
create mode 100644 packages/app/src/components/video-benchmark/video-url-state.ts
diff --git a/packages/app/src/components/video-benchmark/video-url-state.test.ts b/packages/app/src/components/video-benchmark/video-url-state.test.ts
new file mode 100644
index 000000000..31fca027e
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/video-url-state.test.ts
@@ -0,0 +1,47 @@
+import { describe, expect, it } from 'vitest';
+import {
+ DEFAULT_VIDEO_DASHBOARD_STATE,
+ readVideoDashboardState,
+ writeVideoDashboardState,
+} from './video-url-state';
+
+describe('video dashboard URL state', () => {
+ it('falls back to defaults for missing or invalid params', () => {
+ expect(readVideoDashboardState('')).toEqual(DEFAULT_VIDEO_DASHBOARD_STATE);
+ expect(
+ readVideoDashboardState('?v_x=bogus&v_y=nope&v_tier=z&v_basis=q&v_view=pie&v_queue=yes'),
+ ).toEqual(DEFAULT_VIDEO_DASHBOARD_STATE);
+ });
+ it('reads every supported param', () => {
+ expect(
+ readVideoDashboardState(
+ '?v_x=genSpeed&v_y=kjPerVideo&v_tier=r&v_basis=allocated&v_queue=1&v_opt=1&v_view=table',
+ ),
+ ).toEqual({
+ x: 'genSpeed',
+ y: 'kjPerVideo',
+ tier: 'r',
+ basis: 'allocated',
+ queue: true,
+ optimal: true,
+ view: 'table',
+ });
+ });
+ it('writes only non-default params and keeps unrelated params', () => {
+ const url = new URL('https://x.test/video?run=1&view=results');
+ const out = writeVideoDashboardState(url, {
+ ...DEFAULT_VIDEO_DASHBOARD_STATE,
+ tier: 'r',
+ queue: true,
+ });
+ expect(out.searchParams.get('run')).toBe('1');
+ expect(out.searchParams.get('view')).toBe('results');
+ expect(out.searchParams.get('v_tier')).toBe('r');
+ expect(out.searchParams.get('v_queue')).toBe('1');
+ expect(out.searchParams.has('v_x')).toBe(false);
+ expect(url.searchParams.has('v_tier')).toBe(false);
+ const reset = writeVideoDashboardState(out, DEFAULT_VIDEO_DASHBOARD_STATE);
+ expect([...reset.searchParams.keys()].filter((k) => k.startsWith('v_'))).toEqual([]);
+ expect(reset.searchParams.get('run')).toBe('1');
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/video-url-state.ts b/packages/app/src/components/video-benchmark/video-url-state.ts
new file mode 100644
index 000000000..aad6c229e
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/video-url-state.ts
@@ -0,0 +1,68 @@
+import type { CostTier } from './hardware';
+import {
+ COST_TIERS,
+ X_METRICS,
+ Y_METRICS,
+ type GpuBasis,
+ type XMetricId,
+ type YMetricId,
+} from './metrics';
+
+export interface VideoDashboardState {
+ x: XMetricId;
+ y: YMetricId;
+ tier: CostTier;
+ basis: GpuBasis;
+ /** Show C2/C4 client-concurrency cells as dotted queueing tails. */
+ queue: boolean;
+ /** Show only Pareto-optimal hardware. */
+ optimal: boolean;
+ view: 'chart' | 'table';
+}
+
+export const DEFAULT_VIDEO_DASHBOARD_STATE: VideoDashboardState = {
+ x: 'p90Latency',
+ y: 'videosPerDollar',
+ tier: 'h',
+ basis: 'participating',
+ queue: false,
+ optimal: false,
+ view: 'chart',
+};
+
+const BASES: readonly GpuBasis[] = ['participating', 'allocated'];
+const VIEWS: readonly VideoDashboardState['view'][] = ['chart', 'table'];
+
+const pick = (allowed: readonly T[], value: string | null, fallback: T): T =>
+ allowed.includes(value as T) ? (value as T) : fallback;
+
+/** Dashboard controls live under the `v_` prefix so the run/artifact/view params stay untouched. */
+export function readVideoDashboardState(search: string): VideoDashboardState {
+ const p = new URLSearchParams(search);
+ const d = DEFAULT_VIDEO_DASHBOARD_STATE;
+ return {
+ x: pick(X_METRICS, p.get('v_x'), d.x),
+ y: pick(Y_METRICS, p.get('v_y'), d.y),
+ tier: pick(COST_TIERS, p.get('v_tier'), d.tier),
+ basis: pick(BASES, p.get('v_basis'), d.basis),
+ queue: p.get('v_queue') === '1',
+ optimal: p.get('v_opt') === '1',
+ view: pick(VIEWS, p.get('v_view'), d.view),
+ };
+}
+
+/** Returns a new URL with defaults omitted; the input URL is not mutated. */
+export function writeVideoDashboardState(url: URL, state: VideoDashboardState): URL {
+ const out = new URL(url);
+ const d = DEFAULT_VIDEO_DASHBOARD_STATE;
+ const set = (key: string, value: string | null) =>
+ value === null ? out.searchParams.delete(key) : out.searchParams.set(key, value);
+ set('v_x', state.x === d.x ? null : state.x);
+ set('v_y', state.y === d.y ? null : state.y);
+ set('v_tier', state.tier === d.tier ? null : state.tier);
+ set('v_basis', state.basis === d.basis ? null : state.basis);
+ set('v_queue', state.queue ? '1' : null);
+ set('v_opt', state.optimal ? '1' : null);
+ set('v_view', state.view === d.view ? null : state.view);
+ return out;
+}
From fd056ac9e83a5c076e8a5a79178b1f4e46edb4c1 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 19:55:19 -0700
Subject: [PATCH 054/104] feat: project GPU counts, power and server layout per
published video cell
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:已发布历史投影为每个 cell 增加参与/已分配 GPU 数、测量窗口、视频时长与帧数、板卡功率与生效上限、配置的 TP/Ulysses/attention;均为可空的附加字段,schemaVersion 不变。
---
docs/video-history.md | 4 ++-
.../video-benchmark/history.test.ts | 18 +++++++++++++
.../src/components/video-benchmark/history.ts | 27 +++++++++++++++++++
3 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/docs/video-history.md b/docs/video-history.md
index c3a86e9a5..67b12a032 100644
--- a/docs/video-history.md
+++ b/docs/video-history.md
@@ -8,6 +8,8 @@
The projection groups all cells under the original source inside one artifact entry. It reuses `storedBundle`, `servingCells`, `storedFidelityBundle`, and the existing tradeoff calculations. Invalid or unavailable indexes remain explicit error entries. Original execution time comes from `ci.started_at`; index publication time is separate and must never be substituted for execution time. Original run IDs and export run IDs remain distinct.
+Each observation also carries the cell's participating and allocated GPU counts, measurement wall seconds, clip duration and frame count, summed mean board watts, summed recorded enforced limits (null when no limit snapshot exists) and the configured `tp_size` / `ulysses_degree` / `attention_backend`. These are additive, nullable fields under the same `schemaVersion: 1`; the hardware dashboard derives every displayed metric from them, so the browser never parses an artifact bundle for the chart.
+
## Evidence boundaries
- Only descriptive observations are shown: this version has no selected matched baseline and computes no before/after delta.
@@ -24,7 +26,7 @@ The projection groups all cells under the original source inside one artifact en
`/video` 与 `/zh/video` 默认打开“性能历史”。原有 run/artifact/source/cell 链接仍打开对应结果;`?view=results` 打开最新发布页面中首个可读取的产物与原始运行;未选择运行时,“视频与结果”也使用该入口。空列表或读取失败会显示可恢复的提示;只有点击“浏览 CI 运行”才扫描 GitHub Actions。返回性能历史会取消正在进行的结果选择;刷新和重新加载保留产物、原始运行及并发配置。历史筛选条件保存在 URL,刷新后恢复。
-历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。
+历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。每个 cell 另附参与/已分配 GPU 数、测量窗口秒数、视频时长与帧数、板卡平均功率之和、记录的生效功率上限之和(无快照时为 null)以及配置的 `tp_size` / `ulysses_degree` / `attention_backend`;这些都是同一 `schemaVersion: 1` 下可为空的附加字段,硬件仪表板据此推导全部指标,浏览器不再解析产物包。
当前展示观测值,未选择匹配基线,也不计算 before/after。延迟、吞吐量使用提交到下载完成的窗口;板卡能耗使用记录的生成窗口。保真度、阈值校准、发布验收单独展示。筛选仅作用于已加载的页面,可继续加载较早结果。
diff --git a/packages/app/src/components/video-benchmark/history.test.ts b/packages/app/src/components/video-benchmark/history.test.ts
index 58b770230..72673fb03 100644
--- a/packages/app/src/components/video-benchmark/history.test.ts
+++ b/packages/app/src/components/video-benchmark/history.test.ts
@@ -50,6 +50,21 @@ describe('video history projection', () => {
[4, 300, null, 15, 168],
]);
});
+ it('carries GPU counts, wall time, clip shape, board power and server layout per cell', () => {
+ const entry = videoHistoryEntry(saved(), null);
+ const c1 = entry.sources[0].observations[0];
+ expect(c1).toMatchObject({
+ participating: 2,
+ allocated: 2,
+ wallSeconds: 480,
+ durationSeconds: 4,
+ frameCount: 107,
+ avgPowerW: 1400,
+ // The synthetic bundle records no power-limit snapshots, so no limit is invented.
+ enforcedLimitW: null,
+ server: { tp: 1, ulysses: 2, attention: null },
+ });
+ });
it('preserves failed cells and null power without inventing zero-valued performance', () => {
const artifact = saved();
const source = artifact.sources[0];
@@ -71,6 +86,9 @@ describe('video history projection', () => {
p90: null,
clipsGpuHour: null,
energyKj: null,
+ wallSeconds: null,
+ avgPowerW: null,
+ enforcedLimitW: null,
});
});
it('retains source provenance and failure when a new artifact contract is unsupported', () => {
diff --git a/packages/app/src/components/video-benchmark/history.ts b/packages/app/src/components/video-benchmark/history.ts
index fac1eef34..aa9f9d541 100644
--- a/packages/app/src/components/video-benchmark/history.ts
+++ b/packages/app/src/components/video-benchmark/history.ts
@@ -22,6 +22,18 @@ export interface VideoHistoryObservation {
p90: number | null;
clipsGpuHour: number | null;
energyKj: number | null;
+ /** GPU boards that generated the clips (distinct bound UUIDs); null when the binding is ambiguous. */
+ participating: number | null;
+ /** GPU boards the job reserved (Slurm AllocTRES or the retained AMD binding); null when unknown. */
+ allocated: number | null;
+ wallSeconds: number | null;
+ durationSeconds: number | null;
+ frameCount: number | null;
+ /** Summed mean board W over the recorded generation window; null when the power phase is invalid. */
+ avgPowerW: number | null;
+ /** Summed recorded enforced limits of the same boards; null when a limit was not recorded. */
+ enforcedLimitW: number | null;
+ server: { tp: number | null; ulysses: number | null; attention: string | null } | null;
}
export interface VideoHistorySource {
id: string;
@@ -120,6 +132,21 @@ export function videoHistoryEntry(
p90: latencyValue(point, 'p90'),
clipsGpuHour: efficiencyValue(point, 'clipsGpu'),
energyKj: point.energy === null ? null : point.energy / 1000,
+ participating: point.participating,
+ allocated: point.allocated,
+ wallSeconds: point.wall,
+ durationSeconds: number(at(point.workload, 'generation', 'duration_seconds')),
+ frameCount: number(at(point.workload, 'generation', 'frame_count')),
+ avgPowerW: point.power,
+ enforcedLimitW: point.powerLimit?.watts ?? null,
+ server:
+ point.server !== null && typeof point.server === 'object'
+ ? {
+ tp: number(at(point.server, 'tp_size')),
+ ulysses: number(at(point.server, 'ulysses_degree')),
+ attention: text(at(point.server, 'attention_backend')) || null,
+ }
+ : null,
};
});
}
From d5743da3a824dcd93e28820238bc76dc36d9d570 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 19:58:47 -0700
Subject: [PATCH 055/104] feat: flatten published video history into chart
points
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:把已发布历史页面展开为可绘图的 VideoPoint 列表:映射硬件键、按来源去重保留最新发布、按 HW_REGISTRY 顺序排序、兼容缺少附加字段的旧投影。
---
.../components/video-benchmark/points.test.ts | 156 ++++++++++++++++++
.../src/components/video-benchmark/points.ts | 76 +++++++++
2 files changed, 232 insertions(+)
create mode 100644 packages/app/src/components/video-benchmark/points.test.ts
create mode 100644 packages/app/src/components/video-benchmark/points.ts
diff --git a/packages/app/src/components/video-benchmark/points.test.ts b/packages/app/src/components/video-benchmark/points.test.ts
new file mode 100644
index 000000000..a893e2a47
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/points.test.ts
@@ -0,0 +1,156 @@
+import { describe, expect, it } from 'vitest';
+import type { VideoHistoryObservation, VideoHistoryPage } from './history';
+import { videoPoints } from './points';
+
+const observation: VideoHistoryObservation = {
+ id: 'sha:c1',
+ cell: 'c1',
+ hardware: 'NVIDIA H200',
+ concurrency: 1,
+ runtime: '71de97b2',
+ workload: 'w',
+ model: 'MiniMaxAI/MiniMax-H3',
+ status: 'complete',
+ valid: 20,
+ completed: 20,
+ scheduled: 20,
+ failed: 0,
+ samples: 20,
+ p50: 150.6,
+ p90: 151.1,
+ clipsGpuHour: 5.97,
+ energyKj: 410.95,
+ participating: 4,
+ allocated: 4,
+ wallSeconds: 3013.4,
+ durationSeconds: 8,
+ frameCount: 192,
+ avgPowerW: 2727.5,
+ enforcedLimitW: 2800,
+ server: { tp: 2, ulysses: 2, attention: 'auto' },
+};
+const artifact = {
+ id: 10107476604,
+ name: 'h3-video-34342452354-1',
+ expired: false,
+ size_in_bytes: 1,
+ stored: true,
+};
+const source = {
+ id: '34342452354',
+ sha256: 'a',
+ sourceSha: 'b',
+ hardware: 'NVIDIA H200',
+ execution: 'complete',
+ observedAt: '2026-09-09T10:00:00Z',
+ kind: 'observation' as const,
+ observations: [observation, { ...observation, id: 'sha:c2', cell: 'c2', concurrency: 2 }],
+ fidelity: null,
+ calibration: null,
+ releaseQualified: false,
+ error: null,
+};
+const page: VideoHistoryPage = {
+ schemaVersion: 1,
+ nextPage: null,
+ entries: [
+ {
+ id: '34342452354.10107476604',
+ runId: '34342452354',
+ artifact,
+ publishedAt: '2026-09-10T00:00:00Z',
+ error: null,
+ sources: [
+ source,
+ {
+ ...source,
+ id: '1',
+ kind: 'fidelity',
+ observations: [],
+ fidelity: 'fail',
+ calibration: 'uncalibrated',
+ },
+ ],
+ },
+ {
+ // An older re-export of the same source: same observation ids, stale numbers.
+ id: '99.1',
+ runId: '34342452354',
+ artifact: { ...artifact, id: 1 },
+ publishedAt: '2026-09-01T00:00:00Z',
+ error: null,
+ sources: [{ ...source, observations: [{ ...observation, p50: 999 }] }],
+ },
+ ],
+};
+
+describe('videoPoints', () => {
+ it('flattens observation cells, maps hardware keys and keeps the newest publication of a source', () => {
+ const points = videoPoints([page]);
+ expect(points.map((p) => [p.id, p.concurrency])).toEqual([
+ ['sha:c1', 1],
+ ['sha:c2', 2],
+ ]);
+ expect(points[0]).toMatchObject({
+ runId: '34342452354',
+ artifactId: 10107476604,
+ hardwareKey: 'h200',
+ hardwareName: 'NVIDIA H200',
+ p50: 150.6,
+ enforcedLimitW: 2800,
+ server: { tp: 2, ulysses: 2, attention: 'auto' },
+ observedAt: '2026-09-09T10:00:00Z',
+ });
+ });
+ it('sorts by HW_REGISTRY order, then concurrency', () => {
+ const b200 = {
+ ...page.entries[0],
+ id: '2.2',
+ runId: '2',
+ sources: [
+ {
+ ...source,
+ id: '2',
+ observations: [{ ...observation, id: 'b:c1', hardware: 'NVIDIA B200' }],
+ },
+ ],
+ };
+ const h100 = {
+ ...page.entries[0],
+ id: '3.3',
+ runId: '3',
+ sources: [
+ {
+ ...source,
+ id: '3',
+ observations: [
+ { ...observation, id: 'h:c4', hardware: 'NVIDIA H100 80GB HBM3', concurrency: 4 },
+ { ...observation, id: 'h:c1', hardware: 'NVIDIA H100 80GB HBM3' },
+ ],
+ },
+ ],
+ };
+ const points = videoPoints([{ ...page, entries: [h100, page.entries[0], b200] }]);
+ expect(points.map((p) => p.id)).toEqual(['b:c1', 'sha:c1', 'sha:c2', 'h:c1', 'h:c4']);
+ });
+ it('tolerates pre-upgrade observations that lack the additive fields', () => {
+ const legacy = structuredClone(page);
+ const obs = legacy.entries[0].sources[0].observations[0] as unknown as Record;
+ for (const key of [
+ 'participating',
+ 'allocated',
+ 'wallSeconds',
+ 'durationSeconds',
+ 'frameCount',
+ 'avgPowerW',
+ 'enforcedLimitW',
+ 'server',
+ ])
+ delete obs[key];
+ const [point] = videoPoints([legacy]);
+ expect(point.participating).toBeNull();
+ expect(point.wallSeconds).toBeNull();
+ expect(point.server).toBeNull();
+ expect(point.hardwareKey).toBe('h200');
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/points.ts b/packages/app/src/components/video-benchmark/points.ts
new file mode 100644
index 000000000..519696f9b
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/points.ts
@@ -0,0 +1,76 @@
+import { hardwareKey, hardwareSort } from './hardware';
+import type { VideoHistoryObservation, VideoHistoryPage } from './history';
+import type { VideoPoint } from './metrics';
+
+const num = (value: unknown): number | null =>
+ typeof value === 'number' && Number.isFinite(value) ? value : null;
+
+/**
+ * Flatten published history pages (newest publication first) into chartable
+ * points. A source re-exported under a later artifact repeats its observation
+ * ids; the first occurrence wins, which is the newest publication.
+ */
+export function videoPoints(pages: VideoHistoryPage[]): VideoPoint[] {
+ const seen = new Set();
+ const points: VideoPoint[] = [];
+ for (const page of pages)
+ for (const entry of page.entries)
+ for (const source of entry.sources) {
+ if (source.kind !== 'observation') continue;
+ for (const observation of source.observations) {
+ if (seen.has(observation.id)) continue;
+ seen.add(observation.id);
+ points.push(toPoint(observation, entry.runId, entry.artifact.id, source.observedAt));
+ }
+ }
+ return points.toSorted(
+ (a, b) =>
+ hardwareSort(a.hardwareKey ?? '') - hardwareSort(b.hardwareKey ?? '') ||
+ (a.concurrency ?? 0) - (b.concurrency ?? 0),
+ );
+}
+
+/** Observations published before the additive fields existed read as null, never 0. */
+function toPoint(
+ o: Partial & Pick,
+ runId: string,
+ artifactId: number,
+ observedAt: string | null,
+): VideoPoint {
+ const server = o.server;
+ return {
+ id: o.id,
+ runId,
+ artifactId,
+ cell: o.cell ?? null,
+ hardwareKey: hardwareKey(o.hardware),
+ hardwareName: o.hardware,
+ runtime: o.runtime ?? '',
+ concurrency: num(o.concurrency),
+ participating: num(o.participating),
+ allocated: num(o.allocated),
+ valid: num(o.valid),
+ completed: num(o.completed),
+ scheduled: num(o.scheduled),
+ failed: num(o.failed),
+ samples: num(o.samples) ?? 0,
+ p50: num(o.p50),
+ p90: num(o.p90),
+ wallSeconds: num(o.wallSeconds),
+ durationSeconds: num(o.durationSeconds),
+ frameCount: num(o.frameCount),
+ energyKj: num(o.energyKj),
+ avgPowerW: num(o.avgPowerW),
+ enforcedLimitW: num(o.enforcedLimitW),
+ server:
+ server !== null && typeof server === 'object'
+ ? {
+ tp: num(server.tp),
+ ulysses: num(server.ulysses),
+ attention: typeof server.attention === 'string' ? server.attention : null,
+ }
+ : null,
+ status: o.status ?? '',
+ observedAt,
+ };
+}
From bed9d02f07ac3ee7fb9f22618a050f0575f72ec0 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 19:58:57 -0700
Subject: [PATCH 056/104] test: rebuild video history fixture with per-cell
GPU, power and layout fields
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增从保留的 StoredArtifact 导出重建 video-history fixture 的脚本,并更新 fixture 与校验清单;无新测量、无新发布。
---
.../app/cypress/fixtures/api/_manifest.json | 8 +-
.../cypress/fixtures/api/video-history.json | 126 ++++++++++++++++--
packages/app/package.json | 1 +
.../scripts/build-video-history-fixture.ts | 71 ++++++++++
4 files changed, 193 insertions(+), 13 deletions(-)
create mode 100644 packages/app/scripts/build-video-history-fixture.ts
diff --git a/packages/app/cypress/fixtures/api/_manifest.json b/packages/app/cypress/fixtures/api/_manifest.json
index 5eba3a24d..be6ce66ba 100644
--- a/packages/app/cypress/fixtures/api/_manifest.json
+++ b/packages/app/cypress/fixtures/api/_manifest.json
@@ -101,10 +101,10 @@
"topLevel": "object"
},
"video-history": {
- "bytes": 14506,
- "capturedAt": "2026-09-15T23:50:12.033Z",
- "sha256": "278dbafd690465ea01d0a05b6c972751a1a2a277a6d1b43362407abd7d42ed2c",
- "source": "Retained public H3 metadata replay from original runs; publication time unavailable. No new benchmark or publication.",
+ "bytes": 18083,
+ "capturedAt": "2026-09-20T02:56:12.184Z",
+ "sha256": "8a748582af68a5d259ad06f7295a3a5b92989ed0b5c0798eefb69600e22cdb77",
+ "source": "Retained public H3 metadata replay from original runs via videoHistoryEntry (per-cell GPU counts, board power and server layout); publication time unavailable. No new benchmark or publication.",
"topLevel": "object"
}
}
diff --git a/packages/app/cypress/fixtures/api/video-history.json b/packages/app/cypress/fixtures/api/video-history.json
index 45be3d3fe..65a72f04c 100644
--- a/packages/app/cypress/fixtures/api/video-history.json
+++ b/packages/app/cypress/fixtures/api/video-history.json
@@ -40,7 +40,19 @@
"p50": 167.33339739358053,
"p90": 168.11354550393298,
"clipsGpuHour": 5.3741390883412175,
- "energyKj": 431.14963489170344
+ "energyKj": 431.14963489170344,
+ "participating": 4,
+ "allocated": 8,
+ "wallSeconds": 3349.37367718108,
+ "durationSeconds": 8,
+ "frameCount": 192,
+ "avgPowerW": 2574.550733165641,
+ "enforcedLimitW": 2800,
+ "server": {
+ "tp": 2,
+ "ulysses": 2,
+ "attention": null
+ }
},
{
"id": "7df99e50c015669f4dd9ef62549317870f197cfe0fc5d163cf8bf0fb3b88dd5e:c2",
@@ -59,7 +71,19 @@
"p50": 334.78318604291417,
"p90": 336.9140758761205,
"clipsGpuHour": 5.368742995784034,
- "energyKj": 431.32628015924786
+ "energyKj": 431.32628015924786,
+ "participating": 4,
+ "allocated": 8,
+ "wallSeconds": 3352.7401133067906,
+ "durationSeconds": 8,
+ "frameCount": 192,
+ "avgPowerW": 2573.016825749808,
+ "enforcedLimitW": 2800,
+ "server": {
+ "tp": 2,
+ "ulysses": 2,
+ "attention": null
+ }
}
],
"fidelity": null,
@@ -109,7 +133,19 @@
"p50": 669.2438137787394,
"p90": 673.7058754772879,
"clipsGpuHour": 5.368345559881099,
- "energyKj": 430.80324425396446
+ "energyKj": 430.80324425396446,
+ "participating": 4,
+ "allocated": 8,
+ "wallSeconds": 3352.988327450119,
+ "durationSeconds": 8,
+ "frameCount": 192,
+ "avgPowerW": 2569.709833308179,
+ "enforcedLimitW": 2800,
+ "server": {
+ "tp": 2,
+ "ulysses": 2,
+ "attention": null
+ }
}
],
"fidelity": null,
@@ -159,7 +195,19 @@
"p50": 150.61379817902343,
"p90": 151.10486977093387,
"clipsGpuHour": 5.973235869122123,
- "energyKj": 410.954300515549
+ "energyKj": 410.954300515549,
+ "participating": 4,
+ "allocated": 4,
+ "wallSeconds": 3013.44202613004,
+ "durationSeconds": 8,
+ "frameCount": 192,
+ "avgPowerW": 2727.484797810607,
+ "enforcedLimitW": 2800,
+ "server": {
+ "tp": 2,
+ "ulysses": 2,
+ "attention": null
+ }
},
{
"id": "ad62f1b44954b9733cb513b7dd1d54c224759a20956d9a1f257b190ce8d4da35:c2",
@@ -178,7 +226,19 @@
"p50": 300.09254947002046,
"p90": 300.1774324030848,
"clipsGpuHour": 5.997056099146397,
- "energyKj": 409.91272507134966
+ "energyKj": 409.91272507134966,
+ "participating": 4,
+ "allocated": 4,
+ "wallSeconds": 3001.4726729940157,
+ "durationSeconds": 8,
+ "frameCount": 192,
+ "avgPowerW": 2731.4196931869433,
+ "enforcedLimitW": 2800,
+ "server": {
+ "tp": 2,
+ "ulysses": 2,
+ "attention": null
+ }
},
{
"id": "ad62f1b44954b9733cb513b7dd1d54c224759a20956d9a1f257b190ce8d4da35:c4",
@@ -197,7 +257,19 @@
"p50": 601.2122122829896,
"p90": 601.8977232379839,
"clipsGpuHour": 5.986775861646954,
- "energyKj": 413.58283766782114
+ "energyKj": 413.58283766782114,
+ "participating": 4,
+ "allocated": 4,
+ "wallSeconds": 3006.626674519968,
+ "durationSeconds": 8,
+ "frameCount": 192,
+ "avgPowerW": 2751.151140021047,
+ "enforcedLimitW": 2800,
+ "server": {
+ "tp": 2,
+ "ulysses": 2,
+ "attention": null
+ }
}
],
"fidelity": null,
@@ -247,7 +319,19 @@
"p50": 77.94495720259147,
"p90": 78.31597462110221,
"clipsGpuHour": 11.52605424609145,
- "energyKj": 301.08754501100987
+ "energyKj": 301.08754501100987,
+ "participating": 4,
+ "allocated": 8,
+ "wallSeconds": 1561.6792716470081,
+ "durationSeconds": 8,
+ "frameCount": 192,
+ "avgPowerW": 3856.016973742528,
+ "enforcedLimitW": 4000,
+ "server": {
+ "tp": 2,
+ "ulysses": 2,
+ "attention": null
+ }
},
{
"id": "ab90da9236114cd13de833a364159b8f84e69060de888f3e813635d5b7b26b82:c2",
@@ -266,7 +350,19 @@
"p50": 153.6016560649732,
"p90": 154.1683327689534,
"clipsGpuHour": 11.691563929313219,
- "energyKj": 300.10551714629605
+ "energyKj": 300.10551714629605,
+ "participating": 4,
+ "allocated": 8,
+ "wallSeconds": 1539.571618376067,
+ "durationSeconds": 8,
+ "frameCount": 192,
+ "avgPowerW": 3898.6355959505895,
+ "enforcedLimitW": 4000,
+ "server": {
+ "tp": 2,
+ "ulysses": 2,
+ "attention": null
+ }
},
{
"id": "ab90da9236114cd13de833a364159b8f84e69060de888f3e813635d5b7b26b82:c4",
@@ -285,7 +381,19 @@
"p50": 307.28381997847464,
"p90": 308.79631440097,
"clipsGpuHour": 11.69172635792307,
- "energyKj": 299.96858693604275
+ "energyKj": 299.96858693604275,
+ "participating": 4,
+ "allocated": 8,
+ "wallSeconds": 1539.5502297059866,
+ "durationSeconds": 8,
+ "frameCount": 192,
+ "avgPowerW": 3896.903348609339,
+ "enforcedLimitW": 4000,
+ "server": {
+ "tp": 2,
+ "ulysses": 2,
+ "attention": null
+ }
}
],
"fidelity": null,
diff --git a/packages/app/package.json b/packages/app/package.json
index fb2463cde..25b2fed13 100644
--- a/packages/app/package.json
+++ b/packages/app/package.json
@@ -31,6 +31,7 @@
"cache:invalidate": "bun --env-file=../../.env scripts/invalidate-cache.ts",
"cache:warmup": "bun --env-file=../../.env scripts/warmup-cache.ts",
"capture:fixtures": "bun scripts/capture-cypress-fixtures.ts",
+ "fixtures:video-history": "bun scripts/build-video-history-fixture.ts",
"guard:zh-copy:chinese-only": "bun scripts/check-zh-chinese-only.ts --chinese-only"
},
"dependencies": {
diff --git a/packages/app/scripts/build-video-history-fixture.ts b/packages/app/scripts/build-video-history-fixture.ts
new file mode 100644
index 000000000..550811491
--- /dev/null
+++ b/packages/app/scripts/build-video-history-fixture.ts
@@ -0,0 +1,71 @@
+/**
+ * Rebuild cypress/fixtures/api/video-history.json from retained StoredArtifact
+ * exports (frontend exports of the original CI artifacts; no new benchmark and
+ * no new publication). Entries whose run has no local export are kept verbatim,
+ * so fidelity-only entries survive a rebuild untouched.
+ *
+ * Usage:
+ * bun scripts/build-video-history-fixture.ts .json>
+ */
+
+import { readdir, readFile, writeFile } from 'node:fs/promises';
+import { resolve } from 'node:path';
+
+import {
+ videoHistoryEntry,
+ type VideoHistoryEntry,
+ type VideoHistoryPage,
+} from '../src/components/video-benchmark/history';
+import type { StoredArtifact } from '../src/components/video-benchmark/stored';
+import {
+ FIXTURE_MANIFEST_FILENAME,
+ type FixtureManifest,
+ assertFixtureContent,
+ fixtureSha256,
+ fixtureTopLevel,
+} from '../src/lib/testing/test-fixture-manifest';
+
+const FIXTURE_NAME = 'video-history';
+const fixturesDir = resolve(import.meta.dirname, '..', 'cypress', 'fixtures', 'api');
+const source = process.argv[2];
+if (!source) throw new Error('Pass the directory holding retained .json exports');
+
+const current = JSON.parse(
+ await readFile(resolve(fixturesDir, `${FIXTURE_NAME}.json`), 'utf8'),
+) as VideoHistoryPage;
+const exports = new Map();
+const files = await readdir(source);
+for (const file of files.filter((name) => /^\d+\.json$/u.test(name))) {
+ const saved = JSON.parse(await readFile(resolve(source, file), 'utf8')) as StoredArtifact;
+ if (saved.storageVersion !== 1) throw new Error(`${file} is not a storageVersion 1 export`);
+ exports.set(`${saved.runId}.${saved.artifact.id}`, saved);
+}
+
+let rebuilt = 0;
+const entries: VideoHistoryEntry[] = current.entries.map((entry) => {
+ const saved = exports.get(entry.id);
+ if (!saved) return entry;
+ rebuilt += 1;
+ const next = videoHistoryEntry(saved, entry.publishedAt);
+ // The existing fixture already carries the artifact identity (size, digest); keep it.
+ return { ...next, artifact: { ...next.artifact, ...entry.artifact } };
+});
+const page: VideoHistoryPage = { schemaVersion: 1, entries, nextPage: current.nextPage };
+assertFixtureContent(FIXTURE_NAME, page);
+const body = `${JSON.stringify(page, null, 2)}\n`;
+await writeFile(resolve(fixturesDir, `${FIXTURE_NAME}.json`), body);
+
+const manifestPath = resolve(fixturesDir, FIXTURE_MANIFEST_FILENAME);
+const manifest = JSON.parse(await readFile(manifestPath, 'utf8')) as FixtureManifest;
+const capturedAt = new Date().toISOString();
+manifest.fixtures[FIXTURE_NAME] = {
+ bytes: Buffer.byteLength(body),
+ capturedAt,
+ sha256: fixtureSha256(body),
+ source:
+ 'Retained public H3 metadata replay from original runs via videoHistoryEntry (per-cell GPU counts, board power and server layout); publication time unavailable. No new benchmark or publication.',
+ topLevel: fixtureTopLevel(page),
+};
+manifest.generatedAt = capturedAt;
+await writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
+console.log(`Wrote ${entries.length} entries; ${rebuilt} rebuilt from ${exports.size} exports`);
From b8a85029834495c25f677af35772647b828789b7 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:08:56 -0700
Subject: [PATCH 057/104] feat: add video dashboard config bar, hardware chart,
KPI cards and table
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增视频仪表板的构件:读取已发布历史的 hook、基准测试/图表配置面板、带 Pareto 包络与排队尾迹的 D3 硬件图、每硬件 KPI 卡(含 MI355X 未测得卡)、可排序数据表;VideoPoint 增加 model/workload 字段并按 cell 保留最新观测。
---
.../video-benchmark/VideoConfigBar.tsx | 132 +++++++++++
.../video-benchmark/VideoHardwareChart.tsx | 211 ++++++++++++++++++
.../video-benchmark/VideoKpiCards.tsx | 117 ++++++++++
.../video-benchmark/VideoPointsTable.tsx | 121 ++++++++++
.../video-benchmark/metrics.test.ts | 2 +
.../src/components/video-benchmark/metrics.ts | 3 +
.../components/video-benchmark/points.test.ts | 23 +-
.../src/components/video-benchmark/points.ts | 18 ++
.../video-benchmark/use-video-points.ts | 53 +++++
9 files changed, 679 insertions(+), 1 deletion(-)
create mode 100644 packages/app/src/components/video-benchmark/VideoConfigBar.tsx
create mode 100644 packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
create mode 100644 packages/app/src/components/video-benchmark/VideoKpiCards.tsx
create mode 100644 packages/app/src/components/video-benchmark/VideoPointsTable.tsx
create mode 100644 packages/app/src/components/video-benchmark/use-video-points.ts
diff --git a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
new file mode 100644
index 000000000..d7b1d6d98
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
@@ -0,0 +1,132 @@
+'use client';
+
+import { ControlPanel } from '@/components/ui/control-panel';
+import { track } from '@/lib/analytics';
+import { useLocale } from '@/lib/use-locale';
+import type { CostTier } from './hardware';
+import {
+ COST_TIERS,
+ metricLabel,
+ TIER_LABELS,
+ X_METRICS,
+ Y_METRICS,
+ type GpuBasis,
+ type XMetricId,
+ type YMetricId,
+} from './metrics';
+import VideoSelect from './VideoSelect';
+import type { VideoDashboardState } from './video-url-state';
+
+const STRINGS = {
+ en: {
+ benchmark: 'Benchmark config',
+ chart: 'Chart config',
+ model: 'Model',
+ workload: 'Workload',
+ load: 'Load',
+ c1: 'C1 · one request per deployment',
+ all: 'C1 + C2/C4 queueing tails',
+ x: 'X-axis metric',
+ y: 'Y-axis metric',
+ tier: 'Cost tier',
+ basis: 'GPU basis',
+ participating: 'Participating GPUs (boards generating the clip)',
+ allocated: 'Allocated GPUs (boards the job reserved)',
+ },
+ zh: {
+ benchmark: '基准测试配置',
+ chart: '图表配置',
+ model: '模型',
+ workload: '工作负载',
+ load: '负载',
+ c1: 'C1 · 每个部署一个请求',
+ all: 'C1 + C2/C4 排队尾迹',
+ x: 'X 轴指标',
+ y: 'Y 轴指标',
+ tier: '成本分档',
+ basis: 'GPU 口径',
+ participating: '参与计算的 GPU(实际生成视频的板卡)',
+ allocated: '已分配的 GPU(作业预留的板卡)',
+ },
+};
+
+/**
+ * Two control panels mirroring the inference tab: what is being compared
+ * (frozen for this campaign, so model and workload are single-option selects
+ * that state the comparison rather than change it) and how it is plotted.
+ */
+export default function VideoConfigBar({
+ state,
+ onChange,
+ modelLabel,
+ workloadLabel,
+}: {
+ state: VideoDashboardState;
+ onChange: (patch: Partial) => void;
+ modelLabel: string;
+ workloadLabel: string;
+}) {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const options = { tier: state.tier, basis: state.basis };
+ const change = (key: K, value: VideoDashboardState[K]) => {
+ onChange({ [key]: value } as Partial);
+ track(`video_${key}_changed`, { value: String(value) });
+ };
+ return (
+
+
+ {}}
+ options={[{ value: 'model', label: modelLabel }]}
+ />
+ {}}
+ options={[{ value: 'workload', label: workloadLabel }]}
+ />
+ change('queue', value === 'all')}
+ options={[
+ { value: 'c1', label: s.c1 },
+ { value: 'all', label: s.all },
+ ]}
+ />
+
+
+ change('x', value as XMetricId)}
+ options={X_METRICS.map((id) => ({ value: id, label: metricLabel(id, locale, options) }))}
+ />
+ change('y', value as YMetricId)}
+ options={Y_METRICS.map((id) => ({ value: id, label: metricLabel(id, locale, options) }))}
+ />
+ change('tier', value as CostTier)}
+ options={COST_TIERS.map((tier) => ({ value: tier, label: TIER_LABELS[tier][locale] }))}
+ />
+ change('basis', value as GpuBasis)}
+ options={[
+ { value: 'participating', label: s.participating },
+ { value: 'allocated', label: s.allocated },
+ ]}
+ />
+
+
+ );
+}
diff --git a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
new file mode 100644
index 000000000..b9b91d560
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
@@ -0,0 +1,211 @@
+'use client';
+
+import { curveLinear, type Selection } from 'd3';
+import { D3Chart } from '@/lib/d3-chart/D3Chart';
+import type { ContinuousScale } from '@/lib/d3-chart/types';
+import { CHART_TYPE, px } from '@/lib/d3-chart/typography';
+import { useLocale } from '@/lib/use-locale';
+import { escapeHtml } from '@/lib/utils';
+import { paretoFrontier } from './frontier';
+import { hardwareLabel } from './hardware';
+import { formatMetric, metricLabel, metricValue, VIDEO_METRICS, type VideoPoint } from './metrics';
+import { latestVideoCells } from './points';
+import type { VideoDashboardState } from './video-url-state';
+
+export const VIDEO_CHART_ID = 'video-hardware';
+/** Matches ChartSection's default `${analyticsPrefix}_zoom_reset_${chartId}`. */
+export const VIDEO_ZOOM_RESET_EVENT = `video_zoom_reset_${VIDEO_CHART_ID}`;
+
+export interface PlottedVideoPoint extends VideoPoint {
+ x: number;
+ y: number;
+ color: string;
+ label: string;
+}
+
+/**
+ * Points with both axes available (newest observation per hardware cell), the
+ * cross-hardware Pareto hull over the C1 cells, and per-hardware queueing tails
+ * (C1→C2→C4) when the load control shows them.
+ */
+export function plotVideoPoints(
+ points: VideoPoint[],
+ state: VideoDashboardState,
+ colorFor: (hardwareKey: string) => string,
+ hidden: ReadonlySet,
+) {
+ const options = { tier: state.tier, basis: state.basis };
+ const plotted: PlottedVideoPoint[] = latestVideoCells(points).flatMap((p) => {
+ if (!p.hardwareKey || hidden.has(p.hardwareKey)) return [];
+ if (!state.queue && p.concurrency !== 1) return [];
+ const x = metricValue(p, state.x, options);
+ const y = metricValue(p, state.y, options);
+ if (x === null || y === null) return [];
+ return [{ ...p, x, y, color: colorFor(p.hardwareKey), label: hardwareLabel(p.hardwareKey) }];
+ });
+ const frontier = paretoFrontier(
+ plotted.filter((p) => p.concurrency === 1),
+ VIDEO_METRICS[state.x].polarity,
+ VIDEO_METRICS[state.y].polarity,
+ );
+ const optimal = new Set(frontier.map((p) => p.hardwareKey));
+ const visible = state.optimal ? plotted.filter((p) => optimal.has(p.hardwareKey)) : plotted;
+ const tails: Record = {};
+ if (state.queue)
+ for (const p of visible) {
+ if (!p.hardwareKey) continue;
+ (tails[p.hardwareKey] ??= []).push({ x: p.x, y: p.y });
+ }
+ for (const key of Object.keys(tails)) {
+ tails[key].sort((a, b) => a.x - b.x);
+ if (tails[key].length < 2) delete tails[key];
+ }
+ return { plotted: visible, frontier, tails };
+}
+
+const STRINGS = {
+ en: {
+ hull: 'Dashed hull joins the Pareto-optimal hardware at C1. Dotted tails show C2/C4 client concurrency on the batch-one server: requests queue, throughput stays flat, so they are evidence, not a frontier.',
+ controls:
+ 'Shift+scroll to zoom; drag to pan; double-click to reset. Click a point to pin its details.',
+ n: 'valid samples',
+ run: 'run',
+ noData: 'No hardware has both selected metrics for this configuration.',
+ },
+ zh: {
+ hull: '虚线连接 C1 下 Pareto 最优的硬件;点线尾迹为 batch-one 服务器上 C2/C4 客户端并发的表现:请求排队、吞吐量不变,它们是证据而不是前沿。',
+ controls: 'Shift+滚轮缩放,拖动平移,双击重置。点击数据点可固定详情。',
+ n: '有效样本',
+ run: '运行',
+ noData: '当前配置下没有硬件同时具备所选的两个指标。',
+ },
+};
+
+export default function VideoHardwareChart({
+ points,
+ state,
+ colorFor,
+ hidden,
+ onSelect,
+}: {
+ points: VideoPoint[];
+ state: VideoDashboardState;
+ colorFor: (hardwareKey: string) => string;
+ hidden: ReadonlySet;
+ onSelect?: (point: VideoPoint) => void;
+}) {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const options = { tier: state.tier, basis: state.basis };
+ const { plotted, frontier, tails } = plotVideoPoints(points, state, colorFor, hidden);
+ const xLabel = metricLabel(state.x, locale, options);
+ const yLabel = metricLabel(state.y, locale, options);
+ const drawLabels = (
+ group: Selection,
+ x: ContinuousScale,
+ y: ContinuousScale,
+ ) => {
+ group
+ .selectAll('text.video-point-label')
+ .data(plotted, (p) => p.id)
+ .join('text')
+ .attr('class', 'video-point-label')
+ .attr('x', (p) => x(p.x) + 10)
+ .attr('y', (p) => y(p.y) - 10)
+ .attr('font-size', px(CHART_TYPE.axisLabel))
+ .attr('font-weight', (p) => (p.concurrency === 1 ? 600 : 400))
+ .attr('fill', 'var(--foreground)')
+ .attr('pointer-events', 'none')
+ .text((p) => (p.concurrency === 1 ? p.label : `C${p.concurrency}`));
+ };
+ const maxX = Math.max(0, ...plotted.map((p) => p.x));
+ const maxY = Math.max(0, ...plotted.map((p) => p.y));
+ return (
+ 1 ? { hull: frontier.map((p) => ({ x: p.x, y: p.y })) } : {},
+ config: {
+ getColor: () => 'var(--foreground)',
+ strokeWidth: 1.5,
+ strokeDasharray: '6 4',
+ curve: curveLinear,
+ },
+ },
+ {
+ type: 'line',
+ key: 'queueing-tails',
+ lines: tails,
+ config: {
+ getColor: (key) => colorFor(key),
+ getStrokeDasharray: () => '2 4',
+ strokeWidth: 1.5,
+ curve: curveLinear,
+ },
+ },
+ {
+ type: 'point',
+ data: plotted,
+ config: {
+ getCx: () => 0,
+ getCy: () => 0,
+ getX: (p) => p.x,
+ getY: (p) => p.y,
+ getColor: (p) => p.color,
+ getRadius: (p) => (p.concurrency === 1 ? 7 : 4),
+ stroke: 'var(--foreground)',
+ strokeWidth: 1,
+ keyFn: (p) => p.id,
+ },
+ },
+ {
+ type: 'custom',
+ key: 'video-point-labels',
+ render: (group, ctx) => {
+ drawLabels(
+ group,
+ (ctx.renderedXScale ?? ctx.xScale) as ContinuousScale,
+ (ctx.renderedYScale ?? ctx.yScale) as ContinuousScale,
+ );
+ },
+ onZoom: (group, ctx) =>
+ drawLabels(group, ctx.newXScale as ContinuousScale, ctx.newYScale as ContinuousScale),
+ },
+ ]}
+ tooltip={{
+ rulerType: 'none',
+ content: (p) =>
+ `${escapeHtml(p.label)} · C${p.concurrency ?? '?'} ${escapeHtml(xLabel)}: ${formatMetric(p.x, state.x)} ${escapeHtml(yLabel)}: ${formatMetric(p.y, state.y)} ${s.n}: ${p.samples} · ${s.run} #${escapeHtml(p.runId)}
`,
+ onPointClick: onSelect,
+ }}
+ zoom={{
+ enabled: true,
+ axes: 'both',
+ scaleExtent: [1, 20],
+ resetEventName: VIDEO_ZOOM_RESET_EVENT,
+ }}
+ instructions={s.controls}
+ noDataOverlay={
+ plotted.length === 0 ? (
+
+ {s.noData}
+
+ ) : undefined
+ }
+ caption={{s.hull}
}
+ />
+ );
+}
diff --git a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
new file mode 100644
index 000000000..825c277cb
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
@@ -0,0 +1,117 @@
+'use client';
+
+import { Card } from '@/components/ui/card';
+import { useLocale } from '@/lib/use-locale';
+import { hardwareLabel, VIDEO_HARDWARE_ROSTER } from './hardware';
+import { formatMetric, metricValue, type MetricId, type VideoPoint } from './metrics';
+import { latestVideoCells } from './points';
+import type { VideoDashboardState } from './video-url-state';
+
+const CARD_METRICS = [
+ 'p50Latency',
+ 'videosPerGpuHour',
+ 'dollarsPerVideo',
+ 'kjPerVideo',
+ 'powerPctCap',
+] as const satisfies readonly MetricId[];
+const STRINGS = {
+ en: {
+ p50Latency: 'P50 time to video (s)',
+ videosPerGpuHour: 'Videos / GPU-hr',
+ dollarsPerVideo: 'TCO / video',
+ kjPerVideo: 'kJ / video',
+ powerPctCap: 'Board power / limit',
+ p90: 'P90',
+ gpus: 'GPUs',
+ of: 'of',
+ unavailable: 'Not measured',
+ why: 'Failed run',
+ },
+ zh: {
+ p50Latency: 'P50 出片时间(s)',
+ videosPerGpuHour: '视频数 / GPU 小时',
+ dollarsPerVideo: 'TCO / 条',
+ kjPerVideo: 'kJ / 条',
+ powerPctCap: '板卡功率 / 上限',
+ p90: 'P90',
+ gpus: '张 GPU',
+ of: '/',
+ unavailable: '未测得',
+ why: '失败的运行',
+ },
+};
+
+/** One card per campaign hardware at C1; hardware without a valid run says so instead of vanishing. */
+export default function VideoKpiCards({
+ points,
+ state,
+ colorFor,
+}: {
+ points: VideoPoint[];
+ state: VideoDashboardState;
+ colorFor: (hardwareKey: string) => string;
+}) {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const options = { tier: state.tier, basis: state.basis };
+ const cells = latestVideoCells(points);
+ return (
+
+ {VIDEO_HARDWARE_ROSTER.map(({ key, unavailable }) => {
+ const point = cells.find((p) => p.hardwareKey === key && p.concurrency === 1);
+ return (
+
+
+
+ {hardwareLabel(key)}
+ {point && (
+
+ {point.participating ?? '—'} {s.of} {point.allocated ?? '—'} {s.gpus}
+
+ )}
+
+ {point ? (
+
+ {CARD_METRICS.map((id) => (
+
+
{s[id]}
+
+ {formatMetric(metricValue(point, id, options), id)}
+ {id === 'powerPctCap' && metricValue(point, id, options) !== null && '%'}
+ {id === 'p50Latency' && (
+
+ {s.p90}{' '}
+ {formatMetric(metricValue(point, 'p90Latency', options), 'p90Latency')}
+
+ )}
+
+
+ ))}
+
+ ) : (
+
+ {s.unavailable}. {' '}
+ {unavailable && (
+ <>
+ {unavailable[locale]}{' '}
+
+ {s.why}
+
+ >
+ )}
+
+ )}
+
+ );
+ })}
+
+ );
+}
diff --git a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
new file mode 100644
index 000000000..0051a3914
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
@@ -0,0 +1,121 @@
+'use client';
+
+import { DataTable, type DataTableColumn } from '@/components/ui/data-table';
+import { useLocale } from '@/lib/use-locale';
+import { hardwareLabel } from './hardware';
+import { formatMetric, metricLabel, metricValue, type MetricId, type VideoPoint } from './metrics';
+import { latestVideoCells } from './points';
+import type { VideoDashboardState } from './video-url-state';
+
+const STRINGS = {
+ en: {
+ hardware: 'Hardware',
+ c: 'C',
+ counts: 'Valid / scheduled',
+ power: 'Board power (W)',
+ run: 'CI run',
+ },
+ zh: {
+ hardware: '硬件',
+ c: 'C',
+ counts: '有效 / 计划',
+ power: '板卡功率(W)',
+ run: 'CI 运行',
+ },
+};
+const METRIC_COLUMNS: readonly MetricId[] = [
+ 'p50Latency',
+ 'p90Latency',
+ 'videosPerGpuHour',
+ 'videosPerDollar',
+ 'dollarsPerVideo',
+ 'kjPerVideo',
+ 'powerPctCap',
+];
+
+/** Rows for the plotted cells: every metric the chart can show, plus provenance. */
+export function videoTableRows(
+ points: VideoPoint[],
+ state: VideoDashboardState,
+ hidden: ReadonlySet,
+): VideoPoint[] {
+ return latestVideoCells(points).filter(
+ (p) => p.hardwareKey && !hidden.has(p.hardwareKey) && (state.queue || p.concurrency === 1),
+ );
+}
+
+export default function VideoPointsTable({
+ points,
+ state,
+ hidden,
+}: {
+ points: VideoPoint[];
+ state: VideoDashboardState;
+ hidden: ReadonlySet;
+}) {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const options = { tier: state.tier, basis: state.basis };
+ const rows = videoTableRows(points, state, hidden);
+ const columns: DataTableColumn[] = [
+ {
+ header: s.hardware,
+ cell: (p) => hardwareLabel(p.hardwareKey ?? ''),
+ sortValue: (p) => hardwareLabel(p.hardwareKey ?? ''),
+ importance: 'key',
+ pinned: true,
+ },
+ {
+ header: s.c,
+ align: 'right',
+ cell: (p) => p.concurrency ?? '—',
+ sortValue: (p) => p.concurrency ?? 0,
+ importance: 'key',
+ },
+ {
+ header: s.counts,
+ align: 'right',
+ cell: (p) => `${p.valid ?? '—'} / ${p.scheduled ?? '—'}`,
+ },
+ ...METRIC_COLUMNS.map((id): DataTableColumn => ({
+ header: metricLabel(id, locale, options),
+ align: 'right',
+ cell: (p) => formatMetric(metricValue(p, id, options), id),
+ sortValue: (p) => metricValue(p, id, options) ?? Number.NEGATIVE_INFINITY,
+ importance: id === 'p50Latency' || id === 'videosPerDollar' ? 'key' : 'secondary',
+ })),
+ {
+ header: s.power,
+ align: 'right',
+ cell: (p) =>
+ p.avgPowerW === null
+ ? '—'
+ : p.avgPowerW.toLocaleString('en-US', { maximumFractionDigits: 0 }),
+ sortValue: (p) => p.avgPowerW ?? 0,
+ importance: 'secondary',
+ },
+ {
+ header: s.run,
+ cell: (p) => (
+
+ #{p.runId}
+
+ ),
+ importance: 'secondary',
+ },
+ ];
+ return (
+
+ );
+}
diff --git a/packages/app/src/components/video-benchmark/metrics.test.ts b/packages/app/src/components/video-benchmark/metrics.test.ts
index 2d427d0d5..e26bc1752 100644
--- a/packages/app/src/components/video-benchmark/metrics.test.ts
+++ b/packages/app/src/components/video-benchmark/metrics.test.ts
@@ -10,6 +10,8 @@ const h200: VideoPoint = {
hardwareKey: 'h200',
hardwareName: 'NVIDIA H200',
runtime: '71de97b264b04dcd514cf904003028aefe9775c8',
+ model: 'MiniMaxAI/MiniMax-H3',
+ workload: '1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df',
concurrency: 1,
participating: 4,
allocated: 4,
diff --git a/packages/app/src/components/video-benchmark/metrics.ts b/packages/app/src/components/video-benchmark/metrics.ts
index f0ab62b04..5f09eebe8 100644
--- a/packages/app/src/components/video-benchmark/metrics.ts
+++ b/packages/app/src/components/video-benchmark/metrics.ts
@@ -12,6 +12,9 @@ export interface VideoPoint {
hardwareKey: string | null;
hardwareName: string;
runtime: string;
+ model: string;
+ /** Human-readable workload summary from the projection (resolution · duration · fps · steps · model @ rev · seeds · prompt). */
+ workload: string;
concurrency: number | null;
participating: number | null;
allocated: number | null;
diff --git a/packages/app/src/components/video-benchmark/points.test.ts b/packages/app/src/components/video-benchmark/points.test.ts
index a893e2a47..64a25c31b 100644
--- a/packages/app/src/components/video-benchmark/points.test.ts
+++ b/packages/app/src/components/video-benchmark/points.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
import type { VideoHistoryObservation, VideoHistoryPage } from './history';
-import { videoPoints } from './points';
+import { latestVideoCells, videoPoints } from './points';
const observation: VideoHistoryObservation = {
id: 'sha:c1',
@@ -153,4 +153,25 @@ describe('videoPoints', () => {
expect(point.server).toBeNull();
expect(point.hardwareKey).toBe('h200');
});
+ it('keeps only the newest observation per hardware cell', () => {
+ const rerun = {
+ ...page.entries[0],
+ id: '5.5',
+ runId: '5',
+ sources: [
+ {
+ ...source,
+ id: '5',
+ observations: [{ ...observation, id: 'again:c1', p50: 140 }],
+ },
+ ],
+ };
+ // Entry order is publication order (newest first): the rerun supersedes the older cell.
+ const points = videoPoints([{ ...page, entries: [rerun, page.entries[0]] }]);
+ expect(points.map((p) => p.id)).toEqual(['again:c1', 'sha:c1', 'sha:c2']);
+ expect(latestVideoCells(points).map((p) => [p.id, p.p50])).toEqual([
+ ['again:c1', 140],
+ ['sha:c2', 150.6],
+ ]);
+ });
});
diff --git a/packages/app/src/components/video-benchmark/points.ts b/packages/app/src/components/video-benchmark/points.ts
index 519696f9b..bac2848fa 100644
--- a/packages/app/src/components/video-benchmark/points.ts
+++ b/packages/app/src/components/video-benchmark/points.ts
@@ -46,6 +46,8 @@ function toPoint(
hardwareKey: hardwareKey(o.hardware),
hardwareName: o.hardware,
runtime: o.runtime ?? '',
+ model: o.model ?? '',
+ workload: o.workload ?? '',
concurrency: num(o.concurrency),
participating: num(o.participating),
allocated: num(o.allocated),
@@ -74,3 +76,19 @@ function toPoint(
observedAt,
};
}
+
+/**
+ * Newest published observation per (hardware, concurrency) cell. Points arrive
+ * newest publication first, so the first occurrence wins; hardware without a
+ * registry key is kept as-is because nothing can be compared against it.
+ */
+export function latestVideoCells(points: VideoPoint[]): VideoPoint[] {
+ const seen = new Set();
+ return points.filter((point) => {
+ if (point.hardwareKey === null) return true;
+ const key = `${point.hardwareKey}:${point.concurrency ?? 'na'}`;
+ if (seen.has(key)) return false;
+ seen.add(key);
+ return true;
+ });
+}
diff --git a/packages/app/src/components/video-benchmark/use-video-points.ts b/packages/app/src/components/video-benchmark/use-video-points.ts
new file mode 100644
index 000000000..1892c7d79
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/use-video-points.ts
@@ -0,0 +1,53 @@
+'use client';
+
+import { useCallback, useEffect, useState } from 'react';
+import type { VideoHistoryPage } from './history';
+import type { VideoPoint } from './metrics';
+import { videoPoints } from './points';
+
+/** Published pages are read newest first; the frozen campaign fits in far fewer. */
+const MAX_PAGES = 5;
+
+/** Load every published history page (bounded) and flatten it into chart points. */
+export function useVideoPoints() {
+ const [points, setPoints] = useState([]);
+ const [loading, setLoading] = useState(true);
+ const [loadError, setLoadError] = useState(null);
+ const [replay, setReplay] = useState(false);
+ const [attempt, setAttempt] = useState(0);
+ useEffect(() => {
+ const controller = new AbortController();
+ setLoading(true);
+ setLoadError(null);
+ (async () => {
+ const pages: VideoHistoryPage[] = [];
+ let replayed = false;
+ for (let page = 1; page <= MAX_PAGES; page++) {
+ const response = await fetch(`/api/video-runs?format=history&page=${page}`, {
+ signal: controller.signal,
+ cache: 'no-store',
+ });
+ if (!response.ok) throw new Error(`Published history HTTP ${response.status}`);
+ replayed ||= response.headers.get('x-videogenx-replay') === '1';
+ const data = (await response.json()) as VideoHistoryPage;
+ if (data.schemaVersion !== 1 || !Array.isArray(data.entries))
+ throw new Error('Unsupported published history projection');
+ pages.push(data);
+ if (data.nextPage === null) break;
+ }
+ if (controller.signal.aborted) return;
+ setPoints(videoPoints(pages));
+ setReplay(replayed);
+ })()
+ .catch((error: unknown) => {
+ if (controller.signal.aborted) return;
+ setLoadError(error instanceof Error ? error.message : String(error));
+ })
+ .finally(() => {
+ if (!controller.signal.aborted) setLoading(false);
+ });
+ return () => controller.abort();
+ }, [attempt]);
+ const retry = useCallback(() => setAttempt((n) => n + 1), []);
+ return { points, loading, error: loadError, replay, retry };
+}
From e74d5b84fef832e47894e1accf0087e2504c2710 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:09:20 -0700
Subject: [PATCH 058/104] feat: make the cross-hardware dashboard the /video
landing view
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:/video 与 /zh/video 改为以跨硬件仪表板为首屏:配置栏、带 Pareto 包络的硬件图与图例侧栏、TCO 单价与来源、KPI 卡、图表/表格切换与 CSV 导出;原运行/视频/历史视图收进可展开的“运行、视频与证据”区块,含 run/view/compare/history-* 参数的深链接自动展开。
---
.../cypress/component/video-dashboard.cy.tsx | 100 +++++
packages/app/cypress/e2e/navigation.cy.ts | 2 +
.../app/src/app/(dashboard)/video/page.tsx | 4 +-
.../app/src/app/zh/(dashboard)/video/page.tsx | 4 +-
.../video-benchmark/VideoDashboard.tsx | 400 ++++++++++++++++++
5 files changed, 506 insertions(+), 4 deletions(-)
create mode 100644 packages/app/cypress/component/video-dashboard.cy.tsx
create mode 100644 packages/app/src/components/video-benchmark/VideoDashboard.tsx
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
new file mode 100644
index 000000000..4464ce9cf
--- /dev/null
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -0,0 +1,100 @@
+import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
+import VideoDashboard from '@/components/video-benchmark/VideoDashboard';
+
+// Retained H100/H200/B200 C1/C2/C4 observations (cypress/fixtures/api/video-history.json).
+function mount(pathname = '/video', search = '') {
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', {
+ fixture: 'api/video-history.json',
+ }).as('history');
+ cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null });
+ cy.window().then((win) =>
+ win.history.replaceState(null, '', `${win.location.pathname}${search}`),
+ );
+ cy.mount(
+
+
+ ,
+ );
+ cy.wait('@history');
+}
+const kpi = (hardware: string) =>
+ cy.get(`[data-testid="video-kpi-card"][data-hardware="${hardware}"]`);
+const points = () => cy.get('[data-testid="video-hardware-chart"] circle.point');
+const tails = () => cy.get('[data-testid="video-hardware-chart"] path.line-path');
+
+describe('Video hardware dashboard (retained fixture)', () => {
+ it('plots one C1 point per measured hardware and lists MI355X as unavailable', () => {
+ mount();
+ points().should('have.length', 3);
+ tails().should('have.length', 0);
+ cy.get('[data-testid="video-kpi-card"]').should('have.length', 4);
+ kpi('mi355x').find('[data-testid="video-kpi-unavailable"]').should('contain', 'Not measured');
+ kpi('h200').should('contain', '$0.204').and('contain', '150.6').and('contain', '97.4');
+ kpi('b200').should('contain', '$0.150');
+ kpi('h100').should('contain', '$0.218').and('contain', '4 of 8 GPUs');
+ cy.get('[data-testid="video-config-bar"]').should(
+ 'contain',
+ '1344 × 768 · 8 s · 24 fps · 50 steps',
+ );
+ cy.get('[data-testid="video-chart-card"]').should(
+ 'contain',
+ 'MiniMaxAI/MiniMax-H3 @ 42ed227ee7df',
+ );
+ });
+ it('switches cost tier and GPU basis, reflecting both in the URL and the cards', () => {
+ mount();
+ cy.get('[role="combobox"][aria-label="Cost tier"]').click();
+ cy.contains('[role="option"]', 'Rent - 3 Year Commit').click();
+ // 2.9 $/hr ÷ 5.9732 videos/GPU-hr = 0.48550 → rounds down at three decimals.
+ kpi('h200').should('contain', '$0.485');
+ cy.location('search').should('contain', 'v_tier=r');
+ cy.get('[data-testid="video-tco-badge"]')
+ .first()
+ .should('contain', 'B200')
+ .and('contain', '3.70');
+ cy.get('[role="combobox"][aria-label="GPU basis"]').click();
+ cy.contains('[role="option"]', 'Allocated GPUs').click();
+ kpi('h100').should('contain', '$0.744');
+ cy.location('search').should('contain', 'v_basis=allocated');
+ });
+ it('adds dotted C2/C4 tails behind the queueing switch and isolates the Pareto-optimal hardware', () => {
+ mount();
+ cy.get('[data-testid="video-queue"]').click();
+ points().should('have.length', 9);
+ tails().should('have.length', 3);
+ cy.location('search').should('contain', 'v_queue=1');
+ cy.get('[data-testid="video-optimal"]').click();
+ points().should('have.length', 3);
+ tails().should('have.length', 1);
+ cy.location('search').should('contain', 'v_opt=1');
+ });
+ it('hides a hardware from the legend and shows the table view', () => {
+ mount();
+ cy.contains('[data-testid="video-legend"] li', 'H100').click();
+ points().should('have.length', 2);
+ cy.contains('button', 'Table').click();
+ cy.get('[data-testid="video-points-table"] tbody tr').should('have.length', 2);
+ cy.get('[data-testid="video-points-table"]')
+ .should('contain', 'H200')
+ .and('contain', 'B200')
+ .and('not.contain', 'H100');
+ cy.location('search').should('contain', 'v_view=table');
+ cy.get('[data-testid="video-runs-section"]').should('not.have.attr', 'open');
+ });
+ it('restores v_ params from the URL and opens the runs section for run deep links', () => {
+ mount('/video', '?v_y=kjPerVideo&v_x=genSpeed&v_queue=1&view=history');
+ points().should('have.length', 9);
+ cy.get('[data-testid="video-chart-card"]').should('contain', 'GPU-board energy per video (kJ)');
+ cy.get('[data-testid="video-runs-section"]').should('have.attr', 'open');
+ cy.get('[data-testid="video-ci-runs"]').should('exist');
+ });
+ it('renders Chinese copy on /zh/video', () => {
+ mount('/zh/video');
+ cy.get('[data-testid="video-chart-card"]').should(
+ 'contain',
+ '每 1 美元 TCO 生成视频数(Hyperscaler 自有设备)',
+ );
+ kpi('mi355x').should('contain', '未测得');
+ cy.get('[data-testid="video-config-bar"]').should('contain', '成本分档');
+ });
+});
diff --git a/packages/app/cypress/e2e/navigation.cy.ts b/packages/app/cypress/e2e/navigation.cy.ts
index 192491633..71ffb0537 100644
--- a/packages/app/cypress/e2e/navigation.cy.ts
+++ b/packages/app/cypress/e2e/navigation.cy.ts
@@ -389,6 +389,8 @@ describe('H3 video artifact viewer', () => {
}).as('history');
cy.visit('/video');
cy.wait('@history');
+ // The hardware dashboard leads; the run/history views live in a collapsible section.
+ cy.get('[data-testid="video-runs-section"] summary').click();
cy.get('[data-testid="video-history"] h1').should('contain', 'Performance history');
cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
cy.get('[aria-label="Client concurrency"]').click();
diff --git a/packages/app/src/app/(dashboard)/video/page.tsx b/packages/app/src/app/(dashboard)/video/page.tsx
index 1a3c8f965..9b4d7cae5 100644
--- a/packages/app/src/app/(dashboard)/video/page.tsx
+++ b/packages/app/src/app/(dashboard)/video/page.tsx
@@ -1,5 +1,5 @@
import type { Metadata } from 'next';
-import VideoCIRuns from '@/components/video-benchmark/VideoCIRuns';
+import VideoDashboard from '@/components/video-benchmark/VideoDashboard';
import { tabMetadata } from '@/lib/routing/tab-meta';
export const metadata: Metadata = {
@@ -7,5 +7,5 @@ export const metadata: Metadata = {
robots: { index: false, follow: false },
};
export default function VideoPage() {
- return ;
+ return ;
}
diff --git a/packages/app/src/app/zh/(dashboard)/video/page.tsx b/packages/app/src/app/zh/(dashboard)/video/page.tsx
index 885cbc279..ad8f5fafb 100644
--- a/packages/app/src/app/zh/(dashboard)/video/page.tsx
+++ b/packages/app/src/app/zh/(dashboard)/video/page.tsx
@@ -1,5 +1,5 @@
import type { Metadata } from 'next';
-import VideoCIRuns from '@/components/video-benchmark/VideoCIRuns';
+import VideoDashboard from '@/components/video-benchmark/VideoDashboard';
import { tabMetadataZh } from '@/lib/routing/tab-meta-zh';
export const metadata: Metadata = {
@@ -7,5 +7,5 @@ export const metadata: Metadata = {
robots: { index: false, follow: false },
};
export default function VideoPage() {
- return ;
+ return ;
}
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
new file mode 100644
index 000000000..2feb7dd5c
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -0,0 +1,400 @@
+'use client';
+
+import { useCallback, useEffect, useMemo, useState } from 'react';
+import {
+ HW_REGISTRY,
+ TCO_SOURCE_TITLE,
+ TCO_SOURCE_URL,
+} from '@semianalysisai/inferencex-constants';
+import { Button } from '@/components/ui/button';
+import ChartLegend from '@/components/ui/chart-legend';
+import { ChartSection } from '@/components/ui/chart-section';
+import { Heading } from '@/components/ui/heading';
+import { useThemeColors } from '@/hooks/useThemeColors';
+import { track } from '@/lib/analytics';
+import { useLocale } from '@/lib/use-locale';
+import { costPerGpuHour, hardwareLabel, VIDEO_HARDWARE_ROSTER } from './hardware';
+import {
+ metricLabel,
+ metricValue,
+ TIER_LABELS,
+ VIDEO_METRICS,
+ type MetricId,
+ type VideoPoint,
+} from './metrics';
+import { latestVideoCells } from './points';
+import { useVideoPoints } from './use-video-points';
+import VideoCIRuns from './VideoCIRuns';
+import VideoConfigBar from './VideoConfigBar';
+import VideoHardwareChart, { VIDEO_CHART_ID } from './VideoHardwareChart';
+import VideoKpiCards from './VideoKpiCards';
+import VideoPointsTable, { videoTableRows } from './VideoPointsTable';
+import {
+ DEFAULT_VIDEO_DASHBOARD_STATE,
+ readVideoDashboardState,
+ writeVideoDashboardState,
+ type VideoDashboardState,
+} from './video-url-state';
+
+/** URL params owned by the run/results/history views; any of them opens that section on load. */
+const RUNS_SECTION_PARAMS = [
+ 'run',
+ 'artifact',
+ 'source',
+ 'cell',
+ 'view',
+ 'compare',
+ 'history-hardware',
+ 'history-concurrency',
+ 'history-query',
+];
+const CSV_METRICS: readonly MetricId[] = [
+ 'p50Latency',
+ 'p90Latency',
+ 'genSpeed',
+ 'videosPerGpuHour',
+ 'videoSecondsPerGpuHour',
+ 'videosPerDollar',
+ 'dollarsPerVideo',
+ 'dollarsPerVideoSecond',
+ 'kjPerVideo',
+ 'videosPerKwh',
+ 'powerPctCap',
+];
+
+const STRINGS = {
+ en: {
+ title: 'VideoGenX · MiniMax-H3 across hardware',
+ subtitle:
+ 'One frozen workload, one model and runtime, measured on each GPU: time to video, useful output per GPU-hour and per TCO dollar, and metered GPU-board energy.',
+ chart: 'Chart',
+ table: 'Table',
+ viewToggle: 'Chart or table view',
+ tier: 'Cost tier',
+ badges: 'TCO $/chip/hr',
+ source: 'Source',
+ queue: 'Show queueing (C2/C4)',
+ optimal: 'Optimal only',
+ runs: 'Runs, videos & evidence',
+ runsHint: 'Per-run results, generated clips, fidelity checks and the performance history list.',
+ loading: 'Loading published results…',
+ error: 'Could not load published results',
+ retry: 'Retry',
+ replay: 'Replaying retained results (local fixture), not a new measurement.',
+ vs: 'vs.',
+ notMeasured: 'not measured',
+ runtime: 'runtime',
+ workloads: (n: number) => ` (+${n} more)`,
+ },
+ zh: {
+ title: 'VideoGenX · MiniMax-H3 跨硬件对比',
+ subtitle:
+ '同一冻结的工作负载、同一模型与运行时,在每种 GPU 上实测:出片时间、每 GPU 小时与每美元 TCO 的有效产出、GPU 板卡实测能耗。',
+ chart: '图表',
+ table: '表格',
+ viewToggle: '图表或表格视图',
+ tier: '成本分档',
+ badges: 'TCO $/chip/hr',
+ source: '来源',
+ queue: '显示排队尾迹(C2/C4)',
+ optimal: '仅最优',
+ runs: '运行、视频与证据',
+ runsHint: '按运行查看结果、生成的视频、保真度检查以及性能历史列表。',
+ loading: '正在加载已发布结果…',
+ error: '无法加载已发布结果',
+ retry: '重试',
+ replay: '正在回放保留结果(本地 fixture),不是新的测量。',
+ vs: 'vs.',
+ notMeasured: '未测得',
+ runtime: 'runtime',
+ workloads: (n: number) => `(另有 ${n} 个)`,
+ },
+};
+
+function csvCell(value: string | number | null): string {
+ if (value === null) return '';
+ const text = String(value);
+ return /[",\n]/u.test(text) ? `"${text.replaceAll('"', '""')}"` : text;
+}
+
+export default function VideoDashboard() {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const { points, loading, error, replay, retry } = useVideoPoints();
+ const [state, setState] = useState(DEFAULT_VIDEO_DASHBOARD_STATE);
+ const [hidden, setHidden] = useState>(() => new Set());
+ const [legendExpanded, setLegendExpanded] = useState(true);
+ const [runsOpen, setRunsOpen] = useState(false);
+ useEffect(() => {
+ setState(readVideoDashboardState(location.search));
+ const params = new URLSearchParams(location.search);
+ setRunsOpen(RUNS_SECTION_PARAMS.some((key) => params.has(key)));
+ }, []);
+ const update = useCallback((patch: Partial) => {
+ setState((old) => {
+ const next = { ...old, ...patch };
+ history.replaceState(null, '', writeVideoDashboardState(new URL(location.href), next));
+ return next;
+ });
+ }, []);
+
+ const hardwareKeys = useMemo(() => VIDEO_HARDWARE_ROSTER.map((item) => item.key), []);
+ const { resolveColor, getCssColor } = useThemeColors({
+ highContrast: false,
+ activeKeys: hardwareKeys,
+ });
+ const colorFor = useCallback(
+ (key: string) => getCssColor(resolveColor(key)),
+ [resolveColor, getCssColor],
+ );
+
+ const options = { tier: state.tier, basis: state.basis };
+ const cells = useMemo(() => latestVideoCells(points), [points]);
+ const measured = useMemo(
+ () => new Map(cells.filter((p) => p.concurrency === 1).map((p) => [p.hardwareKey, p])),
+ [cells],
+ );
+ const lead = cells.find((p) => p.concurrency === 1) ?? cells[0];
+ // "1344 × 768 · 8 s · 24 fps · 50 steps · model @ rev · seeds · prompt" → shape, then model @ rev.
+ const workloadParts = lead?.workload.split(' · ') ?? [];
+ const workloadLabel = workloadParts.slice(0, 4).join(' · ') || '—';
+ const modelLabel = workloadParts[4] ?? lead?.model ?? '—';
+ const otherWorkloads = new Set(cells.map((p) => p.workload.split(' · ').slice(0, 5).join(' · ')))
+ .size;
+ const workloadSuffix = otherWorkloads > 1 ? s.workloads(otherWorkloads - 1) : '';
+
+ const legendItems = VIDEO_HARDWARE_ROSTER.map(({ key, unavailable }) => {
+ const point = measured.get(key);
+ return {
+ name: key,
+ hw: key,
+ label: point
+ ? `${hardwareLabel(key)} · ${s.runtime} ${point.runtime.slice(0, 8)}`
+ : `${hardwareLabel(key)} · ${s.notMeasured}`,
+ color: colorFor(key),
+ isActive: point !== undefined && !hidden.has(key),
+ isRemovable: point !== undefined,
+ title: unavailable?.[locale],
+ onClick: (name: string) => {
+ if (!measured.has(name)) return;
+ setHidden((old) => {
+ const next = new Set(old);
+ if (next.has(name)) next.delete(name);
+ else next.add(name);
+ return next;
+ });
+ track('video_legend_toggled', { hardware: name });
+ },
+ };
+ });
+
+ const exportCsv = () => {
+ const rows = videoTableRows(points, state, hidden);
+ const header = [
+ 'hardware',
+ 'concurrency',
+ 'valid',
+ 'scheduled',
+ 'participating_gpus',
+ 'allocated_gpus',
+ ...CSV_METRICS.map((id) => `${id} (${VIDEO_METRICS[id].unit})`),
+ 'board_power_w',
+ 'enforced_limit_w',
+ 'runtime',
+ 'ci_run',
+ ];
+ const lines = rows.map((p) =>
+ [
+ hardwareLabel(p.hardwareKey ?? ''),
+ p.concurrency,
+ p.valid,
+ p.scheduled,
+ p.participating,
+ p.allocated,
+ ...CSV_METRICS.map((id) => metricValue(p, id, options)),
+ p.avgPowerW,
+ p.enforcedLimitW,
+ p.runtime,
+ `https://github.com/SemiAnalysisAI/InferenceX/actions/runs/${p.runId}`,
+ ]
+ .map(csvCell)
+ .join(','),
+ );
+ const blob = new Blob([`${[header.join(','), ...lines].join('\n')}\n`], {
+ type: 'text/csv;charset=utf-8',
+ });
+ const url = URL.createObjectURL(blob);
+ const anchor = document.createElement('a');
+ anchor.href = url;
+ anchor.download = `videogenx-${state.y}-vs-${state.x}-${state.tier}-${state.basis}.csv`;
+ anchor.click();
+ URL.revokeObjectURL(url);
+ };
+
+ return (
+
+
+
+ {s.title}
+
+
{s.subtitle}
+
+
+
+ {(['chart', 'table'] as const).map((view) => (
+ {
+ update({ view });
+ track('video_view_changed', { view });
+ }}
+ >
+ {s[view]}
+
+ ))}
+
+ }
+ >
+
+
+
+ {modelLabel} · {metricLabel(state.y, locale, options)} {s.vs}{' '}
+ {metricLabel(state.x, locale, options)}
+
+
+
+ {s.tier}: {TIER_LABELS[state.tier][locale]}
+
+
+ {s.badges}:
+ {hardwareKeys.map((key) => (
+
+ {HW_REGISTRY[key]?.badgeLabel ?? hardwareLabel(key)}{' '}
+ {costPerGpuHour(key, state.tier)?.toFixed(2) ?? '—'}
+
+ ))}
+
+
+ {s.source}:{' '}
+
+ {TCO_SOURCE_TITLE}
+
+
+
+
+ {replay && (
+
+ {s.replay}
+
+ )}
+ {loading && (
+
+ {s.loading}
+
+ )}
+ {error && (
+
+
+ {s.error}: {error}
+
+
+ {s.retry}
+
+
+ )}
+ {!loading && !error && (
+
+
+ {state.view === 'chart' ? (
+
+ track('video_point_selected', { hardware: p.hardwareKey ?? '', run: p.runId })
+ }
+ />
+ ) : (
+
+ )}
+
+
+ {
+ update({ queue: checked });
+ track('video_queue_changed', { value: String(checked) });
+ },
+ },
+ {
+ id: 'video-optimal',
+ label: s.optimal,
+ checked: state.optimal,
+ onCheckedChange: (checked) => {
+ update({ optimal: checked });
+ track('video_optimal_changed', { value: String(checked) });
+ },
+ },
+ ]}
+ />
+
+
+ )}
+
+
+
+ {
+ const open = event.currentTarget.open;
+ if (open === runsOpen) return;
+ setRunsOpen(open);
+ track('video_runs_section_toggled', { open });
+ }}
+ >
+
+ {s.runs}
+ {s.runsHint}
+
+ {runsOpen && }
+
+
+ );
+}
From 8f021885536b52f3a1778b1aa1b7caf83b336880 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:09:30 -0700
Subject: [PATCH 059/104] test: cover the video dashboard end to end with
retained fixtures
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增视频仪表板 E2E:v_ 参数恢复、排队尾迹、回放提示、history 深链接展开运行区块、中文页面;登记 timings 基线。
---
.../app/cypress/e2e/video-dashboard.cy.ts | 29 +++++++++++++++++++
packages/app/timings.json | 4 +++
2 files changed, 33 insertions(+)
create mode 100644 packages/app/cypress/e2e/video-dashboard.cy.ts
diff --git a/packages/app/cypress/e2e/video-dashboard.cy.ts b/packages/app/cypress/e2e/video-dashboard.cy.ts
new file mode 100644
index 000000000..0d55d052a
--- /dev/null
+++ b/packages/app/cypress/e2e/video-dashboard.cy.ts
@@ -0,0 +1,29 @@
+// Runs against the E2E_FIXTURES=1 server, which serves the retained
+// H100/H200/B200 observations from cypress/fixtures/api/video-history.json.
+describe('Video hardware dashboard (E2E fixtures)', () => {
+ it('leads with the cross-hardware chart and restores v_ params from the URL', () => {
+ cy.visit('/video?v_y=kjPerVideo&v_tier=r&v_queue=1');
+ cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 9);
+ cy.get('[data-testid="video-hardware-chart"] path.line-path').should('have.length', 3);
+ cy.get('[data-testid="video-chart-card"]')
+ .should('contain', 'GPU-board energy per video (kJ)')
+ .and('contain', 'Rent - 3 Year Commit');
+ cy.get('[data-testid="video-tco-badge"]').first().should('contain', 'B200');
+ cy.get('[data-testid="video-replay"]').should('be.visible');
+ cy.get('[data-testid="video-kpi-card"]').should('have.length', 4);
+ cy.get('[data-testid="video-runs-section"]').should('not.have.attr', 'open');
+ cy.get('[data-testid="video-ci-runs"]').should('not.exist');
+ });
+ it('opens the runs section for history deep links and renders the Chinese dashboard', () => {
+ cy.visit('/video?view=history');
+ cy.get('[data-testid="video-runs-section"]').should('have.attr', 'open');
+ cy.get('[data-testid="video-history"] h1').should('contain', 'Performance history');
+ cy.visit('/zh/video');
+ cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 3);
+ cy.get('[data-testid="video-chart-card"]').should(
+ 'contain',
+ '每 1 美元 TCO 生成视频数(Hyperscaler 自有设备)',
+ );
+ cy.get('[data-testid="video-kpi-card"][data-hardware="mi355x"]').should('contain', '未测得');
+ });
+});
diff --git a/packages/app/timings.json b/packages/app/timings.json
index d263bc053..35600e5cd 100644
--- a/packages/app/timings.json
+++ b/packages/app/timings.json
@@ -6041,6 +6041,10 @@
}
]
},
+ {
+ "spec": "cypress/e2e/video-dashboard.cy.ts",
+ "duration": 8000
+ },
{
"spec": "cypress/e2e/yaxis-metrics-render.cy.ts",
"duration": 5938,
From 30b9cd54fc40d8f2e2f9f17551f023e2e1e79d4f Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:16:49 -0700
Subject: [PATCH 060/104] docs: explain the VideoGenX dashboard data path, axes
and C1 default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增 VideoGenX 仪表板文档(数据路径、坐标轴与默认值、C1 默认原因、Pareto 包络、GPU 口径、未测得硬件与缺失值规则),在文档索引登记,并更新性能历史文档的入口说明。
---
docs/index.md | 1 +
docs/video-history.md | 4 ++--
docs/videogenx-dashboard.md | 29 +++++++++++++++++++++++++++++
3 files changed, 32 insertions(+), 2 deletions(-)
create mode 100644 docs/videogenx-dashboard.md
diff --git a/docs/index.md b/docs/index.md
index c237c2836..4bc1c1831 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -35,6 +35,7 @@ Design rationale and non-obvious conventions. See [CLAUDE.md](../CLAUDE.md) for
- [State Ownership](./state-ownership.md) — Which context owns which state, availability filtering cascade, comparison date mechanics, URL param sync
- [Blog](./blog.md) — MDX content system, SEO features (OG images, RSS, llms.txt, JSON-LD), TOC sidebar, reading progress, heading links, analytics events
- [CollectiveX](./collectivex.md) — lazy ingest-on-read pipeline (separate Neon DB as a durable GitHub-artifact cache), tombstoned deletes, raw-docs storage + shared reader
+- [VideoGenX dashboard](./videogenx-dashboard.md) — `/video` cross-hardware chart: published-history projection → points → metrics, TCO tiers and GPU basis, C1 default with queueing tails, Pareto hull, unavailable-hardware roster, null rules
- [Chinese Pages (/zh)](./i18n.md) — Why hand-authored /zh pages instead of an i18n framework, hreflang pairing, blog translation pairing, html lang workaround, CJK reading time/slugs
- [Chinese Copy Editorial Guide](./chinese-copy.md) — Audience, surface-specific register, context-aware terminology, rewrite workflow, manual-review process, and PR checklist
diff --git a/docs/video-history.md b/docs/video-history.md
index 67b12a032..9bdb2f128 100644
--- a/docs/video-history.md
+++ b/docs/video-history.md
@@ -1,6 +1,6 @@
# Video performance history
-`/video` and `/zh/video` default to **Performance history**. Explicit run/artifact/source/cell URLs retain the existing video viewer. `?view=results` opens the first readable artifact/source from the newest published page; `?view=history` restores history. History filters use `history-hardware`, `history-concurrency`, and `history-query` in the URL. Videos & result follows the same published-first path when no run is selected; empty or failed reads show a recoverable message. Browse CI runs explicitly opens legacy Actions discovery. Returning to History cancels pending result selection; Refresh and reload preserve the selected artifact/source/cell.
+`/video` and `/zh/video` lead with the cross-hardware dashboard (see [VideoGenX dashboard](./videogenx-dashboard.md)); the run, results and **Performance history** views described here live in the collapsible "Runs, videos & evidence" section below it, which opens automatically when the URL carries any of `run`, `artifact`, `source`, `cell`, `view`, `compare` or `history-*`. Explicit run/artifact/source/cell URLs retain the existing video viewer. `?view=results` opens the first readable artifact/source from the newest published page; `?view=history` restores history. History filters use `history-hardware`, `history-concurrency`, and `history-query` in the URL. Videos & result follows the same published-first path when no run is selected; empty or failed reads show a recoverable message. Browse CI runs explicitly opens legacy Actions discovery. Returning to History cancels pending result selection; Refresh and reload preserve the selected artifact/source/cell.
## Read path
@@ -24,7 +24,7 @@ Each observation also carries the cell's participating and allocated GPU counts,
## 中文说明
-`/video` 与 `/zh/video` 默认打开“性能历史”。原有 run/artifact/source/cell 链接仍打开对应结果;`?view=results` 打开最新发布页面中首个可读取的产物与原始运行;未选择运行时,“视频与结果”也使用该入口。空列表或读取失败会显示可恢复的提示;只有点击“浏览 CI 运行”才扫描 GitHub Actions。返回性能历史会取消正在进行的结果选择;刷新和重新加载保留产物、原始运行及并发配置。历史筛选条件保存在 URL,刷新后恢复。
+`/video` 与 `/zh/video` 首屏为跨硬件仪表板(见 [VideoGenX 仪表板](./videogenx-dashboard.md));本文描述的运行、结果与“性能历史”视图位于其下方可展开的“运行、视频与证据”区块,URL 带有 `run`、`artifact`、`source`、`cell`、`view`、`compare` 或 `history-*` 参数时自动展开。原有 run/artifact/source/cell 链接仍打开对应结果;`?view=results` 打开最新发布页面中首个可读取的产物与原始运行;未选择运行时,“视频与结果”也使用该入口。空列表或读取失败会显示可恢复的提示;只有点击“浏览 CI 运行”才扫描 GitHub Actions。返回性能历史会取消正在进行的结果选择;刷新和重新加载保留产物、原始运行及并发配置。历史筛选条件保存在 URL,刷新后恢复。
历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。每个 cell 另附参与/已分配 GPU 数、测量窗口秒数、视频时长与帧数、板卡平均功率之和、记录的生效功率上限之和(无快照时为 null)以及配置的 `tp_size` / `ulysses_degree` / `attention_backend`;这些都是同一 `schemaVersion: 1` 下可为空的附加字段,硬件仪表板据此推导全部指标,浏览器不再解析产物包。
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
new file mode 100644
index 000000000..1ba76f8d9
--- /dev/null
+++ b/docs/videogenx-dashboard.md
@@ -0,0 +1,29 @@
+# VideoGenX dashboard (/video)
+
+Why `/video` leads with a cross-hardware chart instead of a CI-run browser, and the rules its metrics obey. Component code lives in `packages/app/src/components/video-benchmark/` (`VideoDashboard.tsx` is the root).
+
+## Data path
+
+Published blob indexes → `GET /api/video-runs?format=history` (the per-cell projection described in [Video performance history](./video-history.md), with additive nullable fields for GPU counts, wall time, clip shape, board power, enforced limit and server layout) → `points.ts` (`videoPoints`, `latestVideoCells`) → `metrics.ts` (`metricValue`). The browser never parses an artifact bundle for the dashboard; media loads only inside the collapsed "Runs, videos & evidence" section, which mounts the previous `VideoCIRuns` views unchanged so `?run=`, `?view=`, `?compare=` and `history-*` deep links keep working and open that section automatically.
+
+## Axes and defaults
+
+`video-url-state.ts` owns the `v_*` URL params (`v_x`, `v_y`, `v_tier`, `v_basis`, `v_queue`, `v_opt`, `v_view`); defaults are omitted from the URL and every other param is left alone.
+
+- **X = P90 time to video (s)**, lower is better. `p50Latency` and `genSpeed` (frames/s per request, the closest analogue to interactivity) are the alternatives.
+- **Y = videos per $1 TCO** at the _Owning at Large Hyperscaler Volume_ tier. Cost per GPU-hour comes from `HW_REGISTRY` (`costh`/`costr`), the same SemiAnalysis TCO source `/inference` uses; the badge row and source link sit above the chart.
+- **GPU basis**: _participating_ GPUs (the boards that generated the clip — 4 per video with TP2 × Ulysses 2) is chip efficiency; _allocated_ GPUs (H100/B200 reserved 8) is what a deployment bills. One toggle apart, never mixed in one number.
+- **Why C1 by default**: the pinned H3 server is batch-one and single-replica, so client concurrency only queues requests — throughput stays flat while latency scales with C. C2/C4 render as dotted "queueing tails" behind the _Show queueing_ switch; they are evidence that batching does not help, not a frontier.
+- **Pareto hull** (`frontier.ts`) flips lower-is-better axes and reuses `paretoFrontUpperLeft` from the calculator. With one C1 point per hardware the hull is a cross-hardware comparison; a per-hardware curve needs a GPUs-per-video sweep (design plan P6, GPU work not authorised yet). When one hardware dominates outright (today: B200), no hull path is drawn.
+
+## Rules
+
+- **Unavailable hardware** stays visible. `VIDEO_HARDWARE_ROSTER` in `hardware.ts` lists the campaign targets; MI355X has no valid run and renders as a muted legend row, a "Not measured" KPI card with the failed-run link, and no table row. A missing point is never a zero.
+- **Nulls**: every formula returns `null` when an input is missing or invalid — power phase invalid, fewer than ten samples for P90, unknown hardware key, missing GPU count. `formatMetric` prints `—`.
+- **Newest observation wins**: `latestVideoCells` keeps the first (newest publication) observation per hardware × concurrency, so a re-run replaces, never duplicates, a point.
+- **Strings**: component-local `STRINGS = { en, zh }` via `useLocale()`; SKUs, units and identifiers stay English.
+- **Fixture**: `cypress/fixtures/api/video-history.json` is rebuilt from retained `StoredArtifact` exports with `bun run fixtures:video-history ` (`scripts/build-video-history-fixture.ts`); it is metadata only and registered in `_manifest.json`.
+
+## 中文说明
+
+`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;原有的运行/视频/历史视图收进可展开的“运行、视频与证据”区块,`?run=`、`?view=`、`?compare=` 和 `history-*` 深链接会自动展开该区块。默认 X 为 P90 出片时间、Y 为每 1 美元 TCO 视频数(Hyperscaler 自有设备分档,单价与 `/inference` 同源)。默认只画 C1:pinned H3 服务是 batch-one、单副本,客户端并发只会排队,C2/C4 作为可选的点线尾迹展示。Pareto 包络复用 calculator 的前沿算法;参与/已分配 GPU 口径一键切换;MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
From 2ae4189f090eee3921c9fabf239d5f5a48d4c199 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:20:35 -0700
Subject: [PATCH 061/104] fix: keep video KPI swatches hydration-safe and show
placeholders while loading
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:KPI 卡色块在首次渲染使用中性色,水合完成后再取主题色,消除 SSR/CSR 不一致;历史数据加载中显示占位骨架而不是误报“未测得”;E2E 增加 390 px 视口无横向滚动检查并输出截图。
---
.../cypress/component/video-dashboard.cy.tsx | 17 +++++++++++++++++
packages/app/cypress/e2e/video-dashboard.cy.ts | 17 +++++++++++++++++
.../video-benchmark/VideoDashboard.tsx | 18 ++++++++++++++----
.../video-benchmark/VideoKpiCards.tsx | 12 +++++++++++-
4 files changed, 59 insertions(+), 5 deletions(-)
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index 4464ce9cf..a48853455 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -88,6 +88,23 @@ describe('Video hardware dashboard (retained fixture)', () => {
cy.get('[data-testid="video-runs-section"]').should('have.attr', 'open');
cy.get('[data-testid="video-ci-runs"]').should('exist');
});
+ it('shows placeholders while loading instead of a false "Not measured"', () => {
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', (req) => {
+ req.reply({ fixture: 'api/video-history.json', delay: 800 });
+ }).as('slowHistory');
+ cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null });
+ cy.mount(
+
+
+ ,
+ );
+ cy.get('[data-testid="video-kpi-skeleton"]').should('have.length', 4);
+ cy.get('[data-testid="video-kpi-unavailable"]').should('not.exist');
+ cy.wait('@slowHistory');
+ cy.get('[data-testid="video-kpi-skeleton"]').should('not.exist');
+ kpi('h200').should('contain', '$0.204');
+ kpi('mi355x').find('[data-testid="video-kpi-unavailable"]').should('exist');
+ });
it('renders Chinese copy on /zh/video', () => {
mount('/zh/video');
cy.get('[data-testid="video-chart-card"]').should(
diff --git a/packages/app/cypress/e2e/video-dashboard.cy.ts b/packages/app/cypress/e2e/video-dashboard.cy.ts
index 0d55d052a..17860917b 100644
--- a/packages/app/cypress/e2e/video-dashboard.cy.ts
+++ b/packages/app/cypress/e2e/video-dashboard.cy.ts
@@ -26,4 +26,21 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
);
cy.get('[data-testid="video-kpi-card"][data-hardware="mi355x"]').should('contain', '未测得');
});
+ it('fits a phone viewport without horizontal page scroll in both locales', () => {
+ cy.viewport(390, 844);
+ for (const path of ['/video?v_queue=1', '/zh/video']) {
+ cy.visit(path);
+ cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length.at.least', 3);
+ cy.get('[data-testid="video-kpi-card"]').should('have.length', 4);
+ cy.document().then((doc) => {
+ expect(doc.documentElement.scrollWidth, `${path} page width`).to.be.at.most(
+ doc.documentElement.clientWidth,
+ );
+ });
+ cy.screenshot(`video-dashboard-390${path.startsWith('/zh') ? '-zh' : '-en'}`, {
+ capture: 'fullPage',
+ overwrite: true,
+ });
+ }
+ });
});
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index 2feb7dd5c..7147cbdf4 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -1,6 +1,6 @@
'use client';
-import { useCallback, useEffect, useMemo, useState } from 'react';
+import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from 'react';
import {
HW_REGISTRY,
TCO_SOURCE_TITLE,
@@ -111,6 +111,8 @@ const STRINGS = {
},
};
+const subscribeNoop = () => () => {};
+
function csvCell(value: string | number | null): string {
if (value === null) return '';
const text = String(value);
@@ -143,9 +145,17 @@ export default function VideoDashboard() {
highContrast: false,
activeKeys: hardwareKeys,
});
+ // Vendor hues depend on the resolved theme and computed styles, which the
+ // server cannot know; render the neutral token until hydration completes so
+ // the first client render matches the server HTML.
+ const mounted = useSyncExternalStore(
+ subscribeNoop,
+ () => true,
+ () => false,
+ );
const colorFor = useCallback(
- (key: string) => getCssColor(resolveColor(key)),
- [resolveColor, getCssColor],
+ (key: string) => (mounted ? getCssColor(resolveColor(key)) : 'var(--muted-foreground)'),
+ [mounted, resolveColor, getCssColor],
);
const options = { tier: state.tier, basis: state.basis };
@@ -377,7 +387,7 @@ export default function VideoDashboard() {
)}
-
+
string;
+ /** While the published history loads, show placeholders rather than a false "Not measured". */
+ loading?: boolean;
}) {
const locale = useLocale();
const s = STRINGS[locale];
@@ -73,7 +77,13 @@ export default function VideoKpiCards({
)}
- {point ? (
+ {!point && loading ? (
+
+ {CARD_METRICS.map((id) => (
+
+ ))}
+
+ ) : point ? (
{CARD_METRICS.map((id) => (
From 70bc22810e33e7718d1af77a0239bb2f566bd064 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:23:37 -0700
Subject: [PATCH 062/104] fix: align video dashboard Chinese labels with
existing tier and metric wording
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:统一“成本档位”“仅最优”等既有用词;指标中文改为“每 GPU 小时生成视频数”“每秒视频时长 TCO 成本”“每 kWh GPU 板卡电能生成视频数”;重写包络说明与副标题,使其更贴近中文技术表达且不夸大“吞吐量不变”的结论。
---
packages/app/cypress/component/video-dashboard.cy.tsx | 2 +-
.../app/src/components/video-benchmark/VideoConfigBar.tsx | 2 +-
.../app/src/components/video-benchmark/VideoDashboard.tsx | 4 ++--
.../src/components/video-benchmark/VideoHardwareChart.tsx | 2 +-
.../app/src/components/video-benchmark/VideoKpiCards.tsx | 4 ++--
packages/app/src/components/video-benchmark/metrics.ts | 6 +++---
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index a48853455..ab71bc582 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -112,6 +112,6 @@ describe('Video hardware dashboard (retained fixture)', () => {
'每 1 美元 TCO 生成视频数(Hyperscaler 自有设备)',
);
kpi('mi355x').should('contain', '未测得');
- cy.get('[data-testid="video-config-bar"]').should('contain', '成本分档');
+ cy.get('[data-testid="video-config-bar"]').should('contain', '成本档位');
});
});
diff --git a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
index d7b1d6d98..d3927ce09 100644
--- a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
+++ b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
@@ -43,7 +43,7 @@ const STRINGS = {
all: 'C1 + C2/C4 排队尾迹',
x: 'X 轴指标',
y: 'Y 轴指标',
- tier: '成本分档',
+ tier: '成本档位',
basis: 'GPU 口径',
participating: '参与计算的 GPU(实际生成视频的板卡)',
allocated: '已分配的 GPU(作业预留的板卡)',
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index 7147cbdf4..ef9d81c7c 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -89,11 +89,11 @@ const STRINGS = {
zh: {
title: 'VideoGenX · MiniMax-H3 跨硬件对比',
subtitle:
- '同一冻结的工作负载、同一模型与运行时,在每种 GPU 上实测:出片时间、每 GPU 小时与每美元 TCO 的有效产出、GPU 板卡实测能耗。',
+ '固定的工作负载、模型与运行时,在每种 GPU 上实测:出片时间、每 GPU 小时和每美元 TCO 的有效产出,以及 GPU 板卡的实测能耗。',
chart: '图表',
table: '表格',
viewToggle: '图表或表格视图',
- tier: '成本分档',
+ tier: '成本档位',
badges: 'TCO $/chip/hr',
source: '来源',
queue: '显示排队尾迹(C2/C4)',
diff --git a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
index b9b91d560..26880b2e6 100644
--- a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
+++ b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
@@ -73,7 +73,7 @@ const STRINGS = {
noData: 'No hardware has both selected metrics for this configuration.',
},
zh: {
- hull: '虚线连接 C1 下 Pareto 最优的硬件;点线尾迹为 batch-one 服务器上 C2/C4 客户端并发的表现:请求排队、吞吐量不变,它们是证据而不是前沿。',
+ hull: '虚线包络连接 C1 下 Pareto 最优的硬件;点线尾迹是 batch-one 服务器上 C2/C4 客户端并发的结果:请求排队、吞吐量基本持平,因此只是证据,不构成前沿。',
controls: 'Shift+滚轮缩放,拖动平移,双击重置。点击数据点可固定详情。',
n: '有效样本',
run: '运行',
diff --git a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
index 8912f173f..0b5a985f2 100644
--- a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
+++ b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
@@ -31,8 +31,8 @@ const STRINGS = {
zh: {
p50Latency: 'P50 出片时间(s)',
videosPerGpuHour: '视频数 / GPU 小时',
- dollarsPerVideo: 'TCO / 条',
- kjPerVideo: 'kJ / 条',
+ dollarsPerVideo: 'TCO / 条视频',
+ kjPerVideo: 'kJ / 条视频',
powerPctCap: '板卡功率 / 上限',
p90: 'P90',
gpus: '张 GPU',
diff --git a/packages/app/src/components/video-benchmark/metrics.ts b/packages/app/src/components/video-benchmark/metrics.ts
index 5f09eebe8..68e80eab4 100644
--- a/packages/app/src/components/video-benchmark/metrics.ts
+++ b/packages/app/src/components/video-benchmark/metrics.ts
@@ -115,7 +115,7 @@ export const VIDEO_METRICS: Record = {
},
videosPerGpuHour: {
label: 'Videos per GPU-hour',
- labelZh: '每 GPU 小时视频数',
+ labelZh: '每 GPU 小时生成视频数',
unit: 'videos/GPU-hr',
polarity: 'higher',
digits: 2,
@@ -138,7 +138,7 @@ export const VIDEO_METRICS: Record = {
},
dollarsPerVideoSecond: {
label: 'TCO cost per video-second',
- labelZh: '每视频秒 TCO 成本',
+ labelZh: '每秒视频时长 TCO 成本',
unit: '$/video-s',
polarity: 'lower',
digits: 4,
@@ -154,7 +154,7 @@ export const VIDEO_METRICS: Record = {
},
videosPerKwh: {
label: 'Videos per GPU-board kWh',
- labelZh: '每 GPU 板卡 kWh 视频数',
+ labelZh: '每 kWh GPU 板卡电能生成视频数',
unit: 'videos/kWh',
polarity: 'higher',
digits: 2,
From 2a671b916290ce060da8946bae38da11ccdc4f2d Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:51:38 -0700
Subject: [PATCH 063/104] feat: key video cells by deployment and carry the
replica count
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
A deployment is the server layout that produced a cell (participating GPUs,
tp_size × ulysses_degree); cells that differ only in client concurrency share
it. latestVideoCells now dedupes per hardware × deployment × concurrency so a
GPUs-per-video sweep adds points instead of replacing them. Project the
endpoint replica count (execution.deployment.replica_count, null before that
record existed) and classify concurrency above one request per replica as
queueing; leadCell picks each hardware's most efficient deployment. Fixture
rebuilt from the retained exports (replicas: null).
中文:视频 cell 改为按“部署”(参与 GPU 数、tp_size × ulysses_degree)作键,仅并发不同的
cell 属于同一部署,GPUs-per-video 扫描会新增点而不是覆盖。投影新增端点副本数
(早于该记录的产物包为 null),并发超过每副本一个请求判定为排队;leadCell 选出每种硬件
最高效的部署。fixture 已按保留导出重建。
---
docs/video-history.md | 4 +-
.../app/cypress/fixtures/api/_manifest.json | 6 +-
.../cypress/fixtures/api/video-history.json | 9 +++
.../video-benchmark/deployment.test.ts | 81 +++++++++++++++++++
.../components/video-benchmark/deployment.ts | 62 ++++++++++++++
.../video-benchmark/history.test.ts | 1 +
.../src/components/video-benchmark/history.ts | 3 +
.../video-benchmark/metrics.test.ts | 1 +
.../src/components/video-benchmark/metrics.ts | 2 +
.../components/video-benchmark/points.test.ts | 1 +
.../src/components/video-benchmark/points.ts | 12 ++-
.../components/video-benchmark/tradeoff.ts | 2 +
12 files changed, 175 insertions(+), 9 deletions(-)
create mode 100644 packages/app/src/components/video-benchmark/deployment.test.ts
create mode 100644 packages/app/src/components/video-benchmark/deployment.ts
diff --git a/docs/video-history.md b/docs/video-history.md
index 9bdb2f128..6063551bf 100644
--- a/docs/video-history.md
+++ b/docs/video-history.md
@@ -8,7 +8,7 @@
The projection groups all cells under the original source inside one artifact entry. It reuses `storedBundle`, `servingCells`, `storedFidelityBundle`, and the existing tradeoff calculations. Invalid or unavailable indexes remain explicit error entries. Original execution time comes from `ci.started_at`; index publication time is separate and must never be substituted for execution time. Original run IDs and export run IDs remain distinct.
-Each observation also carries the cell's participating and allocated GPU counts, measurement wall seconds, clip duration and frame count, summed mean board watts, summed recorded enforced limits (null when no limit snapshot exists) and the configured `tp_size` / `ulysses_degree` / `attention_backend`. These are additive, nullable fields under the same `schemaVersion: 1`; the hardware dashboard derives every displayed metric from them, so the browser never parses an artifact bundle for the chart.
+Each observation also carries the cell's participating and allocated GPU counts, measurement wall seconds, clip duration and frame count, summed mean board watts, summed recorded enforced limits (null when no limit snapshot exists), the configured `tp_size` / `ulysses_degree` / `attention_backend` and the endpoint's replica count (`execution.deployment.replica_count`, null for bundles that predate it). These are additive, nullable fields under the same `schemaVersion: 1`; the hardware dashboard derives every displayed metric from them, so the browser never parses an artifact bundle for the chart.
## Evidence boundaries
@@ -26,7 +26,7 @@ Each observation also carries the cell's participating and allocated GPU counts,
`/video` 与 `/zh/video` 首屏为跨硬件仪表板(见 [VideoGenX 仪表板](./videogenx-dashboard.md));本文描述的运行、结果与“性能历史”视图位于其下方可展开的“运行、视频与证据”区块,URL 带有 `run`、`artifact`、`source`、`cell`、`view`、`compare` 或 `history-*` 参数时自动展开。原有 run/artifact/source/cell 链接仍打开对应结果;`?view=results` 打开最新发布页面中首个可读取的产物与原始运行;未选择运行时,“视频与结果”也使用该入口。空列表或读取失败会显示可恢复的提示;只有点击“浏览 CI 运行”才扫描 GitHub Actions。返回性能历史会取消正在进行的结果选择;刷新和重新加载保留产物、原始运行及并发配置。历史筛选条件保存在 URL,刷新后恢复。
-历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。每个 cell 另附参与/已分配 GPU 数、测量窗口秒数、视频时长与帧数、板卡平均功率之和、记录的生效功率上限之和(无快照时为 null)以及配置的 `tp_size` / `ulysses_degree` / `attention_backend`;这些都是同一 `schemaVersion: 1` 下可为空的附加字段,硬件仪表板据此推导全部指标,浏览器不再解析产物包。
+历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。每个 cell 另附参与/已分配 GPU 数、测量窗口秒数、视频时长与帧数、板卡平均功率之和、记录的生效功率上限之和(无快照时为 null)、配置的 `tp_size` / `ulysses_degree` / `attention_backend`,以及端点的副本数(`execution.deployment.replica_count`,早于该记录的产物包为 null);这些都是同一 `schemaVersion: 1` 下可为空的附加字段,硬件仪表板据此推导全部指标,浏览器不再解析产物包。
当前展示观测值,未选择匹配基线,也不计算 before/after。延迟、吞吐量使用提交到下载完成的窗口;板卡能耗使用记录的生成窗口。保真度、阈值校准、发布验收单独展示。筛选仅作用于已加载的页面,可继续加载较早结果。
diff --git a/packages/app/cypress/fixtures/api/_manifest.json b/packages/app/cypress/fixtures/api/_manifest.json
index be6ce66ba..104ef24bf 100644
--- a/packages/app/cypress/fixtures/api/_manifest.json
+++ b/packages/app/cypress/fixtures/api/_manifest.json
@@ -101,9 +101,9 @@
"topLevel": "object"
},
"video-history": {
- "bytes": 18083,
- "capturedAt": "2026-09-20T02:56:12.184Z",
- "sha256": "8a748582af68a5d259ad06f7295a3a5b92989ed0b5c0798eefb69600e22cdb77",
+ "bytes": 18371,
+ "capturedAt": "2026-09-20T03:49:19.738Z",
+ "sha256": "16c1b9c97824fc68160454c14aeb79f2c3404595a5bd97b9bb8f286de42539f9",
"source": "Retained public H3 metadata replay from original runs via videoHistoryEntry (per-cell GPU counts, board power and server layout); publication time unavailable. No new benchmark or publication.",
"topLevel": "object"
}
diff --git a/packages/app/cypress/fixtures/api/video-history.json b/packages/app/cypress/fixtures/api/video-history.json
index 65a72f04c..5d8443a7b 100644
--- a/packages/app/cypress/fixtures/api/video-history.json
+++ b/packages/app/cypress/fixtures/api/video-history.json
@@ -43,6 +43,7 @@
"energyKj": 431.14963489170344,
"participating": 4,
"allocated": 8,
+ "replicas": null,
"wallSeconds": 3349.37367718108,
"durationSeconds": 8,
"frameCount": 192,
@@ -74,6 +75,7 @@
"energyKj": 431.32628015924786,
"participating": 4,
"allocated": 8,
+ "replicas": null,
"wallSeconds": 3352.7401133067906,
"durationSeconds": 8,
"frameCount": 192,
@@ -136,6 +138,7 @@
"energyKj": 430.80324425396446,
"participating": 4,
"allocated": 8,
+ "replicas": null,
"wallSeconds": 3352.988327450119,
"durationSeconds": 8,
"frameCount": 192,
@@ -198,6 +201,7 @@
"energyKj": 410.954300515549,
"participating": 4,
"allocated": 4,
+ "replicas": null,
"wallSeconds": 3013.44202613004,
"durationSeconds": 8,
"frameCount": 192,
@@ -229,6 +233,7 @@
"energyKj": 409.91272507134966,
"participating": 4,
"allocated": 4,
+ "replicas": null,
"wallSeconds": 3001.4726729940157,
"durationSeconds": 8,
"frameCount": 192,
@@ -260,6 +265,7 @@
"energyKj": 413.58283766782114,
"participating": 4,
"allocated": 4,
+ "replicas": null,
"wallSeconds": 3006.626674519968,
"durationSeconds": 8,
"frameCount": 192,
@@ -322,6 +328,7 @@
"energyKj": 301.08754501100987,
"participating": 4,
"allocated": 8,
+ "replicas": null,
"wallSeconds": 1561.6792716470081,
"durationSeconds": 8,
"frameCount": 192,
@@ -353,6 +360,7 @@
"energyKj": 300.10551714629605,
"participating": 4,
"allocated": 8,
+ "replicas": null,
"wallSeconds": 1539.571618376067,
"durationSeconds": 8,
"frameCount": 192,
@@ -384,6 +392,7 @@
"energyKj": 299.96858693604275,
"participating": 4,
"allocated": 8,
+ "replicas": null,
"wallSeconds": 1539.5502297059866,
"durationSeconds": 8,
"frameCount": 192,
diff --git a/packages/app/src/components/video-benchmark/deployment.test.ts b/packages/app/src/components/video-benchmark/deployment.test.ts
new file mode 100644
index 000000000..37f3586d8
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/deployment.test.ts
@@ -0,0 +1,81 @@
+import { describe, expect, it } from 'vitest';
+import { deploymentKey, isQueueing, layoutLabel, leadCell } from './deployment';
+import type { VideoPoint } from './metrics';
+
+const base: VideoPoint = {
+ id: 'a',
+ runId: '1',
+ artifactId: 1,
+ cell: 'c1',
+ hardwareKey: 'h200',
+ hardwareName: 'NVIDIA H200',
+ runtime: 'r',
+ model: 'm',
+ workload: 'w',
+ concurrency: 1,
+ participating: 4,
+ allocated: 8,
+ replicas: null,
+ valid: 20,
+ completed: 20,
+ scheduled: 20,
+ failed: 0,
+ samples: 20,
+ p50: 150,
+ p90: 151,
+ wallSeconds: 3000,
+ durationSeconds: 8,
+ frameCount: 192,
+ energyKj: 400,
+ avgPowerW: 2700,
+ enforcedLimitW: 2800,
+ server: { tp: 2, ulysses: 2, attention: null },
+ status: 'complete',
+ observedAt: null,
+};
+const options = { tier: 'h', basis: 'participating' } as const;
+
+describe('deployment', () => {
+ it('keys a deployment by boards and model split, not by concurrency', () => {
+ const c4: VideoPoint = { ...base, concurrency: 4 };
+ expect(deploymentKey(base)).toBe('4g:tp2:u2');
+ expect(deploymentKey(c4)).toBe('4g:tp2:u2');
+ expect(deploymentKey({ ...base, server: { tp: 1, ulysses: 4, attention: null } })).toBe(
+ '4g:tp1:u4',
+ );
+ expect(deploymentKey({ ...base, participating: null, server: null })).toBe('nag:tpna:una');
+ });
+ it('treats concurrency above the replica count as queueing, with one replica when unknown', () => {
+ expect(isQueueing(base)).toBe(false);
+ expect(isQueueing({ ...base, concurrency: 2 })).toBe(true);
+ expect(isQueueing({ ...base, concurrency: 4, replicas: 4 })).toBe(false);
+ expect(isQueueing({ ...base, concurrency: 8, replicas: 4 })).toBe(true);
+ expect(isQueueing({ ...base, concurrency: null })).toBe(false);
+ });
+ it('labels the layout in both locales and omits unknown parts', () => {
+ expect(layoutLabel(base, 'en')).toBe('4 GPU · TP2 × Ulysses 2');
+ expect(layoutLabel({ ...base, replicas: 2 }, 'zh')).toBe(
+ '4 张 GPU · TP2 × Ulysses 2 · 2 个副本',
+ );
+ expect(layoutLabel({ ...base, server: null }, 'en')).toBe('4 GPU');
+ expect(layoutLabel({ ...base, participating: null, server: null }, 'en')).toBe('—');
+ });
+ it('leads with the most efficient non-queued deployment of the hardware', () => {
+ const eightBoards = {
+ ...base,
+ id: 'b',
+ participating: 8,
+ server: { tp: 4, ulysses: 2, attention: null },
+ p50: 90,
+ wallSeconds: 1800, // 20 × 3600 / (1800 × 8) = 5.0 videos per GPU-hour
+ };
+ const queued = { ...base, id: 'c', concurrency: 2, wallSeconds: 2900 }; // higher rate, but queued
+ // base: 20 × 3600 / (3000 × 4) = 6.0 videos per GPU-hour
+ expect(leadCell([eightBoards, queued, base], 'h200', options)?.id).toBe('a');
+ expect(leadCell([eightBoards, queued, base], 'b200', options)).toBeUndefined();
+ const tie = { ...eightBoards, id: 'd', participating: 4, wallSeconds: 3000, p50: 120 };
+ expect(leadCell([base, tie], 'h200', options)?.id).toBe('d');
+ const noRate = { ...base, id: 'e', wallSeconds: null };
+ expect(leadCell([noRate], 'h200', options)?.id).toBe('e');
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/deployment.ts b/packages/app/src/components/video-benchmark/deployment.ts
new file mode 100644
index 000000000..9aa17b6e9
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/deployment.ts
@@ -0,0 +1,62 @@
+import { metricValue, type MetricOptions, type VideoPoint } from './metrics';
+
+type Layout = Pick;
+
+/**
+ * A deployment is the server layout that produced a cell: how many GPU boards
+ * served one request and how they split the model (tensor parallel × Ulysses
+ * sequence parallel). Cells that differ only in client concurrency belong to
+ * the same deployment, so they share this key.
+ */
+export function deploymentKey(p: Pick): string {
+ return `${p.participating ?? 'na'}g:tp${p.server?.tp ?? 'na'}:u${p.server?.ulysses ?? 'na'}`;
+}
+
+/**
+ * On a batch-one server every request beyond one per replica waits in a queue:
+ * latency grows with concurrency while throughput stays flat. Such a cell is
+ * evidence about the same deployment, never a new point on its frontier.
+ * Bundles that predate the deployment record ran one supervised endpoint, so
+ * an unknown replica count reads as one.
+ */
+export function isQueueing(p: Pick): boolean {
+ return (p.concurrency ?? 1) > (p.replicas ?? 1);
+}
+
+/** "4 GPU · TP2 × Ulysses 2", plus the replica count when more than one. */
+export function layoutLabel(p: Layout, locale: 'en' | 'zh'): string {
+ const parts: string[] = [];
+ if (p.participating !== null)
+ parts.push(locale === 'zh' ? `${p.participating} 张 GPU` : `${p.participating} GPU`);
+ const tp = p.server?.tp ?? null;
+ const ulysses = p.server?.ulysses ?? null;
+ if (tp !== null && ulysses !== null) parts.push(`TP${tp} × Ulysses ${ulysses}`);
+ if (p.replicas !== null && p.replicas > 1)
+ parts.push(locale === 'zh' ? `${p.replicas} 个副本` : `${p.replicas} replicas`);
+ return parts.length > 0 ? parts.join(' · ') : '—';
+}
+
+/**
+ * The cell that stands for a hardware in cards and comparisons: its most
+ * efficient deployment under the current GPU basis (highest videos per
+ * GPU-hour), lowest P50 on ties. Queued cells never lead; a hardware whose
+ * cells all lack the rate falls back to its first deployment cell.
+ */
+export function leadCell(
+ cells: VideoPoint[],
+ hardwareKey: string,
+ options: MetricOptions,
+): VideoPoint | undefined {
+ let best: VideoPoint | undefined;
+ let bestRate = Number.NEGATIVE_INFINITY;
+ for (const p of cells) {
+ if (p.hardwareKey !== hardwareKey || isQueueing(p)) continue;
+ const rate = metricValue(p, 'videosPerGpuHour', options) ?? Number.NEGATIVE_INFINITY;
+ const faster = rate === bestRate && (p.p50 ?? Infinity) < (best?.p50 ?? Infinity);
+ if (best === undefined || rate > bestRate || faster) {
+ best = p;
+ bestRate = rate;
+ }
+ }
+ return best;
+}
diff --git a/packages/app/src/components/video-benchmark/history.test.ts b/packages/app/src/components/video-benchmark/history.test.ts
index 72673fb03..337089f9a 100644
--- a/packages/app/src/components/video-benchmark/history.test.ts
+++ b/packages/app/src/components/video-benchmark/history.test.ts
@@ -56,6 +56,7 @@ describe('video history projection', () => {
expect(c1).toMatchObject({
participating: 2,
allocated: 2,
+ replicas: null,
wallSeconds: 480,
durationSeconds: 4,
frameCount: 107,
diff --git a/packages/app/src/components/video-benchmark/history.ts b/packages/app/src/components/video-benchmark/history.ts
index aa9f9d541..337b60158 100644
--- a/packages/app/src/components/video-benchmark/history.ts
+++ b/packages/app/src/components/video-benchmark/history.ts
@@ -26,6 +26,8 @@ export interface VideoHistoryObservation {
participating: number | null;
/** GPU boards the job reserved (Slurm AllocTRES or the retained AMD binding); null when unknown. */
allocated: number | null;
+ /** Replicas behind the endpoint (`execution.deployment.replica_count`); null before that record existed. */
+ replicas: number | null;
wallSeconds: number | null;
durationSeconds: number | null;
frameCount: number | null;
@@ -134,6 +136,7 @@ export function videoHistoryEntry(
energyKj: point.energy === null ? null : point.energy / 1000,
participating: point.participating,
allocated: point.allocated,
+ replicas: point.replicas,
wallSeconds: point.wall,
durationSeconds: number(at(point.workload, 'generation', 'duration_seconds')),
frameCount: number(at(point.workload, 'generation', 'frame_count')),
diff --git a/packages/app/src/components/video-benchmark/metrics.test.ts b/packages/app/src/components/video-benchmark/metrics.test.ts
index e26bc1752..19f963dfd 100644
--- a/packages/app/src/components/video-benchmark/metrics.test.ts
+++ b/packages/app/src/components/video-benchmark/metrics.test.ts
@@ -15,6 +15,7 @@ const h200: VideoPoint = {
concurrency: 1,
participating: 4,
allocated: 4,
+ replicas: null,
valid: 20,
completed: 20,
scheduled: 20,
diff --git a/packages/app/src/components/video-benchmark/metrics.ts b/packages/app/src/components/video-benchmark/metrics.ts
index 68e80eab4..da55c8675 100644
--- a/packages/app/src/components/video-benchmark/metrics.ts
+++ b/packages/app/src/components/video-benchmark/metrics.ts
@@ -18,6 +18,8 @@ export interface VideoPoint {
concurrency: number | null;
participating: number | null;
allocated: number | null;
+ /** Model replicas behind the endpoint; null for bundles that predate the deployment record. */
+ replicas: number | null;
valid: number | null;
completed: number | null;
scheduled: number | null;
diff --git a/packages/app/src/components/video-benchmark/points.test.ts b/packages/app/src/components/video-benchmark/points.test.ts
index 64a25c31b..1d54e8947 100644
--- a/packages/app/src/components/video-benchmark/points.test.ts
+++ b/packages/app/src/components/video-benchmark/points.test.ts
@@ -22,6 +22,7 @@ const observation: VideoHistoryObservation = {
energyKj: 410.95,
participating: 4,
allocated: 4,
+ replicas: null,
wallSeconds: 3013.4,
durationSeconds: 8,
frameCount: 192,
diff --git a/packages/app/src/components/video-benchmark/points.ts b/packages/app/src/components/video-benchmark/points.ts
index bac2848fa..ec3d73208 100644
--- a/packages/app/src/components/video-benchmark/points.ts
+++ b/packages/app/src/components/video-benchmark/points.ts
@@ -1,3 +1,4 @@
+import { deploymentKey } from './deployment';
import { hardwareKey, hardwareSort } from './hardware';
import type { VideoHistoryObservation, VideoHistoryPage } from './history';
import type { VideoPoint } from './metrics';
@@ -51,6 +52,7 @@ function toPoint(
concurrency: num(o.concurrency),
participating: num(o.participating),
allocated: num(o.allocated),
+ replicas: num(o.replicas),
valid: num(o.valid),
completed: num(o.completed),
scheduled: num(o.scheduled),
@@ -78,15 +80,17 @@ function toPoint(
}
/**
- * Newest published observation per (hardware, concurrency) cell. Points arrive
- * newest publication first, so the first occurrence wins; hardware without a
- * registry key is kept as-is because nothing can be compared against it.
+ * Newest published observation per (hardware, deployment, concurrency) cell.
+ * Points arrive newest publication first, so the first occurrence wins; hardware
+ * without a registry key is kept as-is because nothing can be compared against
+ * it. Two server layouts of one hardware are different cells, so a GPUs-per-video
+ * sweep adds points instead of replacing the existing one.
*/
export function latestVideoCells(points: VideoPoint[]): VideoPoint[] {
const seen = new Set();
return points.filter((point) => {
if (point.hardwareKey === null) return true;
- const key = `${point.hardwareKey}:${point.concurrency ?? 'na'}`;
+ const key = `${point.hardwareKey}:${deploymentKey(point)}:${point.concurrency ?? 'na'}`;
if (seen.has(key)) return false;
seen.add(key);
return true;
diff --git a/packages/app/src/components/video-benchmark/tradeoff.ts b/packages/app/src/components/video-benchmark/tradeoff.ts
index aef07f516..ffdaec7d3 100644
--- a/packages/app/src/components/video-benchmark/tradeoff.ts
+++ b/packages/app/src/components/video-benchmark/tradeoff.ts
@@ -154,6 +154,7 @@ function pairedTradeoffPoints(run: TradeoffRun) {
boundary: text(at(metrics, 'measurement', 'boundary')),
allocated: positive(at(result, 'hardware', 'reserved_gpu_count')),
participating: positive(at(result, 'hardware', 'selected_gpu_count')),
+ replicas: positive(at(result, 'execution', 'deployment', 'replica_count')),
energy,
powerLimit,
timing: serverTimingSummary(null, false),
@@ -233,6 +234,7 @@ function servingTradeoffPoints(run: TradeoffRun) {
boundary: text(boundary),
allocated,
participating: uuids.length > 0 && new Set(uuids).size === uuids.length ? uuids.length : null,
+ replicas: positive(at(b.result, 'execution', 'deployment', 'replica_count')),
energy: powerValid ? positive(at(phase, 'aggregate', 'joules_per_valid_clip')) : null,
power: powerValid ? number(at(phase, 'aggregate', 'avg_power_w')) : null,
powerWindow: powerValid ? number(at(phase, 'duration_seconds')) : null,
From 9d542cc6b649ba0bab0769bf5152068a8da188d7 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:51:50 -0700
Subject: [PATCH 064/104] feat: draw per-hardware Pareto frontiers over
deployments, never through queued cells
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Client concurrency on the batch-one H3 server only queues requests (retained
C1/C2/C4 throughput is flat within ±1.5 %), so the dotted C1→C2→C4 tails were
not a frontier and are gone. plotVideoPoints builds each hardware's Pareto
frontier over its deployment cells and draws a solid line once two or more
frontier deployments exist; dominated deployments render faded and "Optimal
only" hides them. Queued cells are opt-in faded markers that never join a
line. A "Pareto frontier" switch (v_frontier) adds the dashed cross-hardware
frontier as on /inference; when one hardware dominates the caption says so.
With one deployment per hardware today the chart is a scatter whose caption
names the measured layout and the sweep a curve needs. The config bar states
the measured deployments, the table and CSV carry deployment and queued
columns, and KPI cards show each hardware's lead deployment.
中文:batch-one H3 服务上客户端并发只会排队(保留数据 C1/C2/C4 吞吐量相差不到 1.5%),
原来的 C1→C2→C4 点线尾迹不是前沿,已移除。plotVideoPoints 按硬件对部署点求 Pareto 前沿,
两个及以上前沿点才画实线;被支配部署淡色显示,“仅最优”可隐藏;排队点需手动开启,
只画淡色小标记、不连线。新增“Pareto 前沿”开关(v_frontier)叠加跨硬件虚线,某硬件全面
占优时由说明文字指出。目前每种硬件一种部署,图表为散点,说明文字给出实测布局及曲线所需的
扫描。配置栏展示实测部署,表格与 CSV 增加部署/排队列,KPI 卡展示各硬件的代表部署。
---
docs/videogenx-dashboard.md | 18 ++-
.../cypress/component/video-dashboard.cy.tsx | 31 +++-
.../app/cypress/e2e/video-dashboard.cy.ts | 7 +-
.../video-benchmark/VideoConfigBar.tsx | 28 ++--
.../video-benchmark/VideoDashboard.tsx | 45 +++++-
.../video-benchmark/VideoHardwareChart.tsx | 139 +++++++++---------
.../video-benchmark/VideoKpiCards.tsx | 9 +-
.../video-benchmark/VideoPointsTable.tsx | 17 ++-
.../components/video-benchmark/plot.test.ts | 135 +++++++++++++++++
.../src/components/video-benchmark/plot.ts | 84 +++++++++++
.../video-benchmark/video-url-state.test.ts | 3 +-
.../video-benchmark/video-url-state.ts | 9 +-
12 files changed, 418 insertions(+), 107 deletions(-)
create mode 100644 packages/app/src/components/video-benchmark/plot.test.ts
create mode 100644 packages/app/src/components/video-benchmark/plot.ts
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
index 1ba76f8d9..0bce20b01 100644
--- a/docs/videogenx-dashboard.md
+++ b/docs/videogenx-dashboard.md
@@ -8,13 +8,21 @@ Published blob indexes → `GET /api/video-runs?format=history` (the per-cell pr
## Axes and defaults
-`video-url-state.ts` owns the `v_*` URL params (`v_x`, `v_y`, `v_tier`, `v_basis`, `v_queue`, `v_opt`, `v_view`); defaults are omitted from the URL and every other param is left alone.
+`video-url-state.ts` owns the `v_*` URL params (`v_x`, `v_y`, `v_tier`, `v_basis`, `v_queue`, `v_opt`, `v_frontier`, `v_view`); defaults are omitted from the URL and every other param is left alone.
- **X = P90 time to video (s)**, lower is better. `p50Latency` and `genSpeed` (frames/s per request, the closest analogue to interactivity) are the alternatives.
- **Y = videos per $1 TCO** at the _Owning at Large Hyperscaler Volume_ tier. Cost per GPU-hour comes from `HW_REGISTRY` (`costh`/`costr`), the same SemiAnalysis TCO source `/inference` uses; the badge row and source link sit above the chart.
- **GPU basis**: _participating_ GPUs (the boards that generated the clip — 4 per video with TP2 × Ulysses 2) is chip efficiency; _allocated_ GPUs (H100/B200 reserved 8) is what a deployment bills. One toggle apart, never mixed in one number.
-- **Why C1 by default**: the pinned H3 server is batch-one and single-replica, so client concurrency only queues requests — throughput stays flat while latency scales with C. C2/C4 render as dotted "queueing tails" behind the _Show queueing_ switch; they are evidence that batching does not help, not a frontier.
-- **Pareto hull** (`frontier.ts`) flips lower-is-better axes and reuses `paretoFrontUpperLeft` from the calculator. With one C1 point per hardware the hull is a cross-hardware comparison; a per-hardware curve needs a GPUs-per-video sweep (design plan P6, GPU work not authorised yet). When one hardware dominates outright (today: B200), no hull path is drawn.
+
+## Deployments, not concurrency, make the curve
+
+`/inference` sweeps batch size to trace each hardware's latency-vs-throughput frontier. A diffusion video server has no batching lever: the pinned H3 SGLang server is batch-one and single-replica, so client concurrency only queues requests — the retained C1/C2/C4 cells show throughput flat within ±1.5 % while latency scales with C. Joining those cells would draw a flat "curve" that measures the queue, not the hardware, so the chart never does.
+
+The knob that does trade latency for efficiency is the **deployment**: how many GPU boards serve one request and how they split the model (`tp_size` × `ulysses_degree`). `deployment.ts` keys cells by it (`deploymentKey`), classifies `concurrency > replicas` as queueing (`isQueueing`; bundles that predate `execution.deployment.replica_count` ran one endpoint, so null reads as one), and picks each hardware's most efficient deployment as its representative (`leadCell`, used by the KPI cards and the legend).
+
+`plot.ts` (`plotVideoPoints`) then builds the chart: per hardware, the Pareto frontier over its deployment cells (`frontier.ts` flips lower-is-better axes and reuses `paretoFrontUpperLeft` from the calculator); a solid line appears once a hardware has two or more frontier deployments, dominated deployments render faded, and _Optimal only_ hides them. Queued cells are opt-in (_Show queued requests_), drawn as small faded markers and never joined. _Pareto frontier_ adds the dashed cross-hardware frontier over all deployments, as on `/inference`; when one hardware dominates outright (today: B200) the caption says so instead of drawing a line.
+
+Today every hardware has exactly one measured deployment (4 GPUs per video, TP2 × Ulysses 2), so the chart is an honest scatter and the caption says a per-hardware curve needs the GPUs-per-video sweep. That sweep (design plan P6) is backend work in InferenceX `experimental/video-generation` — the serving matrix currently varies only concurrency — and needs GPU authorisation; the frontend needs no change when its cells arrive, because they differ in `deploymentKey` and therefore add points rather than replace them.
## Rules
@@ -26,4 +34,6 @@ Published blob indexes → `GET /api/video-runs?format=history` (the per-cell pr
## 中文说明
-`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;原有的运行/视频/历史视图收进可展开的“运行、视频与证据”区块,`?run=`、`?view=`、`?compare=` 和 `history-*` 深链接会自动展开该区块。默认 X 为 P90 出片时间、Y 为每 1 美元 TCO 视频数(Hyperscaler 自有设备分档,单价与 `/inference` 同源)。默认只画 C1:pinned H3 服务是 batch-one、单副本,客户端并发只会排队,C2/C4 作为可选的点线尾迹展示。Pareto 包络复用 calculator 的前沿算法;参与/已分配 GPU 口径一键切换;MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
+`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;原有的运行/视频/历史视图收进可展开的“运行、视频与证据”区块,`?run=`、`?view=`、`?compare=` 和 `history-*` 深链接会自动展开该区块。默认 X 为 P90 出片时间、Y 为每 1 美元 TCO 视频数(Hyperscaler 自有设备档位,单价与 `/inference` 同源)。
+
+曲线来自部署而不是并发:pinned H3 服务是 batch-one、单副本,客户端并发只会排队(保留数据中 C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 线性增长),把这些点连起来画出的只是队列,因此图表绝不连接它们。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表;`plot.ts` 按硬件对部署点求 Pareto 前沿,达到两个及以上前沿点时才画实线,被支配的部署以淡色显示,“仅最优”可将其隐藏;排队点需手动开启,只画小号淡色标记、不连线;“Pareto 前沿”开关叠加跨硬件虚线。目前每种硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。参与/已分配 GPU 口径一键切换;MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index ab71bc582..eb64482fd 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -20,18 +20,25 @@ function mount(pathname = '/video', search = '') {
const kpi = (hardware: string) =>
cy.get(`[data-testid="video-kpi-card"][data-hardware="${hardware}"]`);
const points = () => cy.get('[data-testid="video-hardware-chart"] circle.point');
-const tails = () => cy.get('[data-testid="video-hardware-chart"] path.line-path');
+const lines = () => cy.get('[data-testid="video-hardware-chart"] path.line-path');
+const hull = () => cy.get('[data-testid="video-hardware-chart"] path.roofline-path');
describe('Video hardware dashboard (retained fixture)', () => {
it('plots one C1 point per measured hardware and lists MI355X as unavailable', () => {
mount();
points().should('have.length', 3);
- tails().should('have.length', 0);
+ lines().should('have.length', 0);
+ hull().should('have.length', 0);
+ cy.get('[data-testid="video-chart-caption"]').should(
+ 'contain',
+ 'One deployment measured per hardware so far (4 GPU · TP2 × Ulysses 2)',
+ );
+ cy.get('[data-testid="video-config-bar"]').should('contain', '4 GPU · TP2 × Ulysses 2');
cy.get('[data-testid="video-kpi-card"]').should('have.length', 4);
kpi('mi355x').find('[data-testid="video-kpi-unavailable"]').should('contain', 'Not measured');
kpi('h200').should('contain', '$0.204').and('contain', '150.6').and('contain', '97.4');
kpi('b200').should('contain', '$0.150');
- kpi('h100').should('contain', '$0.218').and('contain', '4 of 8 GPUs');
+ kpi('h100').should('contain', '$0.218').and('contain', '4 of 8 GPUs · TP2 × Ulysses 2');
cy.get('[data-testid="video-config-bar"]').should(
'contain',
'1344 × 768 · 8 s · 24 fps · 50 steps',
@@ -57,17 +64,29 @@ describe('Video hardware dashboard (retained fixture)', () => {
kpi('h100').should('contain', '$0.744');
cy.location('search').should('contain', 'v_basis=allocated');
});
- it('adds dotted C2/C4 tails behind the queueing switch and isolates the Pareto-optimal hardware', () => {
+ it('plots queued cells as unjoined markers and never draws a curve through them', () => {
mount();
cy.get('[data-testid="video-queue"]').click();
points().should('have.length', 9);
- tails().should('have.length', 3);
+ lines().should('have.length', 0);
+ cy.get('[data-testid="video-chart-caption"]').should('contain', 'never joined into a curve');
cy.location('search').should('contain', 'v_queue=1');
+ cy.contains('button', 'Table').click();
+ cy.get('[data-testid="video-points-table"] tbody tr').should('have.length', 9);
+ cy.get('[data-testid="video-points-table"]').should('contain', '2 · queued');
+ cy.contains('button', 'Chart').click();
+ // Optimal-only keeps every hardware's single deployment and hides the queued cells.
cy.get('[data-testid="video-optimal"]').click();
points().should('have.length', 3);
- tails().should('have.length', 1);
cy.location('search').should('contain', 'v_opt=1');
});
+ it('explains the cross-hardware frontier switch when one hardware dominates', () => {
+ mount();
+ cy.get('[data-testid="video-frontier"]').click();
+ cy.location('search').should('contain', 'v_frontier=1');
+ hull().should('have.length', 0);
+ cy.get('[data-testid="video-chart-caption"]').should('contain', 'one hardware dominates');
+ });
it('hides a hardware from the legend and shows the table view', () => {
mount();
cy.contains('[data-testid="video-legend"] li', 'H100').click();
diff --git a/packages/app/cypress/e2e/video-dashboard.cy.ts b/packages/app/cypress/e2e/video-dashboard.cy.ts
index 17860917b..c0c4e0a1b 100644
--- a/packages/app/cypress/e2e/video-dashboard.cy.ts
+++ b/packages/app/cypress/e2e/video-dashboard.cy.ts
@@ -4,7 +4,12 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
it('leads with the cross-hardware chart and restores v_ params from the URL', () => {
cy.visit('/video?v_y=kjPerVideo&v_tier=r&v_queue=1');
cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 9);
- cy.get('[data-testid="video-hardware-chart"] path.line-path').should('have.length', 3);
+ // Queued C2/C4 cells are markers only: no curve is drawn through them.
+ cy.get('[data-testid="video-hardware-chart"] path.line-path').should('have.length', 0);
+ cy.get('[data-testid="video-chart-caption"]').should(
+ 'contain',
+ 'One deployment measured per hardware',
+ );
cy.get('[data-testid="video-chart-card"]')
.should('contain', 'GPU-board energy per video (kJ)')
.and('contain', 'Rent - 3 Year Commit');
diff --git a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
index d3927ce09..7f04a34aa 100644
--- a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
+++ b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
@@ -23,9 +23,7 @@ const STRINGS = {
chart: 'Chart config',
model: 'Model',
workload: 'Workload',
- load: 'Load',
- c1: 'C1 · one request per deployment',
- all: 'C1 + C2/C4 queueing tails',
+ deployment: 'Deployment',
x: 'X-axis metric',
y: 'Y-axis metric',
tier: 'Cost tier',
@@ -38,9 +36,7 @@ const STRINGS = {
chart: '图表配置',
model: '模型',
workload: '工作负载',
- load: '负载',
- c1: 'C1 · 每个部署一个请求',
- all: 'C1 + C2/C4 排队尾迹',
+ deployment: '部署',
x: 'X 轴指标',
y: 'Y 轴指标',
tier: '成本档位',
@@ -52,19 +48,24 @@ const STRINGS = {
/**
* Two control panels mirroring the inference tab: what is being compared
- * (frozen for this campaign, so model and workload are single-option selects
- * that state the comparison rather than change it) and how it is plotted.
+ * (frozen for this campaign, so model, workload and the measured deployments
+ * are single-option selects that state the comparison rather than change it)
+ * and how it is plotted. Queued cells, optimal-only and the cross-hardware
+ * frontier are legend switches, as on the inference chart.
*/
export default function VideoConfigBar({
state,
onChange,
modelLabel,
workloadLabel,
+ deploymentLabel,
}: {
state: VideoDashboardState;
onChange: (patch: Partial) => void;
modelLabel: string;
workloadLabel: string;
+ /** Measured server layouts (GPUs per video and model split), stated rather than selectable. */
+ deploymentLabel: string;
}) {
const locale = useLocale();
const s = STRINGS[locale];
@@ -89,13 +90,10 @@ export default function VideoConfigBar({
options={[{ value: 'workload', label: workloadLabel }]}
/>
change('queue', value === 'all')}
- options={[
- { value: 'c1', label: s.c1 },
- { value: 'all', label: s.all },
- ]}
+ label={s.deployment}
+ value="deployment"
+ onValueChange={() => {}}
+ options={[{ value: 'deployment', label: deploymentLabel }]}
/>
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index ef9d81c7c..e3bacacb1 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -13,6 +13,7 @@ import { Heading } from '@/components/ui/heading';
import { useThemeColors } from '@/hooks/useThemeColors';
import { track } from '@/lib/analytics';
import { useLocale } from '@/lib/use-locale';
+import { isQueueing, layoutLabel, leadCell } from './deployment';
import { costPerGpuHour, hardwareLabel, VIDEO_HARDWARE_ROSTER } from './hardware';
import {
metricLabel,
@@ -73,8 +74,10 @@ const STRINGS = {
tier: 'Cost tier',
badges: 'TCO $/chip/hr',
source: 'Source',
- queue: 'Show queueing (C2/C4)',
+ queue: 'Show queued requests (C2/C4)',
optimal: 'Optimal only',
+ frontier: 'Pareto frontier',
+ deployments: (n: number) => `${n} deployments`,
runs: 'Runs, videos & evidence',
runsHint: 'Per-run results, generated clips, fidelity checks and the performance history list.',
loading: 'Loading published results…',
@@ -96,8 +99,10 @@ const STRINGS = {
tier: '成本档位',
badges: 'TCO $/chip/hr',
source: '来源',
- queue: '显示排队尾迹(C2/C4)',
+ queue: '显示排队请求(C2/C4)',
optimal: '仅最优',
+ frontier: 'Pareto 前沿',
+ deployments: (n: number) => `${n} 种部署`,
runs: '运行、视频与证据',
runsHint: '按运行查看结果、生成的视频、保真度检查以及性能历史列表。',
loading: '正在加载已发布结果…',
@@ -160,11 +165,23 @@ export default function VideoDashboard() {
const options = { tier: state.tier, basis: state.basis };
const cells = useMemo(() => latestVideoCells(points), [points]);
+ // Each hardware is represented by its most efficient measured deployment.
const measured = useMemo(
- () => new Map(cells.filter((p) => p.concurrency === 1).map((p) => [p.hardwareKey, p])),
- [cells],
+ () =>
+ new Map(
+ hardwareKeys.flatMap((key) => {
+ const point = leadCell(cells, key, { tier: state.tier, basis: state.basis });
+ return point ? [[key, point] as const] : [];
+ }),
+ ),
+ [cells, hardwareKeys, state.tier, state.basis],
);
- const lead = cells.find((p) => p.concurrency === 1) ?? cells[0];
+ const lead = measured.values().next().value ?? cells[0];
+ const layouts = [
+ ...new Set(cells.filter((p) => !isQueueing(p)).map((p) => layoutLabel(p, locale))),
+ ];
+ const deploymentLabel =
+ layouts.length > 2 ? s.deployments(layouts.length) : layouts.join(' | ') || '—';
// "1344 × 768 · 8 s · 24 fps · 50 steps · model @ rev · seeds · prompt" → shape, then model @ rev.
const workloadParts = lead?.workload.split(' · ') ?? [];
const workloadLabel = workloadParts.slice(0, 4).join(' · ') || '—';
@@ -207,6 +224,10 @@ export default function VideoDashboard() {
'scheduled',
'participating_gpus',
'allocated_gpus',
+ 'tp_size',
+ 'ulysses_degree',
+ 'replicas',
+ 'queued',
...CSV_METRICS.map((id) => `${id} (${VIDEO_METRICS[id].unit})`),
'board_power_w',
'enforced_limit_w',
@@ -221,6 +242,10 @@ export default function VideoDashboard() {
p.scheduled,
p.participating,
p.allocated,
+ p.server?.tp ?? null,
+ p.server?.ulysses ?? null,
+ p.replicas,
+ isQueueing(p) ? 1 : 0,
...CSV_METRICS.map((id) => metricValue(p, id, options)),
p.avgPowerW,
p.enforcedLimitW,
@@ -254,6 +279,7 @@ export default function VideoDashboard() {
onChange={update}
modelLabel={modelLabel}
workloadLabel={`${workloadLabel}${workloadSuffix}`}
+ deploymentLabel={deploymentLabel}
/>
{
+ update({ frontier: checked });
+ track('video_frontier_changed', { value: String(checked) });
+ },
+ },
]}
/>
diff --git a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
index 26880b2e6..5b59e721c 100644
--- a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
+++ b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
@@ -6,81 +6,54 @@ import type { ContinuousScale } from '@/lib/d3-chart/types';
import { CHART_TYPE, px } from '@/lib/d3-chart/typography';
import { useLocale } from '@/lib/use-locale';
import { escapeHtml } from '@/lib/utils';
-import { paretoFrontier } from './frontier';
-import { hardwareLabel } from './hardware';
-import { formatMetric, metricLabel, metricValue, VIDEO_METRICS, type VideoPoint } from './metrics';
-import { latestVideoCells } from './points';
+import { layoutLabel } from './deployment';
+import { formatMetric, metricLabel, type VideoPoint } from './metrics';
+import { plotVideoPoints, type PlottedVideoPoint } from './plot';
import type { VideoDashboardState } from './video-url-state';
export const VIDEO_CHART_ID = 'video-hardware';
/** Matches ChartSection's default `${analyticsPrefix}_zoom_reset_${chartId}`. */
export const VIDEO_ZOOM_RESET_EVENT = `video_zoom_reset_${VIDEO_CHART_ID}`;
-export interface PlottedVideoPoint extends VideoPoint {
- x: number;
- y: number;
- color: string;
- label: string;
-}
-
-/**
- * Points with both axes available (newest observation per hardware cell), the
- * cross-hardware Pareto hull over the C1 cells, and per-hardware queueing tails
- * (C1→C2→C4) when the load control shows them.
- */
-export function plotVideoPoints(
- points: VideoPoint[],
- state: VideoDashboardState,
- colorFor: (hardwareKey: string) => string,
- hidden: ReadonlySet,
-) {
- const options = { tier: state.tier, basis: state.basis };
- const plotted: PlottedVideoPoint[] = latestVideoCells(points).flatMap((p) => {
- if (!p.hardwareKey || hidden.has(p.hardwareKey)) return [];
- if (!state.queue && p.concurrency !== 1) return [];
- const x = metricValue(p, state.x, options);
- const y = metricValue(p, state.y, options);
- if (x === null || y === null) return [];
- return [{ ...p, x, y, color: colorFor(p.hardwareKey), label: hardwareLabel(p.hardwareKey) }];
- });
- const frontier = paretoFrontier(
- plotted.filter((p) => p.concurrency === 1),
- VIDEO_METRICS[state.x].polarity,
- VIDEO_METRICS[state.y].polarity,
- );
- const optimal = new Set(frontier.map((p) => p.hardwareKey));
- const visible = state.optimal ? plotted.filter((p) => optimal.has(p.hardwareKey)) : plotted;
- const tails: Record = {};
- if (state.queue)
- for (const p of visible) {
- if (!p.hardwareKey) continue;
- (tails[p.hardwareKey] ??= []).push({ x: p.x, y: p.y });
- }
- for (const key of Object.keys(tails)) {
- tails[key].sort((a, b) => a.x - b.x);
- if (tails[key].length < 2) delete tails[key];
- }
- return { plotted: visible, frontier, tails };
-}
-
const STRINGS = {
en: {
- hull: 'Dashed hull joins the Pareto-optimal hardware at C1. Dotted tails show C2/C4 client concurrency on the batch-one server: requests queue, throughput stays flat, so they are evidence, not a frontier.',
+ single: (layouts: string) =>
+ `One deployment measured per hardware so far (${layouts}), so each hardware is a single point. A per-hardware Pareto curve needs the GPUs-per-video sweep.`,
+ multi:
+ "Solid lines join each hardware's Pareto-optimal deployments (GPUs per video and model split); faded points are dominated deployments.",
+ global: 'Dashed line: cross-hardware Pareto frontier over all deployments.',
+ globalOne:
+ 'Cross-hardware Pareto frontier: one hardware dominates, so there is no line to draw.',
+ queued:
+ 'Small faded markers: C2/C4 client concurrency on the same batch-one deployment. Requests queue and throughput stays flat, so they are evidence, never joined into a curve.',
controls:
'Shift+scroll to zoom; drag to pan; double-click to reset. Click a point to pin its details.',
+ deployment: 'Deployment',
+ queuedTag: 'queued',
n: 'valid samples',
run: 'run',
noData: 'No hardware has both selected metrics for this configuration.',
},
zh: {
- hull: '虚线包络连接 C1 下 Pareto 最优的硬件;点线尾迹是 batch-one 服务器上 C2/C4 客户端并发的结果:请求排队、吞吐量基本持平,因此只是证据,不构成前沿。',
+ single: (layouts: string) =>
+ `目前每种硬件只测得一种部署(${layouts}),因此每种硬件只有一个点;要得到每硬件的 Pareto 曲线,还需扫描每条视频占用的 GPU 数。`,
+ multi:
+ '实线连接同一硬件的 Pareto 最优部署(每条视频占用的 GPU 数及模型切分方式);淡色点为被支配的部署。',
+ global: '虚线为所有部署的跨硬件 Pareto 前沿。',
+ globalOne: '跨硬件 Pareto 前沿:有一种硬件全面占优,因此没有可画的连线。',
+ queued:
+ '小号淡色标记为同一 batch-one 部署上的 C2/C4 客户端并发:请求排队、吞吐量持平,仅作为证据展示,不连成曲线。',
controls: 'Shift+滚轮缩放,拖动平移,双击重置。点击数据点可固定详情。',
+ deployment: '部署',
+ queuedTag: '排队',
n: '有效样本',
run: '运行',
noData: '当前配置下没有硬件同时具备所选的两个指标。',
},
};
+const faded = (color: string) => `color-mix(in oklab, ${color} 45%, transparent)`;
+
export default function VideoHardwareChart({
points,
state,
@@ -97,9 +70,28 @@ export default function VideoHardwareChart({
const locale = useLocale();
const s = STRINGS[locale];
const options = { tier: state.tier, basis: state.basis };
- const { plotted, frontier, tails } = plotVideoPoints(points, state, colorFor, hidden);
+ const { plotted, frontiers, global, multiLayout } = plotVideoPoints(
+ points,
+ state,
+ colorFor,
+ hidden,
+ );
const xLabel = metricLabel(state.x, locale, options);
const yLabel = metricLabel(state.y, locale, options);
+ const lines: Record = {};
+ const lineColors: Record = {};
+ for (const [key, frontier] of Object.entries(frontiers)) {
+ if (frontier.length < 2) continue;
+ lines[key] = frontier.map((p) => ({ x: p.x, y: p.y }));
+ lineColors[key] = frontier[0].color;
+ }
+ const layouts = [
+ ...new Set(plotted.filter((p) => !p.queued).map((p) => layoutLabel(p, locale))),
+ ].join(locale === 'zh' ? ';' : '; ');
+ const pointLabel = (p: PlottedVideoPoint) => {
+ if (p.queued) return `C${p.concurrency}`;
+ return multiLayout ? `${p.label} · ${layoutLabel(p, locale)}` : p.label;
+ };
const drawLabels = (
group: Selection,
x: ContinuousScale,
@@ -113,13 +105,18 @@ export default function VideoHardwareChart({
.attr('x', (p) => x(p.x) + 10)
.attr('y', (p) => y(p.y) - 10)
.attr('font-size', px(CHART_TYPE.axisLabel))
- .attr('font-weight', (p) => (p.concurrency === 1 ? 600 : 400))
- .attr('fill', 'var(--foreground)')
+ .attr('font-weight', (p) => (p.optimal ? 600 : 400))
+ .attr('fill', (p) => (p.optimal ? 'var(--foreground)' : 'var(--muted-foreground)'))
.attr('pointer-events', 'none')
- .text((p) => (p.concurrency === 1 ? p.label : `C${p.concurrency}`));
+ .text(pointLabel);
};
const maxX = Math.max(0, ...plotted.map((p) => p.x));
const maxY = Math.max(0, ...plotted.map((p) => p.y));
+ const caption = [
+ multiLayout ? s.multi : s.single(layouts || '—'),
+ state.frontier ? (global.length > 1 ? s.global : s.globalOne) : null,
+ state.queue && !state.optimal ? s.queued : null,
+ ].filter((text): text is string => text !== null);
return (
1 ? { hull: frontier.map((p) => ({ x: p.x, y: p.y })) } : {},
+ key: 'pareto-global',
+ rooflines:
+ state.frontier && global.length > 1
+ ? { global: global.map((p) => ({ x: p.x, y: p.y })) }
+ : {},
config: {
getColor: () => 'var(--foreground)',
strokeWidth: 1.5,
@@ -147,12 +147,11 @@ export default function VideoHardwareChart({
},
{
type: 'line',
- key: 'queueing-tails',
- lines: tails,
+ key: 'hardware-frontiers',
+ lines,
config: {
- getColor: (key) => colorFor(key),
- getStrokeDasharray: () => '2 4',
- strokeWidth: 1.5,
+ getColor: (key) => lineColors[key] ?? 'var(--foreground)',
+ strokeWidth: 2,
curve: curveLinear,
},
},
@@ -164,8 +163,8 @@ export default function VideoHardwareChart({
getCy: () => 0,
getX: (p) => p.x,
getY: (p) => p.y,
- getColor: (p) => p.color,
- getRadius: (p) => (p.concurrency === 1 ? 7 : 4),
+ getColor: (p) => (p.queued || !p.optimal ? faded(p.color) : p.color),
+ getRadius: (p) => (p.queued ? 3.5 : p.optimal ? 7 : 5),
stroke: 'var(--foreground)',
strokeWidth: 1,
keyFn: (p) => p.id,
@@ -188,7 +187,7 @@ export default function VideoHardwareChart({
tooltip={{
rulerType: 'none',
content: (p) =>
- `${escapeHtml(p.label)} · C${p.concurrency ?? '?'} ${escapeHtml(xLabel)}: ${formatMetric(p.x, state.x)} ${escapeHtml(yLabel)}: ${formatMetric(p.y, state.y)} ${s.n}: ${p.samples} · ${s.run} #${escapeHtml(p.runId)}
`,
+ `${escapeHtml(p.label)} · C${p.concurrency ?? '?'}${p.queued ? ` (${s.queuedTag})` : ''} ${s.deployment}: ${escapeHtml(layoutLabel(p, locale))} ${escapeHtml(xLabel)}: ${formatMetric(p.x, state.x)} ${escapeHtml(yLabel)}: ${formatMetric(p.y, state.y)} ${s.n}: ${p.samples} · ${s.run} #${escapeHtml(p.runId)}
`,
onPointClick: onSelect,
}}
zoom={{
@@ -205,7 +204,11 @@ export default function VideoHardwareChart({
) : undefined
}
- caption={{s.hull}
}
+ caption={
+
+ {caption.join(' ')}
+
+ }
/>
);
}
diff --git a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
index 0b5a985f2..62712c418 100644
--- a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
+++ b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
@@ -3,6 +3,7 @@
import { Card } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
import { useLocale } from '@/lib/use-locale';
+import { leadCell } from './deployment';
import { hardwareLabel, VIDEO_HARDWARE_ROSTER } from './hardware';
import { formatMetric, metricValue, type MetricId, type VideoPoint } from './metrics';
import { latestVideoCells } from './points';
@@ -42,7 +43,7 @@ const STRINGS = {
},
};
-/** One card per campaign hardware at C1; hardware without a valid run says so instead of vanishing. */
+/** One card per campaign hardware, showing its most efficient deployment; hardware without a valid run says so instead of vanishing. */
export default function VideoKpiCards({
points,
state,
@@ -62,7 +63,7 @@ export default function VideoKpiCards({
return (
{VIDEO_HARDWARE_ROSTER.map(({ key, unavailable }) => {
- const point = cells.find((p) => p.hardwareKey === key && p.concurrency === 1);
+ const point = leadCell(cells, key, options);
return (
@@ -74,6 +75,10 @@ export default function VideoKpiCards({
{point && (
{point.participating ?? '—'} {s.of} {point.allocated ?? '—'} {s.gpus}
+ {point.server?.tp !== null &&
+ point.server?.tp !== undefined &&
+ point.server.ulysses !== null &&
+ ` · TP${point.server.tp} × Ulysses ${point.server.ulysses}`}
)}
diff --git a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
index 0051a3914..3e488b6e9 100644
--- a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
+++ b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
@@ -2,6 +2,7 @@
import { DataTable, type DataTableColumn } from '@/components/ui/data-table';
import { useLocale } from '@/lib/use-locale';
+import { isQueueing, layoutLabel } from './deployment';
import { hardwareLabel } from './hardware';
import { formatMetric, metricLabel, metricValue, type MetricId, type VideoPoint } from './metrics';
import { latestVideoCells } from './points';
@@ -10,14 +11,18 @@ import type { VideoDashboardState } from './video-url-state';
const STRINGS = {
en: {
hardware: 'Hardware',
+ deployment: 'Deployment',
c: 'C',
+ queued: 'queued',
counts: 'Valid / scheduled',
power: 'Board power (W)',
run: 'CI run',
},
zh: {
hardware: '硬件',
+ deployment: '部署',
c: 'C',
+ queued: '排队',
counts: '有效 / 计划',
power: '板卡功率(W)',
run: 'CI 运行',
@@ -33,14 +38,14 @@ const METRIC_COLUMNS: readonly MetricId[] = [
'powerPctCap',
];
-/** Rows for the plotted cells: every metric the chart can show, plus provenance. */
+/** Rows for the plotted cells: every deployment, queued cells on request, plus provenance. */
export function videoTableRows(
points: VideoPoint[],
state: VideoDashboardState,
hidden: ReadonlySet,
): VideoPoint[] {
return latestVideoCells(points).filter(
- (p) => p.hardwareKey && !hidden.has(p.hardwareKey) && (state.queue || p.concurrency === 1),
+ (p) => p.hardwareKey && !hidden.has(p.hardwareKey) && (state.queue || !isQueueing(p)),
);
}
@@ -65,10 +70,16 @@ export default function VideoPointsTable({
importance: 'key',
pinned: true,
},
+ {
+ header: s.deployment,
+ cell: (p) => layoutLabel(p, locale),
+ sortValue: (p) => p.participating ?? 0,
+ importance: 'key',
+ },
{
header: s.c,
align: 'right',
- cell: (p) => p.concurrency ?? '—',
+ cell: (p) => (isQueueing(p) ? `${p.concurrency} · ${s.queued}` : (p.concurrency ?? '—')),
sortValue: (p) => p.concurrency ?? 0,
importance: 'key',
},
diff --git a/packages/app/src/components/video-benchmark/plot.test.ts b/packages/app/src/components/video-benchmark/plot.test.ts
new file mode 100644
index 000000000..bbbda936c
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/plot.test.ts
@@ -0,0 +1,135 @@
+import { describe, expect, it } from 'vitest';
+import type { VideoPoint } from './metrics';
+import { plotVideoPoints } from './plot';
+import { DEFAULT_VIDEO_DASHBOARD_STATE } from './video-url-state';
+
+const base: VideoPoint = {
+ id: 'h200-4g-c1',
+ runId: '1',
+ artifactId: 1,
+ cell: 'c1',
+ hardwareKey: 'h200',
+ hardwareName: 'NVIDIA H200',
+ runtime: 'r',
+ model: 'm',
+ workload: 'w',
+ concurrency: 1,
+ participating: 4,
+ allocated: 8,
+ replicas: null,
+ valid: 20,
+ completed: 20,
+ scheduled: 20,
+ failed: 0,
+ samples: 20,
+ p50: 150,
+ p90: 151,
+ wallSeconds: 3000, // 6.0 videos per GPU-hour
+ durationSeconds: 8,
+ frameCount: 192,
+ energyKj: 400,
+ avgPowerW: 2700,
+ enforcedLimitW: 2800,
+ server: { tp: 2, ulysses: 2, attention: null },
+ status: 'complete',
+ observedAt: null,
+};
+const cell = (patch: Partial): VideoPoint => ({ ...base, ...patch });
+// H200 deployments: 8 boards are faster but less efficient, 2 boards slower but more efficient,
+// and a second 4-board split that is dominated by the first (slower and less efficient).
+const h200 = [
+ base,
+ cell({
+ id: 'h200-8g',
+ participating: 8,
+ server: { tp: 4, ulysses: 2, attention: null },
+ p90: 85,
+ p50: 84,
+ wallSeconds: 1700,
+ }), // 5.29
+ cell({
+ id: 'h200-2g',
+ participating: 2,
+ server: { tp: 2, ulysses: 1, attention: null },
+ p90: 290,
+ p50: 289,
+ wallSeconds: 5400,
+ }), // 6.67
+ cell({
+ id: 'h200-4g-tp4',
+ server: { tp: 4, ulysses: 1, attention: null },
+ p90: 160,
+ p50: 159,
+ wallSeconds: 3100,
+ }), // 5.81
+ cell({ id: 'h200-4g-c2', concurrency: 2, p90: 300, p50: 299, wallSeconds: 2990 }), // queued, marginally higher rate
+];
+const b200 = cell({
+ id: 'b200-4g',
+ hardwareKey: 'b200',
+ hardwareName: 'NVIDIA B200',
+ p90: 78,
+ p50: 77,
+ wallSeconds: 1560,
+});
+const colorFor = (key: string) => `color-${key}`;
+const state = {
+ ...DEFAULT_VIDEO_DASHBOARD_STATE,
+ x: 'p90Latency' as const,
+ y: 'videosPerGpuHour' as const,
+};
+
+describe('plotVideoPoints', () => {
+ it('builds a per-hardware frontier over deployments and leaves queued cells out of it', () => {
+ const plot = plotVideoPoints([...h200, b200], state, colorFor, new Set());
+ expect(plot.frontiers.h200.map((p) => p.id)).toEqual(['h200-8g', 'h200-4g-c1', 'h200-2g']);
+ expect(plot.frontiers.b200.map((p) => p.id)).toEqual(['b200-4g']);
+ expect(plot.plotted.map((p) => p.id)).toEqual([
+ 'h200-4g-c1',
+ 'h200-8g',
+ 'h200-2g',
+ 'h200-4g-tp4',
+ 'b200-4g',
+ ]);
+ expect(plot.plotted.find((p) => p.id === 'h200-4g-tp4')?.optimal).toBe(false);
+ expect(plot.multiLayout).toBe(true);
+ // B200 is faster and more efficient than every H200 deployment, so it is the whole global frontier.
+ expect(plot.global.map((p) => p.id)).toEqual(['b200-4g']);
+ });
+ it('shows queued cells only on request, faded from every frontier', () => {
+ const plot = plotVideoPoints(h200, { ...state, queue: true }, colorFor, new Set());
+ const queued = plot.plotted.filter((p) => p.queued);
+ expect(queued.map((p) => p.id)).toEqual(['h200-4g-c2']);
+ expect(plot.frontiers.h200.map((p) => p.id)).not.toContain('h200-4g-c2');
+ expect(plot.global.map((p) => p.id)).not.toContain('h200-4g-c2');
+ });
+ it('optimal-only hides dominated deployments and queued cells', () => {
+ const plot = plotVideoPoints(
+ h200,
+ { ...state, queue: true, optimal: true },
+ colorFor,
+ new Set(),
+ );
+ expect(plot.plotted.map((p) => p.id)).toEqual(['h200-4g-c1', 'h200-8g', 'h200-2g']);
+ });
+ it('is a scatter of single deployments when each hardware has one layout', () => {
+ const plot = plotVideoPoints([base, b200], state, colorFor, new Set());
+ expect(plot.multiLayout).toBe(false);
+ expect(Object.values(plot.frontiers).every((f) => f.length === 1)).toBe(true);
+ expect(plot.global.map((p) => p.id)).toEqual(['b200-4g']);
+ });
+ it('drops hidden hardware and cells missing either metric', () => {
+ const plot = plotVideoPoints(
+ [
+ base,
+ b200,
+ cell({ id: 'no-p90', hardwareKey: 'h100', hardwareName: 'H100', samples: 4, p90: null }),
+ ],
+ state,
+ colorFor,
+ new Set(['b200']),
+ );
+ expect(plot.plotted.map((p) => p.id)).toEqual(['h200-4g-c1']);
+ expect(plot.frontiers).not.toHaveProperty('b200');
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/plot.ts b/packages/app/src/components/video-benchmark/plot.ts
new file mode 100644
index 000000000..fa1c2037d
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/plot.ts
@@ -0,0 +1,84 @@
+import { deploymentKey, isQueueing } from './deployment';
+import { paretoFrontier } from './frontier';
+import { hardwareLabel } from './hardware';
+import { metricValue, VIDEO_METRICS, type VideoPoint } from './metrics';
+import { latestVideoCells } from './points';
+import type { VideoDashboardState } from './video-url-state';
+
+export interface PlottedVideoPoint extends VideoPoint {
+ x: number;
+ y: number;
+ color: string;
+ label: string;
+ /** Client concurrency above one request per replica: the same deployment under load. */
+ queued: boolean;
+ /** On its hardware's Pareto frontier (deployment cells only). */
+ optimal: boolean;
+}
+
+export interface VideoPlot {
+ /** Cells to draw: deployments (dominated ones unless `optimal`), plus queued cells when `queue`. */
+ plotted: PlottedVideoPoint[];
+ /** Per-hardware Pareto frontier over its deployment cells, ascending x; lines need two or more. */
+ frontiers: Record;
+ /** Cross-hardware Pareto frontier over every deployment cell. */
+ global: PlottedVideoPoint[];
+ /** True once any hardware has more than one measured deployment. */
+ multiLayout: boolean;
+}
+
+/**
+ * The chart's data model. A hardware's curve is the Pareto frontier over its
+ * measured deployments (GPUs per video and how they split the model); client
+ * concurrency on a batch-one server only queues requests, so queued cells are
+ * plotted as evidence but never join a frontier.
+ */
+export function plotVideoPoints(
+ points: VideoPoint[],
+ state: VideoDashboardState,
+ colorFor: (hardwareKey: string) => string,
+ hidden: ReadonlySet,
+): VideoPlot {
+ const options = { tier: state.tier, basis: state.basis };
+ const cells: PlottedVideoPoint[] = latestVideoCells(points).flatMap((p) => {
+ if (!p.hardwareKey || hidden.has(p.hardwareKey)) return [];
+ const x = metricValue(p, state.x, options);
+ const y = metricValue(p, state.y, options);
+ if (x === null || y === null) return [];
+ return [
+ {
+ ...p,
+ x,
+ y,
+ color: colorFor(p.hardwareKey),
+ label: hardwareLabel(p.hardwareKey),
+ queued: isQueueing(p),
+ optimal: false,
+ },
+ ];
+ });
+ const deployments = cells.filter((p) => !p.queued);
+ const byHardware = new Map();
+ for (const p of deployments) {
+ const list = byHardware.get(p.hardwareKey!) ?? [];
+ list.push(p);
+ byHardware.set(p.hardwareKey!, list);
+ }
+ const xBetter = VIDEO_METRICS[state.x].polarity;
+ const yBetter = VIDEO_METRICS[state.y].polarity;
+ const frontiers: Record = {};
+ let multiLayout = false;
+ for (const [key, list] of byHardware) {
+ frontiers[key] = paretoFrontier(list, xBetter, yBetter);
+ for (const p of frontiers[key]) p.optimal = true;
+ if (new Set(list.map(deploymentKey)).size > 1) multiLayout = true;
+ }
+ const shown = state.optimal ? deployments.filter((p) => p.optimal) : deployments;
+ const queued = state.queue && !state.optimal ? cells.filter((p) => p.queued) : [];
+ return {
+ plotted: [...shown, ...queued],
+ frontiers,
+ global: paretoFrontier(deployments, xBetter, yBetter),
+ multiLayout,
+ };
+}
diff --git a/packages/app/src/components/video-benchmark/video-url-state.test.ts b/packages/app/src/components/video-benchmark/video-url-state.test.ts
index 31fca027e..f7cd3ed44 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.test.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.test.ts
@@ -15,7 +15,7 @@ describe('video dashboard URL state', () => {
it('reads every supported param', () => {
expect(
readVideoDashboardState(
- '?v_x=genSpeed&v_y=kjPerVideo&v_tier=r&v_basis=allocated&v_queue=1&v_opt=1&v_view=table',
+ '?v_x=genSpeed&v_y=kjPerVideo&v_tier=r&v_basis=allocated&v_queue=1&v_opt=1&v_frontier=1&v_view=table',
),
).toEqual({
x: 'genSpeed',
@@ -24,6 +24,7 @@ describe('video dashboard URL state', () => {
basis: 'allocated',
queue: true,
optimal: true,
+ frontier: true,
view: 'table',
});
});
diff --git a/packages/app/src/components/video-benchmark/video-url-state.ts b/packages/app/src/components/video-benchmark/video-url-state.ts
index aad6c229e..435fe1b97 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.ts
@@ -13,10 +13,12 @@ export interface VideoDashboardState {
y: YMetricId;
tier: CostTier;
basis: GpuBasis;
- /** Show C2/C4 client-concurrency cells as dotted queueing tails. */
+ /** Also plot queued client-concurrency cells (C > replicas) as faded markers. */
queue: boolean;
- /** Show only Pareto-optimal hardware. */
+ /** Hide deployments dominated by another deployment of the same hardware. */
optimal: boolean;
+ /** Draw the cross-hardware Pareto frontier over all deployments. */
+ frontier: boolean;
view: 'chart' | 'table';
}
@@ -27,6 +29,7 @@ export const DEFAULT_VIDEO_DASHBOARD_STATE: VideoDashboardState = {
basis: 'participating',
queue: false,
optimal: false,
+ frontier: false,
view: 'chart',
};
@@ -47,6 +50,7 @@ export function readVideoDashboardState(search: string): VideoDashboardState {
basis: pick(BASES, p.get('v_basis'), d.basis),
queue: p.get('v_queue') === '1',
optimal: p.get('v_opt') === '1',
+ frontier: p.get('v_frontier') === '1',
view: pick(VIEWS, p.get('v_view'), d.view),
};
}
@@ -63,6 +67,7 @@ export function writeVideoDashboardState(url: URL, state: VideoDashboardState):
set('v_basis', state.basis === d.basis ? null : state.basis);
set('v_queue', state.queue ? '1' : null);
set('v_opt', state.optimal ? '1' : null);
+ set('v_frontier', state.frontier ? '1' : null);
set('v_view', state.view === d.view ? null : state.view);
return out;
}
From f37161a9d7907a2d6eaf52127bdca6f3a5d7000d Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:30:01 -0700
Subject: [PATCH 065/104] feat: add H3 API price reference and API-priced video
metrics
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增带日期与来源的 H3 API 标价参考常量(0.034 $/视频秒,区间 0.034–0.047,采集于 2026-09-19),并在视频指标注册表中加入每条视频 API 标价、按标价计的每 GPU 小时收入、每 GPU 小时利润与标价倍数;缺少价格时全部返回 null,货币格式的负号置于 $ 之前。
---
.../video-benchmark/api-reference.test.ts | 24 +++++
.../video-benchmark/api-reference.ts | 31 ++++++
.../video-benchmark/metrics.test.ts | 65 +++++++++++++
.../src/components/video-benchmark/metrics.ts | 97 ++++++++++++++++++-
4 files changed, 213 insertions(+), 4 deletions(-)
create mode 100644 packages/app/src/components/video-benchmark/api-reference.test.ts
create mode 100644 packages/app/src/components/video-benchmark/api-reference.ts
diff --git a/packages/app/src/components/video-benchmark/api-reference.test.ts b/packages/app/src/components/video-benchmark/api-reference.test.ts
new file mode 100644
index 000000000..f032eaf20
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/api-reference.test.ts
@@ -0,0 +1,24 @@
+import { describe, expect, it } from 'vitest';
+import { formatApiPrice, H3_API_REFERENCE } from './api-reference';
+
+describe('H3 API price reference', () => {
+ it('is a dated, sourced list price inside its own listed range', () => {
+ const { pricePerVideoSecondUsd, rangeUsd, capturedOn, label } = H3_API_REFERENCE;
+ expect(pricePerVideoSecondUsd).toBe(0.034);
+ expect(rangeUsd).toEqual([0.034, 0.047]);
+ expect(pricePerVideoSecondUsd).toBeGreaterThanOrEqual(rangeUsd[0]);
+ expect(pricePerVideoSecondUsd).toBeLessThanOrEqual(rangeUsd[1]);
+ expect(capturedOn).toBe('2026-09-19');
+ expect(Number.isNaN(Date.parse(capturedOn))).toBe(false);
+ // The source text must keep saying what was not verified, in both locales.
+ expect(label.en).toContain('MiniMax Design');
+ expect(label.en).toContain('not verified');
+ expect(label.zh).toContain('MiniMax Design');
+ expect(label.zh).toContain('未在按量付费页面核实');
+ });
+ it('formats USD per video-second to the input step, keeping a fourth decimal when typed', () => {
+ expect(formatApiPrice(0.034)).toBe('$0.034');
+ expect(formatApiPrice(0.05)).toBe('$0.050');
+ expect(formatApiPrice(0.0345)).toBe('$0.0345');
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/api-reference.ts b/packages/app/src/components/video-benchmark/api-reference.ts
new file mode 100644
index 000000000..17d668a89
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/api-reference.ts
@@ -0,0 +1,31 @@
+export interface ApiPriceReference {
+ /** USD an API bills per generated video-second at the captured tier. */
+ pricePerVideoSecondUsd: number;
+ /** Listed range across the captured tiers, USD per video-second. */
+ rangeUsd: readonly [number, number];
+ /** ISO date the price was captured. */
+ capturedOn: string;
+ /** Where the price was seen, including what was not verified. */
+ label: { en: string; zh: string };
+}
+
+/**
+ * Dated, sourced API list price the dashboard compares self-hosted TCO against.
+ * It is a reference input, not a measurement: the reader can override it
+ * (`v_api`) and every derived number is labelled as list price. Change the
+ * numbers only together with a new capture date and source text.
+ */
+export const H3_API_REFERENCE: ApiPriceReference = {
+ pricePerVideoSecondUsd: 0.034,
+ rangeUsd: [0.034, 0.047],
+ capturedOn: '2026-09-19',
+ label: {
+ en: 'MiniMax Design · H3 768p subscription tier (web search, not verified on the pay-as-you-go page; H3 was listed as not yet supported on the API packages page)',
+ zh: 'MiniMax Design · H3 768p 订阅档(来源为网页搜索,未在按量付费页面核实;API 套餐页当时标注 H3 尚未支持)',
+ },
+};
+
+/** `$0.034` style USD per video-second: at least the three decimals the input steps by. */
+export function formatApiPrice(value: number): string {
+ return `$${value.toLocaleString('en-US', { minimumFractionDigits: 3, maximumFractionDigits: 4 })}`;
+}
diff --git a/packages/app/src/components/video-benchmark/metrics.test.ts b/packages/app/src/components/video-benchmark/metrics.test.ts
index 19f963dfd..d7e7d5f0d 100644
--- a/packages/app/src/components/video-benchmark/metrics.test.ts
+++ b/packages/app/src/components/video-benchmark/metrics.test.ts
@@ -46,6 +46,8 @@ const h100: VideoPoint = {
avgPowerW: 2574.550733165641,
};
const opts = { tier: 'h', basis: 'participating' } as const;
+// H3 768p list price captured 2026-09-19 (api-reference.ts), USD per video-second.
+const priced = { ...opts, apiPricePerVideoSecond: 0.034 };
describe('video metrics', () => {
it('derives throughput per GPU-hour from valid clips, wall time and participating GPUs', () => {
@@ -77,6 +79,52 @@ describe('video metrics', () => {
expect(metricValue(h200, 'videosPerKwh', opts)).toBeCloseTo(8.76, 2);
expect(metricValue(h200, 'powerPctCap', opts)).toBeCloseTo(97.41, 1);
});
+ it('prices the clip at the API reference and derives revenue, profit and headroom', () => {
+ // 0.034 $/s × 8 s clip; 5.9732 videos/GPU-hr × $0.272; − $1.22 H200 hyperscaler GPU-hr.
+ expect(metricValue(h200, 'apiPricePerVideo', priced)).toBeCloseTo(0.272, 6);
+ expect(metricValue(h200, 'revenuePerGpuHour', priced)).toBeCloseTo(1.6247, 3);
+ expect(metricValue(h200, 'profitPerGpuHour', priced)).toBeCloseTo(0.4047, 3);
+ // $0.272 API ÷ $0.2042 TCO per video.
+ expect(metricValue(h200, 'apiPriceMultiple', priced)).toBeCloseTo(1.332, 3);
+ // Rental tier: same revenue, $2.90 GPU-hr → loss; headroom drops below 1.
+ expect(metricValue(h200, 'profitPerGpuHour', { ...priced, tier: 'r' })).toBeCloseTo(-1.2753, 3);
+ expect(metricValue(h200, 'apiPriceMultiple', { ...priced, tier: 'r' })).toBeCloseTo(0.5603, 3);
+ });
+ it('halves revenue on the allocated basis when only half the reserved GPUs generate', () => {
+ // H100: 4 of 8 allocated boards participate → 2.687 videos/GPU-hr × $0.272 − $1.17.
+ expect(metricValue(h100, 'revenuePerGpuHour', priced)).toBeCloseTo(1.4618, 3);
+ expect(metricValue(h100, 'profitPerGpuHour', priced)).toBeCloseTo(0.2918, 3);
+ const allocated = { ...priced, basis: 'allocated' } as const;
+ expect(metricValue(h100, 'revenuePerGpuHour', allocated)).toBeCloseTo(0.7309, 3);
+ expect(metricValue(h100, 'profitPerGpuHour', allocated)).toBeCloseTo(-0.4391, 3);
+ // The clip price itself does not depend on the GPU basis.
+ expect(metricValue(h100, 'apiPricePerVideo', allocated)).toBeCloseTo(0.272, 6);
+ expect(metricValue(h100, 'apiPriceMultiple', allocated)).toBeCloseTo(0.6247, 3);
+ });
+ it('returns null for every API-priced metric without a positive price or clip length', () => {
+ const ids = [
+ 'apiPricePerVideo',
+ 'revenuePerGpuHour',
+ 'profitPerGpuHour',
+ 'apiPriceMultiple',
+ ] as const;
+ for (const id of ids) {
+ expect(metricValue(h200, id, opts)).toBeNull();
+ expect(metricValue(h200, id, { ...opts, apiPricePerVideoSecond: null })).toBeNull();
+ expect(metricValue(h200, id, { ...opts, apiPricePerVideoSecond: 0 })).toBeNull();
+ expect(metricValue(h200, id, { ...opts, apiPricePerVideoSecond: -0.01 })).toBeNull();
+ expect(metricValue(h200, id, { ...opts, apiPricePerVideoSecond: Number.NaN })).toBeNull();
+ expect(metricValue({ ...h200, durationSeconds: null }, id, priced)).toBeNull();
+ }
+ // A price alone is not enough: revenue, profit and headroom still need throughput and a tier cost.
+ expect(metricValue({ ...h200, wallSeconds: null }, 'revenuePerGpuHour', priced)).toBeNull();
+ expect(metricValue({ ...h200, hardwareKey: null }, 'profitPerGpuHour', priced)).toBeNull();
+ expect(metricValue({ ...h200, hardwareKey: null }, 'apiPriceMultiple', priced)).toBeNull();
+ expect(metricValue({ ...h200, wallSeconds: null }, 'apiPricePerVideo', priced)).toBeCloseTo(
+ 0.272,
+ 6,
+ );
+ });
it('returns null instead of zero for missing inputs', () => {
const broken: VideoPoint = {
...h200,
@@ -107,4 +155,21 @@ describe('video metrics', () => {
expect(formatMetric(151.10486, 'p90Latency')).toBe('151.1');
expect(formatMetric(1234.5, 'videoSecondsPerGpuHour')).toBe('1,234.5');
});
+ it('labels and formats the API-priced metrics, with the sign before the currency symbol', () => {
+ expect(metricLabel('profitPerGpuHour', 'en', opts)).toBe(
+ 'Profit per GPU-hour, API list price − TCO (Owning at Large Hyperscaler Volume)',
+ );
+ expect(metricLabel('apiPriceMultiple', 'zh', { ...opts, tier: 'r' })).toBe(
+ 'API 标价 ÷ 每条视频 TCO 成本(租赁 - 3 年承诺)',
+ );
+ expect(metricLabel('revenuePerGpuHour', 'en', opts)).toBe(
+ 'Revenue per GPU-hour at API list price',
+ );
+ expect(metricLabel('apiPricePerVideo', 'zh', opts)).toBe('每条视频 API 标价');
+ expect(formatMetric(0.272, 'apiPricePerVideo')).toBe('$0.272');
+ expect(formatMetric(1.62471, 'revenuePerGpuHour')).toBe('$1.62');
+ expect(formatMetric(-0.43913, 'profitPerGpuHour')).toBe('-$0.44');
+ expect(formatMetric(1.3318, 'apiPriceMultiple')).toBe('1.33');
+ expect(formatMetric(-1.5, 'p50Latency')).toBe('-1.5');
+ });
});
diff --git a/packages/app/src/components/video-benchmark/metrics.ts b/packages/app/src/components/video-benchmark/metrics.ts
index da55c8675..aea6ee6e3 100644
--- a/packages/app/src/components/video-benchmark/metrics.ts
+++ b/packages/app/src/components/video-benchmark/metrics.ts
@@ -48,12 +48,26 @@ export type YMetricId =
| 'videoSecondsPerGpuHour'
| 'dollarsPerVideo'
| 'kjPerVideo'
- | 'videosPerKwh';
-export type MetricId = XMetricId | YMetricId | 'powerPctCap' | 'dollarsPerVideoSecond';
+ | 'videosPerKwh'
+ | 'revenuePerGpuHour'
+ | 'profitPerGpuHour'
+ | 'apiPriceMultiple';
+export type MetricId =
+ | XMetricId
+ | YMetricId
+ | 'powerPctCap'
+ | 'dollarsPerVideoSecond'
+ | 'apiPricePerVideo';
export interface MetricOptions {
tier: CostTier;
basis: GpuBasis;
+ /**
+ * USD an API bills per video-second of the same clip (`H3_API_REFERENCE` or
+ * the reader's override). Missing or non-positive → every API-priced metric
+ * is null.
+ */
+ apiPricePerVideoSecond?: number | null;
}
interface MetricDefinition {
@@ -76,6 +90,9 @@ export const Y_METRICS: readonly YMetricId[] = [
'dollarsPerVideo',
'kjPerVideo',
'videosPerKwh',
+ 'revenuePerGpuHour',
+ 'profitPerGpuHour',
+ 'apiPriceMultiple',
];
export const COST_TIERS: readonly CostTier[] = ['h', 'r'];
@@ -168,6 +185,42 @@ export const VIDEO_METRICS: Record = {
polarity: 'higher',
digits: 1,
},
+ // API-priced metrics: list price × clip length, seen from the self-hosting
+ // operator's side, so more revenue, profit or price headroom is "higher".
+ apiPricePerVideo: {
+ label: 'API list price per video',
+ labelZh: '每条视频 API 标价',
+ unit: '$/video',
+ polarity: 'higher',
+ digits: 3,
+ currency: true,
+ },
+ revenuePerGpuHour: {
+ label: 'Revenue per GPU-hour at API list price',
+ labelZh: '按 API 标价计的每 GPU 小时收入',
+ unit: '$/GPU-hr',
+ polarity: 'higher',
+ digits: 2,
+ currency: true,
+ },
+ // Tiered labels take the cost tier in parentheses, so they carry no unit parentheses of their own.
+ profitPerGpuHour: {
+ label: 'Profit per GPU-hour, API list price − TCO',
+ labelZh: '每 GPU 小时利润,API 标价 − TCO',
+ unit: '$/GPU-hr',
+ polarity: 'higher',
+ digits: 2,
+ tiered: true,
+ currency: true,
+ },
+ apiPriceMultiple: {
+ label: 'API list price ÷ TCO cost per video',
+ labelZh: 'API 标价 ÷ 每条视频 TCO 成本',
+ unit: '×',
+ polarity: 'higher',
+ digits: 2,
+ tiered: true,
+ },
};
const finite = (n: number | null | undefined): n is number =>
@@ -191,6 +244,18 @@ function dollarsPerVideo(point: VideoPoint, options: MetricOptions): number | nu
return rate !== null && cost !== null ? cost / rate : null;
}
+/** What an API would bill for one clip of this cell's length at the reference price. */
+function apiPricePerVideo(point: VideoPoint, options: MetricOptions): number | null {
+ const price = options.apiPricePerVideoSecond;
+ return positive(price) && positive(point.durationSeconds) ? price * point.durationSeconds : null;
+}
+
+function revenuePerGpuHour(point: VideoPoint, options: MetricOptions): number | null {
+ const rate = videosPerGpuHour(point, options.basis);
+ const price = apiPricePerVideo(point, options);
+ return rate !== null && price !== null ? rate * price : null;
+}
+
/** Every formula returns null (never 0) when an input is missing or invalid. */
export function metricValue(
point: VideoPoint,
@@ -253,6 +318,28 @@ export function metricValue(
: null;
break;
}
+ case 'apiPricePerVideo': {
+ value = apiPricePerVideo(point, options);
+ break;
+ }
+ case 'revenuePerGpuHour': {
+ value = revenuePerGpuHour(point, options);
+ break;
+ }
+ case 'profitPerGpuHour': {
+ // Negative when the API list price does not cover the tier's GPU-hour.
+ const revenue = revenuePerGpuHour(point, options);
+ const cost = point.hardwareKey ? costPerGpuHour(point.hardwareKey, options.tier) : null;
+ value = revenue !== null && cost !== null ? revenue - cost : null;
+ break;
+ }
+ case 'apiPriceMultiple': {
+ // > 1 means the API list price exceeds the self-hosted TCO cost of the clip.
+ const price = apiPricePerVideo(point, options);
+ const cost = dollarsPerVideo(point, options);
+ value = price !== null && cost !== null ? price / cost : null;
+ break;
+ }
}
return finite(value) ? value : null;
}
@@ -265,12 +352,14 @@ export function metricLabel(id: MetricId, locale: 'en' | 'zh', options: MetricOp
return locale === 'zh' ? `${base}(${tier})` : `${base} (${tier})`;
}
+/** Sign precedes the currency symbol (`-$0.44`), as profit per GPU-hour can be negative. */
export function formatMetric(value: number | null, id: MetricId): string {
if (value === null) return '—';
const def = VIDEO_METRICS[id];
- const text = value.toLocaleString('en-US', {
+ const text = Math.abs(value).toLocaleString('en-US', {
minimumFractionDigits: def.currency ? def.digits : 0,
maximumFractionDigits: def.digits,
});
- return def.currency ? `$${text}` : text;
+ const sign = value < 0 ? '-' : '';
+ return def.currency ? `${sign}$${text}` : `${sign}${text}`;
}
From b54404f569c6da1cf12b93e2f457885bce3aae76 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:30:12 -0700
Subject: [PATCH 066/104] feat: carry the API price in the video dashboard URL
state
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:仪表板状态新增 apiPrice(默认取参考值);URL 参数 v_api 仅接受正的有限数并保留四位小数,无效值回退默认、等于默认时省略;新增 metricOptions(state) 把状态映射为指标选项。
---
.../video-benchmark/video-url-state.test.ts | 69 ++++++++++++++++++-
.../video-benchmark/video-url-state.ts | 28 ++++++++
2 files changed, 95 insertions(+), 2 deletions(-)
diff --git a/packages/app/src/components/video-benchmark/video-url-state.test.ts b/packages/app/src/components/video-benchmark/video-url-state.test.ts
index f7cd3ed44..e7dcb3b19 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.test.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.test.ts
@@ -1,6 +1,9 @@
import { describe, expect, it } from 'vitest';
+import { H3_API_REFERENCE } from './api-reference';
import {
DEFAULT_VIDEO_DASHBOARD_STATE,
+ metricOptions,
+ parseApiPrice,
readVideoDashboardState,
writeVideoDashboardState,
} from './video-url-state';
@@ -9,13 +12,15 @@ describe('video dashboard URL state', () => {
it('falls back to defaults for missing or invalid params', () => {
expect(readVideoDashboardState('')).toEqual(DEFAULT_VIDEO_DASHBOARD_STATE);
expect(
- readVideoDashboardState('?v_x=bogus&v_y=nope&v_tier=z&v_basis=q&v_view=pie&v_queue=yes'),
+ readVideoDashboardState(
+ '?v_x=bogus&v_y=nope&v_tier=z&v_basis=q&v_view=pie&v_queue=yes&v_api=free',
+ ),
).toEqual(DEFAULT_VIDEO_DASHBOARD_STATE);
});
it('reads every supported param', () => {
expect(
readVideoDashboardState(
- '?v_x=genSpeed&v_y=kjPerVideo&v_tier=r&v_basis=allocated&v_queue=1&v_opt=1&v_frontier=1&v_view=table',
+ '?v_x=genSpeed&v_y=kjPerVideo&v_tier=r&v_basis=allocated&v_queue=1&v_opt=1&v_frontier=1&v_view=table&v_api=0.047',
),
).toEqual({
x: 'genSpeed',
@@ -26,7 +31,24 @@ describe('video dashboard URL state', () => {
optimal: true,
frontier: true,
view: 'table',
+ apiPrice: 0.047,
});
+ expect(readVideoDashboardState('?v_y=profitPerGpuHour').y).toBe('profitPerGpuHour');
+ });
+ it('defaults the API price to the dated reference and rejects non-positive or malformed prices', () => {
+ expect(DEFAULT_VIDEO_DASHBOARD_STATE.apiPrice).toBe(H3_API_REFERENCE.pricePerVideoSecondUsd);
+ for (const bad of ['0', '-0.034', 'NaN', 'Infinity', '', ' ', 'abc', '0.00004']) {
+ expect(readVideoDashboardState(`?v_api=${bad}`).apiPrice).toBe(0.034);
+ expect(parseApiPrice(bad)).toBeNull();
+ }
+ expect(parseApiPrice(null)).toBeNull();
+ expect(parseApiPrice(undefined)).toBeNull();
+ expect(parseApiPrice(Number.NaN)).toBeNull();
+ // Positive prices are kept to four decimals, so the URL and the input agree.
+ expect(parseApiPrice('0.05')).toBe(0.05);
+ expect(parseApiPrice('0.03456')).toBe(0.0346);
+ expect(parseApiPrice(0.0001)).toBe(0.0001);
+ expect(readVideoDashboardState('?v_api=1e-2').apiPrice).toBe(0.01);
});
it('writes only non-default params and keeps unrelated params', () => {
const url = new URL('https://x.test/video?run=1&view=results');
@@ -40,9 +62,52 @@ describe('video dashboard URL state', () => {
expect(out.searchParams.get('v_tier')).toBe('r');
expect(out.searchParams.get('v_queue')).toBe('1');
expect(out.searchParams.has('v_x')).toBe(false);
+ expect(out.searchParams.has('v_api')).toBe(false);
expect(url.searchParams.has('v_tier')).toBe(false);
const reset = writeVideoDashboardState(out, DEFAULT_VIDEO_DASHBOARD_STATE);
expect([...reset.searchParams.keys()].filter((k) => k.startsWith('v_'))).toEqual([]);
expect(reset.searchParams.get('run')).toBe('1');
});
+ it('round-trips an overridden API price and drops an invalid one', () => {
+ const url = new URL('https://x.test/video');
+ const out = writeVideoDashboardState(url, { ...DEFAULT_VIDEO_DASHBOARD_STATE, apiPrice: 0.05 });
+ expect(out.searchParams.get('v_api')).toBe('0.05');
+ expect(readVideoDashboardState(out.search).apiPrice).toBe(0.05);
+ expect(
+ writeVideoDashboardState(url, {
+ ...DEFAULT_VIDEO_DASHBOARD_STATE,
+ apiPrice: 0.03456,
+ }).searchParams.get('v_api'),
+ ).toBe('0.0346');
+ expect(
+ writeVideoDashboardState(out, {
+ ...DEFAULT_VIDEO_DASHBOARD_STATE,
+ apiPrice: 0,
+ }).searchParams.has('v_api'),
+ ).toBe(false);
+ expect(
+ writeVideoDashboardState(out, {
+ ...DEFAULT_VIDEO_DASHBOARD_STATE,
+ apiPrice: Number.NaN,
+ }).searchParams.has('v_api'),
+ ).toBe(false);
+ });
+ it('maps state to metric options, including the API price', () => {
+ expect(metricOptions(DEFAULT_VIDEO_DASHBOARD_STATE)).toEqual({
+ tier: 'h',
+ basis: 'participating',
+ apiPricePerVideoSecond: 0.034,
+ });
+ expect(
+ metricOptions({
+ ...DEFAULT_VIDEO_DASHBOARD_STATE,
+ tier: 'r',
+ basis: 'allocated',
+ apiPrice: 0.05,
+ }),
+ ).toEqual({ tier: 'r', basis: 'allocated', apiPricePerVideoSecond: 0.05 });
+ expect(
+ metricOptions({ ...DEFAULT_VIDEO_DASHBOARD_STATE, apiPrice: -1 }).apiPricePerVideoSecond,
+ ).toBeNull();
+ });
});
diff --git a/packages/app/src/components/video-benchmark/video-url-state.ts b/packages/app/src/components/video-benchmark/video-url-state.ts
index 435fe1b97..29626b1e1 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.ts
@@ -1,9 +1,11 @@
+import { H3_API_REFERENCE } from './api-reference';
import type { CostTier } from './hardware';
import {
COST_TIERS,
X_METRICS,
Y_METRICS,
type GpuBasis,
+ type MetricOptions,
type XMetricId,
type YMetricId,
} from './metrics';
@@ -20,6 +22,8 @@ export interface VideoDashboardState {
/** Draw the cross-hardware Pareto frontier over all deployments. */
frontier: boolean;
view: 'chart' | 'table';
+ /** USD per video-second the API-priced metrics assume; the dated reference unless the reader overrides it. */
+ apiPrice: number;
}
export const DEFAULT_VIDEO_DASHBOARD_STATE: VideoDashboardState = {
@@ -31,6 +35,7 @@ export const DEFAULT_VIDEO_DASHBOARD_STATE: VideoDashboardState = {
optimal: false,
frontier: false,
view: 'chart',
+ apiPrice: H3_API_REFERENCE.pricePerVideoSecondUsd,
};
const BASES: readonly GpuBasis[] = ['participating', 'allocated'];
@@ -39,6 +44,26 @@ const VIEWS: readonly VideoDashboardState['view'][] = ['chart', 'table'];
const pick = (allowed: readonly T[], value: string | null, fallback: T): T =>
allowed.includes(value as T) ? (value as T) : fallback;
+/**
+ * A USD/video-second price as typed or read from `v_api`: positive, finite,
+ * kept to four decimals so the URL and the input agree. Anything else is null,
+ * so callers fall back to the reference instead of pricing at 0.
+ */
+export function parseApiPrice(raw: string | number | null | undefined): number | null {
+ if (raw === null || raw === undefined) return null;
+ const n = typeof raw === 'number' ? raw : Number(raw.trim() || Number.NaN);
+ if (!Number.isFinite(n) || n <= 0) return null;
+ const rounded = Math.round(n * 1e4) / 1e4;
+ return rounded > 0 ? rounded : null;
+}
+
+/** Metric inputs the dashboard controls select, so no component rebuilds `{ tier, basis }` by hand. */
+export const metricOptions = (state: VideoDashboardState): MetricOptions => ({
+ tier: state.tier,
+ basis: state.basis,
+ apiPricePerVideoSecond: parseApiPrice(state.apiPrice),
+});
+
/** Dashboard controls live under the `v_` prefix so the run/artifact/view params stay untouched. */
export function readVideoDashboardState(search: string): VideoDashboardState {
const p = new URLSearchParams(search);
@@ -52,6 +77,7 @@ export function readVideoDashboardState(search: string): VideoDashboardState {
optimal: p.get('v_opt') === '1',
frontier: p.get('v_frontier') === '1',
view: pick(VIEWS, p.get('v_view'), d.view),
+ apiPrice: parseApiPrice(p.get('v_api')) ?? d.apiPrice,
};
}
@@ -69,5 +95,7 @@ export function writeVideoDashboardState(url: URL, state: VideoDashboardState):
set('v_opt', state.optimal ? '1' : null);
set('v_frontier', state.frontier ? '1' : null);
set('v_view', state.view === d.view ? null : state.view);
+ const apiPrice = parseApiPrice(state.apiPrice);
+ set('v_api', apiPrice === null || apiPrice === d.apiPrice ? null : String(apiPrice));
return out;
}
From da9d2e1951fb96f814d1218547c092a622efeb9d Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:30:25 -0700
Subject: [PATCH 067/104] feat: add API price reference control and
revenue/profit views to the video dashboard
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:基准测试配置面板新增 API 价格参考控件(数值输入、重置按钮,以及含参考值、区间、采集日期与来源的说明);KPI 卡新增“API 标价 / 条”与“利润 / GPU 小时”,数据表新增四个 API 定价次级列;图表与各组件统一改用 metricOptions(state),Y 轴允许负的每 GPU 小时利润。
---
.../video-benchmark/VideoApiReference.tsx | 128 ++++++++++++++++++
.../video-benchmark/VideoConfigBar.tsx | 8 +-
.../video-benchmark/VideoHardwareChart.tsx | 4 +-
.../video-benchmark/VideoKpiCards.tsx | 10 +-
.../video-benchmark/VideoPointsTable.tsx | 8 +-
.../src/components/video-benchmark/plot.ts | 4 +-
6 files changed, 151 insertions(+), 11 deletions(-)
create mode 100644 packages/app/src/components/video-benchmark/VideoApiReference.tsx
diff --git a/packages/app/src/components/video-benchmark/VideoApiReference.tsx b/packages/app/src/components/video-benchmark/VideoApiReference.tsx
new file mode 100644
index 000000000..b128f84ba
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoApiReference.tsx
@@ -0,0 +1,128 @@
+'use client';
+
+import { useId, useRef, useState } from 'react';
+import { Button } from '@/components/ui/button';
+import { Input } from '@/components/ui/input';
+import { track } from '@/lib/analytics';
+import { useLocale } from '@/lib/use-locale';
+import { formatApiPrice, H3_API_REFERENCE } from './api-reference';
+import { parseApiPrice } from './video-url-state';
+
+const STRINGS = {
+ en: {
+ label: 'API price reference ($/video-second)',
+ reset: 'Reset',
+ resetTitle: 'Reset to the dated reference price',
+ reference: 'Reference',
+ range: 'listed range',
+ captured: 'captured',
+ source: 'Source: ',
+ disclaimer:
+ 'List price, not realized revenue; self-hosted TCO excludes utilization, CPU, storage and network.',
+ },
+ zh: {
+ label: 'API 价格参考($/视频秒)',
+ reset: '重置',
+ resetTitle: '恢复为带日期的参考价格',
+ reference: '参考值',
+ range: '标价区间',
+ captured: '采集于',
+ source: '来源:',
+ disclaimer: '为标价而非实际收入;自托管 TCO 不含利用率、CPU、存储与网络成本。',
+ },
+};
+
+/**
+ * The one editable economics input: USD an API bills per video-second. It
+ * sits in the Benchmark config panel next to the frozen model and workload,
+ * and its caption keeps the dated reference and source in view so a changed
+ * price is always read against what was captured. Valid prices apply as they
+ * are typed; an empty or non-positive box leaves the last valid price in
+ * place and snaps back on blur.
+ */
+export default function VideoApiReference({
+ value,
+ onChange,
+}: {
+ value: number;
+ onChange: (value: number) => void;
+}) {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const id = useId();
+ const { pricePerVideoSecondUsd: reference, rangeUsd, capturedOn, label } = H3_API_REFERENCE;
+ const [raw, setRaw] = useState(() => String(value));
+ const [synced, setSynced] = useState(value);
+ // Adopt a value set elsewhere (URL restore, reset) without clobbering text mid-edit.
+ if (value !== synced) {
+ setSynced(value);
+ if (parseApiPrice(raw) !== value) setRaw(String(value));
+ }
+ const valueAtFocus = useRef(value);
+ const commit = (next: number, reset = false) => {
+ if (next === value) return;
+ onChange(next);
+ if (reset) track('video_api_price_changed', { value: String(next), reset: true });
+ };
+ return (
+ <>
+
+
+ {s.label}
+
+
+ {
+ valueAtFocus.current = value;
+ }}
+ onChange={(event) => {
+ setRaw(event.target.value);
+ const next = parseApiPrice(event.target.value);
+ if (next !== null) commit(next);
+ }}
+ onBlur={() => {
+ if (parseApiPrice(raw) === null) setRaw(String(value));
+ if (value !== valueAtFocus.current) {
+ track('video_api_price_changed', { value: String(value) });
+ }
+ }}
+ onWheel={(event) => event.currentTarget.blur()}
+ />
+ {
+ setRaw(String(reference));
+ commit(reference, true);
+ }}
+ >
+ {s.reset}
+
+
+
+
+
+ {s.reference} {formatApiPrice(reference)}/video-s · {s.range}{' '}
+ {formatApiPrice(rangeUsd[0])}–{formatApiPrice(rangeUsd[1])} · {s.captured} {capturedOn} ·{' '}
+ {s.source}
+ {label[locale]}
+
+
{s.disclaimer}
+
+ >
+ );
+}
diff --git a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
index 7f04a34aa..71beba436 100644
--- a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
+++ b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
@@ -14,8 +14,9 @@ import {
type XMetricId,
type YMetricId,
} from './metrics';
+import VideoApiReference from './VideoApiReference';
import VideoSelect from './VideoSelect';
-import type { VideoDashboardState } from './video-url-state';
+import { metricOptions, type VideoDashboardState } from './video-url-state';
const STRINGS = {
en: {
@@ -69,14 +70,14 @@ export default function VideoConfigBar({
}) {
const locale = useLocale();
const s = STRINGS[locale];
- const options = { tier: state.tier, basis: state.basis };
+ const options = metricOptions(state);
const change = (key: K, value: VideoDashboardState[K]) => {
onChange({ [key]: value } as Partial);
track(`video_${key}_changed`, { value: String(value) });
};
return (
-
+
{}}
options={[{ value: 'deployment', label: deploymentLabel }]}
/>
+ onChange({ apiPrice })} />
diff --git a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
index 3e488b6e9..d85893240 100644
--- a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
+++ b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
@@ -6,7 +6,7 @@ import { isQueueing, layoutLabel } from './deployment';
import { hardwareLabel } from './hardware';
import { formatMetric, metricLabel, metricValue, type MetricId, type VideoPoint } from './metrics';
import { latestVideoCells } from './points';
-import type { VideoDashboardState } from './video-url-state';
+import { metricOptions, type VideoDashboardState } from './video-url-state';
const STRINGS = {
en: {
@@ -34,6 +34,10 @@ const METRIC_COLUMNS: readonly MetricId[] = [
'videosPerGpuHour',
'videosPerDollar',
'dollarsPerVideo',
+ 'apiPricePerVideo',
+ 'revenuePerGpuHour',
+ 'profitPerGpuHour',
+ 'apiPriceMultiple',
'kjPerVideo',
'powerPctCap',
];
@@ -60,7 +64,7 @@ export default function VideoPointsTable({
}) {
const locale = useLocale();
const s = STRINGS[locale];
- const options = { tier: state.tier, basis: state.basis };
+ const options = metricOptions(state);
const rows = videoTableRows(points, state, hidden);
const columns: DataTableColumn[] = [
{
diff --git a/packages/app/src/components/video-benchmark/plot.ts b/packages/app/src/components/video-benchmark/plot.ts
index fa1c2037d..dd705ac32 100644
--- a/packages/app/src/components/video-benchmark/plot.ts
+++ b/packages/app/src/components/video-benchmark/plot.ts
@@ -3,7 +3,7 @@ import { paretoFrontier } from './frontier';
import { hardwareLabel } from './hardware';
import { metricValue, VIDEO_METRICS, type VideoPoint } from './metrics';
import { latestVideoCells } from './points';
-import type { VideoDashboardState } from './video-url-state';
+import { metricOptions, type VideoDashboardState } from './video-url-state';
export interface PlottedVideoPoint extends VideoPoint {
x: number;
@@ -39,7 +39,7 @@ export function plotVideoPoints(
colorFor: (hardwareKey: string) => string,
hidden: ReadonlySet,
): VideoPlot {
- const options = { tier: state.tier, basis: state.basis };
+ const options = metricOptions(state);
const cells: PlottedVideoPoint[] = latestVideoCells(points).flatMap((p) => {
if (!p.hardwareKey || hidden.has(p.hardwareKey)) return [];
const x = metricValue(p, state.x, options);
From 2b63f5272357944ebd004ed8d919bb94dd7cd550 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:30:36 -0700
Subject: [PATCH 068/104] test: cover the API price reference in video
component specs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增 VideoApiReference 组件测试(参考说明、输入即生效、空值/零值保留上次有效价、失焦回退、重置与外部同步、埋点、中文文案),并扩展仪表板测试:改价后卡片、表格与 v_api 同步更新,allocated 口径下负利润仍在画布内。
---
.../component/video-api-reference.cy.tsx | 78 +++++++++++++++++++
.../cypress/component/video-dashboard.cy.tsx | 49 +++++++++++-
2 files changed, 126 insertions(+), 1 deletion(-)
create mode 100644 packages/app/cypress/component/video-api-reference.cy.tsx
diff --git a/packages/app/cypress/component/video-api-reference.cy.tsx b/packages/app/cypress/component/video-api-reference.cy.tsx
new file mode 100644
index 000000000..958303597
--- /dev/null
+++ b/packages/app/cypress/component/video-api-reference.cy.tsx
@@ -0,0 +1,78 @@
+import { useState } from 'react';
+import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
+import VideoApiReference from '@/components/video-benchmark/VideoApiReference';
+import { registerAnalyticsClient } from '@/lib/analytics';
+
+/** Owns the price like VideoDashboard does and exposes it, plus an external setter. */
+function Harness({ initial, pathname = '/video' }: { initial: number; pathname?: string }) {
+ const [value, setValue] = useState(initial);
+ return (
+
+
+
+
+ {value}
+ setValue(0.047)}>
+ external
+
+
+ );
+}
+const input = () => cy.get('[data-testid="video-api-price"]');
+const value = () => cy.get('[data-testid="api-price-value"]');
+const caption = () => cy.get('[data-testid="video-api-reference-caption"]');
+
+describe('VideoApiReference', () => {
+ it('shows the dated reference with its source and applies valid prices as typed', () => {
+ cy.mount( );
+ input().should('have.value', '0.034').and('have.attr', 'step', '0.001');
+ caption()
+ .should('contain', 'Reference $0.034/video-s')
+ .and('contain', 'listed range $0.034–$0.047')
+ .and('contain', 'captured 2026-09-19')
+ .and('contain', 'Source: MiniMax Design · H3 768p subscription tier')
+ .and('contain', 'not verified on the pay-as-you-go page')
+ .and('contain', 'List price, not realized revenue');
+ input().clear().type('0.05');
+ value().should('have.text', '0.05');
+ });
+ it('keeps the last valid price while the box is empty or zero and snaps back on blur', () => {
+ cy.mount( );
+ input().clear();
+ value().should('have.text', '0.034');
+ input().type('0');
+ value().should('have.text', '0.034');
+ input().blur().should('have.value', '0.034');
+ });
+ it('resets to the reference, adopts external values and tracks committed changes', () => {
+ const capture = cy.stub().as('capture');
+ registerAnalyticsClient({ capture });
+ cy.mount( );
+ input().should('have.value', '0.05');
+ cy.get('[data-testid="video-api-price-reset"]').click();
+ value().should('have.text', '0.034');
+ input().should('have.value', '0.034');
+ cy.get('@capture').should('have.been.calledWith', 'video_api_price_changed', {
+ value: '0.034',
+ reset: true,
+ });
+ cy.get('[data-testid="api-price-external"]').click();
+ input().should('have.value', '0.047');
+ input().clear().type('0.04').blur();
+ value().should('have.text', '0.04');
+ cy.get('@capture').should('have.been.calledWith', 'video_api_price_changed', {
+ value: '0.04',
+ });
+ });
+ it('renders Chinese copy under /zh', () => {
+ cy.mount( );
+ cy.contains('label', 'API 价格参考($/视频秒)').should('exist');
+ cy.contains('button', '重置').should('exist');
+ caption()
+ .should('contain', '参考值 $0.034/video-s')
+ .and('contain', '标价区间 $0.034–$0.047')
+ .and('contain', '采集于 2026-09-19')
+ .and('contain', '来源:MiniMax Design · H3 768p 订阅档')
+ .and('contain', '为标价而非实际收入');
+ });
+});
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index eb64482fd..0fc71ba50 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -107,6 +107,49 @@ describe('Video hardware dashboard (retained fixture)', () => {
cy.get('[data-testid="video-runs-section"]').should('have.attr', 'open');
cy.get('[data-testid="video-ci-runs"]').should('exist');
});
+ it('reprices the API reference, updating the cards, the table and the URL', () => {
+ mount();
+ // 0.034 $/video-s × 8 s clip = $0.272; 5.9732 videos/GPU-hr × $0.272 − $1.22 = $0.40 profit.
+ kpi('h200').should('contain', 'API $/video').and('contain', '$0.272').and('contain', '$0.40');
+ // H100 on the participating basis: 5.3741 × $0.272 − $1.17 = $0.29.
+ kpi('h100').should('contain', '$0.29');
+ cy.get('[data-testid="video-api-reference-caption"]')
+ .should('contain', 'Reference $0.034/video-s')
+ .and('contain', '$0.034–$0.047')
+ .and('contain', 'captured 2026-09-19')
+ .and('contain', 'MiniMax Design');
+ cy.get('[data-testid="video-api-price"]').clear().type('0.05');
+ // $0.400 per clip; 5.9732 × $0.400 − $1.22 = $1.17 profit.
+ kpi('h200').should('contain', '$0.400').and('contain', '$1.17');
+ cy.location('search').should('contain', 'v_api=0.05');
+ cy.contains('button', 'Table').click();
+ cy.get('[data-testid="data-table-preset-all"]').click();
+ cy.get('[data-testid="video-points-table"] thead')
+ .should('contain', 'Revenue per GPU-hour at API list price')
+ .and('contain', 'API list price ÷ TCO cost per video (Owning at Large Hyperscaler Volume)');
+ // H200 row: revenue 5.9732 × $0.400 = $2.39; multiple $0.400 ÷ $0.2042 = 1.96.
+ cy.contains('[data-testid="video-points-table"] tbody tr', 'H200')
+ .should('contain', '$2.39')
+ .and('contain', '1.96');
+ cy.get('[data-testid="video-api-price-reset"]').click();
+ cy.contains('[data-testid="video-points-table"] tbody tr', 'H200').should('contain', '$1.62');
+ cy.location('search').should('not.contain', 'v_api');
+ });
+ it('keeps negative profit per GPU-hour on the canvas on the allocated basis', () => {
+ mount('/video', '?v_y=profitPerGpuHour&v_basis=allocated');
+ // H100 (−$0.44) and B200 (−$0.16) bill idle boards; only H200 (+$0.40) stays positive.
+ points().should('have.length', 3);
+ cy.get('[data-testid="video-hardware-chart"] .y-axis .tick text').should(($ticks) => {
+ const labels = [...$ticks].map((el) => el.textContent ?? '');
+ expect(labels.some((label) => /^[-−]/u.test(label))).to.equal(true);
+ });
+ cy.get('[data-testid="video-chart-card"]').should(
+ 'contain',
+ 'Profit per GPU-hour, API list price − TCO (Owning at Large Hyperscaler Volume)',
+ );
+ kpi('h100').should('contain', '-$0.44');
+ kpi('b200').should('contain', '-$0.16');
+ });
it('shows placeholders while loading instead of a false "Not measured"', () => {
cy.intercept('GET', '/api/video-runs?format=history&page=1', (req) => {
req.reply({ fixture: 'api/video-history.json', delay: 800 });
@@ -131,6 +174,10 @@ describe('Video hardware dashboard (retained fixture)', () => {
'每 1 美元 TCO 生成视频数(Hyperscaler 自有设备)',
);
kpi('mi355x').should('contain', '未测得');
- cy.get('[data-testid="video-config-bar"]').should('contain', '成本档位');
+ kpi('h200').should('contain', 'API 标价 / 条视频').and('contain', '利润 / GPU 小时');
+ cy.get('[data-testid="video-config-bar"]')
+ .should('contain', '成本档位')
+ .and('contain', 'API 价格参考($/视频秒)')
+ .and('contain', '采集于 2026-09-19');
});
});
From eebadd6efea9d0a179b6b126559f480841e9a926 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:55:41 -0700
Subject: [PATCH 069/104] fix: cap the video chart y axis at break-even when
every hardware loses money
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The y domain fell back to a ceiling of 1 whenever the true ceiling was 0,
so any all-negative profit view (default price and basis, Rent - 3 Year
Commit tier) drew the three losses in the bottom third of the canvas
under an empty band. Move the padding into zeroAnchoredDomain(), which
pads past the data anchored at zero and reserves the unit fallback for
no data, and cover the all-negative case in Vitest and in the dashboard
component spec (the spec fails on the old chart code with "expected 1 to
equal 0").
中文:当所有硬件都亏损时,将视频图表的 y 轴上限固定在盈亏平衡点。此前只要真实上限为 0,
y 轴就会退回到 1 的合成上限,把三个亏损点挤在画布底部;现改为 zeroAnchoredDomain()
以零为锚点外扩,仅在没有数据时使用单位区间,并在 Vitest 与仪表板组件测试中覆盖全负值场景。
---
.../cypress/component/video-dashboard.cy.tsx | 14 ++++++++
.../video-benchmark/VideoHardwareChart.tsx | 17 ++++++---
.../video-benchmark/chart-domain.test.ts | 35 +++++++++++++++++++
.../video-benchmark/chart-domain.ts | 16 +++++++++
4 files changed, 78 insertions(+), 4 deletions(-)
create mode 100644 packages/app/src/components/video-benchmark/chart-domain.test.ts
create mode 100644 packages/app/src/components/video-benchmark/chart-domain.ts
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index 0fc71ba50..9a2a1d6c1 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -150,6 +150,20 @@ describe('Video hardware dashboard (retained fixture)', () => {
kpi('h100').should('contain', '-$0.44');
kpi('b200').should('contain', '-$0.16');
});
+ it('caps the y axis at break-even when every hardware loses money at the rental tier', () => {
+ mount('/video', '?v_y=profitPerGpuHour&v_tier=r');
+ // $0.034/video-s on the participating basis against $2.00/$2.90/$3.70 GPU-hr: H100 −$0.54, H200 −$1.28, B200 −$0.56.
+ points().should('have.length', 3);
+ kpi('h100').should('contain', '-$0.54');
+ kpi('h200').should('contain', '-$1.28');
+ kpi('b200').should('contain', '-$0.56');
+ cy.get('[data-testid="video-hardware-chart"] .y-axis .tick text').should(($ticks) => {
+ const values = [...$ticks].map((el) => Number((el.textContent ?? '').replace('−', '-')));
+ // Regression: a zero ceiling used to fall back to 1, leaving the top half of the canvas empty.
+ expect(Math.max(...values)).to.equal(0);
+ expect(Math.min(...values)).to.be.below(-1.2);
+ });
+ });
it('shows placeholders while loading instead of a false "Not measured"', () => {
cy.intercept('GET', '/api/video-runs?format=history&page=1', (req) => {
req.reply({ fixture: 'api/video-history.json', delay: 800 });
diff --git a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
index 74f4ea24d..de17f945b 100644
--- a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
+++ b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
@@ -6,6 +6,7 @@ import type { ContinuousScale } from '@/lib/d3-chart/types';
import { CHART_TYPE, px } from '@/lib/d3-chart/typography';
import { useLocale } from '@/lib/use-locale';
import { escapeHtml } from '@/lib/utils';
+import { zeroAnchoredDomain } from './chart-domain';
import { layoutLabel } from './deployment';
import { formatMetric, metricLabel, type VideoPoint } from './metrics';
import { plotVideoPoints, type PlottedVideoPoint } from './plot';
@@ -110,8 +111,16 @@ export default function VideoHardwareChart({
.attr('pointer-events', 'none')
.text(pointLabel);
};
- const maxX = Math.max(0, ...plotted.map((p) => p.x));
- const maxY = Math.max(0, ...plotted.map((p) => p.y));
+ const xDomain = zeroAnchoredDomain(
+ plotted.map((p) => p.x),
+ 1.12,
+ );
+ // Profit per GPU-hour goes negative when the API price misses the tier cost: those
+ // points stay on the canvas, and when every hardware loses money the top is break-even.
+ const yDomain = zeroAnchoredDomain(
+ plotted.map((p) => p.y),
+ 1.15,
+ );
const caption = [
multiLayout ? s.multi : s.single(layouts || '—'),
state.frontier ? (global.length > 1 ? s.global : s.globalOne) : null,
@@ -126,8 +135,8 @@ export default function VideoHardwareChart({
margin={{ top: 20, right: 28, bottom: 80, left: 85 }}
watermark="logo"
transitionDuration={0}
- xScale={{ type: 'linear', domain: [0, maxX * 1.12 || 1], nice: true }}
- yScale={{ type: 'linear', domain: [0, maxY * 1.15 || 1], nice: true }}
+ xScale={{ type: 'linear', domain: xDomain, nice: true }}
+ yScale={{ type: 'linear', domain: yDomain, nice: true }}
xAxis={{ label: xLabel, tickCount: 6 }}
yAxis={{ label: yLabel, tickCount: 6 }}
layers={[
diff --git a/packages/app/src/components/video-benchmark/chart-domain.test.ts b/packages/app/src/components/video-benchmark/chart-domain.test.ts
new file mode 100644
index 000000000..578de9fb7
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/chart-domain.test.ts
@@ -0,0 +1,35 @@
+import { describe, expect, it } from 'vitest';
+import { zeroAnchoredDomain } from './chart-domain';
+
+// Profit per GPU-hour for the retained H100/H200/B200 C1 cells at $0.034/video-s
+// (cypress/fixtures/api/video-history.json, asserted per point in metrics.test.ts):
+// every hardware loses money at the 3-year rental tier ($2.00/$2.90/$3.70 GPU-hr)
+// on the participating basis, while on the allocated basis at the hyperscaler
+// tier only H200 stays positive.
+const RENTAL_LOSSES = [-0.5382, -1.2753, -0.5649];
+const ALLOCATED_HYPERSCALER = [-0.4391, 0.4047, -0.16];
+// Videos per $1 TCO at the hyperscaler tier: H100, H200, B200.
+const VIDEOS_PER_DOLLAR = [4.593, 4.896, 6.663];
+
+describe('zeroAnchoredDomain', () => {
+ it('pads positive-only data above zero', () => {
+ const [lo, hi] = zeroAnchoredDomain(VIDEOS_PER_DOLLAR, 1.15);
+ expect(lo).toBe(0);
+ expect(hi).toBeCloseTo(6.663 * 1.15, 6);
+ });
+ it('caps all-negative data at break-even instead of a synthetic ceiling', () => {
+ // Regression: `maxY * 1.15 || 1` read a zero ceiling as missing data and pinned the top at 1.
+ const [lo, hi] = zeroAnchoredDomain(RENTAL_LOSSES, 1.15);
+ expect(hi).toBe(0);
+ expect(lo).toBeCloseTo(-1.2753 * 1.15, 6);
+ });
+ it('pads both ends of mixed data', () => {
+ const [lo, hi] = zeroAnchoredDomain(ALLOCATED_HYPERSCALER, 1.15);
+ expect(lo).toBeCloseTo(-0.4391 * 1.15, 6);
+ expect(hi).toBeCloseTo(0.4047 * 1.15, 6);
+ });
+ it('falls back to a unit domain only without data, or when every value is zero', () => {
+ expect(zeroAnchoredDomain([], 1.15)).toEqual([0, 1]);
+ expect(zeroAnchoredDomain([0, 0], 1.15)).toEqual([0, 1]);
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/chart-domain.ts b/packages/app/src/components/video-benchmark/chart-domain.ts
new file mode 100644
index 000000000..cc75aa311
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/chart-domain.ts
@@ -0,0 +1,16 @@
+/**
+ * Linear axis domain for the hardware chart, anchored at zero and padded past
+ * the data by the `pad` multiplier so point labels clear the plot edges.
+ * Positive-only data spans [0, pad·max]; all-negative data — profit per
+ * GPU-hour when the API price misses every tier cost — spans [pad·min, 0], so
+ * break-even is the top edge rather than a synthetic ceiling above the data;
+ * mixed data pads both ends. Only empty data gets the unit domain that keeps
+ * the axes drawn, and all-zero data keeps that unit height instead of
+ * collapsing the scale to a single tick.
+ */
+export function zeroAnchoredDomain(values: readonly number[], pad: number): [number, number] {
+ if (values.length === 0) return [0, 1];
+ const lo = Math.min(0, ...values) * pad;
+ const hi = Math.max(0, ...values) * pad;
+ return lo === hi ? [0, 1] : [lo, hi];
+}
From 13e4adc5d09e2643a93cba1f6eff2d77b755b3c8 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:35:14 -0700
Subject: [PATCH 070/104] feat: add video compare metric deltas and case
pairing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增 VideoGenX 对比纯模块:按 VIDEO_METRICS 极性计算基线/候选的指标比值、变化百分比与优劣判断(缺失输入保持 null);从 serving cell 的测量记录提取 case 身份(prompt + seed,缺失时用 case_id)并按重复次数配对;从已存储产物解析 C1 记录与媒体 URL 映射。单测断言保留 fixture 的实测数值(B200 vs H100 P50 比值 ≈ 0.466,每条视频 TCO ≈ −31%)。
---
.../video-benchmark/compare.test.ts | 277 ++++++++++++++++++
.../src/components/video-benchmark/compare.ts | 223 ++++++++++++++
2 files changed, 500 insertions(+)
create mode 100644 packages/app/src/components/video-benchmark/compare.test.ts
create mode 100644 packages/app/src/components/video-benchmark/compare.ts
diff --git a/packages/app/src/components/video-benchmark/compare.test.ts b/packages/app/src/components/video-benchmark/compare.test.ts
new file mode 100644
index 000000000..3dbcbcb12
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/compare.test.ts
@@ -0,0 +1,277 @@
+import { describe, expect, it } from 'vitest';
+import history from '../../../cypress/fixtures/api/video-history.json';
+import { at, type Json } from './bundle';
+import {
+ caseKey,
+ caseRecords,
+ comparablePoints,
+ compareMetrics,
+ compareSide,
+ pairCases,
+ type CaseRecord,
+} from './compare';
+import type { VideoHistoryPage } from './history';
+import { videoPoints } from './points';
+import { servingCells } from './serving';
+import { servingFixture } from './serving.fixture';
+import type { StoredArtifact } from './stored';
+
+// Retained H100/H200/B200 C1/C2/C4 observations of the 2026-09-09 campaign.
+const points = videoPoints([history as unknown as VideoHistoryPage]);
+const c1 = (key: string) => comparablePoints(points).find((p) => p.hardwareKey === key)!;
+const opts = { tier: 'h', basis: 'participating' } as const;
+const row = (rows: ReturnType, id: string) =>
+ rows.find((item) => item.id === id)!;
+
+function set(value: Json, key: string, replacement: Json) {
+ if (value === null || typeof value !== 'object' || Array.isArray(value))
+ throw new Error('Expected object');
+ value[key] = replacement;
+}
+
+// Same shape cypress/support/video-artifacts.ts publishes: synthetic contract data, never evidence.
+function stored(
+ runId: string,
+ artifactId: number,
+ hardware: string,
+ requests = 4,
+ manifestSha = runId.padEnd(64, '0'),
+): StoredArtifact {
+ const fixture = servingFixture(runId, hardware, requests);
+ fixture.documents.set('manifest.json', fixture.manifest);
+ fixture.documents.set('ci.json', fixture.ci);
+ fixture.checksums.set('manifest.json', manifestSha);
+ return {
+ storageVersion: 1,
+ runId,
+ artifact: {
+ id: artifactId,
+ name: `h3-video-${runId}-1`,
+ expired: false,
+ size_in_bytes: 1,
+ stored: true,
+ },
+ sources: [
+ {
+ id: runId,
+ documents: [...fixture.documents],
+ checksums: [...fixture.checksums],
+ texts: [],
+ assets: [...fixture.checksums.keys()]
+ .filter((path) => path.endsWith('.mp4'))
+ .map((path) => [
+ path,
+ { url: `https://media.test/${path}`, downloadUrl: `https://media.test/${path}?d=1` },
+ ]),
+ },
+ ],
+ };
+}
+
+describe('comparablePoints', () => {
+ it('keeps one measured C1 cell per registry hardware, in registry order', () => {
+ expect(comparablePoints(points).map((p) => [p.hardwareKey, p.concurrency])).toEqual([
+ ['b200', 1],
+ ['h200', 1],
+ ['h100', 1],
+ ]);
+ expect(comparablePoints(points.map((p) => ({ ...p, p50: null })))).toEqual([]);
+ });
+});
+
+describe('compareMetrics', () => {
+ it('reads B200 against H100 at C1: faster, cheaper, less energy, closer to its cap', () => {
+ const rows = compareMetrics(c1('h100'), c1('b200'), opts);
+ expect(rows.map((r) => r.id)).toEqual([
+ 'p50Latency',
+ 'p90Latency',
+ 'videosPerGpuHour',
+ 'videosPerDollar',
+ 'dollarsPerVideo',
+ 'kjPerVideo',
+ 'powerPctCap',
+ ]);
+ const p50 = row(rows, 'p50Latency');
+ expect(p50.baseline).toBeCloseTo(167.33, 2);
+ expect(p50.candidate).toBeCloseTo(77.94, 2);
+ expect(p50.ratio).toBeCloseTo(0.4658, 3);
+ expect(p50.deltaPercent).toBeCloseTo(-53.42, 1);
+ expect(p50.candidateBetter).toBe(true);
+ expect(row(rows, 'p90Latency').ratio).toBeCloseTo(0.4659, 3);
+ const rate = row(rows, 'videosPerGpuHour');
+ expect(rate.baseline).toBeCloseTo(5.374, 3);
+ expect(rate.candidate).toBeCloseTo(11.526, 3);
+ expect(rate.ratio).toBeCloseTo(2.1447, 3);
+ expect(rate.candidateBetter).toBe(true);
+ const cost = row(rows, 'dollarsPerVideo');
+ expect(cost.baseline).toBeCloseTo(0.2177, 4);
+ expect(cost.candidate).toBeCloseTo(0.1501, 4);
+ expect(cost.deltaPercent).toBeCloseTo(-31.06, 1);
+ expect(cost.candidateBetter).toBe(true);
+ expect(row(rows, 'videosPerDollar').deltaPercent).toBeCloseTo(45.05, 1);
+ const energy = row(rows, 'kjPerVideo');
+ expect(energy.baseline).toBeCloseTo(431.1, 1);
+ expect(energy.candidate).toBeCloseTo(301.1, 1);
+ expect(energy.candidateBetter).toBe(true);
+ const power = row(rows, 'powerPctCap');
+ expect(power.baseline).toBeCloseTo(91.95, 2);
+ expect(power.candidate).toBeCloseTo(96.4, 2);
+ expect(power.candidateBetter).toBe(true);
+ });
+ it('flips the verdict when the slower hardware is the candidate', () => {
+ const rows = compareMetrics(c1('b200'), c1('h200'), opts);
+ expect(row(rows, 'p50Latency').ratio).toBeCloseTo(1.9323, 3);
+ expect(row(rows, 'p50Latency').candidateBetter).toBe(false);
+ expect(row(rows, 'dollarsPerVideo').candidateBetter).toBe(false);
+ });
+ it('propagates missing inputs as null and treats equal values as neither better', () => {
+ const noPower = { ...c1('b200'), energyKj: null, enforcedLimitW: null, samples: 5 };
+ const rows = compareMetrics(c1('h100'), noPower, opts);
+ expect(row(rows, 'kjPerVideo')).toEqual({
+ id: 'kjPerVideo',
+ baseline: c1('h100').energyKj,
+ candidate: null,
+ ratio: null,
+ deltaPercent: null,
+ candidateBetter: null,
+ });
+ expect(row(rows, 'powerPctCap').candidate).toBeNull();
+ expect(row(rows, 'p90Latency').candidate).toBeNull();
+ expect(row(rows, 'p50Latency').ratio).not.toBeNull();
+ for (const same of compareMetrics(c1('h100'), c1('h100'), opts)) {
+ expect(same.ratio).toBe(1);
+ expect(same.deltaPercent).toBe(0);
+ expect(same.candidateBetter).toBeNull();
+ }
+ });
+ it('moves only the cost rows with the tier and GPU basis', () => {
+ const rows = compareMetrics(c1('h100'), c1('b200'), { tier: 'r', basis: 'allocated' });
+ // H100 8 allocated: 2.00 / 2.687 videos per GPU-hr; B200 8 allocated: 3.70 / 5.763.
+ expect(row(rows, 'dollarsPerVideo').baseline).toBeCloseTo(0.7443, 3);
+ expect(row(rows, 'dollarsPerVideo').candidate).toBeCloseTo(0.642, 3);
+ expect(row(rows, 'videosPerGpuHour').baseline).toBeCloseTo(2.687, 3);
+ expect(row(rows, 'p50Latency').ratio).toBeCloseTo(0.4658, 3);
+ expect(row(rows, 'kjPerVideo').ratio).toBeCloseTo(0.6984, 3);
+ });
+});
+
+describe('caseRecords', () => {
+ it('lists measurement requests with plan-derived case identity and safe media paths', () => {
+ const [cell] = servingCells(servingFixture('123', 'NVIDIA H200', 4));
+ const records = caseRecords(cell);
+ expect(records).toHaveLength(4);
+ expect(records[0]).toEqual({
+ slotId: 'measurement-r001-c001',
+ caseId: 'drum-taps',
+ prompt: 'A drummer taps a snare drum.',
+ seed: 11,
+ status: 'succeeded',
+ valid: true,
+ seconds: 120,
+ mediaPath: 'gpu/c1/baseline/artifacts/measurement-r001-c001.mp4',
+ });
+ expect(records.map((r) => r.slotId)).not.toContain('warmup-001');
+ });
+ it('prefers the record’s own case fields and drops unsafe or missing paths', () => {
+ const fixture = servingFixture('123', 'NVIDIA H200', 4);
+ const run = fixture.documents.get('gpu/c1/baseline/run.json')!;
+ const first = at(run, 'records', 1);
+ set(first, 'case_id', 'own-case');
+ set(first, 'prompt', 'Own prompt');
+ set(first, 'seed', 99);
+ set(first, 'artifact_path', '../candidate/movie.mp4');
+ const second = at(run, 'records', 2);
+ set(second, 'artifact_path', null);
+ set(second, 'submit_to_media_seconds', 0);
+ set(at(second, 'media'), 'valid', null);
+ const records = caseRecords({ run, runPath: 'gpu/c1/baseline/run.json' });
+ expect(records[0]).toMatchObject({
+ caseId: 'own-case',
+ prompt: 'Own prompt',
+ seed: 99,
+ mediaPath: null,
+ });
+ expect(records[1]).toMatchObject({ mediaPath: null, seconds: null, valid: null });
+ // A slot that names no plan case and carries no identity has nothing to pair on.
+ set(at(run, 'records', 3), 'slot_id', 'measurement-r003');
+ expect(caseKey(caseRecords({ run, runPath: 'gpu/c1/baseline/run.json' })[2])).toBeNull();
+ });
+});
+
+const records = (requests: number) =>
+ caseRecords(servingCells(servingFixture('1', 'NVIDIA H100 80GB HBM3', requests))[0]);
+
+describe('pairCases', () => {
+ it('pairs the k-th repetition of a prompt + seed on each side and counts the rest', () => {
+ const { pairs, unmatched } = pairCases(records(4), records(6));
+ expect(pairs).toHaveLength(4);
+ expect(pairs.map((p) => p.repetition)).toEqual([0, 1, 2, 3]);
+ expect(pairs[1]).toMatchObject({
+ caseId: 'drum-taps',
+ prompt: 'A drummer taps a snare drum.',
+ seed: 11,
+ baseline: { slotId: 'measurement-r002-c001' },
+ candidate: { slotId: 'measurement-r002-c001' },
+ });
+ expect(unmatched).toEqual({ baseline: 0, candidate: 2 });
+ expect(pairCases(records(6), records(4)).unmatched).toEqual({ baseline: 2, candidate: 0 });
+ });
+ it('never pairs different seeds or records without identity', () => {
+ const other = records(4).map((r): CaseRecord => ({ ...r, seed: 12 }));
+ expect(pairCases(records(4), other)).toEqual({
+ pairs: [],
+ unmatched: { baseline: 4, candidate: 4 },
+ });
+ const blank = records(2).map((r): CaseRecord => ({
+ ...r,
+ caseId: null,
+ prompt: null,
+ seed: null,
+ }));
+ expect(pairCases(blank, records(2)).unmatched).toEqual({ baseline: 2, candidate: 2 });
+ });
+ it('falls back to the case id only when prompt or seed is unknown', () => {
+ const [record] = records(1);
+ expect(caseKey(record)).toBe('ps\u000011\u0000A drummer taps a snare drum.');
+ expect(caseKey({ ...record, seed: null })).toBe('id\u0000drum-taps');
+ expect(caseKey({ ...record, prompt: null, caseId: null })).toBeNull();
+ const byId = pairCases([{ ...record, seed: null }], [{ ...record, prompt: null }]);
+ expect(byId.pairs).toHaveLength(1);
+ expect(byId.pairs[0]).toMatchObject({ prompt: 'A drummer taps a snare drum.', seed: 11 });
+ });
+});
+
+describe('compareSide', () => {
+ const h100 = c1('h100');
+ it('resolves the point’s C1 records and published media URLs from a stored artifact', () => {
+ const side = compareSide(stored(h100.runId, h100.artifactId, 'NVIDIA H100 80GB HBM3'), h100);
+ expect(side.records).toHaveLength(4);
+ expect(side.urls.get(side.records[0].mediaPath!)).toBe(
+ 'https://media.test/gpu/c1/baseline/artifacts/measurement-r001-c001.mp4',
+ );
+ });
+ it('prefers the source whose manifest SHA the point id names', () => {
+ const sha = h100.id.split(':')[0];
+ const other = stored(h100.runId, h100.artifactId, 'NVIDIA H100 80GB HBM3', 3);
+ const exact = stored(h100.runId, h100.artifactId, 'NVIDIA H100 80GB HBM3', 6, sha);
+ const saved: StoredArtifact = { ...exact, sources: [...other.sources, ...exact.sources] };
+ expect(compareSide(saved, h100).records).toHaveLength(6);
+ });
+ it('rejects another run’s artifact and artifacts without the cell', () => {
+ expect(() =>
+ compareSide(stored('999', h100.artifactId, 'NVIDIA H100 80GB HBM3'), h100),
+ ).toThrow('Stored artifact identity mismatch');
+ expect(() => compareSide(stored(h100.runId, 1, 'NVIDIA H100 80GB HBM3'), h100)).toThrow(
+ 'Stored artifact identity mismatch',
+ );
+ expect(() =>
+ compareSide(stored(h100.runId, h100.artifactId, 'NVIDIA H100 80GB HBM3'), {
+ ...h100,
+ cell: 'c3',
+ }),
+ ).toThrow('Published artifact has no c3 cell');
+ const fidelityOnly = stored(h100.runId, h100.artifactId, 'NVIDIA H100 80GB HBM3');
+ fidelityOnly.sources[0].kind = 'fidelity';
+ expect(() => compareSide(fidelityOnly, h100)).toThrow('Published artifact has no c1 cell');
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/compare.ts b/packages/app/src/components/video-benchmark/compare.ts
new file mode 100644
index 000000000..5d80b8614
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/compare.ts
@@ -0,0 +1,223 @@
+import { at, number, rows, safePath, text } from './bundle';
+import {
+ metricValue,
+ VIDEO_METRICS,
+ type MetricId,
+ type MetricOptions,
+ type VideoPoint,
+} from './metrics';
+import { latestVideoCells } from './points';
+import { servingCells, type ServingCell } from './serving';
+import { storedBundle, type StoredArtifact } from './stored';
+
+/** Metrics the compare table shows, in row order. */
+export const COMPARE_METRICS = [
+ 'p50Latency',
+ 'p90Latency',
+ 'videosPerGpuHour',
+ 'videosPerDollar',
+ 'dollarsPerVideo',
+ 'kjPerVideo',
+ 'powerPctCap',
+] as const satisfies readonly MetricId[];
+export type CompareMetricId = (typeof COMPARE_METRICS)[number];
+
+export interface CompareRow {
+ id: CompareMetricId;
+ baseline: number | null;
+ candidate: number | null;
+ /** candidate / baseline; null when either side is missing. */
+ ratio: number | null;
+ /** (ratio − 1) × 100. */
+ deltaPercent: number | null;
+ /** By registry polarity; null when not comparable or when both sides are equal. */
+ candidateBetter: boolean | null;
+}
+
+/** Measured C1 cells a reader can pick for comparison: registry hardware with a P50 (newest per hardware). */
+export function comparablePoints(points: VideoPoint[]): VideoPoint[] {
+ return latestVideoCells(points).filter(
+ (p) => p.concurrency === 1 && p.hardwareKey !== null && p.p50 !== null,
+ );
+}
+
+/** Side-by-side deltas; every null input stays null (never 0). */
+export function compareMetrics(
+ baseline: VideoPoint,
+ candidate: VideoPoint,
+ options: MetricOptions,
+): CompareRow[] {
+ return COMPARE_METRICS.map((id) => {
+ const b = metricValue(baseline, id, options);
+ const c = metricValue(candidate, id, options);
+ if (b === null || c === null || !(b > 0))
+ return {
+ id,
+ baseline: b,
+ candidate: c,
+ ratio: null,
+ deltaPercent: null,
+ candidateBetter: null,
+ };
+ const ratio = c / b;
+ const lower = VIDEO_METRICS[id].polarity === 'lower';
+ return {
+ id,
+ baseline: b,
+ candidate: c,
+ ratio,
+ deltaPercent: (ratio - 1) * 100,
+ candidateBetter: c === b ? null : lower ? c < b : c > b,
+ };
+ });
+}
+
+/** One measurement request of a serving cell, with its case identity and retained media path. */
+export interface CaseRecord {
+ slotId: string;
+ caseId: string | null;
+ prompt: string | null;
+ seed: number | null;
+ status: string;
+ /** Technical validity of the decoded media; null when not recorded. */
+ valid: boolean | null;
+ /** Submit-to-downloaded-media seconds for this request. */
+ seconds: number | null;
+ /** Bundle-relative media path (`gpu/c1/baseline/artifacts/….mp4`); null without a safe path. */
+ mediaPath: string | null;
+}
+
+/**
+ * Measurement-phase records of a cell. A record's own `case_id`/`prompt`/`seed`
+ * win; older records without them fall back to the plan case their slot id
+ * names (`measurement-r001-c003` → third plan case).
+ */
+export function caseRecords(cell: Pick): CaseRecord[] {
+ const cases = rows(at(cell.run, 'plan', 'cases'));
+ const directory = cell.runPath.slice(0, cell.runPath.lastIndexOf('/') + 1);
+ return rows(at(cell.run, 'records'))
+ .filter((record) => at(record, 'phase') === 'measurement')
+ .map((record): CaseRecord => {
+ const slotId = text(at(record, 'slot_id'));
+ const index = /-c(?\d+)$/u.exec(slotId)?.groups?.n;
+ const planCase = index === undefined ? null : (cases[Number(index) - 1] ?? null);
+ const seconds = number(at(record, 'submit_to_media_seconds'));
+ const valid = at(record, 'media', 'valid');
+ let mediaPath: string | null = null;
+ try {
+ const relative = text(at(record, 'artifact_path'));
+ if (relative) mediaPath = safePath(`${directory}${safePath(relative)}`);
+ } catch {
+ // Unsafe manifest paths never become media URLs.
+ }
+ return {
+ slotId,
+ caseId: text(at(record, 'case_id')) || text(at(planCase, 'case_id')) || null,
+ prompt: text(at(record, 'prompt')) || text(at(planCase, 'prompt')) || null,
+ seed: number(at(record, 'seed')) ?? number(at(planCase, 'seed')),
+ status: text(at(record, 'status')),
+ valid: typeof valid === 'boolean' ? valid : null,
+ seconds: seconds !== null && seconds > 0 ? seconds : null,
+ mediaPath,
+ };
+ });
+}
+
+export interface CasePair {
+ /** Case identity shared by both records. */
+ key: string;
+ caseId: string | null;
+ prompt: string | null;
+ seed: number | null;
+ /** 0-based repetition among pairs with the same identity. */
+ repetition: number;
+ baseline: CaseRecord;
+ candidate: CaseRecord;
+}
+
+/** Identity used for pairing: prompt + seed when known, else the plan case id. */
+export function caseKey(record: Pick): string | null {
+ if (record.prompt !== null && record.seed !== null)
+ return `ps\u0000${record.seed}\u0000${record.prompt}`;
+ return record.caseId === null ? null : `id\u0000${record.caseId}`;
+}
+
+/**
+ * Match the k-th repetition of a case on one side with the k-th on the other,
+ * in baseline order. Records without any case identity, and repetitions the
+ * other side lacks, are counted rather than invented.
+ */
+export function pairCases(
+ baseline: CaseRecord[],
+ candidate: CaseRecord[],
+): { pairs: CasePair[]; unmatched: { baseline: number; candidate: number } } {
+ const queues = new Map();
+ let unmatchedCandidate = 0;
+ for (const record of candidate) {
+ const key = caseKey(record);
+ if (key === null) unmatchedCandidate++;
+ else queues.set(key, [...(queues.get(key) ?? []), record]);
+ }
+ const pairs: CasePair[] = [];
+ const repetitions = new Map();
+ let unmatchedBaseline = 0;
+ for (const record of baseline) {
+ const key = caseKey(record);
+ const match = key === null ? undefined : queues.get(key)?.shift();
+ if (key === null || match === undefined) {
+ unmatchedBaseline++;
+ continue;
+ }
+ const repetition = repetitions.get(key) ?? 0;
+ repetitions.set(key, repetition + 1);
+ pairs.push({
+ key,
+ caseId: record.caseId ?? match.caseId,
+ prompt: record.prompt ?? match.prompt,
+ seed: record.seed ?? match.seed,
+ repetition,
+ baseline: record,
+ candidate: match,
+ });
+ }
+ for (const queue of queues.values()) unmatchedCandidate += queue.length;
+ return { pairs, unmatched: { baseline: unmatchedBaseline, candidate: unmatchedCandidate } };
+}
+
+/** Case records of one dashboard point plus the published URL of each media path. */
+export interface CompareSide {
+ records: CaseRecord[];
+ urls: Map;
+}
+
+/**
+ * Resolve a dashboard point inside its stored artifact (`format=media`): the
+ * observation source whose manifest SHA the point id names, else the first
+ * source that publishes the point's cell. Contract violations throw, as in the
+ * run views; nothing is synthesised for a missing cell.
+ */
+export function compareSide(saved: StoredArtifact, point: VideoPoint): CompareSide {
+ if (
+ saved.storageVersion !== 1 ||
+ saved.runId !== point.runId ||
+ saved.artifact.id !== point.artifactId
+ )
+ throw new Error('Stored artifact identity mismatch');
+ const wanted = point.id.split(':')[0];
+ const cellId = point.cell ?? (point.concurrency === null ? 'c1' : `c${point.concurrency}`);
+ let fallback: CompareSide | null = null;
+ for (const source of saved.sources) {
+ if (source.kind) continue;
+ const bundle = storedBundle(source);
+ const cell = servingCells(bundle).find((item) => item.id === cellId);
+ if (!cell) continue;
+ const side: CompareSide = {
+ records: caseRecords(cell),
+ urls: new Map(source.assets.map(([path, asset]) => [path, asset.url])),
+ };
+ if (bundle.manifestSha256 === wanted) return side;
+ fallback ??= side;
+ }
+ if (fallback === null) throw new Error(`Published artifact has no ${cellId} cell`);
+ return fallback;
+}
From af453d250512a5fedc1a9f9ba187a200d3064320 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:35:24 -0700
Subject: [PATCH 071/104] feat: add compare URL selection for baseline,
candidate and case
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增 v_base / v_cand / v_case 参数的读取、写回与默认值解析:默认基线为 P50 最高(最慢)的已实测 C1 硬件,候选为最低(最快);未知硬件回退到默认值,默认值不写入 URL;不改动 video-url-state.ts。含单测。
---
.../video-benchmark/compare-url-state.test.ts | 85 +++++++++++++++++++
.../video-benchmark/compare-url-state.ts | 80 +++++++++++++++++
2 files changed, 165 insertions(+)
create mode 100644 packages/app/src/components/video-benchmark/compare-url-state.test.ts
create mode 100644 packages/app/src/components/video-benchmark/compare-url-state.ts
diff --git a/packages/app/src/components/video-benchmark/compare-url-state.test.ts b/packages/app/src/components/video-benchmark/compare-url-state.test.ts
new file mode 100644
index 000000000..4898d0216
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/compare-url-state.test.ts
@@ -0,0 +1,85 @@
+import { describe, expect, it } from 'vitest';
+import history from '../../../cypress/fixtures/api/video-history.json';
+import {
+ DEFAULT_VIDEO_COMPARE_SELECTION,
+ defaultComparePair,
+ readVideoCompareSelection,
+ resolveCompareSelection,
+ writeVideoCompareSelection,
+} from './compare-url-state';
+import type { VideoHistoryPage } from './history';
+import { videoPoints } from './points';
+
+const points = videoPoints([history as unknown as VideoHistoryPage]);
+
+describe('video compare URL selection', () => {
+ it('defaults to the slowest measured C1 hardware as baseline and the fastest as candidate', () => {
+ expect(defaultComparePair(points)).toEqual({ baseline: 'h100', candidate: 'b200' });
+ expect(defaultComparePair(points.filter((p) => p.hardwareKey === 'h200'))).toEqual({
+ baseline: 'h200',
+ candidate: null,
+ });
+ expect(defaultComparePair([])).toEqual({ baseline: null, candidate: null });
+ });
+ it('reads v_base, v_cand and v_case, ignoring malformed values', () => {
+ expect(readVideoCompareSelection('')).toEqual(DEFAULT_VIDEO_COMPARE_SELECTION);
+ expect(readVideoCompareSelection('?v_base=h200&v_cand=h100&v_case=3&v_x=genSpeed')).toEqual({
+ baseline: 'h200',
+ candidate: 'h100',
+ caseIndex: 3,
+ });
+ expect(readVideoCompareSelection('?v_base=H200&v_cand=h1%20x&v_case=-1')).toEqual(
+ DEFAULT_VIDEO_COMPARE_SELECTION,
+ );
+ expect(readVideoCompareSelection('?v_case=12345').caseIndex).toBe(0);
+ });
+ it('resolves choices against measured points and falls back per side', () => {
+ const resolved = resolveCompareSelection(
+ { baseline: 'h200', candidate: null, caseIndex: 2 },
+ points,
+ );
+ expect(resolved.baseline?.hardwareKey).toBe('h200');
+ expect(resolved.candidate?.hardwareKey).toBe('b200');
+ expect(resolved.caseIndex).toBe(2);
+ const unknown = resolveCompareSelection(
+ { baseline: 'mi355x', candidate: 'gb200', caseIndex: 0 },
+ points,
+ );
+ expect(unknown.baseline?.hardwareKey).toBe('h100');
+ expect(unknown.candidate?.hardwareKey).toBe('b200');
+ expect(resolveCompareSelection(DEFAULT_VIDEO_COMPARE_SELECTION, [])).toEqual({
+ baseline: null,
+ candidate: null,
+ caseIndex: 0,
+ });
+ });
+ it('writes only non-default params, keeps unrelated params and leaves the input alone', () => {
+ const defaults = defaultComparePair(points);
+ const url = new URL('https://x.test/video?v_tier=r&run=1');
+ const out = writeVideoCompareSelection(
+ url,
+ { baseline: 'h100', candidate: 'h200', caseIndex: 2 },
+ defaults,
+ );
+ expect(out.searchParams.get('v_tier')).toBe('r');
+ expect(out.searchParams.get('run')).toBe('1');
+ expect(out.searchParams.has('v_base')).toBe(false);
+ expect(out.searchParams.get('v_cand')).toBe('h200');
+ expect(out.searchParams.get('v_case')).toBe('2');
+ expect(url.searchParams.has('v_cand')).toBe(false);
+ const swapped = writeVideoCompareSelection(
+ out,
+ { baseline: 'b200', candidate: 'h100', caseIndex: 0 },
+ defaults,
+ );
+ expect(swapped.searchParams.get('v_base')).toBe('b200');
+ expect(swapped.searchParams.get('v_cand')).toBe('h100');
+ expect(swapped.searchParams.has('v_case')).toBe(false);
+ const reset = writeVideoCompareSelection(
+ swapped,
+ { baseline: 'h100', candidate: 'b200', caseIndex: 0 },
+ defaults,
+ );
+ expect([...reset.searchParams.keys()]).toEqual(['v_tier', 'run']);
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/compare-url-state.ts b/packages/app/src/components/video-benchmark/compare-url-state.ts
new file mode 100644
index 000000000..f1f0e3888
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/compare-url-state.ts
@@ -0,0 +1,80 @@
+import { comparablePoints } from './compare';
+import type { VideoPoint } from './metrics';
+
+/** Reader choices for the compare panel; a null hardware means "the default for the loaded points". */
+export interface VideoCompareSelection {
+ baseline: string | null;
+ candidate: string | null;
+ /** 0-based index into the matched case list. */
+ caseIndex: number;
+}
+
+export interface ComparePair {
+ baseline: string | null;
+ candidate: string | null;
+}
+
+export const DEFAULT_VIDEO_COMPARE_SELECTION: VideoCompareSelection = {
+ baseline: null,
+ candidate: null,
+ caseIndex: 0,
+};
+
+const HARDWARE_KEY = /^[a-z0-9][a-z0-9-]{0,31}$/u;
+const CASE_INDEX = /^\d{1,4}$/u;
+
+/** Slowest measured C1 hardware (highest P50) as baseline, fastest as candidate. */
+export function defaultComparePair(points: VideoPoint[]): ComparePair {
+ const measured = comparablePoints(points);
+ if (measured.length < 2) return { baseline: measured[0]?.hardwareKey ?? null, candidate: null };
+ let slowest = measured[0];
+ let fastest = measured[0];
+ for (const point of measured) {
+ if ((point.p50 ?? 0) > (slowest.p50 ?? 0)) slowest = point;
+ if ((point.p50 ?? 0) < (fastest.p50 ?? 0)) fastest = point;
+ }
+ return { baseline: slowest.hardwareKey, candidate: fastest.hardwareKey };
+}
+
+/** `v_base`, `v_cand` and `v_case` live beside the dashboard's other `v_` params; unknown values read as defaults. */
+export function readVideoCompareSelection(search: string): VideoCompareSelection {
+ const p = new URLSearchParams(search);
+ const key = (value: string | null) => (value !== null && HARDWARE_KEY.test(value) ? value : null);
+ const index = p.get('v_case');
+ return {
+ baseline: key(p.get('v_base')),
+ candidate: key(p.get('v_cand')),
+ caseIndex: index !== null && CASE_INDEX.test(index) ? Number(index) : 0,
+ };
+}
+
+/** Resolve choices against the loaded points; a hardware without a measured C1 cell falls back to the default. */
+export function resolveCompareSelection(
+ selection: VideoCompareSelection,
+ points: VideoPoint[],
+): { baseline: VideoPoint | null; candidate: VideoPoint | null; caseIndex: number } {
+ const measured = comparablePoints(points);
+ const defaults = defaultComparePair(points);
+ const find = (key: string | null) =>
+ key === null ? null : (measured.find((point) => point.hardwareKey === key) ?? null);
+ return {
+ baseline: find(selection.baseline) ?? find(defaults.baseline),
+ candidate: find(selection.candidate) ?? find(defaults.candidate),
+ caseIndex: selection.caseIndex,
+ };
+}
+
+/** Returns a new URL with defaults omitted; the input URL is not mutated. */
+export function writeVideoCompareSelection(
+ url: URL,
+ resolved: VideoCompareSelection,
+ defaults: ComparePair,
+): URL {
+ const out = new URL(url);
+ const set = (key: string, value: string | null) =>
+ value === null ? out.searchParams.delete(key) : out.searchParams.set(key, value);
+ set('v_base', resolved.baseline === defaults.baseline ? null : resolved.baseline);
+ set('v_cand', resolved.candidate === defaults.candidate ? null : resolved.candidate);
+ set('v_case', resolved.caseIndex > 0 ? String(resolved.caseIndex) : null);
+ return out;
+}
From 549101fdbaf4b4a49dbcd0bea14e987f1929ee1f Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:35:35 -0700
Subject: [PATCH 072/104] feat: add arena-style VideoCompare panel with
on-demand clips
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:新增 VideoCompare 组件:基线/候选硬件选择(不足两种时禁用、选到对侧硬件时自动互换)、按 colorFor 着色的指标差异表与绿/红变化标签、按需读取两次运行的 StoredArtifact 并并排播放同一 prompt 与 seed 的视频、用例选择、加载/空/错误状态与脚注;中英双语文案;video_compare_* 埋点。Cypress 组件测试基于保留 fixture 与合成媒体产物。
---
.../cypress/component/video-compare.cy.tsx | 157 ++++++
.../video-benchmark/VideoCompare.tsx | 479 ++++++++++++++++++
2 files changed, 636 insertions(+)
create mode 100644 packages/app/cypress/component/video-compare.cy.tsx
create mode 100644 packages/app/src/components/video-benchmark/VideoCompare.tsx
diff --git a/packages/app/cypress/component/video-compare.cy.tsx b/packages/app/cypress/component/video-compare.cy.tsx
new file mode 100644
index 000000000..884e3e33b
--- /dev/null
+++ b/packages/app/cypress/component/video-compare.cy.tsx
@@ -0,0 +1,157 @@
+import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
+import type { VideoHistoryPage } from '@/components/video-benchmark/history';
+import type { MetricOptions, VideoPoint } from '@/components/video-benchmark/metrics';
+import { videoPoints } from '@/components/video-benchmark/points';
+import VideoCompare from '@/components/video-benchmark/VideoCompare';
+import history from '../fixtures/api/video-history.json';
+import { servingArtifact } from '../support/video-artifacts';
+
+// Retained H100/H200/B200 C1/C2/C4 observations; clips come from synthetic stored artifacts.
+const points = videoPoints([history as unknown as VideoHistoryPage]);
+const c1 = (key: string) => points.find((p) => p.hardwareKey === key && p.concurrency === 1)!;
+const COLORS: Record = {
+ h100: 'rgb(10, 20, 30)',
+ h200: 'rgb(40, 50, 60)',
+ b200: 'rgb(70, 80, 90)',
+};
+const colorFor = (key: string) => COLORS[key] ?? 'rgb(0, 0, 0)';
+const OWNING_PARTICIPATING: MetricOptions = { tier: 'h', basis: 'participating' };
+
+function media(point: VideoPoint, hardware: string, alias: string) {
+ cy.intercept(
+ 'GET',
+ `/api/video-runs?run=${point.runId}&artifact=${point.artifactId}&format=media`,
+ servingArtifact(Number(point.runId), point.artifactId, hardware),
+ ).as(alias);
+}
+
+function mount(
+ pathname = '/video',
+ search = '',
+ data: VideoPoint[] = points,
+ options: MetricOptions = OWNING_PARTICIPATING,
+) {
+ media(c1('h100'), 'NVIDIA H100 80GB HBM3', 'h100');
+ media(c1('b200'), 'NVIDIA B200', 'b200');
+ media(c1('h200'), 'NVIDIA H200', 'h200');
+ cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
+ cy.window().then((win) =>
+ win.history.replaceState(null, '', `${win.location.pathname}${search}`),
+ );
+ cy.mount(
+
+
+ ,
+ );
+}
+const table = () => cy.get('[data-testid="video-compare-table"]');
+const metricRow = (id: string) => table().find(`tbody tr[data-metric="${id}"]`);
+const pick = (label: string, option: string) => {
+ cy.get(`[role="combobox"][aria-label="${label}"]`).click();
+ cy.contains('[role="option"]', option).click();
+};
+
+describe('Video compare panel (retained fixture)', () => {
+ it('defaults to the slowest hardware as baseline and the fastest as candidate', () => {
+ mount();
+ cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H100');
+ cy.get('[data-testid="video-compare-candidate"]').should('contain', 'B200');
+ metricRow('p50Latency')
+ .should('contain', '167.3')
+ .and('contain', '77.9')
+ .and('contain', '-53.4%');
+ metricRow('p50Latency').find('[data-tone="better"]').should('exist');
+ metricRow('dollarsPerVideo')
+ .should('contain', '$0.218')
+ .and('contain', '$0.150')
+ .and('contain', '-31.1%');
+ metricRow('powerPctCap').find('[data-tone="better"]').should('exist');
+ cy.get('[data-testid="video-compare"]').should('contain', 'Owning at Large Hyperscaler Volume');
+ cy.get('[data-testid="video-compare-clip"]').should('not.exist');
+ cy.get('@h100.all').should('have.length', 0);
+ });
+ it('loads both runs’ clips on demand and pairs the same prompt and seed', () => {
+ mount();
+ cy.get('[data-testid="video-compare-load"]').click();
+ cy.wait(['@h100', '@b200']);
+ cy.get('[data-testid="video-compare-clip"]').should('have.length', 2);
+ cy.get('[data-testid="video-compare-clip"] video').should('have.length', 2);
+ cy.get('[data-testid="video-compare-clip"][data-role="baseline"]')
+ .should('contain', 'H100')
+ .and('contain', 'time to video 120 s')
+ .find('video')
+ .should('have.attr', 'src')
+ .and('include', 'measurement-r001-c001.mp4');
+ cy.get('[data-testid="video-compare-clip"][data-role="candidate"]').should('contain', 'B200');
+ cy.get('[role="combobox"][aria-label="Case (prompt · seed)"]').should(
+ 'contain',
+ 'A drummer taps a snare drum. · seed 11 · #1',
+ );
+ pick('Case (prompt · seed)', '#3');
+ cy.get('[data-testid="video-compare-clip"] video').each(($video) =>
+ expect($video.attr('src')).to.include('measurement-r003-c001.mp4'),
+ );
+ cy.location('search').should('contain', 'v_case=2');
+ cy.get('[data-testid="video-compare"]').should('contain', 'retained CI outputs');
+ });
+ it('updates the delta table and the URL when the candidate changes, without refetching', () => {
+ mount();
+ cy.get('[data-testid="video-compare-load"]').click();
+ cy.wait(['@h100', '@b200']);
+ pick('Candidate', 'H200');
+ cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H200');
+ metricRow('p50Latency').should('contain', '150.6').and('contain', '-10%');
+ metricRow('dollarsPerVideo').should('contain', '$0.204');
+ cy.location('search').should('contain', 'v_cand=h200');
+ // H200 clips were never fetched: the pane returns to the on-demand button.
+ cy.get('[data-testid="video-compare-load"]').should('exist');
+ cy.get('@h200.all').should('have.length', 0);
+ // Choosing the baseline's hardware as candidate swaps the two sides.
+ pick('Candidate', 'H100');
+ cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H200');
+ cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H100');
+ metricRow('p50Latency').find('[data-tone="worse"]').should('exist');
+ });
+ it('restores v_base and v_cand from the URL and reports a failed media read', () => {
+ mount('/video', '?v_base=h200&v_cand=h100');
+ cy.intercept(
+ 'GET',
+ `/api/video-runs?run=${c1('h200').runId}&artifact=${c1('h200').artifactId}&format=media`,
+ { statusCode: 404, body: { error: 'gone' } },
+ ).as('missing');
+ cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H200');
+ cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H100');
+ cy.get('[data-testid="video-compare-load"]').click();
+ cy.wait('@missing');
+ cy.get('[data-testid="video-compare-clips"] [role="alert"]')
+ .should('contain', 'Could not load clips')
+ .and('contain', 'HTTP 404');
+ cy.contains('button', 'Retry').should('exist');
+ });
+ it('disables the selects when fewer than two hardware are measured', () => {
+ mount(
+ '/video',
+ '',
+ points.filter((p) => p.hardwareKey === 'h200'),
+ );
+ cy.get('[data-testid="video-compare-controls"]').should('have.attr', 'disabled');
+ cy.get('[data-testid="video-compare"]').should(
+ 'contain',
+ 'Comparison needs at least two measured hardware.',
+ );
+ cy.get('[data-testid="video-compare-table"]').should('not.exist');
+ });
+ it('renders Chinese copy on /zh/video', () => {
+ mount('/zh/video', '', points, { tier: 'r', basis: 'allocated' });
+ cy.get('[data-testid="video-compare"]')
+ .should('contain', '基线')
+ .and('contain', '候选')
+ .and('contain', '加载视频')
+ .and('contain', '租赁 - 3 年承诺')
+ .and('contain', '已分配的 GPU');
+ metricRow('p50Latency').should('contain', 'P50 出片时间');
+ cy.get('[data-testid="video-compare-load"]').click();
+ cy.wait(['@h100', '@b200']);
+ cy.get('[data-testid="video-compare-clip"]').first().should('contain', '出片时间 120 s');
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/VideoCompare.tsx b/packages/app/src/components/video-benchmark/VideoCompare.tsx
new file mode 100644
index 000000000..fd77596e2
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoCompare.tsx
@@ -0,0 +1,479 @@
+'use client';
+
+import { useEffect, useId, useMemo, useRef, useState } from 'react';
+import { Button } from '@/components/ui/button';
+import { Heading } from '@/components/ui/heading';
+import { track } from '@/lib/analytics';
+import { useLocale } from '@/lib/use-locale';
+import {
+ comparablePoints,
+ compareMetrics,
+ compareSide,
+ pairCases,
+ type CasePair,
+ type CompareRow,
+ type CompareSide,
+} from './compare';
+import {
+ DEFAULT_VIDEO_COMPARE_SELECTION,
+ defaultComparePair,
+ readVideoCompareSelection,
+ resolveCompareSelection,
+ writeVideoCompareSelection,
+ type VideoCompareSelection,
+} from './compare-url-state';
+import { hardwareLabel } from './hardware';
+import {
+ formatMetric,
+ TIER_LABELS,
+ VIDEO_METRICS,
+ type MetricOptions,
+ type VideoPoint,
+} from './metrics';
+import type { StoredArtifact } from './stored';
+import VideoSelect from './VideoSelect';
+
+const STRINGS = {
+ en: {
+ title: 'Compare',
+ subtitle:
+ 'Pick a baseline and a candidate hardware (measured C1 cells): metric deltas side by side, then the same generated case from both runs.',
+ baseline: 'Baseline',
+ candidate: 'Candidate',
+ needTwo: 'Comparison needs at least two measured hardware.',
+ metric: 'Metric',
+ change: 'Change',
+ assumptions: (tier: string, basis: string) => `Cost tier: ${tier} · GPU basis: ${basis}.`,
+ participating: 'participating GPUs',
+ allocated: 'allocated GPUs',
+ better: 'Candidate better',
+ worse: 'Candidate worse',
+ neutral: 'No difference',
+ load: 'Load clips',
+ loadHint: 'Fetches the retained clips of both runs on demand (two published artifacts).',
+ loading: 'Loading clips…',
+ error: 'Could not load clips',
+ retry: 'Retry',
+ case: 'Case (prompt · seed)',
+ noPairs: 'No case with the same prompt and seed exists in both runs.',
+ unmatched: (baseline: number, candidate: number) =>
+ `${baseline} baseline and ${candidate} candidate records have no counterpart.`,
+ noClip: 'Clip not published for this record.',
+ mediaError: 'The clip could not be played.',
+ timeToVideo: 'time to video',
+ footnote:
+ 'Clips are the retained CI outputs of the same prompt and seed on each hardware; nothing is re-generated and nothing is voted on. Time to video is that record’s submit-to-downloaded-media seconds.',
+ },
+ zh: {
+ title: '对比',
+ subtitle:
+ '选择基线与候选硬件(已实测的 C1 单元):并排查看指标差异,再对照两次运行中同一 prompt 与 seed 生成的视频。',
+ baseline: '基线',
+ candidate: '候选',
+ needTwo: '至少需要两种已实测的硬件才能对比。',
+ metric: '指标',
+ change: '变化',
+ assumptions: (tier: string, basis: string) => `成本分档:${tier} · GPU 口径:${basis}。`,
+ participating: '参与计算的 GPU',
+ allocated: '已分配的 GPU',
+ better: '候选更优',
+ worse: '候选更差',
+ neutral: '无差异',
+ load: '加载视频',
+ loadHint: '按需读取两次运行保留的视频(两个已发布产物)。',
+ loading: '正在加载视频…',
+ error: '无法加载视频',
+ retry: '重试',
+ case: '用例(prompt · seed)',
+ noPairs: '两次运行中没有 prompt 与 seed 均相同的用例。',
+ unmatched: (baseline: number, candidate: number) =>
+ `${baseline} 条基线记录与 ${candidate} 条候选记录没有对应项。`,
+ noClip: '此记录的视频未发布。',
+ mediaError: '视频无法播放。',
+ timeToVideo: '出片时间',
+ footnote:
+ '视频为各硬件 CI 运行保留的原始输出,prompt 与 seed 相同;不重新生成,也不投票。出片时间为该记录从提交到下载完成的秒数。',
+ },
+};
+type Strings = (typeof STRINGS)['en'];
+
+const CHIP = {
+ better: 'border-emerald-600/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300',
+ worse: 'border-red-600/40 bg-red-500/10 text-red-700 dark:text-red-300',
+ neutral: 'border-border text-muted-foreground',
+} as const;
+
+const excerpt = (prompt: string, max = 60) =>
+ prompt.length > max ? `${prompt.slice(0, max).trimEnd()}…` : prompt;
+
+function caseLabel(pair: CasePair, repeated: boolean): string {
+ const parts = [pair.prompt === null ? (pair.caseId ?? '—') : excerpt(pair.prompt)];
+ if (pair.seed !== null) parts.push(`seed ${pair.seed}`);
+ if (repeated) parts.push(`#${pair.repetition + 1}`);
+ return parts.join(' · ');
+}
+
+async function fetchSide(point: VideoPoint, signal: AbortSignal): Promise {
+ const response = await fetch(
+ `/api/video-runs?run=${encodeURIComponent(point.runId)}&artifact=${encodeURIComponent(String(point.artifactId))}&format=media`,
+ { signal },
+ );
+ if (!response.ok || response.status === 204)
+ throw new Error(`Published media HTTP ${response.status}`);
+ const saved = (await response.json()) as StoredArtifact;
+ return compareSide(saved, point);
+}
+
+function DeltaChip({ row, s }: { row: CompareRow; s: Strings }) {
+ if (row.deltaPercent === null || row.ratio === null)
+ return — ;
+ const tone = row.candidateBetter === null ? 'neutral' : row.candidateBetter ? 'better' : 'worse';
+ return (
+
+
+ {row.deltaPercent.toLocaleString('en-US', {
+ maximumFractionDigits: 1,
+ signDisplay: 'exceptZero',
+ })}
+ %
+
+
+ ×{row.ratio.toLocaleString('en-US', { maximumFractionDigits: 2 })}
+
+
+ );
+}
+
+/**
+ * Arena-style baseline vs candidate: measured C1 metric deltas, then the
+ * retained clips of the same prompt and seed from both CI runs. Media is fetched
+ * only on request, one stored artifact per side.
+ */
+export default function VideoCompare({
+ points,
+ options,
+ colorFor,
+}: {
+ points: VideoPoint[];
+ options: MetricOptions;
+ colorFor: (hardwareKey: string) => string;
+}) {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const headingId = useId();
+ const [selection, setSelection] = useState(
+ DEFAULT_VIDEO_COMPARE_SELECTION,
+ );
+ const [sides, setSides] = useState>(() => new Map());
+ const [pending, setPending] = useState(null);
+ const [failure, setFailure] = useState<{ key: string; message: string } | null>(null);
+ const [failedMedia, setFailedMedia] = useState>(() => new Set());
+ const request = useRef(0);
+ const download = useRef(null);
+ useEffect(() => {
+ setSelection(readVideoCompareSelection(location.search));
+ return () => download.current?.abort();
+ }, []);
+
+ const measured = useMemo(() => comparablePoints(points), [points]);
+ const defaults = useMemo(() => defaultComparePair(points), [points]);
+ const { baseline, candidate, caseIndex } = resolveCompareSelection(selection, points);
+ const pairKey = baseline && candidate ? `${baseline.id}|${candidate.id}` : null;
+ const rows = baseline && candidate ? compareMetrics(baseline, candidate, options) : [];
+ const loaded =
+ baseline && candidate && sides.has(baseline.id) && sides.has(candidate.id)
+ ? { baseline: sides.get(baseline.id)!, candidate: sides.get(candidate.id)! }
+ : null;
+ const matched = loaded ? pairCases(loaded.baseline.records, loaded.candidate.records) : null;
+ const pairs = matched?.pairs ?? [];
+ const index = Math.min(caseIndex, Math.max(pairs.length - 1, 0));
+ const current = pairs[index];
+ const repeated = new Set(
+ pairs
+ .filter((pair) => pairs.some((other) => other !== pair && other.key === pair.key))
+ .map((pair) => pair.key),
+ );
+ const hardwareOptions = measured.map((point) => ({
+ value: point.hardwareKey ?? '',
+ label: hardwareLabel(point.hardwareKey ?? ''),
+ }));
+
+ const update = (patch: Partial) => {
+ const next = { ...selection, ...patch };
+ setSelection(next);
+ const resolved = resolveCompareSelection(next, points);
+ history.replaceState(
+ null,
+ '',
+ writeVideoCompareSelection(
+ new URL(location.href),
+ {
+ baseline: resolved.baseline?.hardwareKey ?? null,
+ candidate: resolved.candidate?.hardwareKey ?? null,
+ caseIndex: next.caseIndex,
+ },
+ defaults,
+ ),
+ );
+ };
+ const choose = (side: 'baseline' | 'candidate', hardware: string) => {
+ const own = side === 'baseline' ? baseline : candidate;
+ const other = side === 'baseline' ? candidate : baseline;
+ const patch: Partial = { [side]: hardware };
+ // Picking the other side's hardware swaps the two instead of comparing a hardware with itself.
+ if (other?.hardwareKey === hardware && own)
+ patch[side === 'baseline' ? 'candidate' : 'baseline'] = own.hardwareKey;
+ update(patch);
+ track(`video_compare_${side}_changed`, { hardware });
+ };
+ const load = async () => {
+ if (!baseline || !candidate || pairKey === null) return;
+ download.current?.abort();
+ const controller = new AbortController();
+ download.current = controller;
+ const attempt = ++request.current;
+ setPending(pairKey);
+ setFailure(null);
+ track('video_compare_clips_load', {
+ baseline: baseline.hardwareKey,
+ candidate: candidate.hardwareKey,
+ });
+ try {
+ const missing = [baseline, candidate].filter((point) => !sides.has(point.id));
+ const fetched = await Promise.all(
+ missing.map(
+ async (point) => [point.id, await fetchSide(point, controller.signal)] as const,
+ ),
+ );
+ if (attempt !== request.current) return;
+ setSides((old) => new Map([...old, ...fetched]));
+ } catch (error) {
+ if (controller.signal.aborted) return;
+ setFailure({ key: pairKey, message: error instanceof Error ? error.message : String(error) });
+ } finally {
+ if (attempt === request.current) setPending(null);
+ }
+ };
+
+ return (
+
+
+
+ {s.title}
+
+
{s.subtitle}
+
+
+ choose('baseline', value)}
+ options={hardwareOptions}
+ />
+ choose('candidate', value)}
+ options={hardwareOptions}
+ />
+
+ {measured.length < 2 && (
+
+ {s.needTwo}
+
+ )}
+ {baseline && candidate && (
+ <>
+
+
+
+
+
+ {s.metric}
+
+ {(
+ [
+ ['baseline', baseline],
+ ['candidate', candidate],
+ ] as const
+ ).map(([role, point]) => (
+
+
+
+ {hardwareLabel(point.hardwareKey ?? '')}
+ · {s[role]}
+
+
+ ))}
+
+ {s.change}
+
+
+
+
+ {rows.map((row) => (
+
+
+ {locale === 'zh'
+ ? VIDEO_METRICS[row.id].labelZh
+ : VIDEO_METRICS[row.id].label}
+
+ {formatMetric(row.baseline, row.id)}
+ {formatMetric(row.candidate, row.id)}
+
+
+
+
+ ))}
+
+
+
+
+ {s.assumptions(
+ TIER_LABELS[options.tier][locale],
+ options.basis === 'allocated' ? s.allocated : s.participating,
+ )}
+
+
+ {loaded && matched ? (
+ pairs.length === 0 || !current ? (
+
+ {s.noPairs}
+
+ ) : (
+ <>
+
+ {
+ const next = Number(value);
+ update({ caseIndex: next });
+ track('video_compare_case_changed', {
+ index: next,
+ seed: pairs[next]?.seed ?? null,
+ });
+ }}
+ options={pairs.map((pair, i) => ({
+ value: String(i),
+ label: caseLabel(pair, repeated.has(pair.key)),
+ }))}
+ />
+
+
+ {(
+ [
+ ['baseline', baseline, current.baseline, loaded.baseline],
+ ['candidate', candidate, current.candidate, loaded.candidate],
+ ] as const
+ ).map(([role, point, record, side]) => {
+ const url =
+ record.mediaPath === null ? undefined : side.urls.get(record.mediaPath);
+ const label = hardwareLabel(point.hardwareKey ?? '');
+ return (
+
+ {url ? (
+ setFailedMedia((old) => new Set(old).add(url))}
+ />
+ ) : (
+
+ {s.noClip}
+
+ )}
+ {url && failedMedia.has(url) && (
+
+ {s.mediaError}
+
+ )}
+
+
+ {label}
+ · {s[role]}
+ {record.seconds !== null && (
+
+ · {s.timeToVideo}{' '}
+ {record.seconds.toLocaleString('en-US', {
+ maximumFractionDigits: 1,
+ })}{' '}
+ s
+
+ )}
+
+
+ );
+ })}
+
+ {(matched.unmatched.baseline > 0 || matched.unmatched.candidate > 0) && (
+
+ {s.unmatched(matched.unmatched.baseline, matched.unmatched.candidate)}
+
+ )}
+ >
+ )
+ ) : pending === pairKey ? (
+
+ {s.loading}
+
+ ) : failure?.key === pairKey ? (
+
+
+ {s.error}: {failure.message}
+
+
+ {s.retry}
+
+
+ ) : (
+
+
+ {s.load}
+
+ {s.loadHint}
+
+ )}
+
{s.footnote}
+
+ >
+ )}
+
+ );
+}
From 3a85cbbbaa6b573737644bdfea8b52fa01be954a Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:56:07 -0700
Subject: [PATCH 073/104] fix: skip malformed sources when resolving compare
clips
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
compareSide read every observation source of the stored artifact inside one
loop with no per-source isolation, so a single source failing storedBundle's
identity check or servingCells' contract asserts aborted the lookup even when
a later source matched the point's manifest SHA or carried its cell. Isolate
each source as videoHistoryEntry does: skip a source that throws, keep the
first error, and rethrow it only when no source carries the cell, so an
unreadable artifact is never reported as one that lacks the cell. Cover both
throw sites on the SHA-preferred and first-with-cell paths.
中文:修复 compareSide 在解析对比视频时被单个损坏的 source 中断的问题:逐个隔离 source 的契约错误并跳过,仅在没有任何 source 包含该 cell 时才重新抛出首个错误;补充两条单元测试覆盖两处抛错点。
---
.../video-benchmark/compare.test.ts | 58 ++++++++++++++++++-
.../src/components/video-benchmark/compare.ts | 55 +++++++++++++-----
2 files changed, 98 insertions(+), 15 deletions(-)
diff --git a/packages/app/src/components/video-benchmark/compare.test.ts b/packages/app/src/components/video-benchmark/compare.test.ts
index 3dbcbcb12..99a5ac52a 100644
--- a/packages/app/src/components/video-benchmark/compare.test.ts
+++ b/packages/app/src/components/video-benchmark/compare.test.ts
@@ -14,7 +14,7 @@ import type { VideoHistoryPage } from './history';
import { videoPoints } from './points';
import { servingCells } from './serving';
import { servingFixture } from './serving.fixture';
-import type { StoredArtifact } from './stored';
+import type { StoredArtifact, StoredSource } from './stored';
// Retained H100/H200/B200 C1/C2/C4 observations of the 2026-09-09 campaign.
const points = videoPoints([history as unknown as VideoHistoryPage]);
@@ -29,6 +29,10 @@ function set(value: Json, key: string, replacement: Json) {
value[key] = replacement;
}
+/** The stored copy of one bundle document; mutating it corrupts only that source. */
+const document = (source: StoredSource, path: string): Json =>
+ source.documents.find(([name]) => name === path)?.[1] ?? null;
+
// Same shape cypress/support/video-artifacts.ts publishes: synthetic contract data, never evidence.
function stored(
runId: string,
@@ -274,4 +278,56 @@ describe('compareSide', () => {
fidelityOnly.sources[0].kind = 'fidelity';
expect(() => compareSide(fidelityOnly, h100)).toThrow('Published artifact has no c1 cell');
});
+ it('skips a malformed source so a readable sibling still resolves', () => {
+ const sha = h100.id.split(':')[0];
+ const hardware = 'NVIDIA H100 80GB HBM3';
+ // Manifest names another run, so storedBundle rejects the source.
+ const misbundled = stored(h100.runId, h100.artifactId, hardware, 3);
+ set(document(misbundled.sources[0], 'manifest.json'), 'run_id', '999');
+ // Manifest mode no longer matches CI, so servingCells rejects the source.
+ const inconsistent = stored(h100.runId, h100.artifactId, hardware, 5);
+ set(document(inconsistent.sources[0], 'manifest.json'), 'mode', 'fidelity');
+ const corrupt = [...misbundled.sources, ...inconsistent.sources];
+ // The readable sibling wins whether the point names its manifest SHA…
+ const exact = stored(h100.runId, h100.artifactId, hardware, 6, sha);
+ expect(
+ compareSide({ ...exact, sources: [...corrupt, ...exact.sources] }, h100).records,
+ ).toHaveLength(6);
+ // …or it is merely the first source with the cell, before or after the corrupt ones.
+ const other = stored(h100.runId, h100.artifactId, hardware, 4);
+ expect(
+ compareSide({ ...other, sources: [...corrupt, ...other.sources] }, h100).records,
+ ).toHaveLength(4);
+ expect(
+ compareSide({ ...other, sources: [...other.sources, ...corrupt] }, h100).records,
+ ).toHaveLength(4);
+ });
+ it('rethrows the first source error only when no source publishes the cell', () => {
+ const hardware = 'NVIDIA H100 80GB HBM3';
+ const misbundled = stored(h100.runId, h100.artifactId, hardware);
+ set(document(misbundled.sources[0], 'manifest.json'), 'run_id', '999');
+ const inconsistent = stored(h100.runId, h100.artifactId, hardware);
+ set(document(inconsistent.sources[0], 'manifest.json'), 'mode', 'fidelity');
+ expect(() => compareSide(misbundled, h100)).toThrow('Stored result identity mismatch');
+ expect(() => compareSide(inconsistent, h100)).toThrow(
+ 'Invalid H3 serving matrix: CI identity does not match the manifest',
+ );
+ expect(() =>
+ compareSide(
+ { ...inconsistent, sources: [...inconsistent.sources, ...misbundled.sources] },
+ h100,
+ ),
+ ).toThrow('Invalid H3 serving matrix: CI identity does not match the manifest');
+ // A readable source without the cell does not prove the unreadable one lacked it.
+ const readable = stored(h100.runId, h100.artifactId, hardware);
+ expect(() =>
+ compareSide(
+ { ...readable, sources: [...misbundled.sources, ...readable.sources] },
+ {
+ ...h100,
+ cell: 'c3',
+ },
+ ),
+ ).toThrow('Stored result identity mismatch');
+ });
});
diff --git a/packages/app/src/components/video-benchmark/compare.ts b/packages/app/src/components/video-benchmark/compare.ts
index 5d80b8614..cd6d83d54 100644
--- a/packages/app/src/components/video-benchmark/compare.ts
+++ b/packages/app/src/components/video-benchmark/compare.ts
@@ -8,7 +8,7 @@ import {
} from './metrics';
import { latestVideoCells } from './points';
import { servingCells, type ServingCell } from './serving';
-import { storedBundle, type StoredArtifact } from './stored';
+import { storedBundle, type StoredArtifact, type StoredSource } from './stored';
/** Metrics the compare table shows, in row order. */
export const COMPARE_METRICS = [
@@ -190,11 +190,35 @@ export interface CompareSide {
urls: Map;
}
+/**
+ * The cell's records inside one observation source, with that source's
+ * manifest SHA; null when the source lacks the cell. Contract violations throw,
+ * as in the run views.
+ */
+function sourceSide(
+ source: StoredSource,
+ cellId: string,
+): { side: CompareSide; manifestSha256: string } | null {
+ const bundle = storedBundle(source);
+ const cell = servingCells(bundle).find((item) => item.id === cellId);
+ if (!cell) return null;
+ return {
+ manifestSha256: bundle.manifestSha256,
+ side: {
+ records: caseRecords(cell),
+ urls: new Map(source.assets.map(([path, asset]) => [path, asset.url])),
+ },
+ };
+}
+
/**
* Resolve a dashboard point inside its stored artifact (`format=media`): the
* observation source whose manifest SHA the point id names, else the first
- * source that publishes the point's cell. Contract violations throw, as in the
- * run views; nothing is synthesised for a missing cell.
+ * source that publishes the point's cell. A malformed source is skipped so a
+ * readable sibling still resolves (as `videoHistoryEntry` isolates sources);
+ * its error is rethrown only when no source publishes the cell, so an
+ * unreadable artifact is never reported as one without the cell. Nothing is
+ * synthesised for a missing cell.
*/
export function compareSide(saved: StoredArtifact, point: VideoPoint): CompareSide {
if (
@@ -206,18 +230,21 @@ export function compareSide(saved: StoredArtifact, point: VideoPoint): CompareSi
const wanted = point.id.split(':')[0];
const cellId = point.cell ?? (point.concurrency === null ? 'c1' : `c${point.concurrency}`);
let fallback: CompareSide | null = null;
+ let sourceError: Error | null = null;
for (const source of saved.sources) {
if (source.kind) continue;
- const bundle = storedBundle(source);
- const cell = servingCells(bundle).find((item) => item.id === cellId);
- if (!cell) continue;
- const side: CompareSide = {
- records: caseRecords(cell),
- urls: new Map(source.assets.map(([path, asset]) => [path, asset.url])),
- };
- if (bundle.manifestSha256 === wanted) return side;
- fallback ??= side;
+ let found: ReturnType;
+ try {
+ found = sourceSide(source, cellId);
+ } catch (error) {
+ sourceError ??= error instanceof Error ? error : new Error(String(error));
+ continue;
+ }
+ if (found === null) continue;
+ if (found.manifestSha256 === wanted) return found.side;
+ fallback ??= found.side;
}
- if (fallback === null) throw new Error(`Published artifact has no ${cellId} cell`);
- return fallback;
+ if (fallback !== null) return fallback;
+ if (sourceError !== null) throw sourceError;
+ throw new Error(`Published artifact has no ${cellId} cell`);
}
From 0411e69d22a6654eaad1181bc576694b71deb296 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:31:35 -0700
Subject: [PATCH 074/104] feat: derive compute-bound evidence from measured
video cells
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Pure evidence.ts: board power vs. recorded enforced limit per hardware at
C1, concurrency plateau rows with throughput/latency ratios against C1,
consecutive-hardware speedups against GPU_SPECS bandwidth and BF16/FP8
ratios (log-space reading with an explicit inconclusive verdict), and
caveat facts read from the cells. Missing input reads as null, never 0.
Unit tests assert the retained fixture: 91.9/97.4/96.4 % of cap,
1.111x and 1.932x observed, C2/C4 throughput within 1.44 % of C1.
中文:新增纯模块 evidence.ts,从实测 cell 推导算力受限证据:C1 板卡功率对照记录到的生效上限、
各并发相对 C1 的吞吐/延迟比值、相邻硬件实测加速比对照 GPU_SPECS 带宽与 BF16/FP8 比值
(对数空间判读,无法区分时明确给出"不确定"),以及来自 cell 的注意事项事实。缺失输入返回 null 而非 0。
单元测试断言保留 fixture 的数值:功率占上限 91.9/97.4/96.4%、实测加速比 1.111x 与 1.932x、
C2/C4 吞吐量与 C1 偏差不超过 1.44%。
---
.../video-benchmark/evidence.test.ts | 274 +++++++++++++++++
.../components/video-benchmark/evidence.ts | 290 ++++++++++++++++++
2 files changed, 564 insertions(+)
create mode 100644 packages/app/src/components/video-benchmark/evidence.test.ts
create mode 100644 packages/app/src/components/video-benchmark/evidence.ts
diff --git a/packages/app/src/components/video-benchmark/evidence.test.ts b/packages/app/src/components/video-benchmark/evidence.test.ts
new file mode 100644
index 000000000..6002cc694
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/evidence.test.ts
@@ -0,0 +1,274 @@
+import { describe, expect, it } from 'vitest';
+import fixture from '../../../cypress/fixtures/api/video-history.json';
+import {
+ concurrencyPlateau,
+ evidenceFacts,
+ parseBandwidthTbps,
+ plateauSummary,
+ powerRange,
+ powerUtilization,
+ readSpeedup,
+ scalingVsSpec,
+ specNumbers,
+} from './evidence';
+import { hardwareSort } from './hardware';
+import type { VideoHistoryPage } from './history';
+import type { VideoPoint } from './metrics';
+import { videoPoints } from './points';
+
+// Retained 2026-09-09 H100/H200/B200 C1/C2/C4 serving cells, n = 20 each; MI355X has no valid run.
+const points = videoPoints([fixture as unknown as VideoHistoryPage]);
+const cell = (hardwareKey: string, concurrency: number): VideoPoint => {
+ const point = points.find((p) => p.hardwareKey === hardwareKey && p.concurrency === concurrency);
+ if (!point) throw new Error(`fixture lacks ${hardwareKey} C${concurrency}`);
+ return point;
+};
+const c1 = points.filter((p) => p.concurrency === 1);
+const registryOrder = (keys: string[]) =>
+ keys.toSorted((a, b) => hardwareSort(a) - hardwareSort(b));
+
+describe('powerUtilization', () => {
+ it('reads mean board power against the recorded enforced limit per measured hardware at C1', () => {
+ const rows = powerUtilization(points);
+ const keys = rows.map((row) => row.hardwareKey);
+ expect(keys).toEqual(registryOrder(['h100', 'h200', 'b200']));
+ expect(keys).toEqual(registryOrder(keys));
+ const byKey = new Map(rows.map((row) => [row.hardwareKey, row]));
+ expect(byKey.get('h100')?.avgPowerW).toBeCloseTo(2574.55, 1);
+ expect(byKey.get('h100')?.enforcedLimitW).toBe(2800);
+ expect(byKey.get('h100')?.percentOfCap).toBeCloseTo(91.95, 1);
+ expect(byKey.get('h200')?.percentOfCap).toBeCloseTo(97.41, 1);
+ expect(byKey.get('b200')?.avgPowerW).toBeCloseTo(3856.02, 1);
+ expect(byKey.get('b200')?.enforcedLimitW).toBe(4000);
+ expect(byKey.get('b200')?.percentOfCap).toBeCloseTo(96.4, 1);
+ });
+ it('summarises the measured spread and keeps missing limits null', () => {
+ expect(powerRange(powerUtilization(points))).toEqual({
+ measured: 3,
+ min: expect.closeTo(91.95, 1),
+ max: expect.closeTo(97.41, 1),
+ });
+ const unlimited = powerUtilization([{ ...cell('h100', 1), enforcedLimitW: null }]);
+ expect(unlimited).toEqual([
+ {
+ hardwareKey: 'h100',
+ avgPowerW: expect.closeTo(2574.55, 1),
+ enforcedLimitW: null,
+ percentOfCap: null,
+ },
+ ]);
+ expect(powerRange(unlimited)).toBeNull();
+ expect(powerUtilization([{ ...cell('h100', 1), avgPowerW: 0 }])[0].percentOfCap).toBeNull();
+ expect(powerUtilization(points.filter((p) => p.concurrency !== 1))).toEqual([]);
+ });
+});
+
+describe('concurrencyPlateau', () => {
+ it('holds throughput within 1.5 % of C1 while P50 scales with client concurrency', () => {
+ const rows = concurrencyPlateau(points);
+ expect(rows).toHaveLength(9);
+ const row = (key: string, c: number) =>
+ rows.find((r) => r.hardwareKey === key && r.concurrency === c);
+ expect(row('h100', 1)).toEqual({
+ hardwareKey: 'h100',
+ concurrency: 1,
+ videosPerGpuHour: expect.closeTo(5.374, 3),
+ p50: expect.closeTo(167.333, 3),
+ throughputRatioVsC1: 1,
+ latencyRatioVsC1: 1,
+ });
+ expect(row('h100', 2)?.throughputRatioVsC1).toBeCloseTo(0.999, 3);
+ expect(row('h100', 2)?.latencyRatioVsC1).toBeCloseTo(2.0007, 3);
+ expect(row('h100', 4)?.throughputRatioVsC1).toBeCloseTo(0.9989, 3);
+ expect(row('h100', 4)?.latencyRatioVsC1).toBeCloseTo(3.9995, 3);
+ expect(row('h200', 2)?.throughputRatioVsC1).toBeCloseTo(1.004, 3);
+ expect(row('h200', 2)?.latencyRatioVsC1).toBeCloseTo(1.9925, 3);
+ expect(row('h200', 4)?.throughputRatioVsC1).toBeCloseTo(1.0023, 3);
+ expect(row('h200', 4)?.latencyRatioVsC1).toBeCloseTo(3.9917, 3);
+ expect(row('b200', 2)?.throughputRatioVsC1).toBeCloseTo(1.0144, 3);
+ expect(row('b200', 2)?.latencyRatioVsC1).toBeCloseTo(1.9706, 3);
+ expect(row('b200', 4)?.videosPerGpuHour).toBeCloseTo(11.692, 3);
+ expect(row('b200', 4)?.p50).toBeCloseTo(307.284, 3);
+ expect(row('b200', 4)?.throughputRatioVsC1).toBeCloseTo(1.0144, 3);
+ expect(row('b200', 4)?.latencyRatioVsC1).toBeCloseTo(3.9423, 3);
+ });
+ it('switches the throughput denominator with the basis without moving the ratios', () => {
+ const rows = concurrencyPlateau(points, 'allocated');
+ const h100 = rows.filter((r) => r.hardwareKey === 'h100');
+ expect(h100[0].videosPerGpuHour).toBeCloseTo(2.687, 3);
+ expect(h100[2].throughputRatioVsC1).toBeCloseTo(0.9989, 3);
+ // H200 allocated 4 of 4, so its denominator is unchanged.
+ expect(rows.find((r) => r.hardwareKey === 'h200')?.videosPerGpuHour).toBeCloseTo(5.973, 3);
+ });
+ it('leaves ratios null without a C1 baseline and never reports 0', () => {
+ const rows = concurrencyPlateau(
+ points.filter((p) => !(p.hardwareKey === 'h200' && p.concurrency === 1)),
+ );
+ const h200 = rows.filter((r) => r.hardwareKey === 'h200');
+ expect(h200).toHaveLength(2);
+ expect(h200.every((r) => r.throughputRatioVsC1 === null && r.latencyRatioVsC1 === null)).toBe(
+ true,
+ );
+ expect(h200[0].videosPerGpuHour).toBeCloseTo(5.997, 3);
+ const broken = concurrencyPlateau([{ ...cell('b200', 1), wallSeconds: null, p50: 0 }]);
+ expect(broken[0]).toMatchObject({
+ videosPerGpuHour: null,
+ p50: null,
+ throughputRatioVsC1: null,
+ latencyRatioVsC1: null,
+ });
+ });
+ it('summarises queued cells: deviation from C1 and latency spread per concurrency', () => {
+ const summary = plateauSummary(concurrencyPlateau(points));
+ expect(summary).toEqual({
+ queued: 6,
+ throughputDeviationPct: expect.closeTo(1.437, 2),
+ latency: [
+ { concurrency: 2, min: expect.closeTo(1.9706, 3), max: expect.closeTo(2.0007, 3) },
+ { concurrency: 4, min: expect.closeTo(3.9423, 3), max: expect.closeTo(3.9995, 3) },
+ ],
+ });
+ expect(plateauSummary(concurrencyPlateau(c1))).toBeNull();
+ expect(plateauSummary([])).toBeNull();
+ });
+});
+
+describe('scalingVsSpec', () => {
+ it('parses spec-sheet bandwidth strings in TB/s or GB/s', () => {
+ expect(parseBandwidthTbps('4.8 TB/s')).toBe(4.8);
+ expect(parseBandwidthTbps('3.35 TB/s')).toBe(3.35);
+ expect(parseBandwidthTbps('8 TB/s')).toBe(8);
+ expect(parseBandwidthTbps('3350 GB/s')).toBeCloseTo(3.35, 6);
+ expect(parseBandwidthTbps('0 TB/s')).toBeNull();
+ expect(parseBandwidthTbps('n/a')).toBeNull();
+ expect(parseBandwidthTbps('')).toBeNull();
+ expect(parseBandwidthTbps(null)).toBeNull();
+ });
+ it('looks up the campaign hardware on the GPU specs page by SKU name', () => {
+ expect(specNumbers('h100')).toEqual({
+ memoryBandwidthTbps: 3.35,
+ bf16Tflops: 989,
+ fp8Tflops: 1979,
+ });
+ expect(specNumbers('h200')).toEqual({
+ memoryBandwidthTbps: 4.8,
+ bf16Tflops: 989,
+ fp8Tflops: 1979,
+ });
+ expect(specNumbers('b200')).toEqual({
+ memoryBandwidthTbps: 8,
+ bf16Tflops: 2250,
+ fp8Tflops: 4500,
+ });
+ expect(specNumbers('unknown')).toEqual({
+ memoryBandwidthTbps: null,
+ bf16Tflops: null,
+ fp8Tflops: null,
+ });
+ });
+ it('pairs consecutive hardware from slowest to fastest C1 P50 against spec ratios', () => {
+ const rows = scalingVsSpec(points);
+ expect(rows.map((r) => [r.fromKey, r.toKey])).toEqual([
+ ['h100', 'h200'],
+ ['h200', 'b200'],
+ ]);
+ expect(rows[0].observedSpeedup).toBeCloseTo(1.111, 3);
+ expect(rows[0].memoryBandwidthRatio).toBeCloseTo(1.4328, 3);
+ expect(rows[0].bf16Ratio).toBe(1);
+ expect(rows[0].fp8Ratio).toBe(1);
+ expect(rows[1].observedSpeedup).toBeCloseTo(1.932, 3);
+ expect(rows[1].memoryBandwidthRatio).toBeCloseTo(1.6667, 3);
+ expect(rows[1].bf16Ratio).toBeCloseTo(2.275, 3);
+ expect(rows[1].fp8Ratio).toBeCloseTo(2.2739, 3);
+ });
+ it('reads which spec ratio the observed speedup sits closer to, and says when it cannot tell', () => {
+ const [h200, b200] = scalingVsSpec(points);
+ expect(readSpeedup(h200)).toEqual({ closest: 'compute', position: 'between', decisive: true });
+ expect(readSpeedup(b200)).toEqual({
+ closest: 'bandwidth',
+ position: 'between',
+ decisive: false,
+ });
+ expect(readSpeedup({ ...b200, memoryBandwidthRatio: null })).toBeNull();
+ expect(readSpeedup({ ...b200, bf16Ratio: null, fp8Ratio: null })).toBeNull();
+ expect(readSpeedup({ ...b200, observedSpeedup: 2.5 })).toEqual({
+ closest: 'compute',
+ position: 'above',
+ decisive: true,
+ });
+ expect(readSpeedup({ ...h200, observedSpeedup: 0.9 })).toEqual({
+ closest: 'compute',
+ position: 'below',
+ decisive: true,
+ });
+ });
+ it('nulls every ratio for hardware missing from the specs page and needs two hardware', () => {
+ const rows = scalingVsSpec([
+ { ...cell('h100', 1), hardwareKey: 'gb200', id: 'gb200:c1' },
+ cell('b200', 1),
+ ]);
+ expect(rows).toEqual([
+ {
+ fromKey: 'gb200',
+ toKey: 'b200',
+ observedSpeedup: expect.closeTo(2.1468, 3),
+ memoryBandwidthRatio: null,
+ bf16Ratio: null,
+ fp8Ratio: null,
+ },
+ ]);
+ expect(readSpeedup(rows[0])).toBeNull();
+ expect(scalingVsSpec([cell('h100', 1)])).toEqual([]);
+ expect(scalingVsSpec([cell('h100', 1), { ...cell('h200', 1), p50: null }])).toEqual([]);
+ });
+});
+
+describe('evidenceFacts', () => {
+ it('reads the shared recipe, sample count and workload from the cells', () => {
+ expect(evidenceFacts(points)).toEqual({
+ participating: 4,
+ tp: 2,
+ ulysses: 2,
+ samples: { min: 20, max: 20 },
+ workload: '1344 × 768 · 8 s · 24 fps · 50 steps',
+ attention: [],
+ });
+ });
+ it('drops a fact the cells disagree on and lists attention backends only when they differ', () => {
+ const b200 = cell('b200', 1);
+ const h200 = cell('h200', 1);
+ const facts = evidenceFacts([
+ {
+ ...b200,
+ participating: 8,
+ samples: 18,
+ server: { tp: 4, ulysses: 2, attention: 'dynamic_cudnn_sdpa' },
+ },
+ { ...h200, server: { tp: 2, ulysses: 2, attention: 'fa' } },
+ { ...cell('h100', 1), server: null, workload: '' },
+ ]);
+ expect(facts).toEqual({
+ participating: null,
+ tp: null,
+ ulysses: 2,
+ samples: { min: 18, max: 20 },
+ workload: '1344 × 768 · 8 s · 24 fps · 50 steps',
+ attention: expect.arrayContaining([
+ { hardwareKey: 'b200', attention: 'dynamic_cudnn_sdpa' },
+ { hardwareKey: 'h200', attention: 'fa' },
+ ]),
+ });
+ expect(facts.attention).toHaveLength(2);
+ expect(
+ evidenceFacts([{ ...b200, server: { tp: 2, ulysses: 2, attention: 'fa' } }]).attention,
+ ).toEqual([]);
+ expect(evidenceFacts([])).toEqual({
+ participating: null,
+ tp: null,
+ ulysses: null,
+ samples: null,
+ workload: null,
+ attention: [],
+ });
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/evidence.ts b/packages/app/src/components/video-benchmark/evidence.ts
new file mode 100644
index 000000000..8af5283be
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/evidence.ts
@@ -0,0 +1,290 @@
+import { GPU_SPECS } from '@/lib/gpu-specs';
+import { hardwareSort } from './hardware';
+import { metricValue, type GpuBasis, type MetricOptions, type VideoPoint } from './metrics';
+import { latestVideoCells } from './points';
+
+/**
+ * Compute-bound evidence read from the measured cells only: board power against
+ * the recorded enforced limit, the client-concurrency plateau, and observed
+ * cross-hardware speedups against spec-sheet ratios. Every number is derived
+ * from published observations or the GPU specs page; missing input reads as
+ * null, never 0, so a panel can hide what the data does not support.
+ */
+
+const finite = (n: number | null | undefined): n is number =>
+ typeof n === 'number' && Number.isFinite(n);
+const positive = (n: number | null | undefined): n is number => finite(n) && n > 0;
+const ratio = (numerator: number | null, denominator: number | null): number | null =>
+ finite(numerator) && positive(denominator) ? numerator / denominator : null;
+
+type MeasuredPoint = VideoPoint & { hardwareKey: string; concurrency: number };
+const isMeasured = (p: VideoPoint): p is MeasuredPoint =>
+ p.hardwareKey !== null && positive(p.concurrency);
+
+/** Newest observation per (hardware, concurrency) in HW_REGISTRY order, then ascending concurrency. */
+function measuredCells(points: VideoPoint[]): MeasuredPoint[] {
+ return latestVideoCells(points)
+ .filter(isMeasured)
+ .toSorted(
+ (a, b) =>
+ hardwareSort(a.hardwareKey) - hardwareSort(b.hardwareKey) || a.concurrency - b.concurrency,
+ );
+}
+
+/** The cost tier only enters priced metrics; nothing read here is priced. */
+const metricOptions = (basis: GpuBasis): MetricOptions => ({ tier: 'h', basis });
+
+export interface PowerUtilizationRow {
+ hardwareKey: string;
+ /** Sum of the participating boards' time-weighted mean power during generation. */
+ avgPowerW: number | null;
+ /** Sum of the same boards' enforced limits recorded around the run, not marketing TDP. */
+ enforcedLimitW: number | null;
+ percentOfCap: number | null;
+}
+
+/** One row per measured hardware at C1. */
+export function powerUtilization(points: VideoPoint[]): PowerUtilizationRow[] {
+ return measuredCells(points)
+ .filter((p) => p.concurrency === 1)
+ .map((p) => ({
+ hardwareKey: p.hardwareKey,
+ avgPowerW: positive(p.avgPowerW) ? p.avgPowerW : null,
+ enforcedLimitW: positive(p.enforcedLimitW) ? p.enforcedLimitW : null,
+ percentOfCap: metricValue(p, 'powerPctCap', metricOptions('participating')),
+ }));
+}
+
+export interface PowerRange {
+ /** Hardware with both a mean power and a recorded limit. */
+ measured: number;
+ min: number;
+ max: number;
+}
+
+/** Spread of the measured percentages; null when nothing recorded both power and a limit. */
+export function powerRange(rows: PowerUtilizationRow[]): PowerRange | null {
+ const values = rows.map((row) => row.percentOfCap).filter(finite);
+ if (values.length === 0) return null;
+ return { measured: values.length, min: Math.min(...values), max: Math.max(...values) };
+}
+
+export interface ConcurrencyPlateauRow {
+ hardwareKey: string;
+ concurrency: number;
+ videosPerGpuHour: number | null;
+ p50: number | null;
+ /** Throughput relative to the same hardware's C1 cell; null when C1 is missing. */
+ throughputRatioVsC1: number | null;
+ /** P50 time to video relative to the same hardware's C1 cell; null when C1 is missing. */
+ latencyRatioVsC1: number | null;
+}
+
+/**
+ * Every measured cell against its hardware's C1 cell. On a batch-one server a
+ * flat throughput ratio with latency scaling by C says client concurrency only
+ * queues requests. `basis` picks the GPU denominator the rest of the dashboard
+ * shows; ratios within one hardware are unaffected unless its allocation changed.
+ */
+export function concurrencyPlateau(
+ points: VideoPoint[],
+ basis: GpuBasis = 'participating',
+): ConcurrencyPlateauRow[] {
+ const cells = measuredCells(points);
+ const options = metricOptions(basis);
+ const baseline = new Map(
+ cells.filter((p) => p.concurrency === 1).map((p) => [p.hardwareKey, p] as const),
+ );
+ return cells.map((p) => {
+ const base = baseline.get(p.hardwareKey);
+ const videosPerGpuHour = metricValue(p, 'videosPerGpuHour', options);
+ const p50 = positive(p.p50) ? p.p50 : null;
+ return {
+ hardwareKey: p.hardwareKey,
+ concurrency: p.concurrency,
+ videosPerGpuHour,
+ p50,
+ throughputRatioVsC1: ratio(
+ videosPerGpuHour,
+ base ? metricValue(base, 'videosPerGpuHour', options) : null,
+ ),
+ latencyRatioVsC1: ratio(p50, base && positive(base.p50) ? base.p50 : null),
+ };
+ });
+}
+
+type QueuedRow = ConcurrencyPlateauRow & { throughputRatioVsC1: number; latencyRatioVsC1: number };
+const isQueued = (row: ConcurrencyPlateauRow): row is QueuedRow =>
+ row.concurrency > 1 && finite(row.throughputRatioVsC1) && finite(row.latencyRatioVsC1);
+
+export interface PlateauSummary {
+ /** Cells above C1 that have a C1 baseline. */
+ queued: number;
+ /** Largest |throughput ratio − 1| across those cells, in percent. */
+ throughputDeviationPct: number;
+ /** Latency ratio spread per concurrency, ascending. */
+ latency: { concurrency: number; min: number; max: number }[];
+}
+
+/** Null when no hardware has a cell above C1 with a baseline: nothing to plateau against. */
+export function plateauSummary(rows: ConcurrencyPlateauRow[]): PlateauSummary | null {
+ const queued = rows.filter(isQueued);
+ if (queued.length === 0) return null;
+ const byConcurrency = new Map();
+ for (const row of queued) {
+ const list = byConcurrency.get(row.concurrency) ?? [];
+ list.push(row.latencyRatioVsC1);
+ byConcurrency.set(row.concurrency, list);
+ }
+ return {
+ queued: queued.length,
+ throughputDeviationPct:
+ Math.max(...queued.map((row) => Math.abs(row.throughputRatioVsC1 - 1))) * 100,
+ latency: [...byConcurrency]
+ .toSorted(([a], [b]) => a - b)
+ .map(([concurrency, values]) => ({
+ concurrency,
+ min: Math.min(...values),
+ max: Math.max(...values),
+ })),
+ };
+}
+
+/** GPU_SPECS names for the campaign hardware; the specs page keys rows by SKU name, not registry key. */
+const SPEC_NAME: Readonly> = {
+ h100: 'H100 SXM',
+ h200: 'H200 SXM',
+ b200: 'B200 SXM',
+ mi355x: 'MI355X',
+};
+
+export interface SpecNumbers {
+ memoryBandwidthTbps: number | null;
+ bf16Tflops: number | null;
+ fp8Tflops: number | null;
+}
+
+/** `"4.8 TB/s"` → 4.8, `"3350 GB/s"` → 3.35; anything else → null. */
+export function parseBandwidthTbps(text: string | null | undefined): number | null {
+ const match = /^\s*(?\d+(?:\.\d+)?)\s*(?[GT])B\/s\s*$/iu.exec(text ?? '');
+ if (!match?.groups) return null;
+ const value = Number(match.groups.value);
+ if (!positive(value)) return null;
+ return match.groups.unit.toUpperCase() === 'G' ? value / 1000 : value;
+}
+
+/** Per-GPU HBM bandwidth and dense tensor-core peaks from the GPU specs page; null when unlisted. */
+export function specNumbers(hardwareKey: string): SpecNumbers {
+ const spec = GPU_SPECS.find((entry) => entry.name === SPEC_NAME[hardwareKey]);
+ return {
+ memoryBandwidthTbps: spec ? parseBandwidthTbps(spec.memoryBandwidth) : null,
+ bf16Tflops: spec && positive(spec.bf16) ? spec.bf16 : null,
+ fp8Tflops: spec && positive(spec.fp8) ? spec.fp8 : null,
+ };
+}
+
+export interface ScalingVsSpecRow {
+ fromKey: string;
+ toKey: string;
+ /** C1 P50 of `from` over `to`: how many times faster `to` finished the same clip. */
+ observedSpeedup: number | null;
+ memoryBandwidthRatio: number | null;
+ bf16Ratio: number | null;
+ fp8Ratio: number | null;
+}
+
+type TimedPoint = MeasuredPoint & { p50: number };
+const isTimedBaseline = (p: MeasuredPoint): p is TimedPoint =>
+ p.concurrency === 1 && positive(p.p50);
+
+/** Consecutive measured hardware from slowest to fastest C1 P50, each step against its spec ratios. */
+export function scalingVsSpec(points: VideoPoint[]): ScalingVsSpecRow[] {
+ const ordered = measuredCells(points)
+ .filter(isTimedBaseline)
+ .toSorted((a, b) => b.p50 - a.p50);
+ return ordered.slice(1).map((to, index) => {
+ const from = ordered[index];
+ const fromSpec = specNumbers(from.hardwareKey);
+ const toSpec = specNumbers(to.hardwareKey);
+ return {
+ fromKey: from.hardwareKey,
+ toKey: to.hardwareKey,
+ observedSpeedup: ratio(from.p50, to.p50),
+ memoryBandwidthRatio: ratio(toSpec.memoryBandwidthTbps, fromSpec.memoryBandwidthTbps),
+ bf16Ratio: ratio(toSpec.bf16Tflops, fromSpec.bf16Tflops),
+ fp8Ratio: ratio(toSpec.fp8Tflops, fromSpec.fp8Tflops),
+ };
+ });
+}
+
+export interface SpeedupReading {
+ /** Spec ratio the observed speedup sits nearer to, measured in log space because ratios multiply. */
+ closest: 'bandwidth' | 'compute';
+ /** Where the observed speedup falls relative to the smallest and largest spec ratio. */
+ position: 'below' | 'between' | 'above';
+ /** False when the two log-distances are within 25 % of each other: the data does not separate them. */
+ decisive: boolean;
+}
+
+/** Ratio of near to far log-distance below which one spec ratio is called closer. */
+const DECISIVE_BELOW = 0.75;
+
+/** Null when the observed speedup or every spec ratio is missing. */
+export function readSpeedup(row: ScalingVsSpecRow): SpeedupReading | null {
+ const compute = [row.bf16Ratio, row.fp8Ratio].filter(positive);
+ if (!positive(row.observedSpeedup) || !positive(row.memoryBandwidthRatio) || compute.length === 0)
+ return null;
+ const observed = Math.log(row.observedSpeedup);
+ const toBandwidth = Math.abs(observed - Math.log(row.memoryBandwidthRatio));
+ const toCompute = Math.min(...compute.map((value) => Math.abs(observed - Math.log(value))));
+ const near = Math.min(toBandwidth, toCompute);
+ const far = Math.max(toBandwidth, toCompute);
+ const specs = [row.memoryBandwidthRatio, ...compute];
+ const lowest = Math.min(...specs);
+ const highest = Math.max(...specs);
+ return {
+ closest: toBandwidth <= toCompute ? 'bandwidth' : 'compute',
+ position:
+ row.observedSpeedup < lowest ? 'below' : row.observedSpeedup > highest ? 'above' : 'between',
+ decisive: far > 0 && near / far < DECISIVE_BELOW,
+ };
+}
+
+export interface EvidenceFacts {
+ /** Participating GPUs per request when every measured cell agrees. */
+ participating: number | null;
+ tp: number | null;
+ ulysses: number | null;
+ /** Valid samples per cell across measured cells. */
+ samples: { min: number; max: number } | null;
+ /** Shape · duration · fps · steps from the projection's workload label, when every cell agrees. */
+ workload: string | null;
+ /** Attention backend per hardware, listed only when the recorded backends differ. */
+ attention: { hardwareKey: string; attention: string }[];
+}
+
+/** The one value every cell shares, or null when they disagree or none recorded it. */
+function uniform(values: (T | null)[]): T | null {
+ const present = values.filter((value): value is T => value !== null);
+ if (present.length === 0) return null;
+ return present.every((value) => value === present[0]) ? present[0] : null;
+}
+
+/** Caveat inputs read from the cells so the panel never states a number the data does not carry. */
+export function evidenceFacts(points: VideoPoint[]): EvidenceFacts {
+ const cells = measuredCells(points);
+ const samples = cells.map((p) => p.samples).filter(positive);
+ const attention = cells
+ .filter((p) => p.concurrency === 1)
+ .flatMap((p) =>
+ p.server?.attention ? [{ hardwareKey: p.hardwareKey, attention: p.server.attention }] : [],
+ );
+ return {
+ participating: uniform(cells.map((p) => (positive(p.participating) ? p.participating : null))),
+ tp: uniform(cells.map((p) => (positive(p.server?.tp) ? p.server.tp : null))),
+ ulysses: uniform(cells.map((p) => (positive(p.server?.ulysses) ? p.server.ulysses : null))),
+ samples: samples.length > 0 ? { min: Math.min(...samples), max: Math.max(...samples) } : null,
+ workload: uniform(cells.map((p) => p.workload.split(' · ').slice(0, 4).join(' · ') || null)),
+ attention: uniform(attention.map((entry) => entry.attention)) === null ? attention : [],
+ };
+}
From 934946c0b872bf7dd61337b64ed54e916b21adb4 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:31:55 -0700
Subject: [PATCH 075/104] feat: add VideoEvidence compute-bound panel
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Three exhibits in Cards, each with a one-sentence reading built from the
computed numbers: power vs. enforced limit as per-hardware meters,
concurrency plateau table grouped by hardware, and observed speedup vs.
spec-sheet ratios with a hedged reading per pair. Bilingual caveats are
derived from the cells (participating GPUs and TP x Ulysses recipe,
n per cell, frozen workload, differing attention backends). Exhibits
without supporting data are hidden; the section disappears when nothing
is measured. No interactive controls, so no analytics events.
中文:新增 VideoEvidence 面板,三组展示均放在 Card 中,每组附一句由计算结果生成的判读:
板卡功率对照生效上限(按硬件的 meter)、按硬件分组的并发平台期表格、实测加速比对照规格表比值
(每对硬件给出留有余地的判读)。中英双语注意事项由 cell 数据推导(参与计算的 GPU 数与 TP x Ulysses
配方、每 cell 样本数、冻结工作负载、不同的 attention 后端)。数据不足的展示会隐藏;没有实测时整段不渲染。
无交互控件,因此无 analytics 事件。
---
.../video-benchmark/VideoEvidence.tsx | 493 ++++++++++++++++++
1 file changed, 493 insertions(+)
create mode 100644 packages/app/src/components/video-benchmark/VideoEvidence.tsx
diff --git a/packages/app/src/components/video-benchmark/VideoEvidence.tsx b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
new file mode 100644
index 000000000..cf98e1410
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
@@ -0,0 +1,493 @@
+'use client';
+
+import { Card } from '@/components/ui/card';
+import { Heading } from '@/components/ui/heading';
+import type { Locale } from '@/lib/i18n';
+import { useLocale } from '@/lib/use-locale';
+import {
+ concurrencyPlateau,
+ evidenceFacts,
+ plateauSummary,
+ powerRange,
+ powerUtilization,
+ readSpeedup,
+ scalingVsSpec,
+ type ConcurrencyPlateauRow,
+ type ScalingVsSpecRow,
+} from './evidence';
+import { hardwareLabel } from './hardware';
+import { formatMetric, type MetricOptions, type VideoPoint } from './metrics';
+
+const STRINGS = {
+ en: {
+ title: 'Compute-bound evidence',
+ subtitle:
+ 'Three readings from the measured cells on why this workload behaves like a compute-bound diffusion model on the pinned runtime. Every number is computed from the published runs; the wording follows the numbers.',
+ power: 'Board power vs. enforced limit',
+ powerHint:
+ 'Mean GPU-board power of the participating boards while generating, against the power limit recorded around the run, not marketing TDP.',
+ powerOne: (hardware: string, share: string) =>
+ `${hardware} ran at ${share} of its enforced power limit while generating: near the cap, as a compute-saturated workload would.`,
+ powerAll: (n: number, share: string) =>
+ `All ${n} measured GPU types ran at ${share} of their enforced power limit while generating: near the cap, as a compute-saturated workload would.`,
+ notRecorded: 'power or limit not recorded',
+ meter: 'share of enforced power limit',
+ plateau: 'Client concurrency plateau',
+ plateauHint:
+ "Newest cell per hardware and client concurrency; ratios are against the same hardware's C1 cell.",
+ plateauSentence: (queued: number, deviation: string, latency: string) =>
+ `Across ${queued} queued cells, throughput per GPU-hour stays within ${deviation} of C1 while P50 time to video rises to ${latency}: on the batch-one server, extra client concurrency queues requests instead of batching them.`,
+ at: (concurrency: number, range: string) => `${range} at C${concurrency}`,
+ hardware: 'Hardware',
+ c: 'C',
+ rate: 'Videos / GPU-hr',
+ p50: 'P50 (s)',
+ throughput: '× C1 throughput',
+ latency: '× C1 latency',
+ scaling: 'Observed speedup vs. spec-sheet ratios',
+ scalingHint:
+ 'Consecutive hardware from slowest to fastest C1 P50. Observed = P50 ratio; spec ratios use per-GPU HBM bandwidth and dense tensor-core TFLOPS from the GPU specs page.',
+ pair: 'Pair',
+ observed: 'Observed (P50 ratio)',
+ bandwidth: 'Memory bandwidth',
+ bf16: 'BF16 dense',
+ fp8: 'FP8 dense',
+ reading: 'Reading',
+ readings: {
+ missing: 'spec missing',
+ compute: 'closer to the FLOPS ratio',
+ bandwidth: 'closer to the bandwidth ratio',
+ between: 'between the two, not clearly closer to either',
+ above: 'above both spec ratios, not clearly closer to either',
+ below: 'below both spec ratios, not clearly closer to either',
+ },
+ scalingStep: (
+ from: string,
+ to: string,
+ observed: string,
+ bandwidth: string,
+ flops: string,
+ reading: string,
+ ) =>
+ `${from} → ${to}: ${observed} observed vs. ${bandwidth} bandwidth and ${flops} FLOPS, ${reading}.`,
+ scalingTail:
+ 'A bandwidth-bound workload would track the bandwidth ratio; a compute-bound one the FLOPS ratio.',
+ caveats: 'Read with these caveats',
+ caveatServer:
+ 'Batch-one, single-replica server: client concurrency queues requests rather than batching them.',
+ caveatGpus: (n: number, recipe: string) =>
+ `${n} participating GPUs per video${recipe}; allocated boards beyond those sit idle.`,
+ caveatGpusUnknown: 'Participating GPUs per video differ between cells or were not recorded.',
+ recipe: (tp: number, ulysses: number) => ` (TP${tp} × Ulysses ${ulysses})`,
+ caveatPower:
+ 'GPU-board power against the recorded enforced limit; not node, rack or facility power.',
+ caveatSamples: (n: string) =>
+ `n = ${n} clips per cell, one cohort per hardware: no error bars, and P90 is a display floor rather than a tail SLO.`,
+ caveatSamplesUnknown: 'Sample counts were not recorded.',
+ caveatWorkload: (workload: string) =>
+ `Frozen workload ${workload}; every ratio compares the same clip across hardware.`,
+ caveatWorkloadUnknown:
+ 'Cells do not share one workload label; cross-hardware ratios only hold for the same clip.',
+ caveatAttention: (backends: string) =>
+ `Attention backend differs by hardware (${backends}); each point is hardware plus its measured recipe.`,
+ },
+ zh: {
+ title: '算力受限(compute-bound)的证据',
+ subtitle:
+ '来自实测 cell 的三组读数,说明该工作负载在固定 runtime 上为何表现为算力受限的扩散模型。所有数字均由已发布运行计算得出,措辞以数字为准。',
+ power: '板卡功率 vs. 生效功率上限',
+ powerHint:
+ '生成期间参与计算板卡的 GPU 板卡平均功率,对照运行前后记录到的功率上限,而非标称 TDP。',
+ powerOne: (hardware: string, share: string) =>
+ `${hardware} 生成期间运行在生效功率上限的 ${share}:接近上限,符合算力饱和型负载的表现。`,
+ powerAll: (n: number, share: string) =>
+ `全部 ${n} 种实测硬件生成期间均运行在生效功率上限的 ${share}:接近上限,符合算力饱和型负载的表现。`,
+ notRecorded: '未记录功率或上限',
+ meter: '占生效功率上限的比例',
+ plateau: '客户端并发平台期',
+ plateauHint: '每种硬件、每个客户端并发下最新的 cell;比值均相对同一硬件的 C1 cell。',
+ plateauSentence: (queued: number, deviation: string, latency: string) =>
+ `在 ${queued} 个排队 cell 中,每 GPU 小时吞吐量与 C1 的偏差不超过 ${deviation},而 P50 出片时间升至 ${latency}:在 batch-one 服务器上,额外的客户端并发只是让请求排队,并没有形成 batching。`,
+ at: (concurrency: number, range: string) => `C${concurrency} 时 ${range}`,
+ hardware: '硬件',
+ c: 'C',
+ rate: '视频数 / GPU 小时',
+ p50: 'P50(s)',
+ throughput: '吞吐量 × C1',
+ latency: '延迟 × C1',
+ scaling: '实测加速比 vs. 规格表比值',
+ scalingHint:
+ '按 C1 P50 从慢到快排列的相邻硬件。实测值为 P50 比值;规格比值取自 GPU 规格页的单卡 HBM 带宽与 dense tensor-core TFLOPS。',
+ pair: '硬件对',
+ observed: '实测(P50 比值)',
+ bandwidth: '显存带宽',
+ bf16: 'BF16 dense',
+ fp8: 'FP8 dense',
+ reading: '判读',
+ readings: {
+ missing: '缺少规格',
+ compute: '更接近 FLOPS 比值',
+ bandwidth: '更接近带宽比值',
+ between: '介于两者之间,不明显偏向任一方',
+ above: '高于两个规格比值,不明显偏向任一方',
+ below: '低于两个规格比值,不明显偏向任一方',
+ },
+ scalingStep: (
+ from: string,
+ to: string,
+ observed: string,
+ bandwidth: string,
+ flops: string,
+ reading: string,
+ ) =>
+ `${from} → ${to}:实测 ${observed},对比带宽比值 ${bandwidth}、FLOPS 比值 ${flops},${reading}。`,
+ scalingTail: '带宽受限的负载会跟随带宽比值,算力受限的负载会跟随 FLOPS 比值。',
+ caveats: '阅读时请注意',
+ caveatServer: 'batch-one 单副本服务器:客户端并发只会让请求排队,不会形成 batching。',
+ caveatGpus: (n: number, recipe: string) =>
+ `每条视频由 ${n} 张 GPU 参与计算${recipe};超出部分的已分配板卡处于空闲。`,
+ caveatGpusUnknown: '各 cell 参与计算的 GPU 数不一致或未记录。',
+ recipe: (tp: number, ulysses: number) => `(TP${tp} × Ulysses ${ulysses})`,
+ caveatPower: 'GPU 板卡级功率,对照记录到的生效上限;不是节点、机柜或设施功率。',
+ caveatSamples: (n: string) =>
+ `每个 cell n = ${n} 条视频、每种硬件一个批次:没有误差棒,P90 只是显示下限而非尾延迟 SLO。`,
+ caveatSamplesUnknown: '未记录样本数。',
+ caveatWorkload: (workload: string) =>
+ `冻结的工作负载 ${workload};所有比值都是同一条视频在不同硬件上的对比。`,
+ caveatWorkloadUnknown: '各 cell 的工作负载标签不一致;跨硬件比值只在同一条视频下成立。',
+ caveatAttention: (backends: string) =>
+ `各硬件的 attention 后端不同(${backends});每个数据点都是“硬件 + 实测配方”。`,
+ },
+};
+
+const number = (value: number, digits: number) =>
+ value.toLocaleString('en-US', { minimumFractionDigits: digits, maximumFractionDigits: digits });
+const times = (value: number | null) => (value === null ? '—' : `${number(value, 2)}×`);
+/** "92–97" or "97" when both ends print alike. */
+function span(min: number, max: number, digits: number): string {
+ const low = number(min, digits);
+ const high = number(max, digits);
+ return low === high ? low : `${low}–${high}`;
+}
+/** Percent range: "92–97%" in English, "92%–97%" in Chinese. */
+function percentSpan(min: number, max: number, digits: number, locale: Locale): string {
+ const low = number(min, digits);
+ const high = number(max, digits);
+ if (low === high) return `${low}%`;
+ return locale === 'zh' ? `${low}%–${high}%` : `${low}–${high}%`;
+}
+function list(items: string[], locale: Locale): string {
+ if (locale === 'zh') return items.join('、');
+ if (items.length <= 2) return items.join(' and ');
+ return `${items.slice(0, -1).join(', ')} and ${items.at(-1)}`;
+}
+
+function HardwareName({ hardwareKey, color }: { hardwareKey: string; color: string }) {
+ return (
+
+
+ {hardwareLabel(hardwareKey)}
+
+ );
+}
+
+const HEAD = 'pb-2 pr-3 font-normal text-muted-foreground';
+const CELL = 'border-t border-border/40 py-1.5 pr-3';
+
+export interface VideoEvidenceProps {
+ points: VideoPoint[];
+ options: MetricOptions;
+ colorFor: (hardwareKey: string) => string;
+}
+
+/**
+ * Compute-bound evidence panel: board power at the enforced limit, the
+ * client-concurrency plateau and observed speedups against spec-sheet ratios.
+ * Each exhibit renders only when the measured cells support it, and every
+ * sentence is built from the computed numbers; the section disappears when
+ * nothing is measured.
+ */
+export default function VideoEvidence({ points, options, colorFor }: VideoEvidenceProps) {
+ const locale = useLocale();
+ const s = STRINGS[locale];
+ const power = powerUtilization(points);
+ const range = powerRange(power);
+ const plateau = concurrencyPlateau(points, options.basis);
+ const summary = plateauSummary(plateau);
+ const scaling = scalingVsSpec(points);
+ if (range === null && summary === null && scaling.length === 0) return null;
+ const facts = evidenceFacts(points);
+
+ const powerSentence =
+ range === null
+ ? null
+ : range.measured === 1
+ ? s.powerOne(
+ hardwareLabel(power.find((row) => row.percentOfCap !== null)?.hardwareKey ?? ''),
+ percentSpan(range.min, range.max, 0, locale),
+ )
+ : s.powerAll(range.measured, percentSpan(range.min, range.max, 0, locale));
+
+ const plateauSentence =
+ summary === null
+ ? null
+ : s.plateauSentence(
+ summary.queued,
+ `${number(summary.throughputDeviationPct, 1)}%`,
+ list(
+ summary.latency.map((entry) =>
+ s.at(entry.concurrency, `${span(entry.min, entry.max, 2)}×`),
+ ),
+ locale,
+ ),
+ );
+ const plateauGroups = new Map();
+ for (const row of plateau) {
+ const group = plateauGroups.get(row.hardwareKey) ?? [];
+ group.push(row);
+ plateauGroups.set(row.hardwareKey, group);
+ }
+
+ const flops = (row: ScalingVsSpecRow) => {
+ const bf16 = times(row.bf16Ratio);
+ const fp8 = times(row.fp8Ratio);
+ return bf16 === fp8 ? bf16 : `${bf16} (BF16) / ${fp8} (FP8)`;
+ };
+ const readingText = (row: ScalingVsSpecRow) => {
+ const reading = readSpeedup(row);
+ if (reading === null) return s.readings.missing;
+ return reading.decisive ? s.readings[reading.closest] : s.readings[reading.position];
+ };
+ const scalingSentence =
+ scaling.length === 0
+ ? null
+ : `${scaling
+ .map((row) =>
+ s.scalingStep(
+ hardwareLabel(row.fromKey),
+ hardwareLabel(row.toKey),
+ times(row.observedSpeedup),
+ times(row.memoryBandwidthRatio),
+ flops(row),
+ readingText(row),
+ ),
+ )
+ .join(' ')} ${s.scalingTail}`;
+
+ const caveats = [
+ s.caveatServer,
+ facts.participating === null
+ ? s.caveatGpusUnknown
+ : s.caveatGpus(
+ facts.participating,
+ facts.tp !== null && facts.ulysses !== null ? s.recipe(facts.tp, facts.ulysses) : '',
+ ),
+ s.caveatPower,
+ facts.samples === null
+ ? s.caveatSamplesUnknown
+ : s.caveatSamples(span(facts.samples.min, facts.samples.max, 0)),
+ facts.workload === null ? s.caveatWorkloadUnknown : s.caveatWorkload(facts.workload),
+ ...(facts.attention.length > 0
+ ? [
+ s.caveatAttention(
+ facts.attention
+ .map((entry) => `${hardwareLabel(entry.hardwareKey)} ${entry.attention}`)
+ .join(' · '),
+ ),
+ ]
+ : []),
+ ];
+
+ return (
+
+
+
+ {s.title}
+
+
{s.subtitle}
+
+
+ {range !== null && (
+
+
+
+ {s.power}
+
+
{s.powerHint}
+
+
+ {power.map((row) => (
+
+
+
+
+ {row.avgPowerW !== null && row.enforcedLimitW !== null
+ ? `${number(row.avgPowerW, 0)} W / ${number(row.enforcedLimitW, 0)} W`
+ : s.notRecorded}
+ {row.percentOfCap !== null && (
+
+ {number(row.percentOfCap, 1)}%
+
+ )}
+
+
+ {row.percentOfCap !== null && (
+
+ )}
+
+ ))}
+
+
+ {powerSentence}
+
+
+ )}
+ {summary !== null && (
+
+
+
+ {s.plateau}
+
+
{s.plateauHint}
+
+
+
+
+
+ {s.hardware}
+ {s.c}
+ {s.rate}
+ {s.p50}
+ {s.throughput}
+ {s.latency}
+
+
+
+ {[...plateauGroups].map(([hardwareKey, rows]) =>
+ rows.map((row, index) => (
+
+ {index === 0 && (
+
+
+
+ )}
+ C{row.concurrency}
+
+ {formatMetric(row.videosPerGpuHour, 'videosPerGpuHour')}
+
+
+ {formatMetric(row.p50, 'p50Latency')}
+
+ {times(row.throughputRatioVsC1)}
+ {times(row.latencyRatioVsC1)}
+
+ )),
+ )}
+
+
+
+
+ {plateauSentence}
+
+
+ )}
+ {scaling.length > 0 && (
+
+
+
+ {s.scaling}
+
+
{s.scalingHint}
+
+
+
+
+
+ {s.pair}
+ {s.observed}
+ {s.bandwidth}
+ {s.bf16}
+ {s.fp8}
+ {s.reading}
+
+
+
+ {scaling.map((row) => (
+
+
+
+
+ →
+
+
+
+
+ {times(row.observedSpeedup)}
+
+ {times(row.memoryBandwidthRatio)}
+ {times(row.bf16Ratio)}
+ {times(row.fp8Ratio)}
+ {readingText(row)}
+
+ ))}
+
+
+
+
+ {scalingSentence}
+
+
+ )}
+
+
+
+ {s.caveats}
+
+
+ {caveats.map((caveat) => (
+ {caveat}
+ ))}
+
+
+
+ );
+}
From 78782b2954c6b79e424b73e995845c74ab45fe21 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:32:06 -0700
Subject: [PATCH 076/104] test: cover the video evidence panel with the
retained fixture
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cypress component spec mounts VideoEvidence with points from
cypress/fixtures/api/video-history.json through videoPoints and asserts
the rendered percentages and ratios (91.9/97.4/96.4 %, 1.11x vs 1.43x,
1.93x between 1.67x and 2.27-2.28x), the allocated-basis column, the
Chinese copy under /zh/video, hidden exhibits with one C1 cell, and an
empty render with no measured cells.
中文:新增 Cypress 组件测试,通过 videoPoints 用 cypress/fixtures/api/video-history.json
挂载 VideoEvidence,断言渲染出的百分比与比值(91.9/97.4/96.4%、1.11x 对 1.43x、
1.93x 介于 1.67x 与 2.27-2.28x 之间)、allocated 口径列、/zh/video 下的中文文案、
仅有一个 C1 cell 时隐藏的展示,以及无实测 cell 时不渲染。
---
.../cypress/component/video-evidence.cy.tsx | 170 ++++++++++++++++++
1 file changed, 170 insertions(+)
create mode 100644 packages/app/cypress/component/video-evidence.cy.tsx
diff --git a/packages/app/cypress/component/video-evidence.cy.tsx b/packages/app/cypress/component/video-evidence.cy.tsx
new file mode 100644
index 000000000..00792f0f8
--- /dev/null
+++ b/packages/app/cypress/component/video-evidence.cy.tsx
@@ -0,0 +1,170 @@
+import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
+import type { VideoHistoryPage } from '@/components/video-benchmark/history';
+import type { GpuBasis } from '@/components/video-benchmark/metrics';
+import { videoPoints } from '@/components/video-benchmark/points';
+import VideoEvidence from '@/components/video-benchmark/VideoEvidence';
+
+// Retained H100/H200/B200 C1/C2/C4 observations (cypress/fixtures/api/video-history.json).
+function mount(pathname = '/video', basis: GpuBasis = 'participating') {
+ cy.fixture('api/video-history.json').then((page: VideoHistoryPage) => {
+ cy.mount(
+
+ (key === 'b200' ? 'rgb(1, 2, 3)' : 'rgb(4, 5, 6)')}
+ />
+ ,
+ );
+ });
+}
+const exhibit = (name: string) => cy.get(`[data-testid="video-evidence-${name}"]`);
+
+describe('Video compute-bound evidence (retained fixture)', () => {
+ it('reads board power against the recorded enforced limit per measured hardware', () => {
+ mount();
+ exhibit('power').find('[data-testid="video-evidence-power-row"]').should('have.length', 3);
+ exhibit('power')
+ .find('[data-hardware="h100"]')
+ .should('contain', '2,575 W / 2,800 W')
+ .and('contain', '91.9%');
+ exhibit('power').find('[data-hardware="h200"]').should('contain', '97.4%');
+ exhibit('power')
+ .find('[data-hardware="b200"]')
+ .should('contain', '3,856 W / 4,000 W')
+ .and('contain', '96.4%');
+ exhibit('power').find('[role="meter"]').should('have.length', 3);
+ exhibit('power')
+ .find('[data-hardware="b200"] [role="meter"]')
+ .should('have.attr', 'aria-valuenow', '96.4')
+ .find('div')
+ .should('have.css', 'background-color', 'rgb(1, 2, 3)');
+ exhibit('power-reading').should(
+ 'contain',
+ 'All 3 measured GPU types ran at 92–97% of their enforced power limit',
+ );
+ });
+ it('tabulates the concurrency plateau with ratios against each hardware C1 cell', () => {
+ mount();
+ exhibit('plateau').find('tbody tr').should('have.length', 9);
+ exhibit('plateau').find('tbody th[scope="rowgroup"]').should('have.length', 3);
+ exhibit('plateau')
+ .find('tr[data-hardware="b200"][data-concurrency="4"]')
+ .should('contain', '11.69')
+ .and('contain', '307.3')
+ .and('contain', '1.01×')
+ .and('contain', '3.94×');
+ exhibit('plateau')
+ .find('tr[data-hardware="h100"][data-concurrency="4"]')
+ .should('contain', '5.37')
+ .and('contain', '669.2')
+ .and('contain', '1.00×')
+ .and('contain', '4.00×');
+ exhibit('plateau')
+ .find('tr[data-hardware="h200"][data-concurrency="1"]')
+ .should('contain', '5.97')
+ .and('contain', '150.6');
+ exhibit('plateau-reading')
+ .should('contain', 'Across 6 queued cells')
+ .and('contain', 'within 1.4% of C1')
+ .and('contain', '1.97–2.00× at C2 and 3.94–4.00× at C4')
+ .and('contain', 'queues requests instead of batching them');
+ });
+ it('compares observed speedups with spec-sheet ratios and hedges when they do not separate', () => {
+ mount();
+ exhibit('scaling').find('[data-testid="video-evidence-scaling-row"]').should('have.length', 2);
+ exhibit('scaling')
+ .find('[data-pair="h100-h200"]')
+ .should('contain', 'H100')
+ .and('contain', 'H200')
+ .and('contain', '1.11×')
+ .and('contain', '1.43×')
+ .and('contain', '1.00×')
+ .and('contain', 'closer to the FLOPS ratio');
+ exhibit('scaling')
+ .find('[data-pair="h200-b200"]')
+ .should('contain', '1.93×')
+ .and('contain', '1.67×')
+ .and('contain', '2.28×')
+ .and('contain', '2.27×')
+ .and('contain', 'between the two, not clearly closer to either');
+ exhibit('scaling-reading')
+ .should('contain', 'H100 → H200: 1.11× observed vs. 1.43× bandwidth and 1.00× FLOPS')
+ .and(
+ 'contain',
+ 'H200 → B200: 1.93× observed vs. 1.67× bandwidth and 2.28× (BF16) / 2.27× (FP8) FLOPS',
+ )
+ .and('contain', 'A bandwidth-bound workload would track the bandwidth ratio');
+ exhibit('caveats')
+ .should('contain', 'Batch-one, single-replica server')
+ .and('contain', '4 participating GPUs per video (TP2 × Ulysses 2)')
+ .and('contain', 'not node, rack or facility power')
+ .and('contain', 'n = 20 clips per cell')
+ .and('contain', 'Frozen workload 1344 × 768 · 8 s · 24 fps · 50 steps');
+ });
+ it('switches the throughput column to the allocated basis without moving the ratios', () => {
+ mount('/video', 'allocated');
+ exhibit('plateau')
+ .find('tr[data-hardware="h100"][data-concurrency="1"]')
+ .should('contain', '2.69')
+ .and('contain', '1.00×');
+ exhibit('plateau')
+ .find('tr[data-hardware="h100"][data-concurrency="4"]')
+ .should('contain', '2.68')
+ .and('contain', '4.00×');
+ exhibit('plateau-reading').should('contain', 'within 1.4% of C1');
+ });
+ it('renders Chinese copy on /zh/video', () => {
+ mount('/zh/video');
+ cy.get('[data-testid="video-evidence"]')
+ .should('contain', '算力受限(compute-bound)的证据')
+ .and('contain', '板卡功率 vs. 生效功率上限')
+ .and('contain', '客户端并发平台期')
+ .and('contain', '实测加速比 vs. 规格表比值');
+ exhibit('power-reading').should(
+ 'contain',
+ '全部 3 种实测硬件生成期间均运行在生效功率上限的 92%–97%',
+ );
+ exhibit('plateau-reading')
+ .should('contain', '偏差不超过 1.4%')
+ .and('contain', 'C2 时 1.97–2.00×、C4 时 3.94–4.00×');
+ exhibit('scaling')
+ .should('contain', '更接近 FLOPS 比值')
+ .and('contain', '介于两者之间,不明显偏向任一方');
+ exhibit('caveats')
+ .should('contain', '每条视频由 4 张 GPU 参与计算(TP2 × Ulysses 2)')
+ .and('contain', '每个 cell n = 20 条视频');
+ });
+ it('hides the plateau and scaling exhibits when only one hardware at C1 is measured', () => {
+ cy.fixture('api/video-history.json').then((page: VideoHistoryPage) => {
+ cy.mount(
+
+ p.hardwareKey === 'h200' && p.concurrency === 1,
+ )}
+ options={{ tier: 'h', basis: 'participating' }}
+ colorFor={() => 'rgb(0, 0, 0)'}
+ />
+ ,
+ );
+ });
+ exhibit('power').find('[data-testid="video-evidence-power-row"]').should('have.length', 1);
+ exhibit('power-reading').should('contain', 'H200 ran at 97% of its enforced power limit');
+ exhibit('plateau').should('not.exist');
+ exhibit('scaling').should('not.exist');
+ exhibit('caveats').should('contain', '4 participating GPUs per video (TP2 × Ulysses 2)');
+ });
+ it('renders nothing when no cell is measured', () => {
+ cy.mount(
+
+ 'rgb(0, 0, 0)'}
+ />
+ ,
+ );
+ cy.get('[data-testid="video-evidence"]').should('not.exist');
+ });
+});
From 4e7f2c5e1f1c0e06a25a1419889ecdf777446989 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:51:18 -0700
Subject: [PATCH 077/104] =?UTF-8?q?fix:=20bound=20the=20power=20meter=20AR?=
=?UTF-8?q?IA=20value=20to=20its=20declared=200=E2=80=93100=20range?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The fill width was clamped to 100% but aria-valuenow was not, so a mean
board power above the recorded enforced limit emitted a range-widget value
outside aria-valuemax. One meterPercent helper in evidence.ts now drives
both the fill and the ARIA value at 0.1% resolution; the label beside the
meter keeps the measured share. Regression: an over-cap H200 C1 cell in the
component spec fails on the old markup ('102' vs '100') and passes now.
中文:将功率仪表的 ARIA 值限制在其声明的 0–100 范围内。此前填充宽度已截断到
100%,但 aria-valuenow 未截断,板卡平均功率超过记录的生效上限时会输出超出
aria-valuemax 的值。现由 evidence.ts 中的 meterPercent 统一驱动填充与 ARIA 值,
标签仍显示实测比例;新增超上限 H200 C1 cell 的单元测试与组件回归用例。
---
.../cypress/component/video-evidence.cy.tsx | 31 +++++++++++++++++--
.../video-benchmark/VideoEvidence.tsx | 5 +--
.../video-benchmark/evidence.test.ts | 11 +++++++
.../components/video-benchmark/evidence.ts | 10 ++++++
4 files changed, 52 insertions(+), 5 deletions(-)
diff --git a/packages/app/cypress/component/video-evidence.cy.tsx b/packages/app/cypress/component/video-evidence.cy.tsx
index 00792f0f8..c21d7d287 100644
--- a/packages/app/cypress/component/video-evidence.cy.tsx
+++ b/packages/app/cypress/component/video-evidence.cy.tsx
@@ -1,16 +1,20 @@
import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
import type { VideoHistoryPage } from '@/components/video-benchmark/history';
-import type { GpuBasis } from '@/components/video-benchmark/metrics';
+import type { GpuBasis, VideoPoint } from '@/components/video-benchmark/metrics';
import { videoPoints } from '@/components/video-benchmark/points';
import VideoEvidence from '@/components/video-benchmark/VideoEvidence';
// Retained H100/H200/B200 C1/C2/C4 observations (cypress/fixtures/api/video-history.json).
-function mount(pathname = '/video', basis: GpuBasis = 'participating') {
+function mount(
+ pathname = '/video',
+ basis: GpuBasis = 'participating',
+ select = (points: VideoPoint[]) => points,
+) {
cy.fixture('api/video-history.json').then((page: VideoHistoryPage) => {
cy.mount(
(key === 'b200' ? 'rgb(1, 2, 3)' : 'rgb(4, 5, 6)')}
/>
@@ -44,6 +48,27 @@ describe('Video compute-bound evidence (retained fixture)', () => {
'All 3 measured GPU types ran at 92–97% of their enforced power limit',
);
});
+ it('bounds the power meter to its declared range when mean power exceeds the recorded limit', () => {
+ // 2,856 W against the recorded 2,800 W limit: the label keeps the measured 102.0%,
+ // the meter reports and fills its 0–100 range.
+ mount('/video', 'participating', (points) =>
+ points
+ .filter((p) => p.hardwareKey === 'h200' && p.concurrency === 1)
+ .map((p) => ({ ...p, avgPowerW: 2856 })),
+ );
+ exhibit('power')
+ .find('[data-hardware="h200"]')
+ .should('contain', '2,856 W / 2,800 W')
+ .and('contain', '102.0%');
+ exhibit('power')
+ .find('[data-hardware="h200"] [role="meter"]')
+ .should('have.attr', 'aria-valuemax', '100')
+ .and('have.attr', 'aria-valuenow', '100')
+ .find('div')
+ .invoke('attr', 'style')
+ .should('match', /width:\s*100%/u);
+ exhibit('power-reading').should('contain', 'H200 ran at 102% of its enforced power limit');
+ });
it('tabulates the concurrency plateau with ratios against each hardware C1 cell', () => {
mount();
exhibit('plateau').find('tbody tr').should('have.length', 9);
diff --git a/packages/app/src/components/video-benchmark/VideoEvidence.tsx b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
index cf98e1410..63dbc4036 100644
--- a/packages/app/src/components/video-benchmark/VideoEvidence.tsx
+++ b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
@@ -7,6 +7,7 @@ import { useLocale } from '@/lib/use-locale';
import {
concurrencyPlateau,
evidenceFacts,
+ meterPercent,
plateauSummary,
powerRange,
powerUtilization,
@@ -346,13 +347,13 @@ export default function VideoEvidence({ points, options, colorFor }: VideoEviden
aria-label={`${hardwareLabel(row.hardwareKey)} ${s.meter}`}
aria-valuemin={0}
aria-valuemax={100}
- aria-valuenow={Math.round(row.percentOfCap * 10) / 10}
+ aria-valuenow={meterPercent(row.percentOfCap)}
className="h-2 w-full overflow-hidden rounded-full bg-muted"
>
diff --git a/packages/app/src/components/video-benchmark/evidence.test.ts b/packages/app/src/components/video-benchmark/evidence.test.ts
index 6002cc694..d28e425b3 100644
--- a/packages/app/src/components/video-benchmark/evidence.test.ts
+++ b/packages/app/src/components/video-benchmark/evidence.test.ts
@@ -3,6 +3,7 @@ import fixture from '../../../cypress/fixtures/api/video-history.json';
import {
concurrencyPlateau,
evidenceFacts,
+ meterPercent,
parseBandwidthTbps,
plateauSummary,
powerRange,
@@ -61,6 +62,16 @@ describe('powerUtilization', () => {
expect(powerUtilization([{ ...cell('h100', 1), avgPowerW: 0 }])[0].percentOfCap).toBeNull();
expect(powerUtilization(points.filter((p) => p.concurrency !== 1))).toEqual([]);
});
+ it('keeps an over-cap share as measured while the meter position stays within 0–100', () => {
+ const [over] = powerUtilization([{ ...cell('h200', 1), avgPowerW: 2856 }]);
+ expect(over.enforcedLimitW).toBe(2800);
+ expect(over.percentOfCap).toBeCloseTo(102, 6);
+ expect(meterPercent(102)).toBe(100);
+ expect(meterPercent(100.04)).toBe(100);
+ expect(meterPercent(97.41)).toBe(97.4);
+ expect(meterPercent(91.948)).toBe(91.9);
+ expect(meterPercent(0)).toBe(0);
+ });
});
describe('concurrencyPlateau', () => {
diff --git a/packages/app/src/components/video-benchmark/evidence.ts b/packages/app/src/components/video-benchmark/evidence.ts
index 8af5283be..c9784eb90 100644
--- a/packages/app/src/components/video-benchmark/evidence.ts
+++ b/packages/app/src/components/video-benchmark/evidence.ts
@@ -69,6 +69,16 @@ export function powerRange(rows: PowerUtilizationRow[]): PowerRange | null {
return { measured: values.length, min: Math.min(...values), max: Math.max(...values) };
}
+/**
+ * Meter position for a share of the enforced limit. The label beside the meter
+ * keeps the measured share, which can exceed 100 % when the mean-power window
+ * and the limit recorded around the run skew; the widget declares 0–100, so its
+ * fill and ARIA value stay inside that range at 0.1 % resolution.
+ */
+export function meterPercent(percentOfCap: number): number {
+ return Math.min(100, Math.max(0, Math.round(percentOfCap * 10) / 10));
+}
+
export interface ConcurrencyPlateauRow {
hardwareKey: string;
concurrency: number;
From f8b492fd38f5014c12113af03d9f812c220785a1 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 20:51:51 -0700
Subject: [PATCH 078/104] docs: note VideoEvidence reads only the basis from
its metric options
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The panel takes the same MetricOptions as the sibling panels so the
dashboard can pass one object, but nothing in it is priced, so the cost
tier is never read. Say so on the prop instead of leaving it implicit.
中文:说明 VideoEvidence 只读取 metric options 中的 basis。该面板与同级面板共用同一
MetricOptions 类型以便仪表板统一传参,但其中没有任何计价指标,因此不会读取
成本 tier;在 prop 上明确写出,而不是留作隐含约定。
---
packages/app/src/components/video-benchmark/VideoEvidence.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/app/src/components/video-benchmark/VideoEvidence.tsx b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
index 63dbc4036..828806b72 100644
--- a/packages/app/src/components/video-benchmark/VideoEvidence.tsx
+++ b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
@@ -197,6 +197,7 @@ const CELL = 'border-t border-border/40 py-1.5 pr-3';
export interface VideoEvidenceProps {
points: VideoPoint[];
+ /** Shared with the sibling panels; only `basis` is read, since nothing here is priced. */
options: MetricOptions;
colorFor: (hardwareKey: string) => string;
}
From e6308e44d81d01b07369982562ebbe505665f5fc Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 21:07:09 -0700
Subject: [PATCH 079/104] refactor: pick compare and evidence cells by
deployment layout
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Compare offers one cell per hardware, its most efficient non-queued deployment,
and the evidence exhibits read every hardware on the layout most of them share
(sharedLayoutCells) so power, plateau and spec-scaling compare like with like
once the GPUs-per-video sweep adds layouts. Queued cells never qualify; a
hardware with no non-queued cell keeps its plateau rows with null ratios.
中文:Compare 每种硬件只提供一个 cell(最高效的非排队部署);证据面板改为读取各硬件
共有的部署布局(sharedLayoutCells),这样 GPUs-per-video 扫描加入新布局后,功耗、
排队平台与规格缩放仍是同类比较。排队 cell 不参与;没有非排队 cell 的硬件保留其
平台行,比值为 null。
---
.../src/components/video-benchmark/compare.ts | 15 ++++--
.../video-benchmark/deployment.test.ts | 26 +++++++++-
.../components/video-benchmark/deployment.ts | 26 ++++++++++
.../components/video-benchmark/evidence.ts | 50 ++++++++++---------
4 files changed, 88 insertions(+), 29 deletions(-)
diff --git a/packages/app/src/components/video-benchmark/compare.ts b/packages/app/src/components/video-benchmark/compare.ts
index cd6d83d54..753e5491d 100644
--- a/packages/app/src/components/video-benchmark/compare.ts
+++ b/packages/app/src/components/video-benchmark/compare.ts
@@ -6,6 +6,7 @@ import {
type MetricOptions,
type VideoPoint,
} from './metrics';
+import { leadCell } from './deployment';
import { latestVideoCells } from './points';
import { servingCells, type ServingCell } from './serving';
import { storedBundle, type StoredArtifact, type StoredSource } from './stored';
@@ -34,11 +35,17 @@ export interface CompareRow {
candidateBetter: boolean | null;
}
-/** Measured C1 cells a reader can pick for comparison: registry hardware with a P50 (newest per hardware). */
+/**
+ * One cell a reader can pick per registry hardware: its most efficient
+ * non-queued deployment (chip basis) with a P50. Queued cells never qualify.
+ */
export function comparablePoints(points: VideoPoint[]): VideoPoint[] {
- return latestVideoCells(points).filter(
- (p) => p.concurrency === 1 && p.hardwareKey !== null && p.p50 !== null,
- );
+ const cells = latestVideoCells(points);
+ const keys = [...new Set(cells.flatMap((p) => (p.hardwareKey === null ? [] : [p.hardwareKey])))];
+ return keys.flatMap((key) => {
+ const lead = leadCell(cells, key, { tier: 'h', basis: 'participating' });
+ return lead && lead.p50 !== null ? [lead] : [];
+ });
}
/** Side-by-side deltas; every null input stays null (never 0). */
diff --git a/packages/app/src/components/video-benchmark/deployment.test.ts b/packages/app/src/components/video-benchmark/deployment.test.ts
index 37f3586d8..726f41fb7 100644
--- a/packages/app/src/components/video-benchmark/deployment.test.ts
+++ b/packages/app/src/components/video-benchmark/deployment.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest';
-import { deploymentKey, isQueueing, layoutLabel, leadCell } from './deployment';
+import { deploymentKey, isQueueing, layoutLabel, leadCell, sharedLayoutCells } from './deployment';
import type { VideoPoint } from './metrics';
const base: VideoPoint = {
@@ -60,6 +60,30 @@ describe('deployment', () => {
expect(layoutLabel({ ...base, server: null }, 'en')).toBe('4 GPU');
expect(layoutLabel({ ...base, participating: null, server: null }, 'en')).toBe('—');
});
+ it('picks the layout most hardware share, falling back to the lead cell', () => {
+ const b200Eight = {
+ ...base,
+ id: 'b8',
+ hardwareKey: 'b200',
+ participating: 8,
+ server: { tp: 4, ulysses: 2, attention: null },
+ wallSeconds: 900,
+ };
+ const b200Four = { ...base, id: 'b4', hardwareKey: 'b200', wallSeconds: 1500 };
+ const h100Two = {
+ ...base,
+ id: 'h2',
+ hardwareKey: 'h100',
+ participating: 2,
+ server: { tp: 2, ulysses: 1, attention: null },
+ };
+ const queued = { ...base, id: 'q', concurrency: 2 };
+ // 4g:tp2:u2 is shared by h200 and b200; h100 only has a 2-GPU cell and keeps it.
+ expect(
+ sharedLayoutCells([base, queued, b200Eight, b200Four, h100Two]).map((p) => p.id),
+ ).toEqual(['a', 'b4', 'h2']);
+ expect(sharedLayoutCells([])).toEqual([]);
+ });
it('leads with the most efficient non-queued deployment of the hardware', () => {
const eightBoards = {
...base,
diff --git a/packages/app/src/components/video-benchmark/deployment.ts b/packages/app/src/components/video-benchmark/deployment.ts
index 9aa17b6e9..02ffbca0e 100644
--- a/packages/app/src/components/video-benchmark/deployment.ts
+++ b/packages/app/src/components/video-benchmark/deployment.ts
@@ -36,6 +36,32 @@ export function layoutLabel(p: Layout, locale: 'en' | 'zh'): string {
return parts.length > 0 ? parts.join(' · ') : '—';
}
+/**
+ * One non-queued cell per hardware on the deployment layout that the most
+ * hardware share (ties keep the first layout in cell order), so cross-hardware
+ * evidence compares like with like. A hardware without that layout falls back
+ * to its lead cell. Cells arrive in hardware order and stay in it.
+ */
+export function sharedLayoutCells(cells: T[]): T[] {
+ const deployments = cells.filter((p) => p.hardwareKey !== null && !isQueueing(p));
+ const hardwareByLayout = new Map>();
+ for (const p of deployments) {
+ const set = hardwareByLayout.get(deploymentKey(p)) ?? new Set();
+ set.add(p.hardwareKey!);
+ hardwareByLayout.set(deploymentKey(p), set);
+ }
+ let shared: string | null = null;
+ for (const [key, set] of hardwareByLayout)
+ if (shared === null || set.size > hardwareByLayout.get(shared)!.size) shared = key;
+ const keys = [...new Set(deployments.map((p) => p.hardwareKey!))];
+ return keys.flatMap((hardwareKey) => {
+ const cell =
+ deployments.find((p) => p.hardwareKey === hardwareKey && deploymentKey(p) === shared) ??
+ leadCell(deployments, hardwareKey, { tier: 'h', basis: 'participating' });
+ return cell ? [cell as T] : [];
+ });
+}
+
/**
* The cell that stands for a hardware in cards and comparisons: its most
* efficient deployment under the current GPU basis (highest videos per
diff --git a/packages/app/src/components/video-benchmark/evidence.ts b/packages/app/src/components/video-benchmark/evidence.ts
index c9784eb90..57bcaa545 100644
--- a/packages/app/src/components/video-benchmark/evidence.ts
+++ b/packages/app/src/components/video-benchmark/evidence.ts
@@ -1,4 +1,5 @@
import { GPU_SPECS } from '@/lib/gpu-specs';
+import { deploymentKey, sharedLayoutCells } from './deployment';
import { hardwareSort } from './hardware';
import { metricValue, type GpuBasis, type MetricOptions, type VideoPoint } from './metrics';
import { latestVideoCells } from './points';
@@ -43,16 +44,14 @@ export interface PowerUtilizationRow {
percentOfCap: number | null;
}
-/** One row per measured hardware at C1. */
+/** One row per measured hardware, on the deployment layout the hardware share. */
export function powerUtilization(points: VideoPoint[]): PowerUtilizationRow[] {
- return measuredCells(points)
- .filter((p) => p.concurrency === 1)
- .map((p) => ({
- hardwareKey: p.hardwareKey,
- avgPowerW: positive(p.avgPowerW) ? p.avgPowerW : null,
- enforcedLimitW: positive(p.enforcedLimitW) ? p.enforcedLimitW : null,
- percentOfCap: metricValue(p, 'powerPctCap', metricOptions('participating')),
- }));
+ return sharedLayoutCells(measuredCells(points)).map((p) => ({
+ hardwareKey: p.hardwareKey,
+ avgPowerW: positive(p.avgPowerW) ? p.avgPowerW : null,
+ enforcedLimitW: positive(p.enforcedLimitW) ? p.enforcedLimitW : null,
+ percentOfCap: metricValue(p, 'powerPctCap', metricOptions('participating')),
+ }));
}
export interface PowerRange {
@@ -100,11 +99,16 @@ export function concurrencyPlateau(
points: VideoPoint[],
basis: GpuBasis = 'participating',
): ConcurrencyPlateauRow[] {
- const cells = measuredCells(points);
const options = metricOptions(basis);
const baseline = new Map(
- cells.filter((p) => p.concurrency === 1).map((p) => [p.hardwareKey, p] as const),
+ sharedLayoutCells(measuredCells(points)).map((p) => [p.hardwareKey, p] as const),
);
+ // Only cells of the baseline's own layout are concurrency steps of that deployment;
+ // a hardware with no non-queued cell keeps its rows with null ratios.
+ const cells = measuredCells(points).filter((p) => {
+ const base = baseline.get(p.hardwareKey);
+ return base === undefined || deploymentKey(p) === deploymentKey(base);
+ });
return cells.map((p) => {
const base = baseline.get(p.hardwareKey);
const videosPerGpuHour = metricValue(p, 'videosPerGpuHour', options);
@@ -204,13 +208,12 @@ export interface ScalingVsSpecRow {
}
type TimedPoint = MeasuredPoint & { p50: number };
-const isTimedBaseline = (p: MeasuredPoint): p is TimedPoint =>
- p.concurrency === 1 && positive(p.p50);
+const isTimed = (p: MeasuredPoint): p is TimedPoint => positive(p.p50);
-/** Consecutive measured hardware from slowest to fastest C1 P50, each step against its spec ratios. */
+/** Consecutive measured hardware from slowest to fastest P50 on the shared layout, each step against its spec ratios. */
export function scalingVsSpec(points: VideoPoint[]): ScalingVsSpecRow[] {
- const ordered = measuredCells(points)
- .filter(isTimedBaseline)
+ const ordered = sharedLayoutCells(measuredCells(points))
+ .filter(isTimed)
.toSorted((a, b) => b.p50 - a.p50);
return ordered.slice(1).map((to, index) => {
const from = ordered[index];
@@ -283,16 +286,15 @@ function uniform(values: (T | null)[]): T | null {
/** Caveat inputs read from the cells so the panel never states a number the data does not carry. */
export function evidenceFacts(points: VideoPoint[]): EvidenceFacts {
const cells = measuredCells(points);
+ const shared = sharedLayoutCells(cells);
const samples = cells.map((p) => p.samples).filter(positive);
- const attention = cells
- .filter((p) => p.concurrency === 1)
- .flatMap((p) =>
- p.server?.attention ? [{ hardwareKey: p.hardwareKey, attention: p.server.attention }] : [],
- );
+ const attention = shared.flatMap((p) =>
+ p.server?.attention ? [{ hardwareKey: p.hardwareKey, attention: p.server.attention }] : [],
+ );
return {
- participating: uniform(cells.map((p) => (positive(p.participating) ? p.participating : null))),
- tp: uniform(cells.map((p) => (positive(p.server?.tp) ? p.server.tp : null))),
- ulysses: uniform(cells.map((p) => (positive(p.server?.ulysses) ? p.server.ulysses : null))),
+ participating: uniform(shared.map((p) => (positive(p.participating) ? p.participating : null))),
+ tp: uniform(shared.map((p) => (positive(p.server?.tp) ? p.server.tp : null))),
+ ulysses: uniform(shared.map((p) => (positive(p.server?.ulysses) ? p.server.ulysses : null))),
samples: samples.length > 0 ? { min: Math.min(...samples), max: Math.max(...samples) } : null,
workload: uniform(cells.map((p) => p.workload.split(' · ').slice(0, 4).join(' · ') || null)),
attention: uniform(attention.map((entry) => entry.attention)) === null ? attention : [],
From 85f5220c1641bcb25a27ee1825aa6b6e156085f0 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 21:07:18 -0700
Subject: [PATCH 080/104] feat: wire the API reference, Compare and Evidence
panels into the video dashboard
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Metric options now come from the URL state (tier, GPU basis and the editable
API price), the subtitle states the dated API reference, the CSV export carries
the four API-priced metrics and the price assumption, and the Compare and
compute-bound Evidence panels mount under the KPI cards once results have
loaded. The loading-placeholder component test resets the URL it inherits
from the previous test.
中文:指标选项统一来自 URL 状态(成本档位、GPU 口径、可编辑的 API 参考价),副标题
给出带日期的 API 参考价,CSV 导出加入四个按 API 标价计算的指标及价格假设;结果加载
完成后在 KPI 卡下方挂载 Compare 与 compute-bound 证据面板。加载态组件测试会重置
上一个测试留下的 URL。
---
.../cypress/component/video-dashboard.cy.tsx | 2 ++
.../video-benchmark/VideoDashboard.tsx | 24 ++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index 9a2a1d6c1..d5e940ffe 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -169,6 +169,8 @@ describe('Video hardware dashboard (retained fixture)', () => {
req.reply({ fixture: 'api/video-history.json', delay: 800 });
}).as('slowHistory');
cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null });
+ // The AUT keeps the previous test's v_ params; start from the defaults.
+ cy.window().then((win) => win.history.replaceState(null, '', win.location.pathname));
cy.mount(
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index e3bacacb1..b83d40374 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -24,14 +24,18 @@ import {
type VideoPoint,
} from './metrics';
import { latestVideoCells } from './points';
+import { formatApiPrice, H3_API_REFERENCE } from './api-reference';
import { useVideoPoints } from './use-video-points';
import VideoCIRuns from './VideoCIRuns';
+import VideoCompare from './VideoCompare';
import VideoConfigBar from './VideoConfigBar';
+import VideoEvidence from './VideoEvidence';
import VideoHardwareChart, { VIDEO_CHART_ID } from './VideoHardwareChart';
import VideoKpiCards from './VideoKpiCards';
import VideoPointsTable, { videoTableRows } from './VideoPointsTable';
import {
DEFAULT_VIDEO_DASHBOARD_STATE,
+ metricOptions,
readVideoDashboardState,
writeVideoDashboardState,
type VideoDashboardState,
@@ -61,6 +65,10 @@ const CSV_METRICS: readonly MetricId[] = [
'kjPerVideo',
'videosPerKwh',
'powerPctCap',
+ 'apiPricePerVideo',
+ 'revenuePerGpuHour',
+ 'profitPerGpuHour',
+ 'apiPriceMultiple',
];
const STRINGS = {
@@ -74,6 +82,7 @@ const STRINGS = {
tier: 'Cost tier',
badges: 'TCO $/chip/hr',
source: 'Source',
+ apiReference: 'API reference',
queue: 'Show queued requests (C2/C4)',
optimal: 'Optimal only',
frontier: 'Pareto frontier',
@@ -99,6 +108,7 @@ const STRINGS = {
tier: '成本档位',
badges: 'TCO $/chip/hr',
source: '来源',
+ apiReference: 'API 参考价',
queue: '显示排队请求(C2/C4)',
optimal: '仅最优',
frontier: 'Pareto 前沿',
@@ -163,7 +173,7 @@ export default function VideoDashboard() {
[mounted, resolveColor, getCssColor],
);
- const options = { tier: state.tier, basis: state.basis };
+ const options = metricOptions(state);
const cells = useMemo(() => latestVideoCells(points), [points]);
// Each hardware is represented by its most efficient measured deployment.
const measured = useMemo(
@@ -224,6 +234,7 @@ export default function VideoDashboard() {
'scheduled',
'participating_gpus',
'allocated_gpus',
+ 'api_price_usd_per_video_second',
'tp_size',
'ulysses_degree',
'replicas',
@@ -242,6 +253,7 @@ export default function VideoDashboard() {
p.scheduled,
p.participating,
p.allocated,
+ state.apiPrice,
p.server?.tp ?? null,
p.server?.ulysses ?? null,
p.replicas,
@@ -330,6 +342,10 @@ export default function VideoDashboard() {
))}
+
+ {s.apiReference}: {formatApiPrice(state.apiPrice)}/video-s (
+ {H3_API_REFERENCE.capturedOn})
+
{s.source}:{' '}
+ {!loading && !error && (
+ <>
+
+
+ >
+ )}
Date: Sat, 19 Sep 2026 21:08:26 -0700
Subject: [PATCH 081/104] docs: describe the API reference, Compare and
Evidence sections of the video dashboard
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:在 /video 设计文档中补充 API 参考价、Compare 与 compute-bound 证据三个区块的说明。
---
docs/videogenx-dashboard.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
index 0bce20b01..7a7813e6a 100644
--- a/docs/videogenx-dashboard.md
+++ b/docs/videogenx-dashboard.md
@@ -24,6 +24,12 @@ The knob that does trade latency for efficiency is the **deployment**: how many
Today every hardware has exactly one measured deployment (4 GPUs per video, TP2 × Ulysses 2), so the chart is an honest scatter and the caption says a per-hardware curve needs the GPUs-per-video sweep. That sweep (design plan P6) is backend work in InferenceX `experimental/video-generation` — the serving matrix currently varies only concurrency — and needs GPU authorisation; the frontend needs no change when its cells arrive, because they differ in `deploymentKey` and therefore add points rather than replace them.
+## Sections below the chart
+
+- **API price reference** (`api-reference.ts`, `VideoApiReference.tsx`): a dated, editable USD per video-second list price (`v_api`, default `H3_API_REFERENCE`) feeds the API-priced metrics in `metrics.ts` — API $/video, revenue and profit per GPU-hour, API price ÷ TCO multiple. It is a web-search reference, labelled with its capture date and range, never presented as an official quote; a null or non-positive price nulls every derived metric. The chart's y axis is zero-anchored (`chart-domain.ts`) so negative profit stays visible and an all-negative view tops out at break-even.
+- **Compare** (`compare.ts`, `compare-url-state.ts`, `VideoCompare.tsx`): arena-style baseline vs. candidate — one selectable cell per hardware (its lead deployment), metric deltas by registry polarity, and the same prompt + seed clips loaded on demand from the published artifacts (`v_base`, `v_cand`, `v_case`).
+- **Compute-bound evidence** (`evidence.ts`, `VideoEvidence.tsx`): board power against the recorded enforced limit, the concurrency plateau (throughput flat, latency × C), and observed speed-ups against memory-bandwidth and FLOPS spec ratios. Every hardware is read on the deployment layout most of them share (`sharedLayoutCells`) so the exhibits compare like with like; sentences stay conditional when ratios do not separate.
+
## Rules
- **Unavailable hardware** stays visible. `VIDEO_HARDWARE_ROSTER` in `hardware.ts` lists the campaign targets; MI355X has no valid run and renders as a muted legend row, a "Not measured" KPI card with the failed-run link, and no table row. A missing point is never a zero.
@@ -37,3 +43,5 @@ Today every hardware has exactly one measured deployment (4 GPUs per video, TP2
`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;原有的运行/视频/历史视图收进可展开的“运行、视频与证据”区块,`?run=`、`?view=`、`?compare=` 和 `history-*` 深链接会自动展开该区块。默认 X 为 P90 出片时间、Y 为每 1 美元 TCO 视频数(Hyperscaler 自有设备档位,单价与 `/inference` 同源)。
曲线来自部署而不是并发:pinned H3 服务是 batch-one、单副本,客户端并发只会排队(保留数据中 C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 线性增长),把这些点连起来画出的只是队列,因此图表绝不连接它们。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表;`plot.ts` 按硬件对部署点求 Pareto 前沿,达到两个及以上前沿点时才画实线,被支配的部署以淡色显示,“仅最优”可将其隐藏;排队点需手动开启,只画小号淡色标记、不连线;“Pareto 前沿”开关叠加跨硬件虚线。目前每种硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。参与/已分配 GPU 口径一键切换;MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
+
+图表下方还有三个区块:带日期、可编辑的 API 参考价(`v_api`,来自网页搜索,标注采集日期与区间,不是官方报价)驱动 API 标价 / 条视频、每 GPU 小时收入与利润、API 标价 ÷ TCO 倍数等指标,价格无效时全部为 null,y 轴锚定 0 以便显示负利润;arena 式 Compare 按硬件选基线与候选(各取代表部署),给出按指标极性判定的差值,并按需加载同一 prompt 与 seed 的视频;compute-bound 证据面板展示板卡功率相对生效上限、并发排队平台以及相对带宽/FLOPS 规格比的实测加速比,所有硬件都读取它们共有的部署布局,比值无法区分时措辞保持保守。
From c4200d33445fb11f2b8d3d8e00d80fdc13d5e37d Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 21:11:00 -0700
Subject: [PATCH 082/104] fix: keep the API price legible and describe Compare
cells as lead deployments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The number input shrank to one digit beside its Reset button inside the
four-column benchmark panel; it now keeps a minimum width and the pair wraps
instead of clipping. The Compare intro no longer calls its cells "measured C1
cells": each hardware is compared on its most efficient measured deployment.
中文:API 参考价的数字输入框在四列基准配置面板中被 Reset 按钮挤到只剩一位数字,现在保留
最小宽度并在必要时换行。Compare 说明不再写“已实测的 C1 单元”,改为各硬件最高效的实测部署。
---
.../src/components/video-benchmark/VideoApiReference.tsx | 5 +++--
.../app/src/components/video-benchmark/VideoCompare.tsx | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/packages/app/src/components/video-benchmark/VideoApiReference.tsx b/packages/app/src/components/video-benchmark/VideoApiReference.tsx
index b128f84ba..72ec1f76b 100644
--- a/packages/app/src/components/video-benchmark/VideoApiReference.tsx
+++ b/packages/app/src/components/video-benchmark/VideoApiReference.tsx
@@ -70,7 +70,7 @@ export default function VideoApiReference({
{s.label}
-
+
{
valueAtFocus.current = value;
}}
@@ -102,6 +102,7 @@ export default function VideoApiReference({
variant="outline"
title={s.resetTitle}
data-testid="video-api-price-reset"
+ className="shrink-0"
onClick={() => {
setRaw(String(reference));
commit(reference, true);
diff --git a/packages/app/src/components/video-benchmark/VideoCompare.tsx b/packages/app/src/components/video-benchmark/VideoCompare.tsx
index fd77596e2..72a0fa575 100644
--- a/packages/app/src/components/video-benchmark/VideoCompare.tsx
+++ b/packages/app/src/components/video-benchmark/VideoCompare.tsx
@@ -37,7 +37,7 @@ const STRINGS = {
en: {
title: 'Compare',
subtitle:
- 'Pick a baseline and a candidate hardware (measured C1 cells): metric deltas side by side, then the same generated case from both runs.',
+ 'Pick a baseline and a candidate hardware (each on its most efficient measured deployment): metric deltas side by side, then the same generated case from both runs.',
baseline: 'Baseline',
candidate: 'Candidate',
needTwo: 'Comparison needs at least two measured hardware.',
@@ -67,7 +67,7 @@ const STRINGS = {
zh: {
title: '对比',
subtitle:
- '选择基线与候选硬件(已实测的 C1 单元):并排查看指标差异,再对照两次运行中同一 prompt 与 seed 生成的视频。',
+ '选择基线与候选硬件(各取其实测中最高效的部署):并排查看指标差异,再对照两次运行中同一 prompt 与 seed 生成的视频。',
baseline: '基线',
candidate: '候选',
needTwo: '至少需要两种已实测的硬件才能对比。',
@@ -149,7 +149,7 @@ function DeltaChip({ row, s }: { row: CompareRow; s: Strings }) {
}
/**
- * Arena-style baseline vs candidate: measured C1 metric deltas, then the
+ * Arena-style baseline vs candidate: metric deltas between each hardware's lead deployment, then the
* retained clips of the same prompt and seed from both CI runs. Media is fetched
* only on request, one stored artifact per side.
*/
From e39312e1dcfa1ae2501ffdefa53e9542d4cbd8c6 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 21:14:24 -0700
Subject: [PATCH 083/104] fix: polish the Chinese copy of the video dashboard
panels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Apply the advisory review-zh-copy findings on the API reference, Compare and
Evidence panels: one name for the cost tier, the API reference label uses the
same /video-s unit as its caption, ratio headers read as multiples of C1, the
P90 caveat says what the display threshold means, "recipe" becomes 实测配置,
and the chart tooltip uses full-width punctuation in Chinese.
中文:按 review-zh-copy 的建议修订 API 参考价、Compare 与证据面板的中文:成本档位统一命名,
API 参考价标签与下方说明同用 /video-s 单位,比值表头改为“相对 C1”,P90 注释说明显示门槛的
含义,“配方”改为“实测配置”,图表 tooltip 在中文下使用全角标点。
---
.../app/cypress/component/video-api-reference.cy.tsx | 4 ++--
packages/app/cypress/component/video-dashboard.cy.tsx | 2 +-
.../components/video-benchmark/VideoApiReference.tsx | 7 ++++---
.../src/components/video-benchmark/VideoCompare.tsx | 4 ++--
.../src/components/video-benchmark/VideoEvidence.tsx | 10 +++++-----
.../components/video-benchmark/VideoHardwareChart.tsx | 6 ++++--
.../src/components/video-benchmark/api-reference.ts | 2 +-
7 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/packages/app/cypress/component/video-api-reference.cy.tsx b/packages/app/cypress/component/video-api-reference.cy.tsx
index 958303597..dac99d7a3 100644
--- a/packages/app/cypress/component/video-api-reference.cy.tsx
+++ b/packages/app/cypress/component/video-api-reference.cy.tsx
@@ -66,13 +66,13 @@ describe('VideoApiReference', () => {
});
it('renders Chinese copy under /zh', () => {
cy.mount( );
- cy.contains('label', 'API 价格参考($/视频秒)').should('exist');
+ cy.contains('label', 'API 参考价($/video-s)').should('exist');
cy.contains('button', '重置').should('exist');
caption()
.should('contain', '参考值 $0.034/video-s')
.and('contain', '标价区间 $0.034–$0.047')
.and('contain', '采集于 2026-09-19')
.and('contain', '来源:MiniMax Design · H3 768p 订阅档')
- .and('contain', '为标价而非实际收入');
+ .and('contain', '此处为 API 标价,而非实际收入');
});
});
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index d5e940ffe..28fa4e182 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -193,7 +193,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
kpi('h200').should('contain', 'API 标价 / 条视频').and('contain', '利润 / GPU 小时');
cy.get('[data-testid="video-config-bar"]')
.should('contain', '成本档位')
- .and('contain', 'API 价格参考($/视频秒)')
+ .and('contain', 'API 参考价($/video-s)')
.and('contain', '采集于 2026-09-19');
});
});
diff --git a/packages/app/src/components/video-benchmark/VideoApiReference.tsx b/packages/app/src/components/video-benchmark/VideoApiReference.tsx
index 72ec1f76b..b4441a12f 100644
--- a/packages/app/src/components/video-benchmark/VideoApiReference.tsx
+++ b/packages/app/src/components/video-benchmark/VideoApiReference.tsx
@@ -21,14 +21,15 @@ const STRINGS = {
'List price, not realized revenue; self-hosted TCO excludes utilization, CPU, storage and network.',
},
zh: {
- label: 'API 价格参考($/视频秒)',
+ label: 'API 参考价($/video-s)',
reset: '重置',
- resetTitle: '恢复为带日期的参考价格',
+ resetTitle: '恢复为标注采集日期的参考价',
reference: '参考值',
range: '标价区间',
captured: '采集于',
source: '来源:',
- disclaimer: '为标价而非实际收入;自托管 TCO 不含利用率、CPU、存储与网络成本。',
+ disclaimer:
+ '此处为 API 标价,而非实际收入;自托管 TCO 未计入利用率,也不含 CPU、存储与网络成本。',
},
};
diff --git a/packages/app/src/components/video-benchmark/VideoCompare.tsx b/packages/app/src/components/video-benchmark/VideoCompare.tsx
index 72a0fa575..bac93a70f 100644
--- a/packages/app/src/components/video-benchmark/VideoCompare.tsx
+++ b/packages/app/src/components/video-benchmark/VideoCompare.tsx
@@ -67,13 +67,13 @@ const STRINGS = {
zh: {
title: '对比',
subtitle:
- '选择基线与候选硬件(各取其实测中最高效的部署):并排查看指标差异,再对照两次运行中同一 prompt 与 seed 生成的视频。',
+ '选择基线与候选硬件(各自取实测中最高效的部署):并排查看指标差异,再对照两次运行中同一 prompt 与 seed 生成的视频。',
baseline: '基线',
candidate: '候选',
needTwo: '至少需要两种已实测的硬件才能对比。',
metric: '指标',
change: '变化',
- assumptions: (tier: string, basis: string) => `成本分档:${tier} · GPU 口径:${basis}。`,
+ assumptions: (tier: string, basis: string) => `成本档位:${tier} · GPU 口径:${basis}。`,
participating: '参与计算的 GPU',
allocated: '已分配的 GPU',
better: '候选更优',
diff --git a/packages/app/src/components/video-benchmark/VideoEvidence.tsx b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
index 828806b72..81c147061 100644
--- a/packages/app/src/components/video-benchmark/VideoEvidence.tsx
+++ b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
@@ -98,7 +98,7 @@ const STRINGS = {
'来自实测 cell 的三组读数,说明该工作负载在固定 runtime 上为何表现为算力受限的扩散模型。所有数字均由已发布运行计算得出,措辞以数字为准。',
power: '板卡功率 vs. 生效功率上限',
powerHint:
- '生成期间参与计算板卡的 GPU 板卡平均功率,对照运行前后记录到的功率上限,而非标称 TDP。',
+ '生成期间各参与计算 GPU 板卡的平均功率,对照运行前后记录到的功率上限,而非标称 TDP。',
powerOne: (hardware: string, share: string) =>
`${hardware} 生成期间运行在生效功率上限的 ${share}:接近上限,符合算力饱和型负载的表现。`,
powerAll: (n: number, share: string) =>
@@ -114,8 +114,8 @@ const STRINGS = {
c: 'C',
rate: '视频数 / GPU 小时',
p50: 'P50(s)',
- throughput: '吞吐量 × C1',
- latency: '延迟 × C1',
+ throughput: '吞吐量(相对 C1)',
+ latency: '延迟(相对 C1)',
scaling: '实测加速比 vs. 规格表比值',
scalingHint:
'按 C1 P50 从慢到快排列的相邻硬件。实测值为 P50 比值;规格比值取自 GPU 规格页的单卡 HBM 带宽与 dense tensor-core TFLOPS。',
@@ -151,13 +151,13 @@ const STRINGS = {
recipe: (tp: number, ulysses: number) => `(TP${tp} × Ulysses ${ulysses})`,
caveatPower: 'GPU 板卡级功率,对照记录到的生效上限;不是节点、机柜或设施功率。',
caveatSamples: (n: string) =>
- `每个 cell n = ${n} 条视频、每种硬件一个批次:没有误差棒,P90 只是显示下限而非尾延迟 SLO。`,
+ `每个 cell n = ${n} 条视频、每种硬件一个批次:没有误差棒;P90 仅在样本数达到显示门槛时展示,不能当作尾延迟 SLO。`,
caveatSamplesUnknown: '未记录样本数。',
caveatWorkload: (workload: string) =>
`冻结的工作负载 ${workload};所有比值都是同一条视频在不同硬件上的对比。`,
caveatWorkloadUnknown: '各 cell 的工作负载标签不一致;跨硬件比值只在同一条视频下成立。',
caveatAttention: (backends: string) =>
- `各硬件的 attention 后端不同(${backends});每个数据点都是“硬件 + 实测配方”。`,
+ `各硬件的 attention 后端不同(${backends});每个数据点都是“硬件 + 实测配置”。`,
},
};
diff --git a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
index de17f945b..07180120d 100644
--- a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
+++ b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
@@ -37,7 +37,7 @@ const STRINGS = {
},
zh: {
single: (layouts: string) =>
- `目前每种硬件只测得一种部署(${layouts}),因此每种硬件只有一个点;要得到每硬件的 Pareto 曲线,还需扫描每条视频占用的 GPU 数。`,
+ `目前每种硬件只测得一种部署(${layouts}),因此每种硬件只有一个点;要得到各硬件自己的 Pareto 曲线,还需扫描每条视频占用的 GPU 数。`,
multi:
'实线连接同一硬件的 Pareto 最优部署(每条视频占用的 GPU 数及模型切分方式);淡色点为被支配的部署。',
global: '虚线为所有部署的跨硬件 Pareto 前沿。',
@@ -89,6 +89,8 @@ export default function VideoHardwareChart({
const layouts = [
...new Set(plotted.filter((p) => !p.queued).map((p) => layoutLabel(p, locale))),
].join(locale === 'zh' ? ';' : '; ');
+ const colon = locale === 'zh' ? ':' : ': ';
+ const queuedTag = locale === 'zh' ? `(${s.queuedTag})` : ` (${s.queuedTag})`;
const pointLabel = (p: PlottedVideoPoint) => {
if (p.queued) return `C${p.concurrency}`;
return multiLayout ? `${p.label} · ${layoutLabel(p, locale)}` : p.label;
@@ -196,7 +198,7 @@ export default function VideoHardwareChart({
tooltip={{
rulerType: 'none',
content: (p) =>
- `${escapeHtml(p.label)} · C${p.concurrency ?? '?'}${p.queued ? ` (${s.queuedTag})` : ''} ${s.deployment}: ${escapeHtml(layoutLabel(p, locale))} ${escapeHtml(xLabel)}: ${formatMetric(p.x, state.x)} ${escapeHtml(yLabel)}: ${formatMetric(p.y, state.y)} ${s.n}: ${p.samples} · ${s.run} #${escapeHtml(p.runId)}
`,
+ `${escapeHtml(p.label)} · C${p.concurrency ?? '?'}${p.queued ? queuedTag : ''} ${s.deployment}${colon}${escapeHtml(layoutLabel(p, locale))} ${escapeHtml(xLabel)}${colon}${formatMetric(p.x, state.x)} ${escapeHtml(yLabel)}${colon}${formatMetric(p.y, state.y)} ${s.n}${colon}${p.samples} · ${s.run} #${escapeHtml(p.runId)}
`,
onPointClick: onSelect,
}}
zoom={{
diff --git a/packages/app/src/components/video-benchmark/api-reference.ts b/packages/app/src/components/video-benchmark/api-reference.ts
index 17d668a89..87636495f 100644
--- a/packages/app/src/components/video-benchmark/api-reference.ts
+++ b/packages/app/src/components/video-benchmark/api-reference.ts
@@ -21,7 +21,7 @@ export const H3_API_REFERENCE: ApiPriceReference = {
capturedOn: '2026-09-19',
label: {
en: 'MiniMax Design · H3 768p subscription tier (web search, not verified on the pay-as-you-go page; H3 was listed as not yet supported on the API packages page)',
- zh: 'MiniMax Design · H3 768p 订阅档(来源为网页搜索,未在按量付费页面核实;API 套餐页当时标注 H3 尚未支持)',
+ zh: 'MiniMax Design · H3 768p 订阅档(价格来自网页搜索,未在按量付费页面核实;API 套餐页当时标注 H3 尚未支持)',
},
};
From 2da595b3a521768781cbe7f9e317953eff66d985 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 19 Sep 2026 23:46:20 -0700
Subject: [PATCH 084/104] feat: make the video Compare panel an arena-style
side-by-side player
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The clips are the point of the comparison, so they lead: the same prompt and
seed from both CI runs play side by side with shared play, pause and restart,
case arrows with a full prompt card, and a blind mode that labels the sides A
and B (and hides the metric deltas) until revealed. Media loads on its own once
the panel scrolls into view instead of behind a button; a 204 side reads as
"clips not published" rather than an error. The delta table moves below the
players. Component and e2e specs stub the clip requests so they stay offline.
中文:视频才是对比的核心,因此改为视频优先:同一 prompt 与 seed 在两种硬件上的视频并排
播放,支持同步播放/暂停/重播、用例翻页与完整 prompt 卡片,“盲测模式”把两侧标为 A/B
并隐藏指标差异直到揭晓。面板滚入视口时自动加载视频,不再需要点按钮;204 视为“未发布
视频”而非错误。指标差值表移到播放器下方。组件与 e2e 测试对视频请求打桩以保持离线。
---
docs/videogenx-dashboard.md | 4 +-
.../cypress/component/video-compare.cy.tsx | 137 +++--
.../cypress/component/video-dashboard.cy.tsx | 3 +
.../app/cypress/e2e/video-dashboard.cy.ts | 4 +
.../video-benchmark/VideoCompare.tsx | 516 +++++++++++++-----
5 files changed, 488 insertions(+), 176 deletions(-)
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
index 7a7813e6a..1446fa891 100644
--- a/docs/videogenx-dashboard.md
+++ b/docs/videogenx-dashboard.md
@@ -27,7 +27,7 @@ Today every hardware has exactly one measured deployment (4 GPUs per video, TP2
## Sections below the chart
- **API price reference** (`api-reference.ts`, `VideoApiReference.tsx`): a dated, editable USD per video-second list price (`v_api`, default `H3_API_REFERENCE`) feeds the API-priced metrics in `metrics.ts` — API $/video, revenue and profit per GPU-hour, API price ÷ TCO multiple. It is a web-search reference, labelled with its capture date and range, never presented as an official quote; a null or non-positive price nulls every derived metric. The chart's y axis is zero-anchored (`chart-domain.ts`) so negative profit stays visible and an all-negative view tops out at break-even.
-- **Compare** (`compare.ts`, `compare-url-state.ts`, `VideoCompare.tsx`): arena-style baseline vs. candidate — one selectable cell per hardware (its lead deployment), metric deltas by registry polarity, and the same prompt + seed clips loaded on demand from the published artifacts (`v_base`, `v_cand`, `v_case`).
+- **Compare** (`compare.ts`, `compare-url-state.ts`, `VideoCompare.tsx`): arena-style baseline vs. candidate, video first — the same prompt + seed clips from both CI runs play side by side with shared play/pause/restart, case arrows, and a blind mode that hides which hardware is which until revealed; the metric deltas (registry polarity) sit below. One selectable cell per hardware (its lead deployment); `v_base`, `v_cand`, `v_case` in the URL. The two stored artifacts (several MB each) load once the panel scrolls into view; an HTTP 204 side reads as "clips not published", never as an error.
- **Compute-bound evidence** (`evidence.ts`, `VideoEvidence.tsx`): board power against the recorded enforced limit, the concurrency plateau (throughput flat, latency × C), and observed speed-ups against memory-bandwidth and FLOPS spec ratios. Every hardware is read on the deployment layout most of them share (`sharedLayoutCells`) so the exhibits compare like with like; sentences stay conditional when ratios do not separate.
## Rules
@@ -44,4 +44,4 @@ Today every hardware has exactly one measured deployment (4 GPUs per video, TP2
曲线来自部署而不是并发:pinned H3 服务是 batch-one、单副本,客户端并发只会排队(保留数据中 C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 线性增长),把这些点连起来画出的只是队列,因此图表绝不连接它们。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表;`plot.ts` 按硬件对部署点求 Pareto 前沿,达到两个及以上前沿点时才画实线,被支配的部署以淡色显示,“仅最优”可将其隐藏;排队点需手动开启,只画小号淡色标记、不连线;“Pareto 前沿”开关叠加跨硬件虚线。目前每种硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。参与/已分配 GPU 口径一键切换;MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
-图表下方还有三个区块:带日期、可编辑的 API 参考价(`v_api`,来自网页搜索,标注采集日期与区间,不是官方报价)驱动 API 标价 / 条视频、每 GPU 小时收入与利润、API 标价 ÷ TCO 倍数等指标,价格无效时全部为 null,y 轴锚定 0 以便显示负利润;arena 式 Compare 按硬件选基线与候选(各取代表部署),给出按指标极性判定的差值,并按需加载同一 prompt 与 seed 的视频;compute-bound 证据面板展示板卡功率相对生效上限、并发排队平台以及相对带宽/FLOPS 规格比的实测加速比,所有硬件都读取它们共有的部署布局,比值无法区分时措辞保持保守。
+图表下方还有三个区块:带日期、可编辑的 API 参考价(`v_api`,来自网页搜索,标注采集日期与区间,不是官方报价)驱动 API 标价 / 条视频、每 GPU 小时收入与利润、API 标价 ÷ TCO 倍数等指标,价格无效时全部为 null,y 轴锚定 0 以便显示负利润;arena 式 Compare 以视频为主:同一 prompt 与 seed 在两种硬件上的视频并排播放,支持同步播放/暂停/重播、用例翻页和“盲测模式”(揭晓前隐藏硬件),指标差值列在视频下方,面板滚入视口时才加载两个已发布产物;compute-bound 证据面板展示板卡功率相对生效上限、并发排队平台以及相对带宽/FLOPS 规格比的实测加速比,所有硬件都读取它们共有的部署布局,比值无法区分时措辞保持保守。
diff --git a/packages/app/cypress/component/video-compare.cy.tsx b/packages/app/cypress/component/video-compare.cy.tsx
index 884e3e33b..aad54730f 100644
--- a/packages/app/cypress/component/video-compare.cy.tsx
+++ b/packages/app/cypress/component/video-compare.cy.tsx
@@ -17,24 +17,29 @@ const COLORS: Record = {
const colorFor = (key: string) => COLORS[key] ?? 'rgb(0, 0, 0)';
const OWNING_PARTICIPATING: MetricOptions = { tier: 'h', basis: 'participating' };
+const mediaUrl = (point: VideoPoint) =>
+ `/api/video-runs?run=${point.runId}&artifact=${point.artifactId}&format=media`;
function media(point: VideoPoint, hardware: string, alias: string) {
cy.intercept(
'GET',
- `/api/video-runs?run=${point.runId}&artifact=${point.artifactId}&format=media`,
+ mediaUrl(point),
servingArtifact(Number(point.runId), point.artifactId, hardware),
).as(alias);
}
+/** Clips load on their own once the panel is in view, so overrides must be registered before mounting. */
function mount(
pathname = '/video',
search = '',
data: VideoPoint[] = points,
options: MetricOptions = OWNING_PARTICIPATING,
+ beforeMount?: () => void,
) {
media(c1('h100'), 'NVIDIA H100 80GB HBM3', 'h100');
media(c1('b200'), 'NVIDIA B200', 'b200');
media(c1('h200'), 'NVIDIA H200', 'h200');
cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
+ beforeMount?.();
cy.window().then((win) =>
win.history.replaceState(null, '', `${win.location.pathname}${search}`),
);
@@ -46,14 +51,29 @@ function mount(
}
const table = () => cy.get('[data-testid="video-compare-table"]');
const metricRow = (id: string) => table().find(`tbody tr[data-metric="${id}"]`);
+const clip = (role: 'baseline' | 'candidate') =>
+ cy.get(`[data-testid="video-compare-clip"][data-role="${role}"]`);
const pick = (label: string, option: string) => {
cy.get(`[role="combobox"][aria-label="${label}"]`).click();
cy.contains('[role="option"]', option).click();
};
describe('Video compare panel (retained fixture)', () => {
- it('defaults to the slowest hardware as baseline and the fastest as candidate', () => {
+ it('plays the same case from the slowest and fastest hardware side by side by default', () => {
mount();
+ cy.wait(['@h100', '@b200']);
+ cy.get('[data-testid="video-compare-prompt"]')
+ .should('contain', 'A drummer taps a snare drum.')
+ .and('contain', 'seed 11');
+ cy.get('[data-testid="video-compare-case-of"]').should('contain', 'Case 1 of');
+ clip('baseline')
+ .should('contain', 'H100')
+ .and('contain', '4 GPU · TP2 × Ulysses 2')
+ .and('contain', 'time to video 120 s')
+ .find('video')
+ .should('have.attr', 'src')
+ .and('include', 'measurement-r001-c001.mp4');
+ clip('candidate').should('contain', 'B200').find('video').should('exist');
cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H100');
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'B200');
metricRow('p50Latency')
@@ -66,68 +86,108 @@ describe('Video compare panel (retained fixture)', () => {
.and('contain', '$0.150')
.and('contain', '-31.1%');
metricRow('powerPctCap').find('[data-tone="better"]').should('exist');
- cy.get('[data-testid="video-compare"]').should('contain', 'Owning at Large Hyperscaler Volume');
- cy.get('[data-testid="video-compare-clip"]').should('not.exist');
- cy.get('@h100.all').should('have.length', 0);
+ cy.get('[data-testid="video-compare"]')
+ .should('contain', 'Owning at Large Hyperscaler Volume')
+ .and('contain', 'retained CI outputs');
+ cy.get('@h200.all').should('have.length', 0);
});
- it('loads both runs’ clips on demand and pairs the same prompt and seed', () => {
+ it('steps through cases with the arrows and the select, keeping v_case in the URL', () => {
mount();
- cy.get('[data-testid="video-compare-load"]').click();
cy.wait(['@h100', '@b200']);
- cy.get('[data-testid="video-compare-clip"]').should('have.length', 2);
- cy.get('[data-testid="video-compare-clip"] video').should('have.length', 2);
- cy.get('[data-testid="video-compare-clip"][data-role="baseline"]')
- .should('contain', 'H100')
- .and('contain', 'time to video 120 s')
- .find('video')
- .should('have.attr', 'src')
- .and('include', 'measurement-r001-c001.mp4');
- cy.get('[data-testid="video-compare-clip"][data-role="candidate"]').should('contain', 'B200');
- cy.get('[role="combobox"][aria-label="Case (prompt · seed)"]').should(
- 'contain',
- 'A drummer taps a snare drum. · seed 11 · #1',
+ cy.get('[data-testid="video-compare-prev"]').should('be.disabled');
+ cy.get('[data-testid="video-compare-next"]').click();
+ cy.get('[data-testid="video-compare-clip"] video').each(($video) =>
+ expect($video.attr('src')).to.include('measurement-r002-c001.mp4'),
);
+ cy.location('search').should('contain', 'v_case=1');
pick('Case (prompt · seed)', '#3');
cy.get('[data-testid="video-compare-clip"] video').each(($video) =>
expect($video.attr('src')).to.include('measurement-r003-c001.mp4'),
);
+ cy.get('[data-testid="video-compare-case-of"]').should('contain', 'Case 3 of');
cy.location('search').should('contain', 'v_case=2');
- cy.get('[data-testid="video-compare"]').should('contain', 'retained CI outputs');
+ cy.get('[data-testid="video-compare-prev"]').click();
+ cy.location('search').should('contain', 'v_case=1');
});
- it('updates the delta table and the URL when the candidate changes, without refetching', () => {
+ it('drives both players together', () => {
+ mount();
+ cy.wait(['@h100', '@b200']);
+ cy.window().then((win) => {
+ cy.stub(win.HTMLMediaElement.prototype, 'play').as('play').resolves();
+ cy.stub(win.HTMLMediaElement.prototype, 'pause').as('pause');
+ });
+ cy.get('[data-testid="video-compare-play"]').click();
+ cy.get('@play').should('have.callCount', 2);
+ cy.get('[data-testid="video-compare-pause"]').click();
+ cy.get('@pause').should('have.callCount', 2);
+ cy.get('[data-testid="video-compare-restart"]').click();
+ cy.get('@play').should('have.callCount', 4);
+ });
+ it('hides which hardware is which in blind mode until revealed', () => {
+ mount();
+ cy.wait(['@h100', '@b200']);
+ cy.get('[data-testid="video-compare-blind"]').click();
+ cy.get('[data-testid="video-compare-pane-label"]').should(($labels) => {
+ expect([...$labels].map((el) => el.textContent)).to.deep.equal(['A', 'B']);
+ });
+ clip('baseline').should('not.contain', 'H100').and('contain', 'time to video 120 s');
+ cy.get('[data-testid="video-compare-table"]').should('not.exist');
+ cy.get('[data-testid="video-compare-metrics-hidden"]').should('exist');
+ cy.get('[data-testid="video-compare-reveal"]').click();
+ cy.get('[data-testid="video-compare-pane-label"]').first().should('contain', 'H100');
+ cy.get('[data-testid="video-compare-table"]').should('exist');
+ // The next case is blind again.
+ cy.get('[data-testid="video-compare-next"]').click();
+ cy.get('[data-testid="video-compare-pane-label"]').first().should('have.text', 'A');
+ });
+ it('switches the candidate, fetching only the new side, and swaps on collision or request', () => {
mount();
- cy.get('[data-testid="video-compare-load"]').click();
cy.wait(['@h100', '@b200']);
pick('Candidate', 'H200');
+ cy.wait('@h200');
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H200');
+ clip('candidate').should('contain', 'H200');
metricRow('p50Latency').should('contain', '150.6').and('contain', '-10%');
metricRow('dollarsPerVideo').should('contain', '$0.204');
cy.location('search').should('contain', 'v_cand=h200');
- // H200 clips were never fetched: the pane returns to the on-demand button.
- cy.get('[data-testid="video-compare-load"]').should('exist');
- cy.get('@h200.all').should('have.length', 0);
- // Choosing the baseline's hardware as candidate swaps the two sides.
+ cy.get('@h100.all').should('have.length', 1);
+ cy.get('@h200.all').should('have.length', 1);
+ // Choosing the baseline's hardware as candidate swaps the two sides; the swap button does too.
pick('Candidate', 'H100');
cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H200');
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H100');
metricRow('p50Latency').find('[data-tone="worse"]').should('exist');
+ cy.get('[data-testid="video-compare-swap"]').click();
+ cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H100');
+ cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H200');
+ cy.get('@h200.all').should('have.length', 1);
});
- it('restores v_base and v_cand from the URL and reports a failed media read', () => {
- mount('/video', '?v_base=h200&v_cand=h100');
- cy.intercept(
- 'GET',
- `/api/video-runs?run=${c1('h200').runId}&artifact=${c1('h200').artifactId}&format=media`,
- { statusCode: 404, body: { error: 'gone' } },
- ).as('missing');
+ it('restores v_base and v_cand from the URL and reports a failed media read with a retry', () => {
+ mount('/video', '?v_base=h200&v_cand=h100', points, OWNING_PARTICIPATING, () => {
+ cy.intercept('GET', mediaUrl(c1('h200')), { statusCode: 404, body: { error: 'gone' } }).as(
+ 'missing',
+ );
+ });
cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H200');
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H100');
- cy.get('[data-testid="video-compare-load"]').click();
cy.wait('@missing');
cy.get('[data-testid="video-compare-clips"] [role="alert"]')
.should('contain', 'Could not load clips')
.and('contain', 'HTTP 404');
cy.contains('button', 'Retry').should('exist');
});
+ it('says when a run publishes no clips and keeps the metric deltas', () => {
+ mount('/video', '', points, OWNING_PARTICIPATING, () => {
+ cy.intercept('GET', mediaUrl(c1('b200')), { statusCode: 204 }).as('unpublished');
+ });
+ cy.wait(['@h100', '@unpublished']);
+ cy.get('[data-testid="video-compare-clips"]').should(
+ 'contain',
+ 'Clips are not published for one of these runs',
+ );
+ cy.get('[data-testid="video-compare-clip"]').should('not.exist');
+ metricRow('p50Latency').should('contain', '-53.4%');
+ });
it('disables the selects when fewer than two hardware are measured', () => {
mount(
'/video',
@@ -143,15 +203,16 @@ describe('Video compare panel (retained fixture)', () => {
});
it('renders Chinese copy on /zh/video', () => {
mount('/zh/video', '', points, { tier: 'r', basis: 'allocated' });
+ cy.wait(['@h100', '@b200']);
cy.get('[data-testid="video-compare"]')
.should('contain', '基线')
.and('contain', '候选')
- .and('contain', '加载视频')
+ .and('contain', '同时播放')
+ .and('contain', '盲测模式')
.and('contain', '租赁 - 3 年承诺')
.and('contain', '已分配的 GPU');
metricRow('p50Latency').should('contain', 'P50 出片时间');
- cy.get('[data-testid="video-compare-load"]').click();
- cy.wait(['@h100', '@b200']);
- cy.get('[data-testid="video-compare-clip"]').first().should('contain', '出片时间 120 s');
+ cy.get('[data-testid="video-compare-case-of"]').should('contain', '第 1 /');
+ clip('baseline').should('contain', '出片时间 120 s');
});
});
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index 28fa4e182..f460ae9a6 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -7,6 +7,8 @@ function mount(pathname = '/video', search = '') {
fixture: 'api/video-history.json',
}).as('history');
cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null });
+ // The Compare panel fetches clips once in view; the component runner publishes none.
+ cy.intercept('GET', '/api/video-runs?run=*', { statusCode: 204 });
cy.window().then((win) =>
win.history.replaceState(null, '', `${win.location.pathname}${search}`),
);
@@ -169,6 +171,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
req.reply({ fixture: 'api/video-history.json', delay: 800 });
}).as('slowHistory');
cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null });
+ cy.intercept('GET', '/api/video-runs?run=*', { statusCode: 204 });
// The AUT keeps the previous test's v_ params; start from the defaults.
cy.window().then((win) => win.history.replaceState(null, '', win.location.pathname));
cy.mount(
diff --git a/packages/app/cypress/e2e/video-dashboard.cy.ts b/packages/app/cypress/e2e/video-dashboard.cy.ts
index c0c4e0a1b..438c771fc 100644
--- a/packages/app/cypress/e2e/video-dashboard.cy.ts
+++ b/packages/app/cypress/e2e/video-dashboard.cy.ts
@@ -1,6 +1,10 @@
// Runs against the E2E_FIXTURES=1 server, which serves the retained
// H100/H200/B200 observations from cypress/fixtures/api/video-history.json.
describe('Video hardware dashboard (E2E fixtures)', () => {
+ beforeEach(() => {
+ // The Compare panel fetches two published artifacts once in view; keep the spec offline.
+ cy.intercept('GET', '/api/video-runs?run=*', { statusCode: 204 });
+ });
it('leads with the cross-hardware chart and restores v_ params from the URL', () => {
cy.visit('/video?v_y=kjPerVideo&v_tier=r&v_queue=1');
cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 9);
diff --git a/packages/app/src/components/video-benchmark/VideoCompare.tsx b/packages/app/src/components/video-benchmark/VideoCompare.tsx
index bac93a70f..ab56117e6 100644
--- a/packages/app/src/components/video-benchmark/VideoCompare.tsx
+++ b/packages/app/src/components/video-benchmark/VideoCompare.tsx
@@ -1,8 +1,10 @@
'use client';
-import { useEffect, useId, useMemo, useRef, useState } from 'react';
+import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';
import { Button } from '@/components/ui/button';
import { Heading } from '@/components/ui/heading';
+import { Skeleton } from '@/components/ui/skeleton';
+import { Switch } from '@/components/ui/switch';
import { track } from '@/lib/analytics';
import { useLocale } from '@/lib/use-locale';
import {
@@ -22,6 +24,7 @@ import {
writeVideoCompareSelection,
type VideoCompareSelection,
} from './compare-url-state';
+import { layoutLabel } from './deployment';
import { hardwareLabel } from './hardware';
import {
formatMetric,
@@ -37,10 +40,17 @@ const STRINGS = {
en: {
title: 'Compare',
subtitle:
- 'Pick a baseline and a candidate hardware (each on its most efficient measured deployment): metric deltas side by side, then the same generated case from both runs.',
+ 'Arena-style: the same prompt and seed generated on two hardware, side by side. Pick a baseline and a candidate (each on its most efficient measured deployment); the metric deltas follow below the clips.',
baseline: 'Baseline',
candidate: 'Candidate',
+ swap: 'Swap sides',
+ blind: 'Blind mode',
+ blindHint: 'Hide which hardware is which until you reveal it.',
+ reveal: 'Reveal hardware',
+ hidden: { baseline: 'A', candidate: 'B' },
needTwo: 'Comparison needs at least two measured hardware.',
+ metrics: 'Metric deltas',
+ metricsHidden: 'Metric deltas are hidden in blind mode; reveal the hardware to see them.',
metric: 'Metric',
change: 'Change',
assumptions: (tier: string, basis: string) => `Cost tier: ${tier} · GPU basis: ${basis}.`,
@@ -49,12 +59,21 @@ const STRINGS = {
better: 'Candidate better',
worse: 'Candidate worse',
neutral: 'No difference',
- load: 'Load clips',
- loadHint: 'Fetches the retained clips of both runs on demand (two published artifacts).',
loading: 'Loading clips…',
+ loadingHint: 'Fetching the retained clips of both runs (two published artifacts).',
error: 'Could not load clips',
retry: 'Retry',
+ noClips: 'Clips are not published for one of these runs; the metric deltas below still apply.',
+ prompt: 'Prompt',
+ seed: 'seed',
+ take: (n: number) => `take ${n}`,
+ caseOf: (i: number, n: number) => `Case ${i} of ${n}`,
+ prev: 'Previous case',
+ next: 'Next case',
case: 'Case (prompt · seed)',
+ playBoth: 'Play both',
+ pauseBoth: 'Pause both',
+ restart: 'Restart both',
noPairs: 'No case with the same prompt and seed exists in both runs.',
unmatched: (baseline: number, candidate: number) =>
`${baseline} baseline and ${candidate} candidate records have no counterpart.`,
@@ -67,10 +86,17 @@ const STRINGS = {
zh: {
title: '对比',
subtitle:
- '选择基线与候选硬件(各自取实测中最高效的部署):并排查看指标差异,再对照两次运行中同一 prompt 与 seed 生成的视频。',
+ 'Arena 式对比:同一 prompt 与 seed 在两种硬件上生成的视频并排播放。选择基线与候选硬件(各自取实测中最高效的部署),指标差异列在视频下方。',
baseline: '基线',
candidate: '候选',
+ swap: '交换两侧',
+ blind: '盲测模式',
+ blindHint: '揭晓前隐藏两侧各是哪种硬件。',
+ reveal: '揭晓硬件',
+ hidden: { baseline: 'A', candidate: 'B' },
needTwo: '至少需要两种已实测的硬件才能对比。',
+ metrics: '指标差异',
+ metricsHidden: '盲测模式下隐藏指标差异,揭晓硬件后显示。',
metric: '指标',
change: '变化',
assumptions: (tier: string, basis: string) => `成本档位:${tier} · GPU 口径:${basis}。`,
@@ -79,12 +105,21 @@ const STRINGS = {
better: '候选更优',
worse: '候选更差',
neutral: '无差异',
- load: '加载视频',
- loadHint: '按需读取两次运行保留的视频(两个已发布产物)。',
loading: '正在加载视频…',
+ loadingHint: '正在读取两次运行保留的视频(两个已发布产物)。',
error: '无法加载视频',
retry: '重试',
+ noClips: '其中一次运行没有发布视频;下方的指标差异仍然有效。',
+ prompt: 'Prompt',
+ seed: 'seed',
+ take: (n: number) => `第 ${n} 次`,
+ caseOf: (i: number, n: number) => `第 ${i} / ${n} 个用例`,
+ prev: '上一个用例',
+ next: '下一个用例',
case: '用例(prompt · seed)',
+ playBoth: '同时播放',
+ pauseBoth: '同时暂停',
+ restart: '从头同时播放',
noPairs: '两次运行中没有 prompt 与 seed 均相同的用例。',
unmatched: (baseline: number, candidate: number) =>
`${baseline} 条基线记录与 ${candidate} 条候选记录没有对应项。`,
@@ -96,6 +131,8 @@ const STRINGS = {
},
};
type Strings = (typeof STRINGS)['en'];
+type Role = 'baseline' | 'candidate';
+const ROLES: readonly Role[] = ['baseline', 'candidate'];
const CHIP = {
better: 'border-emerald-600/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300',
@@ -113,13 +150,14 @@ function caseLabel(pair: CasePair, repeated: boolean): string {
return parts.join(' · ');
}
-async function fetchSide(point: VideoPoint, signal: AbortSignal): Promise {
+/** The stored artifact of one side, or null when the deployment publishes no media (HTTP 204). */
+async function fetchSide(point: VideoPoint, signal: AbortSignal): Promise {
const response = await fetch(
`/api/video-runs?run=${encodeURIComponent(point.runId)}&artifact=${encodeURIComponent(String(point.artifactId))}&format=media`,
{ signal },
);
- if (!response.ok || response.status === 204)
- throw new Error(`Published media HTTP ${response.status}`);
+ if (response.status === 204) return null;
+ if (!response.ok) throw new Error(`Published media HTTP ${response.status}`);
const saved = (await response.json()) as StoredArtifact;
return compareSide(saved, point);
}
@@ -148,10 +186,21 @@ function DeltaChip({ row, s }: { row: CompareRow; s: Strings }) {
);
}
+function ClipPlaceholders() {
+ return (
+
+ {ROLES.map((role) => (
+
+ ))}
+
+ );
+}
+
/**
- * Arena-style baseline vs candidate: metric deltas between each hardware's lead deployment, then the
- * retained clips of the same prompt and seed from both CI runs. Media is fetched
- * only on request, one stored artifact per side.
+ * Arena-style baseline vs candidate: the same prompt and seed from both CI runs
+ * play side by side (blind mode hides which hardware is which), with the metric
+ * deltas between each hardware's lead deployment below. Media is fetched once
+ * the panel scrolls into view, one stored artifact per side.
*/
export default function VideoCompare({
points,
@@ -165,27 +214,53 @@ export default function VideoCompare({
const locale = useLocale();
const s = STRINGS[locale];
const headingId = useId();
+ const blindId = useId();
+ const sectionRef = useRef(null);
+ const videos = useRef>({ baseline: null, candidate: null });
const [selection, setSelection] = useState(
DEFAULT_VIDEO_COMPARE_SELECTION,
);
- const [sides, setSides] = useState>(() => new Map());
+ const [sides, setSides] = useState>(() => new Map());
const [pending, setPending] = useState(null);
const [failure, setFailure] = useState<{ key: string; message: string } | null>(null);
const [failedMedia, setFailedMedia] = useState>(() => new Set());
+ const [visible, setVisible] = useState(false);
+ const [blind, setBlind] = useState(false);
+ const [revealedFor, setRevealedFor] = useState(null);
const request = useRef(0);
const download = useRef(null);
useEffect(() => {
setSelection(readVideoCompareSelection(location.search));
return () => download.current?.abort();
}, []);
+ // Two stored artifacts are several MB each: fetch them once the panel is near the viewport.
+ useEffect(() => {
+ const node = sectionRef.current;
+ if (!node || typeof IntersectionObserver === 'undefined') {
+ setVisible(true);
+ return;
+ }
+ const observer = new IntersectionObserver(
+ (entries) => {
+ if (entries.some((entry) => entry.isIntersecting)) {
+ setVisible(true);
+ observer.disconnect();
+ }
+ },
+ { rootMargin: '240px' },
+ );
+ observer.observe(node);
+ return () => observer.disconnect();
+ }, []);
const measured = useMemo(() => comparablePoints(points), [points]);
const defaults = useMemo(() => defaultComparePair(points), [points]);
const { baseline, candidate, caseIndex } = resolveCompareSelection(selection, points);
const pairKey = baseline && candidate ? `${baseline.id}|${candidate.id}` : null;
const rows = baseline && candidate ? compareMetrics(baseline, candidate, options) : [];
+ const fetched = baseline && candidate && sides.has(baseline.id) && sides.has(candidate.id);
const loaded =
- baseline && candidate && sides.has(baseline.id) && sides.has(candidate.id)
+ fetched && sides.get(baseline.id) && sides.get(candidate.id)
? { baseline: sides.get(baseline.id)!, candidate: sides.get(candidate.id)! }
: null;
const matched = loaded ? pairCases(loaded.baseline.records, loaded.candidate.records) : null;
@@ -201,6 +276,12 @@ export default function VideoCompare({
value: point.hardwareKey ?? '',
label: hardwareLabel(point.hardwareKey ?? ''),
}));
+ const masked = blind && revealedFor !== `${pairKey}:${index}`;
+ const sideOf = { baseline, candidate } as Record;
+ const paneLabel = (role: Role) =>
+ masked ? s.hidden[role] : hardwareLabel(sideOf[role]?.hardwareKey ?? '');
+ const paneColor = (role: Role) =>
+ masked ? 'var(--muted-foreground)' : colorFor(sideOf[role]?.hardwareKey ?? '');
const update = (patch: Partial) => {
const next = { ...selection, ...patch };
@@ -220,9 +301,9 @@ export default function VideoCompare({
),
);
};
- const choose = (side: 'baseline' | 'candidate', hardware: string) => {
- const own = side === 'baseline' ? baseline : candidate;
- const other = side === 'baseline' ? candidate : baseline;
+ const choose = (side: Role, hardware: string) => {
+ const own = sideOf[side];
+ const other = sideOf[side === 'baseline' ? 'candidate' : 'baseline'];
const patch: Partial = { [side]: hardware };
// Picking the other side's hardware swaps the two instead of comparing a hardware with itself.
if (other?.hardwareKey === hardware && own)
@@ -230,7 +311,19 @@ export default function VideoCompare({
update(patch);
track(`video_compare_${side}_changed`, { hardware });
};
- const load = async () => {
+ const swap = () => {
+ if (!baseline || !candidate) return;
+ update({ baseline: candidate.hardwareKey, candidate: baseline.hardwareKey });
+ track('video_compare_swapped', {
+ baseline: candidate.hardwareKey,
+ candidate: baseline.hardwareKey,
+ });
+ };
+ const goTo = (next: number) => {
+ update({ caseIndex: next });
+ track('video_compare_case_changed', { index: next, seed: pairs[next]?.seed ?? null });
+ };
+ const load = useCallback(async () => {
if (!baseline || !candidate || pairKey === null) return;
download.current?.abort();
const controller = new AbortController();
@@ -244,36 +337,83 @@ export default function VideoCompare({
});
try {
const missing = [baseline, candidate].filter((point) => !sides.has(point.id));
- const fetched = await Promise.all(
+ const results = await Promise.all(
missing.map(
async (point) => [point.id, await fetchSide(point, controller.signal)] as const,
),
);
if (attempt !== request.current) return;
- setSides((old) => new Map([...old, ...fetched]));
+ setSides((old) => new Map([...old, ...results]));
} catch (error) {
if (controller.signal.aborted) return;
setFailure({ key: pairKey, message: error instanceof Error ? error.message : String(error) });
} finally {
if (attempt === request.current) setPending(null);
}
+ }, [baseline, candidate, pairKey, sides]);
+ useEffect(() => {
+ if (!visible || pairKey === null || fetched) return;
+ if (pending === pairKey || failure?.key === pairKey) return;
+ void load();
+ }, [visible, pairKey, fetched, pending, failure, load]);
+
+ const eachVideo = (fn: (video: HTMLVideoElement) => void) => {
+ for (const video of Object.values(videos.current)) if (video) fn(video);
+ };
+ const playback = (action: 'play' | 'pause' | 'restart') => {
+ eachVideo((video) => {
+ if (action === 'pause') {
+ video.pause();
+ return;
+ }
+ if (action === 'restart') video.currentTime = 0;
+ void video.play().catch(() => {});
+ });
+ track('video_compare_playback', { action });
+ };
+ const reveal = () => {
+ setRevealedFor(`${pairKey}:${index}`);
+ track('video_compare_revealed', {
+ baseline: baseline?.hardwareKey ?? null,
+ candidate: candidate?.hardwareKey ?? null,
+ });
};
return (
-
-
- {s.title}
-
-
{s.subtitle}
+
+
+
+ {s.title}
+
+
{s.subtitle}
+
+
+ {
+ setBlind(checked);
+ setRevealedFor(null);
+ track('video_compare_blind_toggled', { value: String(checked) });
+ }}
+ data-testid="video-compare-blind"
+ />
+ {s.blind}
+
choose('baseline', value)}
options={hardwareOptions}
/>
+
+ ⇄
+
-
-
-
-
-
- {s.metric}
-
- {(
- [
- ['baseline', baseline],
- ['candidate', candidate],
- ] as const
- ).map(([role, point]) => (
-
-
-
- {hardwareLabel(point.hardwareKey ?? '')}
- · {s[role]}
-
-
- ))}
-
- {s.change}
-
-
-
-
- {rows.map((row) => (
-
-
- {locale === 'zh'
- ? VIDEO_METRICS[row.id].labelZh
- : VIDEO_METRICS[row.id].label}
-
- {formatMetric(row.baseline, row.id)}
- {formatMetric(row.candidate, row.id)}
-
-
-
-
- ))}
-
-
-
-
- {s.assumptions(
- TIER_LABELS[options.tier][locale],
- options.basis === 'allocated' ? s.allocated : s.participating,
- )}
-
{loaded && matched ? (
pairs.length === 0 || !current ? (
@@ -362,34 +455,56 @@ export default function VideoCompare({
) : (
<>
-
-
{
- const next = Number(value);
- update({ caseIndex: next });
- track('video_compare_case_changed', {
- index: next,
- seed: pairs[next]?.seed ?? null,
- });
- }}
- options={pairs.map((pair, i) => ({
- value: String(i),
- label: caseLabel(pair, repeated.has(pair.key)),
- }))}
- />
+
+
+ {s.prompt}
+
+ goTo(index - 1)}
+ disabled={index === 0}
+ aria-label={s.prev}
+ title={s.prev}
+ data-testid="video-compare-prev"
+ >
+ ‹
+
+
+ {s.caseOf(index + 1, pairs.length)}
+
+ goTo(index + 1)}
+ disabled={index >= pairs.length - 1}
+ aria-label={s.next}
+ title={s.next}
+ data-testid="video-compare-next"
+ >
+ ›
+
+
+
+
{current.prompt ?? current.caseId ?? '—'}
+
+ {current.seed !== null && `${s.seed} ${current.seed}`}
+ {repeated.has(current.key) && ` · ${s.take(current.repetition + 1)}`}
+
- {(
- [
- ['baseline', baseline, current.baseline, loaded.baseline],
- ['candidate', candidate, current.candidate, loaded.candidate],
- ] as const
- ).map(([role, point, record, side]) => {
+ {ROLES.map((role) => {
+ const point = sideOf[role]!;
+ const record = current[role];
+ const side = loaded[role];
const url =
record.mediaPath === null ? undefined : side.urls.get(record.mediaPath);
- const label = hardwareLabel(point.hardwareKey ?? '');
+ const label = paneLabel(role);
return (
+
+
+
+ {label}
+
+ · {s[role]}
+ {!masked && (
+
+ · {layoutLabel(point, locale)}
+
+ )}
+ {record.seconds !== null && (
+
+ · {s.timeToVideo}{' '}
+ {record.seconds.toLocaleString('en-US', {
+ maximumFractionDigits: 1,
+ })}{' '}
+ s
+
+ )}
+
{url ? (
{
+ videos.current[role] = element;
+ }}
src={url}
controls
playsInline
@@ -418,27 +560,62 @@ export default function VideoCompare({
{s.mediaError}
)}
-
-
- {label}
- · {s[role]}
- {record.seconds !== null && (
-
- · {s.timeToVideo}{' '}
- {record.seconds.toLocaleString('en-US', {
- maximumFractionDigits: 1,
- })}{' '}
- s
-
- )}
-
);
})}
+
+
+ playback('play')}
+ data-testid="video-compare-play"
+ >
+ {s.playBoth}
+
+ playback('pause')}
+ data-testid="video-compare-pause"
+ >
+ {s.pauseBoth}
+
+ playback('restart')}
+ data-testid="video-compare-restart"
+ >
+ {s.restart}
+
+ {masked && (
+
+ {s.reveal}
+
+ )}
+
+
+ goTo(Number(value))}
+ options={pairs.map((pair, i) => ({
+ value: String(i),
+ label: caseLabel(pair, repeated.has(pair.key)),
+ }))}
+ />
+
+
{(matched.unmatched.baseline > 0 || matched.unmatched.candidate > 0) && (
)
- ) : pending === pairKey ? (
+ ) : fetched ? (
- {s.loading}
+ {s.noClips}
+ ) : pending === pairKey ? (
+
+
+ {s.loading} {s.loadingHint}
+
+
+
) : failure?.key === pairKey ? (
{s.error}: {failure.message}
-
+ void load()}>
{s.retry}
) : (
-
-
- {s.load}
-
- {s.loadHint}
-
+
)}
- {s.footnote}
+ {masked ? (
+
+ {s.metricsHidden}
+
+ ) : (
+
+
{s.metrics}
+
+
+
+
+
+ {s.metric}
+
+ {ROLES.map((role) => (
+
+
+
+ {paneLabel(role)}
+ · {s[role]}
+
+
+ ))}
+
+ {s.change}
+
+
+
+
+ {rows.map((row) => (
+
+
+ {locale === 'zh'
+ ? VIDEO_METRICS[row.id].labelZh
+ : VIDEO_METRICS[row.id].label}
+
+ {formatMetric(row.baseline, row.id)}
+ {formatMetric(row.candidate, row.id)}
+
+
+
+
+ ))}
+
+
+
+
+ {s.assumptions(
+ TIER_LABELS[options.tier][locale],
+ options.basis === 'allocated' ? s.allocated : s.participating,
+ )}
+
+
+ )}
+
{s.footnote}
>
)}
From e635a59525423544533c861a95b7461286b586c2 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sun, 20 Sep 2026 00:34:35 -0700
Subject: [PATCH 085/104] refactor: trim the video dashboard to the cost and
compute-bound claims
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Keep only what the two claims need: X = P90/P50 time to video, Y = videos
per $1 TCO, TCO cost per video, videos per GPU-hour or kJ per video, one
cost tier select. Every per-GPU metric divides by participating GPUs; an
idle-boards note under the chart replaces the GPU-basis toggle. Drop the
queued/optimal/frontier switches (queued cells never reach the chart, and
per-hardware frontier lines appear on their own once a hardware has two
deployments), the single-option Model/Workload/Deployment selects (now
plain facts), the revenue/profit/multiple/genSpeed/video-seconds/kWh/
$ per video-second metrics, the KPI profit and board-power rows, blind
mode and the case dropdown in Compare, and four of its seven delta rows.
The API reference now yields one number, the API list price per video,
shown beside the TCO cost. Tests, docs and the Chinese copy follow.
中文:围绕两个 claim 收敛 /video 仪表板:X 轴只留 P90/P50 出片时间,Y 轴只留
每 1 美元 TCO 视频数、每条视频 TCO 成本、每 GPU 小时视频数和每条视频能耗,
保留成本档位。所有按 GPU 计的指标以参与计算的 GPU 为分母,图表下方的空闲
板卡说明取代 GPU 口径切换。去掉排队/仅最优/前沿三个开关(排队 cell 不进入
图表,某硬件有两种部署时自动画出前沿线)、三个单选项假下拉(改为文字事实)、
收入/利润/倍数/生成速度/视频秒数/kWh/每视频秒成本等指标、KPI 卡的利润与
板卡功率行、Compare 的盲测模式与用例下拉,以及七行差值中的四行。API 参考价
只推导每条视频 API 标价,显示在 TCO 成本旁。测试、文档与中文文案同步更新。
---
docs/index.md | 2 +-
docs/videogenx-dashboard.md | 29 +-
.../cypress/component/video-compare.cy.tsx | 82 +++--
.../cypress/component/video-dashboard.cy.tsx | 272 +++++++++++------
.../cypress/component/video-evidence.cy.tsx | 54 +---
.../app/cypress/e2e/video-dashboard.cy.ts | 222 +++++++++++++-
.../video-benchmark/VideoCompare.tsx | 279 ++++++------------
.../video-benchmark/VideoConfigBar.tsx | 58 ++--
.../video-benchmark/VideoDashboard.tsx | 73 ++---
.../video-benchmark/VideoEvidence.tsx | 8 +-
.../video-benchmark/VideoHardwareChart.tsx | 61 +---
.../video-benchmark/VideoKpiCards.tsx | 57 ++--
.../video-benchmark/VideoPointsTable.tsx | 26 +-
.../video-benchmark/chart-domain.test.ts | 11 +-
.../video-benchmark/compare.test.ts | 71 ++---
.../src/components/video-benchmark/compare.ts | 8 +-
.../components/video-benchmark/deployment.ts | 2 +-
.../video-benchmark/evidence.test.ts | 8 -
.../components/video-benchmark/evidence.ts | 15 +-
.../video-benchmark/metrics.test.ts | 204 ++++++++-----
.../src/components/video-benchmark/metrics.ts | 189 +++---------
.../components/video-benchmark/plot.test.ts | 110 ++++---
.../src/components/video-benchmark/plot.ts | 31 +-
.../video-benchmark/video-url-state.test.ts | 71 +++--
.../video-benchmark/video-url-state.ts | 26 +-
25 files changed, 999 insertions(+), 970 deletions(-)
diff --git a/docs/index.md b/docs/index.md
index 4bc1c1831..a7c0aa712 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -35,7 +35,7 @@ Design rationale and non-obvious conventions. See [CLAUDE.md](../CLAUDE.md) for
- [State Ownership](./state-ownership.md) — Which context owns which state, availability filtering cascade, comparison date mechanics, URL param sync
- [Blog](./blog.md) — MDX content system, SEO features (OG images, RSS, llms.txt, JSON-LD), TOC sidebar, reading progress, heading links, analytics events
- [CollectiveX](./collectivex.md) — lazy ingest-on-read pipeline (separate Neon DB as a durable GitHub-artifact cache), tombstoned deletes, raw-docs storage + shared reader
-- [VideoGenX dashboard](./videogenx-dashboard.md) — `/video` cross-hardware chart: published-history projection → points → metrics, TCO tiers and GPU basis, C1 default with queueing tails, Pareto hull, unavailable-hardware roster, null rules
+- [VideoGenX dashboard](./videogenx-dashboard.md) — `/video` cross-hardware chart: published-history projection → points → metrics, TCO tiers per participating GPU vs. the API list price, deployment cells (queued cells never plotted), arena Compare, compute-bound evidence, unavailable-hardware roster, null rules
- [Chinese Pages (/zh)](./i18n.md) — Why hand-authored /zh pages instead of an i18n framework, hreflang pairing, blog translation pairing, html lang workaround, CJK reading time/slugs
- [Chinese Copy Editorial Guide](./chinese-copy.md) — Audience, surface-specific register, context-aware terminology, rewrite workflow, manual-review process, and PR checklist
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
index 1446fa891..b747f75d5 100644
--- a/docs/videogenx-dashboard.md
+++ b/docs/videogenx-dashboard.md
@@ -8,40 +8,41 @@ Published blob indexes → `GET /api/video-runs?format=history` (the per-cell pr
## Axes and defaults
-`video-url-state.ts` owns the `v_*` URL params (`v_x`, `v_y`, `v_tier`, `v_basis`, `v_queue`, `v_opt`, `v_frontier`, `v_view`); defaults are omitted from the URL and every other param is left alone.
+`video-url-state.ts` owns the `v_*` URL params (`v_x`, `v_y`, `v_tier`, `v_view`, `v_api`); defaults are omitted from the URL and every other param is left alone.
-- **X = P90 time to video (s)**, lower is better. `p50Latency` and `genSpeed` (frames/s per request, the closest analogue to interactivity) are the alternatives.
-- **Y = videos per $1 TCO** at the _Owning at Large Hyperscaler Volume_ tier. Cost per GPU-hour comes from `HW_REGISTRY` (`costh`/`costr`), the same SemiAnalysis TCO source `/inference` uses; the badge row and source link sit above the chart.
-- **GPU basis**: _participating_ GPUs (the boards that generated the clip — 4 per video with TP2 × Ulysses 2) is chip efficiency; _allocated_ GPUs (H100/B200 reserved 8) is what a deployment bills. One toggle apart, never mixed in one number.
+- **X = P90 time to video (s)**, lower is better; `p50Latency` is the alternative.
+- **Y = videos per $1 TCO** at the _Owning at Large Hyperscaler Volume_ tier; TCO cost per video, videos per GPU-hour and GPU-board energy per video (kJ) are the alternatives. Cost per GPU-hour comes from `HW_REGISTRY` (`costh`/`costr`), the same SemiAnalysis TCO source `/inference` uses; the badge row and source link sit above the chart.
+- **Per participating GPU**: every per-GPU metric divides by the boards that generated the clip (4 per video with TP2 × Ulysses 2), never by the boards a job reserved. The retained H100 and B200 jobs reserved eight and used four, so a note under the chart header names them ("B200 (4 of 8), H100 (4 of 8) … the idle boards are not counted") and their KPI card headers read "4 of 8 GPUs". Idle boards are stated, not billed; there is no GPU-basis toggle.
+- **Both axes start at zero** (`chart-domain.ts`), so per-dollar and per-video readings compare by length, not by offset.
## Deployments, not concurrency, make the curve
`/inference` sweeps batch size to trace each hardware's latency-vs-throughput frontier. A diffusion video server has no batching lever: the pinned H3 SGLang server is batch-one and single-replica, so client concurrency only queues requests — the retained C1/C2/C4 cells show throughput flat within ±1.5 % while latency scales with C. Joining those cells would draw a flat "curve" that measures the queue, not the hardware, so the chart never does.
-The knob that does trade latency for efficiency is the **deployment**: how many GPU boards serve one request and how they split the model (`tp_size` × `ulysses_degree`). `deployment.ts` keys cells by it (`deploymentKey`), classifies `concurrency > replicas` as queueing (`isQueueing`; bundles that predate `execution.deployment.replica_count` ran one endpoint, so null reads as one), and picks each hardware's most efficient deployment as its representative (`leadCell`, used by the KPI cards and the legend).
+The knob that does trade latency for efficiency is the **deployment**: how many GPU boards serve one request and how they split the model (`tp_size` × `ulysses_degree`). `deployment.ts` keys cells by it (`deploymentKey`), classifies `concurrency > replicas` as queueing (`isQueueing`; bundles that predate `execution.deployment.replica_count` ran one endpoint, so null reads as one), and picks each hardware's most efficient deployment as its representative (`leadCell`, used by the KPI cards, the Compare panel and the legend).
-`plot.ts` (`plotVideoPoints`) then builds the chart: per hardware, the Pareto frontier over its deployment cells (`frontier.ts` flips lower-is-better axes and reuses `paretoFrontUpperLeft` from the calculator); a solid line appears once a hardware has two or more frontier deployments, dominated deployments render faded, and _Optimal only_ hides them. Queued cells are opt-in (_Show queued requests_), drawn as small faded markers and never joined. _Pareto frontier_ adds the dashed cross-hardware frontier over all deployments, as on `/inference`; when one hardware dominates outright (today: B200) the caption says so instead of drawing a line.
+`plot.ts` (`plotVideoPoints`) then builds the chart from the non-queued cells only: a queued cell never reaches the chart (or the table and CSV) and lives in the evidence panel instead. Per hardware it takes the Pareto frontier over the remaining deployment cells (`frontier.ts` flips lower-is-better axes and reuses `paretoFrontUpperLeft` from the calculator); a solid line appears automatically once a hardware has two or more frontier deployments, and dominated deployments render faded. None of this has a switch — no "show queued requests", no "optimal only", no cross-hardware frontier — so every reader sees the same chart.
-Today every hardware has exactly one measured deployment (4 GPUs per video, TP2 × Ulysses 2), so the chart is an honest scatter and the caption says a per-hardware curve needs the GPUs-per-video sweep. That sweep (design plan P6) is backend work in InferenceX `experimental/video-generation` — the serving matrix currently varies only concurrency — and needs GPU authorisation; the frontend needs no change when its cells arrive, because they differ in `deploymentKey` and therefore add points rather than replace them.
+Today every hardware has exactly one measured deployment (4 GPUs per video, TP2 × Ulysses 2), so the chart is an honest three-point scatter and the caption says a per-hardware curve needs the GPUs-per-video sweep. That sweep (design plan P6) is backend work in InferenceX `experimental/video-generation` — the serving matrix currently varies only concurrency — and needs GPU authorisation; the frontend needs no change when its cells arrive, because they differ in `deploymentKey` and therefore add points rather than replace them.
## Sections below the chart
-- **API price reference** (`api-reference.ts`, `VideoApiReference.tsx`): a dated, editable USD per video-second list price (`v_api`, default `H3_API_REFERENCE`) feeds the API-priced metrics in `metrics.ts` — API $/video, revenue and profit per GPU-hour, API price ÷ TCO multiple. It is a web-search reference, labelled with its capture date and range, never presented as an official quote; a null or non-positive price nulls every derived metric. The chart's y axis is zero-anchored (`chart-domain.ts`) so negative profit stays visible and an all-negative view tops out at break-even.
-- **Compare** (`compare.ts`, `compare-url-state.ts`, `VideoCompare.tsx`): arena-style baseline vs. candidate, video first — the same prompt + seed clips from both CI runs play side by side with shared play/pause/restart, case arrows, and a blind mode that hides which hardware is which until revealed; the metric deltas (registry polarity) sit below. One selectable cell per hardware (its lead deployment); `v_base`, `v_cand`, `v_case` in the URL. The two stored artifacts (several MB each) load once the panel scrolls into view; an HTTP 204 side reads as "clips not published", never as an error.
-- **Compute-bound evidence** (`evidence.ts`, `VideoEvidence.tsx`): board power against the recorded enforced limit, the concurrency plateau (throughput flat, latency × C), and observed speed-ups against memory-bandwidth and FLOPS spec ratios. Every hardware is read on the deployment layout most of them share (`sharedLayoutCells`) so the exhibits compare like with like; sentences stay conditional when ratios do not separate.
+- **API price reference** (`api-reference.ts`, `VideoApiReference.tsx`): a dated, editable USD per video-second list price (`v_api`, default `H3_API_REFERENCE`) feeds exactly one derived number, the API list price per video (`apiPricePerVideo` = price × clip seconds). It is shown beside the TCO cost per video on the KPI cards and as a table and CSV column; the chart never plots it, and no revenue, profit or price multiple is derived from it. The price is a web-search reference, labelled with its capture date and range, never presented as an official quote; a null or non-positive price nulls the list price, and `parseApiPrice` falls back to the reference rather than pricing at 0.
+- **Compare** (`compare.ts`, `compare-url-state.ts`, `VideoCompare.tsx`): arena-style baseline vs. candidate, video first — the same prompt + seed clips from both CI runs play side by side with shared play/pause/restart and previous/next case arrows (no blind mode, no case dropdown); the deltas below are fixed to time to video (P50), TCO cost per video and energy per video (`COMPARE_METRICS`, registry polarity), with the cost tier stated in a footnote. One selectable cell per hardware (its lead deployment), defaulting to the slowest hardware as baseline and the fastest as candidate; `v_base`, `v_cand`, `v_case` in the URL. The two stored artifacts (several MB each) load once the panel scrolls into view; an HTTP 204 side reads as "clips not published", never as an error.
+- **Compute-bound evidence** (`evidence.ts`, `VideoEvidence.tsx`): board power against the recorded enforced limit, the concurrency plateau (throughput flat, latency × C — the only place the queued cells appear), and observed speed-ups against memory-bandwidth and FLOPS spec ratios. Every hardware is read on the deployment layout most of them share (`sharedLayoutCells`) so the exhibits compare like with like; sentences stay conditional when ratios do not separate.
## Rules
- **Unavailable hardware** stays visible. `VIDEO_HARDWARE_ROSTER` in `hardware.ts` lists the campaign targets; MI355X has no valid run and renders as a muted legend row, a "Not measured" KPI card with the failed-run link, and no table row. A missing point is never a zero.
- **Nulls**: every formula returns `null` when an input is missing or invalid — power phase invalid, fewer than ten samples for P90, unknown hardware key, missing GPU count. `formatMetric` prints `—`.
-- **Newest observation wins**: `latestVideoCells` keeps the first (newest publication) observation per hardware × concurrency, so a re-run replaces, never duplicates, a point.
+- **Newest observation wins**: `latestVideoCells` keeps the first (newest publication) observation per hardware × deployment × concurrency, so a re-run replaces, never duplicates, a point, while a new server layout adds one.
- **Strings**: component-local `STRINGS = { en, zh }` via `useLocale()`; SKUs, units and identifiers stay English.
- **Fixture**: `cypress/fixtures/api/video-history.json` is rebuilt from retained `StoredArtifact` exports with `bun run fixtures:video-history ` (`scripts/build-video-history-fixture.ts`); it is metadata only and registered in `_manifest.json`.
## 中文说明
-`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;原有的运行/视频/历史视图收进可展开的“运行、视频与证据”区块,`?run=`、`?view=`、`?compare=` 和 `history-*` 深链接会自动展开该区块。默认 X 为 P90 出片时间、Y 为每 1 美元 TCO 视频数(Hyperscaler 自有设备档位,单价与 `/inference` 同源)。
+`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;原有的运行/视频/历史视图收进可展开的“运行、视频与证据”区块,`?run=`、`?view=`、`?compare=` 和 `history-*` 深链接会自动展开该区块。`video-url-state.ts` 管理 `v_x`、`v_y`、`v_tier`、`v_view`、`v_api` 五个 URL 参数,默认值不写入 URL。X 轴可选 P90(默认)或 P50 出片时间;Y 轴可选每 1 美元 TCO 视频数(默认,Hyperscaler 自有设备档位,单价与 `/inference` 同源)、每条视频 TCO 成本、每 GPU 小时视频数和每条视频 GPU 板卡能耗(kJ)。所有按 GPU 计的指标都以参与计算的 GPU 为分母(每条视频 4 张,TP2 × Ulysses 2),而不是任务预留的板卡数;保留数据中 H100 与 B200 的运行预留了 8 张却只用 4 张,图表标题下方的说明会点名这些硬件,对应 KPI 卡标题显示“4 / 8 张 GPU”。空闲板卡只作说明、不计成本,没有 GPU 口径切换。两条坐标轴都从 0 起,便于按长度比较。
-曲线来自部署而不是并发:pinned H3 服务是 batch-one、单副本,客户端并发只会排队(保留数据中 C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 线性增长),把这些点连起来画出的只是队列,因此图表绝不连接它们。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表;`plot.ts` 按硬件对部署点求 Pareto 前沿,达到两个及以上前沿点时才画实线,被支配的部署以淡色显示,“仅最优”可将其隐藏;排队点需手动开启,只画小号淡色标记、不连线;“Pareto 前沿”开关叠加跨硬件虚线。目前每种硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。参与/已分配 GPU 口径一键切换;MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
+曲线来自部署而不是并发:pinned H3 服务是 batch-one、单副本,客户端并发只会排队(保留数据中 C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 线性增长),把这些点连起来画出的只是队列,因此图表绝不连接它们。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表(KPI 卡、Compare 面板和图例都用它);`plot.ts` 只用未排队的 cell 绘图——排队 cell 不会进入图表、表格和 CSV,只出现在证据面板——再按硬件对剩余部署点求 Pareto 前沿:某硬件有两个及以上前沿部署时自动画出实线,被支配的部署以淡色显示。这些行为都没有开关,没有“显示排队请求”,没有“仅最优”,也没有跨硬件前沿,所有读者看到的是同一张图。目前每种硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的三点散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
-图表下方还有三个区块:带日期、可编辑的 API 参考价(`v_api`,来自网页搜索,标注采集日期与区间,不是官方报价)驱动 API 标价 / 条视频、每 GPU 小时收入与利润、API 标价 ÷ TCO 倍数等指标,价格无效时全部为 null,y 轴锚定 0 以便显示负利润;arena 式 Compare 以视频为主:同一 prompt 与 seed 在两种硬件上的视频并排播放,支持同步播放/暂停/重播、用例翻页和“盲测模式”(揭晓前隐藏硬件),指标差值列在视频下方,面板滚入视口时才加载两个已发布产物;compute-bound 证据面板展示板卡功率相对生效上限、并发排队平台以及相对带宽/FLOPS 规格比的实测加速比,所有硬件都读取它们共有的部署布局,比值无法区分时措辞保持保守。
+图表下方还有三个区块。带日期、可编辑的 API 参考价(`v_api`,来自网页搜索,标注采集日期与区间,不是官方报价)只推导一个数字——每条视频 API 标价(单价 × 视频秒数),显示在 KPI 卡每条视频 TCO 成本旁边,并作为表格和 CSV 的一列;它不进入图表,也不再推导收入、利润或价格倍数。价格缺失或不为正时该值为 null,`parseApiPrice` 会回退到参考价,而不是按 0 计价。Arena 式 Compare 以视频为主:同一 prompt 与 seed 在两种硬件上的视频并排播放,支持同步播放/暂停/重播和上一个/下一个用例箭头,没有盲测模式,也没有用例下拉框;下方的差值行固定为出片时间(P50)、每条视频 TCO 成本和每条视频能耗,并以脚注注明成本档位。每种硬件只有一个可选 cell(其代表部署),默认以最慢的硬件为基线、最快的为候选,选择记录在 `v_base`、`v_cand`、`v_case` 中;面板滚入视口时才加载两个已发布产物,HTTP 204 读作“未发布视频”而不是错误。compute-bound 证据面板展示板卡功率相对生效上限、并发排队平台(排队 cell 唯一出现的地方)以及相对带宽/FLOPS 规格比的实测加速比,所有硬件都读取它们共有的部署布局,比值无法区分时措辞保持保守。
diff --git a/packages/app/cypress/component/video-compare.cy.tsx b/packages/app/cypress/component/video-compare.cy.tsx
index aad54730f..c2c8fa0f2 100644
--- a/packages/app/cypress/component/video-compare.cy.tsx
+++ b/packages/app/cypress/component/video-compare.cy.tsx
@@ -15,7 +15,7 @@ const COLORS: Record = {
b200: 'rgb(70, 80, 90)',
};
const colorFor = (key: string) => COLORS[key] ?? 'rgb(0, 0, 0)';
-const OWNING_PARTICIPATING: MetricOptions = { tier: 'h', basis: 'participating' };
+const OWNING: MetricOptions = { tier: 'h' };
const mediaUrl = (point: VideoPoint) =>
`/api/video-runs?run=${point.runId}&artifact=${point.artifactId}&format=media`;
@@ -32,7 +32,7 @@ function mount(
pathname = '/video',
search = '',
data: VideoPoint[] = points,
- options: MetricOptions = OWNING_PARTICIPATING,
+ options: MetricOptions = OWNING,
beforeMount?: () => void,
) {
media(c1('h100'), 'NVIDIA H100 80GB HBM3', 'h100');
@@ -76,37 +76,67 @@ describe('Video compare panel (retained fixture)', () => {
clip('candidate').should('contain', 'B200').find('video').should('exist');
cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H100');
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'B200');
+ // Exactly three delta rows: time to video, TCO cost per video and energy per video.
+ table()
+ .find('tbody tr')
+ .should(($rows) => {
+ expect([...$rows].map((el) => el.dataset.metric)).to.deep.equal([
+ 'p50Latency',
+ 'dollarsPerVideo',
+ 'kjPerVideo',
+ ]);
+ });
metricRow('p50Latency')
.should('contain', '167.3')
.and('contain', '77.9')
.and('contain', '-53.4%');
metricRow('p50Latency').find('[data-tone="better"]').should('exist');
+ // $1.17 ÷ 5.3741 videos/GPU-hr vs. $1.73 ÷ 11.526, both per participating GPU.
metricRow('dollarsPerVideo')
.should('contain', '$0.218')
.and('contain', '$0.150')
.and('contain', '-31.1%');
- metricRow('powerPctCap').find('[data-tone="better"]').should('exist');
+ metricRow('kjPerVideo')
+ .should('contain', '431.1')
+ .and('contain', '301.1')
+ .and('contain', '-30.2%');
+ metricRow('kjPerVideo').find('[data-tone="better"]').should('exist');
+ cy.contains('[data-testid="video-compare"] p', 'Cost tier:').should(
+ 'have.text',
+ 'Cost tier: Owning at Large Hyperscaler Volume.',
+ );
cy.get('[data-testid="video-compare"]')
- .should('contain', 'Owning at Large Hyperscaler Volume')
- .and('contain', 'retained CI outputs');
+ .should('contain', 'retained CI outputs')
+ .and('not.contain', 'GPU basis');
+ // Arena only: no blind mode and no case dropdown, just the two hardware selects.
+ cy.get('[data-testid="video-compare-blind"]').should('not.exist');
+ cy.get('[data-testid="video-compare-controls"] [role="combobox"]').should(($boxes) => {
+ expect([...$boxes].map((el) => el.getAttribute('aria-label'))).to.deep.equal([
+ 'Baseline',
+ 'Candidate',
+ ]);
+ });
cy.get('@h200.all').should('have.length', 0);
});
- it('steps through cases with the arrows and the select, keeping v_case in the URL', () => {
+ it('steps through cases with the arrows, keeping v_case in the URL', () => {
mount();
cy.wait(['@h100', '@b200']);
cy.get('[data-testid="video-compare-prev"]').should('be.disabled');
+ cy.get('[role="combobox"][aria-label="Case (prompt · seed)"]').should('not.exist');
cy.get('[data-testid="video-compare-next"]').click();
cy.get('[data-testid="video-compare-clip"] video').each(($video) =>
expect($video.attr('src')).to.include('measurement-r002-c001.mp4'),
);
+ cy.get('[data-testid="video-compare-case-of"]').should('contain', 'Case 2 of');
cy.location('search').should('contain', 'v_case=1');
- pick('Case (prompt · seed)', '#3');
+ cy.get('[data-testid="video-compare-next"]').click();
cy.get('[data-testid="video-compare-clip"] video').each(($video) =>
expect($video.attr('src')).to.include('measurement-r003-c001.mp4'),
);
cy.get('[data-testid="video-compare-case-of"]').should('contain', 'Case 3 of');
cy.location('search').should('contain', 'v_case=2');
cy.get('[data-testid="video-compare-prev"]').click();
+ cy.get('[data-testid="video-compare-case-of"]').should('contain', 'Case 2 of');
cy.location('search').should('contain', 'v_case=1');
});
it('drives both players together', () => {
@@ -123,23 +153,6 @@ describe('Video compare panel (retained fixture)', () => {
cy.get('[data-testid="video-compare-restart"]').click();
cy.get('@play').should('have.callCount', 4);
});
- it('hides which hardware is which in blind mode until revealed', () => {
- mount();
- cy.wait(['@h100', '@b200']);
- cy.get('[data-testid="video-compare-blind"]').click();
- cy.get('[data-testid="video-compare-pane-label"]').should(($labels) => {
- expect([...$labels].map((el) => el.textContent)).to.deep.equal(['A', 'B']);
- });
- clip('baseline').should('not.contain', 'H100').and('contain', 'time to video 120 s');
- cy.get('[data-testid="video-compare-table"]').should('not.exist');
- cy.get('[data-testid="video-compare-metrics-hidden"]').should('exist');
- cy.get('[data-testid="video-compare-reveal"]').click();
- cy.get('[data-testid="video-compare-pane-label"]').first().should('contain', 'H100');
- cy.get('[data-testid="video-compare-table"]').should('exist');
- // The next case is blind again.
- cy.get('[data-testid="video-compare-next"]').click();
- cy.get('[data-testid="video-compare-pane-label"]').first().should('have.text', 'A');
- });
it('switches the candidate, fetching only the new side, and swaps on collision or request', () => {
mount();
cy.wait(['@h100', '@b200']);
@@ -148,7 +161,8 @@ describe('Video compare panel (retained fixture)', () => {
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H200');
clip('candidate').should('contain', 'H200');
metricRow('p50Latency').should('contain', '150.6').and('contain', '-10%');
- metricRow('dollarsPerVideo').should('contain', '$0.204');
+ metricRow('dollarsPerVideo').should('contain', '$0.204').and('contain', '-6.2%');
+ metricRow('kjPerVideo').should('contain', '411').and('contain', '-4.7%');
cy.location('search').should('contain', 'v_cand=h200');
cy.get('@h100.all').should('have.length', 1);
cy.get('@h200.all').should('have.length', 1);
@@ -156,14 +170,14 @@ describe('Video compare panel (retained fixture)', () => {
pick('Candidate', 'H100');
cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H200');
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H100');
- metricRow('p50Latency').find('[data-tone="worse"]').should('exist');
+ metricRow('p50Latency').should('contain', '+11.1%').find('[data-tone="worse"]').should('exist');
cy.get('[data-testid="video-compare-swap"]').click();
cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H100');
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H200');
cy.get('@h200.all').should('have.length', 1);
});
it('restores v_base and v_cand from the URL and reports a failed media read with a retry', () => {
- mount('/video', '?v_base=h200&v_cand=h100', points, OWNING_PARTICIPATING, () => {
+ mount('/video', '?v_base=h200&v_cand=h100', points, OWNING, () => {
cy.intercept('GET', mediaUrl(c1('h200')), { statusCode: 404, body: { error: 'gone' } }).as(
'missing',
);
@@ -177,7 +191,7 @@ describe('Video compare panel (retained fixture)', () => {
cy.contains('button', 'Retry').should('exist');
});
it('says when a run publishes no clips and keeps the metric deltas', () => {
- mount('/video', '', points, OWNING_PARTICIPATING, () => {
+ mount('/video', '', points, OWNING, () => {
cy.intercept('GET', mediaUrl(c1('b200')), { statusCode: 204 }).as('unpublished');
});
cy.wait(['@h100', '@unpublished']);
@@ -202,16 +216,20 @@ describe('Video compare panel (retained fixture)', () => {
cy.get('[data-testid="video-compare-table"]').should('not.exist');
});
it('renders Chinese copy on /zh/video', () => {
- mount('/zh/video', '', points, { tier: 'r', basis: 'allocated' });
+ mount('/zh/video', '', points, { tier: 'r' });
cy.wait(['@h100', '@b200']);
cy.get('[data-testid="video-compare"]')
.should('contain', '基线')
.and('contain', '候选')
.and('contain', '同时播放')
- .and('contain', '盲测模式')
- .and('contain', '租赁 - 3 年承诺')
- .and('contain', '已分配的 GPU');
+ .and('contain', '成本档位:租赁 - 3 年承诺。');
metricRow('p50Latency').should('contain', 'P50 出片时间');
+ // Rent - 3 Year Commit: $2.00 ÷ 5.3741 vs. $3.70 ÷ 11.526 per participating GPU-hour.
+ metricRow('dollarsPerVideo')
+ .should('contain', '每条视频 TCO 成本')
+ .and('contain', '$0.372')
+ .and('contain', '$0.321');
+ metricRow('kjPerVideo').should('contain', '每条视频 GPU 板卡能耗');
cy.get('[data-testid="video-compare-case-of"]').should('contain', '第 1 /');
clip('baseline').should('contain', '出片时间 120 s');
});
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index f460ae9a6..07e035b6f 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -23,78 +23,161 @@ const kpi = (hardware: string) =>
cy.get(`[data-testid="video-kpi-card"][data-hardware="${hardware}"]`);
const points = () => cy.get('[data-testid="video-hardware-chart"] circle.point');
const lines = () => cy.get('[data-testid="video-hardware-chart"] path.line-path');
-const hull = () => cy.get('[data-testid="video-hardware-chart"] path.roofline-path');
+const tableRows = () => cy.get('[data-testid="video-points-table"] tbody tr');
+const headers = () => cy.get('[data-testid="video-points-table"] thead th');
+// Roster order (HW_REGISTRY sort): the B200 and H100 jobs reserved 8 boards and generated on 4.
+const IDLE_NOTE =
+ 'Per participating GPU: B200 (4 of 8), H100 (4 of 8) reserved more boards than one video uses; the idle boards are not counted.';
+const IDLE_NOTE_ZH =
+ '按参与计算的 GPU 计:B200(4 / 8 张)、H100(4 / 8 张)预留的板卡多于单条视频所需,空闲板卡未计入。';
+const ALL_COLUMNS = [
+ 'Hardware',
+ 'Deployment',
+ 'Valid / scheduled',
+ 'P50 time to video (s)',
+ 'P90 time to video (s)',
+ 'Videos per GPU-hour',
+ 'Videos per $1 TCO (Owning at Large Hyperscaler Volume)',
+ 'TCO cost per video (Owning at Large Hyperscaler Volume)',
+ 'API list price per video',
+ 'GPU-board energy per video (kJ)',
+ 'Mean board power / enforced limit (%)',
+ 'Board power (W)',
+ 'CI run',
+];
describe('Video hardware dashboard (retained fixture)', () => {
it('plots one C1 point per measured hardware and lists MI355X as unavailable', () => {
mount();
points().should('have.length', 3);
lines().should('have.length', 0);
- hull().should('have.length', 0);
+ cy.get('[data-testid="video-hardware-chart"] path.roofline-path').should('not.exist');
cy.get('[data-testid="video-chart-caption"]').should(
'contain',
'One deployment measured per hardware so far (4 GPU · TP2 × Ulysses 2)',
);
- cy.get('[data-testid="video-config-bar"]').should('contain', '4 GPU · TP2 × Ulysses 2');
+ cy.get('[data-testid="video-chart-card"]')
+ .should(
+ 'contain',
+ 'MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · Videos per $1 TCO (Owning at Large Hyperscaler Volume) vs. P90 time to video (s)',
+ )
+ .and('contain', 'Cost tier: Owning at Large Hyperscaler Volume');
cy.get('[data-testid="video-kpi-card"]').should('have.length', 4);
kpi('mi355x').find('[data-testid="video-kpi-unavailable"]').should('contain', 'Not measured');
- kpi('h200').should('contain', '$0.204').and('contain', '150.6').and('contain', '97.4');
- kpi('b200').should('contain', '$0.150');
- kpi('h100').should('contain', '$0.218').and('contain', '4 of 8 GPUs · TP2 × Ulysses 2');
- cy.get('[data-testid="video-config-bar"]').should(
- 'contain',
- '1344 × 768 · 8 s · 24 fps · 50 steps',
- );
- cy.get('[data-testid="video-chart-card"]').should(
- 'contain',
- 'MiniMaxAI/MiniMax-H3 @ 42ed227ee7df',
- );
+ // H200: 20 valid ÷ (3013.4 s × 4 participating GPUs) = 5.97 videos/GPU-hr; $1.22 ÷ 5.9732 = $0.204.
+ kpi('h200')
+ .should('contain', '4 of 4 GPUs · TP2 × Ulysses 2')
+ .and('contain', '150.6')
+ .and('contain', 'P90 151.1')
+ .and('contain', '5.97')
+ .and('contain', '$0.204')
+ .and('contain', '411');
+ kpi('b200').should('contain', '11.53').and('contain', '$0.150').and('contain', '301.1');
+ // H100 divides by the 4 boards that generated, not the 8 the job reserved: $1.17 ÷ 5.3741.
+ kpi('h100')
+ .should('contain', '4 of 8 GPUs · TP2 × Ulysses 2')
+ .and('contain', '5.37')
+ .and('contain', '$0.218')
+ .and('contain', '431.1');
+ kpi('h100').should('not.contain', 'Profit').and('not.contain', 'Board power');
+ });
+ it('states model, workload and deployment as facts and offers no GPU basis or legend switches', () => {
+ mount();
+ cy.get('[data-testid="video-config-fact"]').should(($facts) => {
+ expect([...$facts].map((el) => el.textContent)).to.deep.equal([
+ 'ModelMiniMaxAI/MiniMax-H3 @ 42ed227ee7df',
+ 'Workload1344 × 768 · 8 s · 24 fps · 50 steps',
+ 'Deployment4 GPU · TP2 × Ulysses 2',
+ ]);
+ });
+ cy.get('[data-testid="video-config-bar"] [role="combobox"]').should(($boxes) => {
+ expect([...$boxes].map((el) => el.getAttribute('aria-label'))).to.deep.equal([
+ 'X-axis metric',
+ 'Y-axis metric',
+ 'Cost tier',
+ ]);
+ });
+ cy.get('[role="combobox"][aria-label="GPU basis"]').should('not.exist');
+ cy.get('[data-testid="video-legend"]').should('contain', 'H100').and('contain', 'MI355X');
+ cy.get('[data-testid="video-legend"] [role="switch"]').should('not.exist');
+ for (const id of ['video-queue', 'video-optimal', 'video-frontier'])
+ cy.get(`[data-testid="${id}"]`).should('not.exist');
+ cy.get('[data-testid="video-idle-note"]').should('have.text', IDLE_NOTE);
});
- it('switches cost tier and GPU basis, reflecting both in the URL and the cards', () => {
+ it('switches the cost tier, repricing the cards, the badges and the URL', () => {
mount();
cy.get('[role="combobox"][aria-label="Cost tier"]').click();
cy.contains('[role="option"]', 'Rent - 3 Year Commit').click();
- // 2.9 $/hr ÷ 5.9732 videos/GPU-hr = 0.48550 → rounds down at three decimals.
+ // $2.90/GPU-hr ÷ 5.9732 videos/GPU-hr = 0.48550 → three decimals.
kpi('h200').should('contain', '$0.485');
+ kpi('h100').should('contain', '$0.372');
+ kpi('b200').should('contain', '$0.321');
cy.location('search').should('contain', 'v_tier=r');
+ cy.get('[data-testid="video-chart-card"]')
+ .should('contain', 'Cost tier: Rent - 3 Year Commit')
+ .and('contain', 'Videos per $1 TCO (Rent - 3 Year Commit)');
cy.get('[data-testid="video-tco-badge"]')
.first()
.should('contain', 'B200')
.and('contain', '3.70');
- cy.get('[role="combobox"][aria-label="GPU basis"]').click();
- cy.contains('[role="option"]', 'Allocated GPUs').click();
- kpi('h100').should('contain', '$0.744');
- cy.location('search').should('contain', 'v_basis=allocated');
});
- it('plots queued cells as unjoined markers and never draws a curve through them', () => {
- mount();
- cy.get('[data-testid="video-queue"]').click();
- points().should('have.length', 9);
+ it('never plots queued cells, even when a stale URL asks for them', () => {
+ // C2/C4 exceed the single replica, so they stay in the evidence panel; the retired
+ // v_queue/v_opt/v_frontier/v_basis params change neither what is drawn nor what is billed.
+ mount('/video', '?v_queue=1&v_opt=1&v_frontier=1&v_basis=allocated');
+ points().should('have.length', 3);
lines().should('have.length', 0);
- cy.get('[data-testid="video-chart-caption"]').should('contain', 'never joined into a curve');
- cy.location('search').should('contain', 'v_queue=1');
+ cy.get('[data-testid="video-chart-caption"]').should('not.contain', 'queued');
+ kpi('h100').should('contain', '$0.218');
cy.contains('button', 'Table').click();
- cy.get('[data-testid="video-points-table"] tbody tr').should('have.length', 9);
- cy.get('[data-testid="video-points-table"]').should('contain', '2 · queued');
- cy.contains('button', 'Chart').click();
- // Optimal-only keeps every hardware's single deployment and hides the queued cells.
- cy.get('[data-testid="video-optimal"]').click();
- points().should('have.length', 3);
- cy.location('search').should('contain', 'v_opt=1');
+ tableRows().should('have.length', 3);
+ cy.get('[data-testid="video-points-table"]').should('not.contain', 'queued');
+ // Only C1 is scheduled once per replica: every row shows the full 20 / 20 cohort once.
+ cy.get('[data-testid="data-table-preset-all"]').click();
+ tableRows().each(($row) => expect($row.text()).to.include('20 / 20'));
+ cy.get('[data-testid="video-idle-note"]').should('have.text', IDLE_NOTE);
});
- it('explains the cross-hardware frontier switch when one hardware dominates', () => {
- mount();
- cy.get('[data-testid="video-frontier"]').click();
- cy.location('search').should('contain', 'v_frontier=1');
- hull().should('have.length', 0);
- cy.get('[data-testid="video-chart-caption"]').should('contain', 'one hardware dominates');
+ it('lists the plotted cells with the full column set on demand and no concurrency column', () => {
+ mount('/video', '?v_view=table');
+ cy.get('[data-testid="video-hardware-chart"]').should('not.exist');
+ tableRows().should('have.length', 3);
+ headers().should(($ths) => {
+ expect([...$ths].map((el) => el.textContent?.trim())).to.deep.equal([
+ ...ALL_COLUMNS.slice(0, 2),
+ ALL_COLUMNS[3],
+ ALL_COLUMNS[6],
+ ]);
+ });
+ cy.get('[data-testid="data-table-preset-all"]').click();
+ headers().should(($ths) => {
+ expect([...$ths].map((el) => el.textContent?.trim())).to.deep.equal(ALL_COLUMNS);
+ });
+ // B200 C1: 77.9 s / 78.3 s, 11.53 videos/GPU-hr, 6.66 videos per $1, $0.150, $0.272 API, 301.1 kJ, 96.4 %, 3,856 W.
+ cy.contains('[data-testid="video-points-table"] tbody tr', 'B200').should(($row) => {
+ const cells = [...$row.find('td')].map((el) => el.textContent?.trim());
+ expect(cells.slice(0, 12)).to.deep.equal([
+ 'B200',
+ '4 GPU · TP2 × Ulysses 2',
+ '20 / 20',
+ '77.9',
+ '78.3',
+ '11.53',
+ '6.66',
+ '$0.150',
+ '$0.272',
+ '301.1',
+ '96.4',
+ '3,856',
+ ]);
+ expect(cells[12]).to.equal('#34341996789');
+ });
});
it('hides a hardware from the legend and shows the table view', () => {
mount();
cy.contains('[data-testid="video-legend"] li', 'H100').click();
points().should('have.length', 2);
cy.contains('button', 'Table').click();
- cy.get('[data-testid="video-points-table"] tbody tr').should('have.length', 2);
+ tableRows().should('have.length', 2);
cy.get('[data-testid="video-points-table"]')
.should('contain', 'H200')
.and('contain', 'B200')
@@ -103,69 +186,50 @@ describe('Video hardware dashboard (retained fixture)', () => {
cy.get('[data-testid="video-runs-section"]').should('not.have.attr', 'open');
});
it('restores v_ params from the URL and opens the runs section for run deep links', () => {
- mount('/video', '?v_y=kjPerVideo&v_x=genSpeed&v_queue=1&view=history');
- points().should('have.length', 9);
- cy.get('[data-testid="video-chart-card"]').should('contain', 'GPU-board energy per video (kJ)');
+ mount('/video', '?v_y=kjPerVideo&v_x=p50Latency&v_tier=r&view=history');
+ points().should('have.length', 3);
+ cy.get('[data-testid="video-chart-card"]')
+ .should('contain', 'GPU-board energy per video (kJ) vs. P50 time to video (s)')
+ .and('contain', 'Cost tier: Rent - 3 Year Commit');
+ kpi('h200').should('contain', '$0.485');
cy.get('[data-testid="video-runs-section"]').should('have.attr', 'open');
cy.get('[data-testid="video-ci-runs"]').should('exist');
});
- it('reprices the API reference, updating the cards, the table and the URL', () => {
+ it('reprices the API list price beside the TCO cost, in the cards, the table and the URL', () => {
mount();
- // 0.034 $/video-s × 8 s clip = $0.272; 5.9732 videos/GPU-hr × $0.272 − $1.22 = $0.40 profit.
- kpi('h200').should('contain', 'API $/video').and('contain', '$0.272').and('contain', '$0.40');
- // H100 on the participating basis: 5.3741 × $0.272 − $1.17 = $0.29.
- kpi('h100').should('contain', '$0.29');
+ // 0.034 $/video-s × 8 s clip = $0.272, read beside each hardware's TCO cost per video.
+ kpi('h200').should('contain', 'API list $0.272').and('contain', '$0.204');
+ kpi('h100').should('contain', 'API list $0.272');
+ kpi('b200').should('contain', 'API list $0.272');
+ cy.get('[data-testid="video-chart-card"]').should(
+ 'contain',
+ 'API reference: $0.034/video-s (2026-09-19)',
+ );
cy.get('[data-testid="video-api-reference-caption"]')
.should('contain', 'Reference $0.034/video-s')
.and('contain', '$0.034–$0.047')
.and('contain', 'captured 2026-09-19')
.and('contain', 'MiniMax Design');
cy.get('[data-testid="video-api-price"]').clear().type('0.05');
- // $0.400 per clip; 5.9732 × $0.400 − $1.22 = $1.17 profit.
- kpi('h200').should('contain', '$0.400').and('contain', '$1.17');
+ // $0.400 per 8 s clip; the TCO cost itself does not move.
+ kpi('h200').should('contain', 'API list $0.400').and('contain', '$0.204');
+ kpi('h200').should('not.contain', '$0.272');
cy.location('search').should('contain', 'v_api=0.05');
cy.contains('button', 'Table').click();
cy.get('[data-testid="data-table-preset-all"]').click();
cy.get('[data-testid="video-points-table"] thead')
- .should('contain', 'Revenue per GPU-hour at API list price')
- .and('contain', 'API list price ÷ TCO cost per video (Owning at Large Hyperscaler Volume)');
- // H200 row: revenue 5.9732 × $0.400 = $2.39; multiple $0.400 ÷ $0.2042 = 1.96.
+ .should('contain', 'API list price per video')
+ .and('contain', 'TCO cost per video (Owning at Large Hyperscaler Volume)')
+ .and('not.contain', 'Revenue')
+ .and('not.contain', 'Profit');
cy.contains('[data-testid="video-points-table"] tbody tr', 'H200')
- .should('contain', '$2.39')
- .and('contain', '1.96');
+ .should('contain', '$0.400')
+ .and('contain', '$0.204');
cy.get('[data-testid="video-api-price-reset"]').click();
- cy.contains('[data-testid="video-points-table"] tbody tr', 'H200').should('contain', '$1.62');
+ cy.contains('[data-testid="video-points-table"] tbody tr', 'H200').should('contain', '$0.272');
+ kpi('h200').should('contain', 'API list $0.272');
cy.location('search').should('not.contain', 'v_api');
});
- it('keeps negative profit per GPU-hour on the canvas on the allocated basis', () => {
- mount('/video', '?v_y=profitPerGpuHour&v_basis=allocated');
- // H100 (−$0.44) and B200 (−$0.16) bill idle boards; only H200 (+$0.40) stays positive.
- points().should('have.length', 3);
- cy.get('[data-testid="video-hardware-chart"] .y-axis .tick text').should(($ticks) => {
- const labels = [...$ticks].map((el) => el.textContent ?? '');
- expect(labels.some((label) => /^[-−]/u.test(label))).to.equal(true);
- });
- cy.get('[data-testid="video-chart-card"]').should(
- 'contain',
- 'Profit per GPU-hour, API list price − TCO (Owning at Large Hyperscaler Volume)',
- );
- kpi('h100').should('contain', '-$0.44');
- kpi('b200').should('contain', '-$0.16');
- });
- it('caps the y axis at break-even when every hardware loses money at the rental tier', () => {
- mount('/video', '?v_y=profitPerGpuHour&v_tier=r');
- // $0.034/video-s on the participating basis against $2.00/$2.90/$3.70 GPU-hr: H100 −$0.54, H200 −$1.28, B200 −$0.56.
- points().should('have.length', 3);
- kpi('h100').should('contain', '-$0.54');
- kpi('h200').should('contain', '-$1.28');
- kpi('b200').should('contain', '-$0.56');
- cy.get('[data-testid="video-hardware-chart"] .y-axis .tick text').should(($ticks) => {
- const values = [...$ticks].map((el) => Number((el.textContent ?? '').replace('−', '-')));
- // Regression: a zero ceiling used to fall back to 1, leaving the top half of the canvas empty.
- expect(Math.max(...values)).to.equal(0);
- expect(Math.min(...values)).to.be.below(-1.2);
- });
- });
it('shows placeholders while loading instead of a false "Not measured"', () => {
cy.intercept('GET', '/api/video-runs?format=history&page=1', (req) => {
req.reply({ fixture: 'api/video-history.json', delay: 800 });
@@ -181,22 +245,52 @@ describe('Video hardware dashboard (retained fixture)', () => {
);
cy.get('[data-testid="video-kpi-skeleton"]').should('have.length', 4);
cy.get('[data-testid="video-kpi-unavailable"]').should('not.exist');
+ cy.get('[data-testid="video-idle-note"]').should('not.exist');
cy.wait('@slowHistory');
cy.get('[data-testid="video-kpi-skeleton"]').should('not.exist');
kpi('h200').should('contain', '$0.204');
kpi('mi355x').find('[data-testid="video-kpi-unavailable"]').should('exist');
+ cy.get('[data-testid="video-idle-note"]').should('have.text', IDLE_NOTE);
});
it('renders Chinese copy on /zh/video', () => {
mount('/zh/video');
- cy.get('[data-testid="video-chart-card"]').should(
+ cy.get('[data-testid="video-chart-card"]')
+ .should('contain', '每 1 美元 TCO 生成视频数(Hyperscaler 自有设备)')
+ .and('contain', '成本档位: Hyperscaler 自有设备');
+ cy.get('[data-testid="video-chart-caption"]').should(
'contain',
- '每 1 美元 TCO 生成视频数(Hyperscaler 自有设备)',
+ '目前每种硬件只测得一种部署(4 张 GPU · TP2 × Ulysses 2)',
);
+ cy.get('[data-testid="video-idle-note"]').should('have.text', IDLE_NOTE_ZH);
kpi('mi355x').should('contain', '未测得');
- kpi('h200').should('contain', 'API 标价 / 条视频').and('contain', '利润 / GPU 小时');
+ kpi('h200')
+ .should('contain', '4 / 4 张 GPU')
+ .and('contain', 'P50 出片时间(s)')
+ .and('contain', '视频数 / GPU 小时')
+ .and('contain', 'TCO / 条视频')
+ .and('contain', 'API 标价 $0.272')
+ .and('contain', 'kJ / 条视频');
+ cy.get('[data-testid="video-config-fact"]').should(($facts) => {
+ expect([...$facts].map((el) => el.textContent)).to.deep.equal([
+ '模型MiniMaxAI/MiniMax-H3 @ 42ed227ee7df',
+ '工作负载1344 × 768 · 8 s · 24 fps · 50 steps',
+ '部署4 张 GPU · TP2 × Ulysses 2',
+ ]);
+ });
cy.get('[data-testid="video-config-bar"]')
- .should('contain', '成本档位')
+ .should('contain', 'X 轴指标')
+ .and('contain', 'Y 轴指标')
+ .and('contain', '成本档位')
.and('contain', 'API 参考价($/video-s)')
.and('contain', '采集于 2026-09-19');
+ cy.contains('button', '表格').click();
+ headers().should(($ths) => {
+ expect([...$ths].map((el) => el.textContent?.trim())).to.deep.equal([
+ '硬件',
+ '部署',
+ 'P50 出片时间(s)',
+ '每 1 美元 TCO 生成视频数(Hyperscaler 自有设备)',
+ ]);
+ });
});
});
diff --git a/packages/app/cypress/component/video-evidence.cy.tsx b/packages/app/cypress/component/video-evidence.cy.tsx
index c21d7d287..129287cfb 100644
--- a/packages/app/cypress/component/video-evidence.cy.tsx
+++ b/packages/app/cypress/component/video-evidence.cy.tsx
@@ -1,21 +1,18 @@
import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
import type { VideoHistoryPage } from '@/components/video-benchmark/history';
-import type { GpuBasis, VideoPoint } from '@/components/video-benchmark/metrics';
+import type { VideoPoint } from '@/components/video-benchmark/metrics';
import { videoPoints } from '@/components/video-benchmark/points';
import VideoEvidence from '@/components/video-benchmark/VideoEvidence';
// Retained H100/H200/B200 C1/C2/C4 observations (cypress/fixtures/api/video-history.json).
-function mount(
- pathname = '/video',
- basis: GpuBasis = 'participating',
- select = (points: VideoPoint[]) => points,
-) {
+// Nothing in the panel is priced, so it takes no metric options: every per-GPU number
+// divides by the boards that generated the clip.
+function mount(pathname = '/video', select = (points: VideoPoint[]) => points) {
cy.fixture('api/video-history.json').then((page: VideoHistoryPage) => {
cy.mount(
(key === 'b200' ? 'rgb(1, 2, 3)' : 'rgb(4, 5, 6)')}
/>
,
@@ -51,7 +48,7 @@ describe('Video compute-bound evidence (retained fixture)', () => {
it('bounds the power meter to its declared range when mean power exceeds the recorded limit', () => {
// 2,856 W against the recorded 2,800 W limit: the label keeps the measured 102.0%,
// the meter reports and fills its 0–100 range.
- mount('/video', 'participating', (points) =>
+ mount('/video', (points) =>
points
.filter((p) => p.hardwareKey === 'h200' && p.concurrency === 1)
.map((p) => ({ ...p, avgPowerW: 2856 })),
@@ -73,12 +70,18 @@ describe('Video compute-bound evidence (retained fixture)', () => {
mount();
exhibit('plateau').find('tbody tr').should('have.length', 9);
exhibit('plateau').find('tbody th[scope="rowgroup"]').should('have.length', 3);
+ // Throughput divides by the 4 participating boards, never the 8 the B200/H100 jobs reserved.
exhibit('plateau')
.find('tr[data-hardware="b200"][data-concurrency="4"]')
.should('contain', '11.69')
.and('contain', '307.3')
.and('contain', '1.01×')
.and('contain', '3.94×');
+ exhibit('plateau')
+ .find('tr[data-hardware="h100"][data-concurrency="1"]')
+ .should('contain', '5.37')
+ .and('contain', '167.3')
+ .and('contain', '1.00×');
exhibit('plateau')
.find('tr[data-hardware="h100"][data-concurrency="4"]')
.should('contain', '5.37')
@@ -123,22 +126,11 @@ describe('Video compute-bound evidence (retained fixture)', () => {
exhibit('caveats')
.should('contain', 'Batch-one, single-replica server')
.and('contain', '4 participating GPUs per video (TP2 × Ulysses 2)')
+ .and('contain', 'allocated boards beyond those sit idle')
.and('contain', 'not node, rack or facility power')
.and('contain', 'n = 20 clips per cell')
.and('contain', 'Frozen workload 1344 × 768 · 8 s · 24 fps · 50 steps');
});
- it('switches the throughput column to the allocated basis without moving the ratios', () => {
- mount('/video', 'allocated');
- exhibit('plateau')
- .find('tr[data-hardware="h100"][data-concurrency="1"]')
- .should('contain', '2.69')
- .and('contain', '1.00×');
- exhibit('plateau')
- .find('tr[data-hardware="h100"][data-concurrency="4"]')
- .should('contain', '2.68')
- .and('contain', '4.00×');
- exhibit('plateau-reading').should('contain', 'within 1.4% of C1');
- });
it('renders Chinese copy on /zh/video', () => {
mount('/zh/video');
cy.get('[data-testid="video-evidence"]')
@@ -161,19 +153,9 @@ describe('Video compute-bound evidence (retained fixture)', () => {
.and('contain', '每个 cell n = 20 条视频');
});
it('hides the plateau and scaling exhibits when only one hardware at C1 is measured', () => {
- cy.fixture('api/video-history.json').then((page: VideoHistoryPage) => {
- cy.mount(
-
- p.hardwareKey === 'h200' && p.concurrency === 1,
- )}
- options={{ tier: 'h', basis: 'participating' }}
- colorFor={() => 'rgb(0, 0, 0)'}
- />
- ,
- );
- });
+ mount('/video', (points) =>
+ points.filter((p) => p.hardwareKey === 'h200' && p.concurrency === 1),
+ );
exhibit('power').find('[data-testid="video-evidence-power-row"]').should('have.length', 1);
exhibit('power-reading').should('contain', 'H200 ran at 97% of its enforced power limit');
exhibit('plateau').should('not.exist');
@@ -183,11 +165,7 @@ describe('Video compute-bound evidence (retained fixture)', () => {
it('renders nothing when no cell is measured', () => {
cy.mount(
- 'rgb(0, 0, 0)'}
- />
+ 'rgb(0, 0, 0)'} />
,
);
cy.get('[data-testid="video-evidence"]').should('not.exist');
diff --git a/packages/app/cypress/e2e/video-dashboard.cy.ts b/packages/app/cypress/e2e/video-dashboard.cy.ts
index 438c771fc..8cc60af1b 100644
--- a/packages/app/cypress/e2e/video-dashboard.cy.ts
+++ b/packages/app/cypress/e2e/video-dashboard.cy.ts
@@ -1,14 +1,18 @@
// Runs against the E2E_FIXTURES=1 server, which serves the retained
-// H100/H200/B200 observations from cypress/fixtures/api/video-history.json.
+// H100/H200/B200 C1/C2/C4 observations from cypress/fixtures/api/video-history.json.
+// Lead (C1) cells, per participating GPU: H100 5.37 videos/GPU-hr at $1.17/GPU-hr,
+// H200 5.97 at $1.22, B200 11.53 at $1.73. Every clip is 8 s, so the $0.034/video-s
+// API reference lists at $0.272 per video.
describe('Video hardware dashboard (E2E fixtures)', () => {
beforeEach(() => {
// The Compare panel fetches two published artifacts once in view; keep the spec offline.
- cy.intercept('GET', '/api/video-runs?run=*', { statusCode: 204 });
+ cy.intercept('GET', '/api/video-runs?run=*', { statusCode: 204 }).as('media');
});
it('leads with the cross-hardware chart and restores v_ params from the URL', () => {
- cy.visit('/video?v_y=kjPerVideo&v_tier=r&v_queue=1');
- cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 9);
- // Queued C2/C4 cells are markers only: no curve is drawn through them.
+ cy.visit('/video?v_y=kjPerVideo&v_tier=r');
+ // One measured deployment per hardware: three points, no frontier line, and the
+ // queued C2/C4 cells never reach the chart.
+ cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 3);
cy.get('[data-testid="video-hardware-chart"] path.line-path').should('have.length', 0);
cy.get('[data-testid="video-chart-caption"]').should(
'contain',
@@ -17,12 +21,202 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
cy.get('[data-testid="video-chart-card"]')
.should('contain', 'GPU-board energy per video (kJ)')
.and('contain', 'Rent - 3 Year Commit');
+ cy.get('[data-testid="video-idle-note"]').should(
+ 'have.text',
+ 'Per participating GPU: B200 (4 of 8), H100 (4 of 8) reserved more boards than one video uses; the idle boards are not counted.',
+ );
cy.get('[data-testid="video-tco-badge"]').first().should('contain', 'B200');
cy.get('[data-testid="video-replay"]').should('be.visible');
+ // The campaign is frozen: model, workload and deployment are facts; only axes and tier select.
+ cy.get('[data-testid="video-config-fact"]').should('have.length', 3);
+ cy.get('[data-testid="video-config-fact"]')
+ .eq(0)
+ .should('contain', 'Model')
+ .and('contain', 'MiniMaxAI/MiniMax-H3 @ 42ed227ee7df');
+ cy.get('[data-testid="video-config-fact"]')
+ .eq(1)
+ .should('contain', 'Workload')
+ .and('contain', '1344 × 768 · 8 s · 24 fps · 50 steps');
+ cy.get('[data-testid="video-config-fact"]')
+ .eq(2)
+ .should('contain', 'Deployment')
+ .and('contain', '4 GPU · TP2 × Ulysses 2');
+ cy.get('[data-testid="video-config-bar"] [role="combobox"]').should('have.length', 3);
+ cy.get('[data-testid="video-config-bar"] [role="combobox"]')
+ .eq(0)
+ .should('contain', 'P90 time to video (s)');
+ cy.get('[data-testid="video-config-bar"] [role="combobox"]')
+ .eq(1)
+ .should('contain', 'GPU-board energy per video (kJ)');
+ cy.get('[data-testid="video-config-bar"] [role="combobox"]')
+ .eq(2)
+ .should('contain', 'Rent - 3 Year Commit');
+ cy.get('[data-testid="video-config-bar"]').should('not.contain', 'GPU basis');
+ cy.get('[data-testid="video-legend"]').should('contain', 'MI355X · not measured');
+ cy.get('[data-testid="video-legend"] [role="switch"]').should('not.exist');
+ // KPI cards read each hardware's lead deployment at the selected tier (Rent - 3 Year Commit:
+ // $2 / $2.9 / $3.7 per GPU-hour); the API list price sits beside the TCO cost.
cy.get('[data-testid="video-kpi-card"]').should('have.length', 4);
+ cy.get('[data-testid="video-kpi-card"][data-hardware="b200"]')
+ .should('contain', '4 of 8 GPUs · TP2 × Ulysses 2')
+ .and('contain', 'P50 time to video (s)')
+ .and('contain', '77.9')
+ .and('contain', 'P90 78.3')
+ .and('contain', 'Videos / GPU-hr')
+ .and('contain', '11.53')
+ .and('contain', 'TCO / video')
+ .and('contain', '$0.321')
+ .and('contain', 'API list $0.272')
+ .and('contain', 'kJ / video')
+ .and('contain', '301.1')
+ .and('not.contain', 'Profit');
+ cy.get('[data-testid="video-kpi-card"][data-hardware="h200"]')
+ .should('contain', '4 of 4 GPUs')
+ .and('contain', '$0.485');
+ cy.get('[data-testid="video-kpi-card"][data-hardware="h100"]')
+ .should('contain', '4 of 8 GPUs')
+ .and('contain', '$0.372');
cy.get('[data-testid="video-runs-section"]').should('not.have.attr', 'open');
cy.get('[data-testid="video-ci-runs"]').should('not.exist');
});
+ it('lists only the measured deployments in the table view, without a concurrency column', () => {
+ cy.visit('/video?v_view=table');
+ cy.get('[data-testid="video-hardware-chart"]').should('not.exist');
+ // One row per hardware: the queued C2/C4 cells stay out, so the C4-only H100 run never appears.
+ cy.get('[data-testid="video-points-table"] tbody tr').should('have.length', 3);
+ cy.get('[data-testid="video-points-table"]').should('not.contain', '#34344378350');
+ cy.get('[data-testid="data-table-preset-all"]').click();
+ cy.get('[data-testid="video-points-table"] thead th').should(($headers) => {
+ expect([...$headers].map((th) => th.textContent?.trim())).to.deep.equal([
+ 'Hardware',
+ 'Deployment',
+ 'Valid / scheduled',
+ 'P50 time to video (s)',
+ 'P90 time to video (s)',
+ 'Videos per GPU-hour',
+ 'Videos per $1 TCO (Owning at Large Hyperscaler Volume)',
+ 'TCO cost per video (Owning at Large Hyperscaler Volume)',
+ 'API list price per video',
+ 'GPU-board energy per video (kJ)',
+ 'Mean board power / enforced limit (%)',
+ 'Board power (W)',
+ 'CI run',
+ ]);
+ });
+ cy.contains('[data-testid="video-points-table"] tbody tr', 'B200')
+ .should('contain', '4 GPU · TP2 × Ulysses 2')
+ .and('contain', '20 / 20')
+ .and('contain', '77.9')
+ .and('contain', '78.3')
+ .and('contain', '11.53')
+ .and('contain', '6.66')
+ .and('contain', '$0.150')
+ .and('contain', '$0.272')
+ .and('contain', '301.1')
+ .and('contain', '96.4')
+ .and('contain', '3,856')
+ .and('contain', '#34341996789');
+ cy.contains('[data-testid="video-points-table"] tbody tr', 'H200')
+ .should('contain', '150.6')
+ .and('contain', '5.97')
+ .and('contain', '4.9')
+ .and('contain', '$0.204')
+ .and('contain', '411')
+ .and('contain', '97.4')
+ .and('contain', '2,727')
+ .and('contain', '#34342452354');
+ cy.contains('[data-testid="video-points-table"] tbody tr', 'H100')
+ .should('contain', '167.3')
+ .and('contain', '5.37')
+ .and('contain', '4.59')
+ .and('contain', '$0.218')
+ .and('contain', '431.1')
+ .and('contain', '91.9')
+ .and('contain', '2,575')
+ .and('contain', '#34336635063');
+ });
+ it('prices the API list reference from v_api and resets it to the dated default', () => {
+ cy.visit('/video?v_api=0.05');
+ cy.get('[data-testid="video-api-price"]').should('have.value', '0.05');
+ cy.get('[data-testid="video-chart-card"]').should('contain', 'API reference: $0.050/video-s');
+ // 8 s clips: $0.05/video-s lists at $0.400 per video on every hardware.
+ cy.get('[data-testid="video-kpi-card"][data-hardware="b200"]').should(
+ 'contain',
+ 'API list $0.400',
+ );
+ cy.get('[data-testid="video-kpi-card"][data-hardware="h100"]').should(
+ 'contain',
+ 'API list $0.400',
+ );
+ cy.get('[data-testid="video-api-price-reset"]').click();
+ cy.get('[data-testid="video-api-price"]').should('have.value', '0.034');
+ cy.get('[data-testid="video-kpi-card"][data-hardware="b200"]').should(
+ 'contain',
+ 'API list $0.272',
+ );
+ cy.location('search').should('not.contain', 'v_api');
+ // A non-positive price never prices at 0: the dated reference stays in force.
+ cy.visit('/video?v_api=0');
+ cy.get('[data-testid="video-api-price"]').should('have.value', '0.034');
+ cy.get('[data-testid="video-kpi-card"][data-hardware="h200"]').should(
+ 'contain',
+ 'API list $0.272',
+ );
+ cy.get('[data-testid="video-api-reference-caption"]').should('contain', 'captured 2026-09-19');
+ });
+ it('compares the slowest lead deployment against the fastest with time, cost and energy deltas', () => {
+ cy.visit('/video');
+ cy.get('[data-testid="video-compare"]').scrollIntoView();
+ cy.wait('@media');
+ // Default pair: slowest C1 P50 (H100) as baseline, fastest (B200) as candidate. Two hardware
+ // selects and nothing else to pick: no case dropdown, no blind mode.
+ cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H100');
+ cy.get('[data-testid="video-compare-candidate"]').should('contain', 'B200');
+ cy.get('[data-testid="video-compare"] [role="combobox"]').should('have.length', 2);
+ cy.get('[data-testid="video-compare-clips"]').should(
+ 'contain',
+ 'Clips are not published for one of these runs',
+ );
+ cy.get('[data-testid="video-compare-table"] tbody tr').should(($rows) => {
+ expect([...$rows].map((row) => row.dataset.metric)).to.deep.equal([
+ 'p50Latency',
+ 'dollarsPerVideo',
+ 'kjPerVideo',
+ ]);
+ });
+ cy.get('[data-testid="video-compare-table"] tr[data-metric="p50Latency"]')
+ .should('contain', '167.3')
+ .and('contain', '77.9')
+ .and('contain', '-53.4%')
+ .and('contain', '×0.47')
+ .find('[data-tone]')
+ .should('have.attr', 'data-tone', 'better');
+ cy.get('[data-testid="video-compare-table"] tr[data-metric="dollarsPerVideo"]')
+ .should('contain', '$0.218')
+ .and('contain', '$0.150')
+ .and('contain', '-31.1%')
+ .find('[data-tone]')
+ .should('have.attr', 'data-tone', 'better');
+ cy.get('[data-testid="video-compare-table"] tr[data-metric="kjPerVideo"]')
+ .should('contain', '431.1')
+ .and('contain', '301.1')
+ .and('contain', '-30.2%')
+ .find('[data-tone]')
+ .should('have.attr', 'data-tone', 'better');
+ cy.get('[data-testid="video-compare"]').should(
+ 'contain',
+ 'Cost tier: Owning at Large Hyperscaler Volume.',
+ );
+ // Swapping sides flips the deltas and records the pair in the URL.
+ cy.get('[data-testid="video-compare-swap"]').click();
+ cy.get('[data-testid="video-compare-baseline"]').should('contain', 'B200');
+ cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H100');
+ cy.get('[data-testid="video-compare-table"] tr[data-metric="p50Latency"]')
+ .should('contain', '+114.7%')
+ .find('[data-tone]')
+ .should('have.attr', 'data-tone', 'worse');
+ cy.location('search').should('contain', 'v_base=b200').and('contain', 'v_cand=h100');
+ });
it('opens the runs section for history deep links and renders the Chinese dashboard', () => {
cy.visit('/video?view=history');
cy.get('[data-testid="video-runs-section"]').should('have.attr', 'open');
@@ -33,13 +227,27 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
'contain',
'每 1 美元 TCO 生成视频数(Hyperscaler 自有设备)',
);
+ cy.get('[data-testid="video-idle-note"]').should(
+ 'have.text',
+ '按参与计算的 GPU 计:B200(4 / 8 张)、H100(4 / 8 张)预留的板卡多于单条视频所需,空闲板卡未计入。',
+ );
+ cy.get('[data-testid="video-config-bar"]')
+ .should('contain', '模型')
+ .and('contain', '工作负载')
+ .and('contain', '4 张 GPU · TP2 × Ulysses 2')
+ .and('contain', 'X 轴指标')
+ .and('contain', '成本档位');
+ cy.get('[data-testid="video-kpi-card"][data-hardware="b200"]')
+ .should('contain', 'TCO / 条视频')
+ .and('contain', '$0.150')
+ .and('contain', 'API 标价 $0.272');
cy.get('[data-testid="video-kpi-card"][data-hardware="mi355x"]').should('contain', '未测得');
});
it('fits a phone viewport without horizontal page scroll in both locales', () => {
cy.viewport(390, 844);
- for (const path of ['/video?v_queue=1', '/zh/video']) {
+ for (const path of ['/video', '/zh/video']) {
cy.visit(path);
- cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length.at.least', 3);
+ cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 3);
cy.get('[data-testid="video-kpi-card"]').should('have.length', 4);
cy.document().then((doc) => {
expect(doc.documentElement.scrollWidth, `${path} page width`).to.be.at.most(
diff --git a/packages/app/src/components/video-benchmark/VideoCompare.tsx b/packages/app/src/components/video-benchmark/VideoCompare.tsx
index ab56117e6..425c7d7c3 100644
--- a/packages/app/src/components/video-benchmark/VideoCompare.tsx
+++ b/packages/app/src/components/video-benchmark/VideoCompare.tsx
@@ -4,7 +4,6 @@ import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react'
import { Button } from '@/components/ui/button';
import { Heading } from '@/components/ui/heading';
import { Skeleton } from '@/components/ui/skeleton';
-import { Switch } from '@/components/ui/switch';
import { track } from '@/lib/analytics';
import { useLocale } from '@/lib/use-locale';
import {
@@ -12,7 +11,6 @@ import {
compareMetrics,
compareSide,
pairCases,
- type CasePair,
type CompareRow,
type CompareSide,
} from './compare';
@@ -44,18 +42,11 @@ const STRINGS = {
baseline: 'Baseline',
candidate: 'Candidate',
swap: 'Swap sides',
- blind: 'Blind mode',
- blindHint: 'Hide which hardware is which until you reveal it.',
- reveal: 'Reveal hardware',
- hidden: { baseline: 'A', candidate: 'B' },
needTwo: 'Comparison needs at least two measured hardware.',
metrics: 'Metric deltas',
- metricsHidden: 'Metric deltas are hidden in blind mode; reveal the hardware to see them.',
metric: 'Metric',
change: 'Change',
- assumptions: (tier: string, basis: string) => `Cost tier: ${tier} · GPU basis: ${basis}.`,
- participating: 'participating GPUs',
- allocated: 'allocated GPUs',
+ assumptions: (tier: string) => `Cost tier: ${tier}.`,
better: 'Candidate better',
worse: 'Candidate worse',
neutral: 'No difference',
@@ -70,7 +61,6 @@ const STRINGS = {
caseOf: (i: number, n: number) => `Case ${i} of ${n}`,
prev: 'Previous case',
next: 'Next case',
- case: 'Case (prompt · seed)',
playBoth: 'Play both',
pauseBoth: 'Pause both',
restart: 'Restart both',
@@ -90,18 +80,11 @@ const STRINGS = {
baseline: '基线',
candidate: '候选',
swap: '交换两侧',
- blind: '盲测模式',
- blindHint: '揭晓前隐藏两侧各是哪种硬件。',
- reveal: '揭晓硬件',
- hidden: { baseline: 'A', candidate: 'B' },
needTwo: '至少需要两种已实测的硬件才能对比。',
metrics: '指标差异',
- metricsHidden: '盲测模式下隐藏指标差异,揭晓硬件后显示。',
metric: '指标',
change: '变化',
- assumptions: (tier: string, basis: string) => `成本档位:${tier} · GPU 口径:${basis}。`,
- participating: '参与计算的 GPU',
- allocated: '已分配的 GPU',
+ assumptions: (tier: string) => `成本档位:${tier}。`,
better: '候选更优',
worse: '候选更差',
neutral: '无差异',
@@ -116,7 +99,6 @@ const STRINGS = {
caseOf: (i: number, n: number) => `第 ${i} / ${n} 个用例`,
prev: '上一个用例',
next: '下一个用例',
- case: '用例(prompt · seed)',
playBoth: '同时播放',
pauseBoth: '同时暂停',
restart: '从头同时播放',
@@ -140,16 +122,6 @@ const CHIP = {
neutral: 'border-border text-muted-foreground',
} as const;
-const excerpt = (prompt: string, max = 60) =>
- prompt.length > max ? `${prompt.slice(0, max).trimEnd()}…` : prompt;
-
-function caseLabel(pair: CasePair, repeated: boolean): string {
- const parts = [pair.prompt === null ? (pair.caseId ?? '—') : excerpt(pair.prompt)];
- if (pair.seed !== null) parts.push(`seed ${pair.seed}`);
- if (repeated) parts.push(`#${pair.repetition + 1}`);
- return parts.join(' · ');
-}
-
/** The stored artifact of one side, or null when the deployment publishes no media (HTTP 204). */
async function fetchSide(point: VideoPoint, signal: AbortSignal): Promise {
const response = await fetch(
@@ -198,7 +170,7 @@ function ClipPlaceholders() {
/**
* Arena-style baseline vs candidate: the same prompt and seed from both CI runs
- * play side by side (blind mode hides which hardware is which), with the metric
+ * play side by side, with the metric
* deltas between each hardware's lead deployment below. Media is fetched once
* the panel scrolls into view, one stored artifact per side.
*/
@@ -214,7 +186,6 @@ export default function VideoCompare({
const locale = useLocale();
const s = STRINGS[locale];
const headingId = useId();
- const blindId = useId();
const sectionRef = useRef(null);
const videos = useRef>({ baseline: null, candidate: null });
const [selection, setSelection] = useState(
@@ -225,8 +196,6 @@ export default function VideoCompare({
const [failure, setFailure] = useState<{ key: string; message: string } | null>(null);
const [failedMedia, setFailedMedia] = useState>(() => new Set());
const [visible, setVisible] = useState(false);
- const [blind, setBlind] = useState(false);
- const [revealedFor, setRevealedFor] = useState(null);
const request = useRef(0);
const download = useRef(null);
useEffect(() => {
@@ -276,12 +245,9 @@ export default function VideoCompare({
value: point.hardwareKey ?? '',
label: hardwareLabel(point.hardwareKey ?? ''),
}));
- const masked = blind && revealedFor !== `${pairKey}:${index}`;
const sideOf = { baseline, candidate } as Record;
- const paneLabel = (role: Role) =>
- masked ? s.hidden[role] : hardwareLabel(sideOf[role]?.hardwareKey ?? '');
- const paneColor = (role: Role) =>
- masked ? 'var(--muted-foreground)' : colorFor(sideOf[role]?.hardwareKey ?? '');
+ const paneLabel = (role: Role) => hardwareLabel(sideOf[role]?.hardwareKey ?? '');
+ const paneColor = (role: Role) => colorFor(sideOf[role]?.hardwareKey ?? '');
const update = (patch: Partial) => {
const next = { ...selection, ...patch };
@@ -371,13 +337,6 @@ export default function VideoCompare({
});
track('video_compare_playback', { action });
};
- const reveal = () => {
- setRevealedFor(`${pairKey}:${index}`);
- track('video_compare_revealed', {
- baseline: baseline?.hardwareKey ?? null,
- candidate: candidate?.hardwareKey ?? null,
- });
- };
return (
-
-
-
- {s.title}
-
-
{s.subtitle}
-
-
- {
- setBlind(checked);
- setRevealedFor(null);
- track('video_compare_blind_toggled', { value: String(checked) });
- }}
- data-testid="video-compare-blind"
- />
- {s.blind}
-
+
+
+ {s.title}
+
+
{s.subtitle}
· {s[role]}
- {!masked && (
-
- · {layoutLabel(point, locale)}
-
- )}
+
+ · {layoutLabel(point, locale)}
+
{record.seconds !== null && (
· {s.timeToVideo}{' '}
@@ -564,57 +502,33 @@ export default function VideoCompare({
);
})}
-
-
- playback('play')}
- data-testid="video-compare-play"
- >
- {s.playBoth}
-
- playback('pause')}
- data-testid="video-compare-pause"
- >
- {s.pauseBoth}
-
- playback('restart')}
- data-testid="video-compare-restart"
- >
- {s.restart}
-
- {masked && (
-
- {s.reveal}
-
- )}
-
-
- goTo(Number(value))}
- options={pairs.map((pair, i) => ({
- value: String(i),
- label: caseLabel(pair, repeated.has(pair.key)),
- }))}
- />
-
+
+ playback('play')}
+ data-testid="video-compare-play"
+ >
+ {s.playBoth}
+
+ playback('pause')}
+ data-testid="video-compare-pause"
+ >
+ {s.pauseBoth}
+
+ playback('restart')}
+ data-testid="video-compare-restart"
+ >
+ {s.restart}
+
{(matched.unmatched.baseline > 0 || matched.unmatched.candidate > 0) && (
)}
- {masked ? (
-
- {s.metricsHidden}
-
- ) : (
-
-
{s.metrics}
-
-
-
-
-
- {s.metric}
+
+
{s.metrics}
+
+
+
+
+
+ {s.metric}
+
+ {ROLES.map((role) => (
+
+
+
+ {paneLabel(role)}
+ · {s[role]}
+
- {ROLES.map((role) => (
-
-
-
- {paneLabel(role)}
- · {s[role]}
-
-
- ))}
-
- {s.change}
+ ))}
+
+ {s.change}
+
+
+
+
+ {rows.map((row) => (
+
+
+ {locale === 'zh'
+ ? VIDEO_METRICS[row.id].labelZh
+ : VIDEO_METRICS[row.id].label}
+ {formatMetric(row.baseline, row.id)}
+ {formatMetric(row.candidate, row.id)}
+
+
+
-
-
- {rows.map((row) => (
-
-
- {locale === 'zh'
- ? VIDEO_METRICS[row.id].labelZh
- : VIDEO_METRICS[row.id].label}
-
- {formatMetric(row.baseline, row.id)}
- {formatMetric(row.candidate, row.id)}
-
-
-
-
- ))}
-
-
-
-
- {s.assumptions(
- TIER_LABELS[options.tier][locale],
- options.basis === 'allocated' ? s.allocated : s.participating,
- )}
-
+ ))}
+
+
- )}
+
+ {s.assumptions(TIER_LABELS[options.tier][locale])}
+
+
{s.footnote}
>
)}
diff --git a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
index 71beba436..2eea0b2fa 100644
--- a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
+++ b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
@@ -10,7 +10,6 @@ import {
TIER_LABELS,
X_METRICS,
Y_METRICS,
- type GpuBasis,
type XMetricId,
type YMetricId,
} from './metrics';
@@ -28,9 +27,6 @@ const STRINGS = {
x: 'X-axis metric',
y: 'Y-axis metric',
tier: 'Cost tier',
- basis: 'GPU basis',
- participating: 'Participating GPUs (boards generating the clip)',
- allocated: 'Allocated GPUs (boards the job reserved)',
},
zh: {
benchmark: '基准测试配置',
@@ -41,18 +37,24 @@ const STRINGS = {
x: 'X 轴指标',
y: 'Y 轴指标',
tier: '成本档位',
- basis: 'GPU 口径',
- participating: '参与计算的 GPU(实际生成视频的板卡)',
- allocated: '已分配的 GPU(作业预留的板卡)',
},
};
+/** A fixed fact of the campaign, laid out like a control so the panel reads as one row. */
+function Fact({ label, value }: { label: string; value: string }) {
+ return (
+
+ {label}
+ {value}
+
+ );
+}
+
/**
* Two control panels mirroring the inference tab: what is being compared
- * (frozen for this campaign, so model, workload and the measured deployments
- * are single-option selects that state the comparison rather than change it)
- * and how it is plotted. Queued cells, optimal-only and the cross-hardware
- * frontier are legend switches, as on the inference chart.
+ * (frozen for this campaign, so model, workload and deployment are stated,
+ * not selectable, beside the one editable input, the API list price) and
+ * how it is plotted (axes and cost tier).
*/
export default function VideoConfigBar({
state,
@@ -65,7 +67,7 @@ export default function VideoConfigBar({
onChange: (patch: Partial) => void;
modelLabel: string;
workloadLabel: string;
- /** Measured server layouts (GPUs per video and model split), stated rather than selectable. */
+ /** Measured server layouts (GPUs per video and model split). */
deploymentLabel: string;
}) {
const locale = useLocale();
@@ -78,27 +80,12 @@ export default function VideoConfigBar({
return (
- {}}
- options={[{ value: 'model', label: modelLabel }]}
- />
- {}}
- options={[{ value: 'workload', label: workloadLabel }]}
- />
- {}}
- options={[{ value: 'deployment', label: deploymentLabel }]}
- />
+
+
+
onChange({ apiPrice })} />
-
+
change('tier', value as CostTier)}
options={COST_TIERS.map((tier) => ({ value: tier, label: TIER_LABELS[tier][locale] }))}
/>
- change('basis', value as GpuBasis)}
- options={[
- { value: 'participating', label: s.participating },
- { value: 'allocated', label: s.allocated },
- ]}
- />
);
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index b83d40374..bdfea7350 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -56,19 +56,12 @@ const RUNS_SECTION_PARAMS = [
const CSV_METRICS: readonly MetricId[] = [
'p50Latency',
'p90Latency',
- 'genSpeed',
'videosPerGpuHour',
- 'videoSecondsPerGpuHour',
'videosPerDollar',
'dollarsPerVideo',
- 'dollarsPerVideoSecond',
'kjPerVideo',
- 'videosPerKwh',
'powerPctCap',
'apiPricePerVideo',
- 'revenuePerGpuHour',
- 'profitPerGpuHour',
- 'apiPriceMultiple',
];
const STRINGS = {
@@ -83,9 +76,10 @@ const STRINGS = {
badges: 'TCO $/chip/hr',
source: 'Source',
apiReference: 'API reference',
- queue: 'Show queued requests (C2/C4)',
- optimal: 'Optimal only',
- frontier: 'Pareto frontier',
+ idle: (list: string) =>
+ `Per participating GPU: ${list} reserved more boards than one video uses; the idle boards are not counted.`,
+ idleItem: (hardware: string, used: number, reserved: number) =>
+ `${hardware} (${used} of ${reserved})`,
deployments: (n: number) => `${n} deployments`,
runs: 'Runs, videos & evidence',
runsHint: 'Per-run results, generated clips, fidelity checks and the performance history list.',
@@ -109,9 +103,10 @@ const STRINGS = {
badges: 'TCO $/chip/hr',
source: '来源',
apiReference: 'API 参考价',
- queue: '显示排队请求(C2/C4)',
- optimal: '仅最优',
- frontier: 'Pareto 前沿',
+ idle: (list: string) =>
+ `按参与计算的 GPU 计:${list}预留的板卡多于单条视频所需,空闲板卡未计入。`,
+ idleItem: (hardware: string, used: number, reserved: number) =>
+ `${hardware}(${used} / ${reserved} 张)`,
deployments: (n: number) => `${n} 种部署`,
runs: '运行、视频与证据',
runsHint: '按运行查看结果、生成的视频、保真度检查以及性能历史列表。',
@@ -180,11 +175,11 @@ export default function VideoDashboard() {
() =>
new Map(
hardwareKeys.flatMap((key) => {
- const point = leadCell(cells, key, { tier: state.tier, basis: state.basis });
+ const point = leadCell(cells, key, { tier: state.tier });
return point ? [[key, point] as const] : [];
}),
),
- [cells, hardwareKeys, state.tier, state.basis],
+ [cells, hardwareKeys, state.tier],
);
const lead = measured.values().next().value ?? cells[0];
const layouts = [
@@ -199,6 +194,12 @@ export default function VideoDashboard() {
const otherWorkloads = new Set(cells.map((p) => p.workload.split(' · ').slice(0, 5).join(' · ')))
.size;
const workloadSuffix = otherWorkloads > 1 ? s.workloads(otherWorkloads - 1) : '';
+ // Jobs that reserved a whole node but generated on part of it: say so beside the per-GPU numbers.
+ const idle = [...measured.values()]
+ .filter(
+ (p) => p.participating !== null && p.allocated !== null && p.allocated > p.participating,
+ )
+ .map((p) => s.idleItem(hardwareLabel(p.hardwareKey ?? ''), p.participating!, p.allocated!));
const legendItems = VIDEO_HARDWARE_ROSTER.map(({ key, unavailable }) => {
const point = measured.get(key);
@@ -226,7 +227,7 @@ export default function VideoDashboard() {
});
const exportCsv = () => {
- const rows = videoTableRows(points, state, hidden);
+ const rows = videoTableRows(points, hidden);
const header = [
'hardware',
'concurrency',
@@ -238,7 +239,6 @@ export default function VideoDashboard() {
'tp_size',
'ulysses_degree',
'replicas',
- 'queued',
...CSV_METRICS.map((id) => `${id} (${VIDEO_METRICS[id].unit})`),
'board_power_w',
'enforced_limit_w',
@@ -257,7 +257,6 @@ export default function VideoDashboard() {
p.server?.tp ?? null,
p.server?.ulysses ?? null,
p.replicas,
- isQueueing(p) ? 1 : 0,
...CSV_METRICS.map((id) => metricValue(p, id, options)),
p.avgPowerW,
p.enforcedLimitW,
@@ -273,7 +272,7 @@ export default function VideoDashboard() {
const url = URL.createObjectURL(blob);
const anchor = document.createElement('a');
anchor.href = url;
- anchor.download = `videogenx-${state.y}-vs-${state.x}-${state.tier}-${state.basis}.csv`;
+ anchor.download = `videogenx-${state.y}-vs-${state.x}-${state.tier}.csv`;
anchor.click();
URL.revokeObjectURL(url);
};
@@ -358,6 +357,11 @@ export default function VideoDashboard() {
+ {idle.length > 0 && (
+
+ {s.idle(idle.join(locale === 'zh' ? '、' : ', '))}
+
+ )}
{replay && (
@@ -403,35 +407,6 @@ export default function VideoDashboard() {
isLegendExpanded={legendExpanded}
onExpandedChange={setLegendExpanded}
disableActiveSort
- switches={[
- {
- id: 'video-queue',
- label: s.queue,
- checked: state.queue,
- onCheckedChange: (checked) => {
- update({ queue: checked });
- track('video_queue_changed', { value: String(checked) });
- },
- },
- {
- id: 'video-optimal',
- label: s.optimal,
- checked: state.optimal,
- onCheckedChange: (checked) => {
- update({ optimal: checked });
- track('video_optimal_changed', { value: String(checked) });
- },
- },
- {
- id: 'video-frontier',
- label: s.frontier,
- checked: state.frontier,
- onCheckedChange: (checked) => {
- update({ frontier: checked });
- track('video_frontier_changed', { value: String(checked) });
- },
- },
- ]}
/>
@@ -442,7 +417,7 @@ export default function VideoDashboard() {
{!loading && !error && (
<>
-
+
>
)}
string;
}
@@ -209,12 +207,12 @@ export interface VideoEvidenceProps {
* sentence is built from the computed numbers; the section disappears when
* nothing is measured.
*/
-export default function VideoEvidence({ points, options, colorFor }: VideoEvidenceProps) {
+export default function VideoEvidence({ points, colorFor }: VideoEvidenceProps) {
const locale = useLocale();
const s = STRINGS[locale];
const power = powerUtilization(points);
const range = powerRange(power);
- const plateau = concurrencyPlateau(points, options.basis);
+ const plateau = concurrencyPlateau(points);
const summary = plateauSummary(plateau);
const scaling = scalingVsSpec(points);
if (range === null && summary === null && scaling.length === 0) return null;
diff --git a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
index 07180120d..7d5e2aa1f 100644
--- a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
+++ b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
@@ -22,15 +22,9 @@ const STRINGS = {
`One deployment measured per hardware so far (${layouts}), so each hardware is a single point. A per-hardware Pareto curve needs the GPUs-per-video sweep.`,
multi:
"Solid lines join each hardware's Pareto-optimal deployments (GPUs per video and model split); faded points are dominated deployments.",
- global: 'Dashed line: cross-hardware Pareto frontier over all deployments.',
- globalOne:
- 'Cross-hardware Pareto frontier: one hardware dominates, so there is no line to draw.',
- queued:
- 'Small faded markers: C2/C4 client concurrency on the same batch-one deployment. Requests queue and throughput stays flat, so they are evidence, never joined into a curve.',
controls:
'Shift+scroll to zoom; drag to pan; double-click to reset. Click a point to pin its details.',
deployment: 'Deployment',
- queuedTag: 'queued',
n: 'valid samples',
run: 'run',
noData: 'No hardware has both selected metrics for this configuration.',
@@ -40,13 +34,8 @@ const STRINGS = {
`目前每种硬件只测得一种部署(${layouts}),因此每种硬件只有一个点;要得到各硬件自己的 Pareto 曲线,还需扫描每条视频占用的 GPU 数。`,
multi:
'实线连接同一硬件的 Pareto 最优部署(每条视频占用的 GPU 数及模型切分方式);淡色点为被支配的部署。',
- global: '虚线为所有部署的跨硬件 Pareto 前沿。',
- globalOne: '跨硬件 Pareto 前沿:有一种硬件全面占优,因此没有可画的连线。',
- queued:
- '小号淡色标记为同一 batch-one 部署上的 C2/C4 客户端并发:请求排队、吞吐量持平,仅作为证据展示,不连成曲线。',
controls: 'Shift+滚轮缩放,拖动平移,双击重置。点击数据点可固定详情。',
deployment: '部署',
- queuedTag: '排队',
n: '有效样本',
run: '运行',
noData: '当前配置下没有硬件同时具备所选的两个指标。',
@@ -71,12 +60,7 @@ export default function VideoHardwareChart({
const locale = useLocale();
const s = STRINGS[locale];
const options = metricOptions(state);
- const { plotted, frontiers, global, multiLayout } = plotVideoPoints(
- points,
- state,
- colorFor,
- hidden,
- );
+ const { plotted, frontiers, multiLayout } = plotVideoPoints(points, state, colorFor, hidden);
const xLabel = metricLabel(state.x, locale, options);
const yLabel = metricLabel(state.y, locale, options);
const lines: Record = {};
@@ -86,15 +70,12 @@ export default function VideoHardwareChart({
lines[key] = frontier.map((p) => ({ x: p.x, y: p.y }));
lineColors[key] = frontier[0].color;
}
- const layouts = [
- ...new Set(plotted.filter((p) => !p.queued).map((p) => layoutLabel(p, locale))),
- ].join(locale === 'zh' ? ';' : '; ');
+ const layouts = [...new Set(plotted.map((p) => layoutLabel(p, locale)))].join(
+ locale === 'zh' ? ';' : '; ',
+ );
const colon = locale === 'zh' ? ':' : ': ';
- const queuedTag = locale === 'zh' ? `(${s.queuedTag})` : ` (${s.queuedTag})`;
- const pointLabel = (p: PlottedVideoPoint) => {
- if (p.queued) return `C${p.concurrency}`;
- return multiLayout ? `${p.label} · ${layoutLabel(p, locale)}` : p.label;
- };
+ const pointLabel = (p: PlottedVideoPoint) =>
+ multiLayout ? `${p.label} · ${layoutLabel(p, locale)}` : p.label;
const drawLabels = (
group: Selection,
x: ContinuousScale,
@@ -113,21 +94,15 @@ export default function VideoHardwareChart({
.attr('pointer-events', 'none')
.text(pointLabel);
};
+ // Both axes start at zero so per-dollar and per-video readings compare by length, not offset.
const xDomain = zeroAnchoredDomain(
plotted.map((p) => p.x),
1.12,
);
- // Profit per GPU-hour goes negative when the API price misses the tier cost: those
- // points stay on the canvas, and when every hardware loses money the top is break-even.
const yDomain = zeroAnchoredDomain(
plotted.map((p) => p.y),
1.15,
);
- const caption = [
- multiLayout ? s.multi : s.single(layouts || '—'),
- state.frontier ? (global.length > 1 ? s.global : s.globalOne) : null,
- state.queue && !state.optimal ? s.queued : null,
- ].filter((text): text is string => text !== null);
return (
1
- ? { global: global.map((p) => ({ x: p.x, y: p.y })) }
- : {},
- config: {
- getColor: () => 'var(--foreground)',
- strokeWidth: 1.5,
- strokeDasharray: '6 4',
- curve: curveLinear,
- },
- },
{
type: 'line',
key: 'hardware-frontiers',
@@ -174,8 +135,8 @@ export default function VideoHardwareChart({
getCy: () => 0,
getX: (p) => p.x,
getY: (p) => p.y,
- getColor: (p) => (p.queued || !p.optimal ? faded(p.color) : p.color),
- getRadius: (p) => (p.queued ? 3.5 : p.optimal ? 7 : 5),
+ getColor: (p) => (p.optimal ? p.color : faded(p.color)),
+ getRadius: (p) => (p.optimal ? 7 : 5),
stroke: 'var(--foreground)',
strokeWidth: 1,
keyFn: (p) => p.id,
@@ -198,7 +159,7 @@ export default function VideoHardwareChart({
tooltip={{
rulerType: 'none',
content: (p) =>
- `${escapeHtml(p.label)} · C${p.concurrency ?? '?'}${p.queued ? queuedTag : ''} ${s.deployment}${colon}${escapeHtml(layoutLabel(p, locale))} ${escapeHtml(xLabel)}${colon}${formatMetric(p.x, state.x)} ${escapeHtml(yLabel)}${colon}${formatMetric(p.y, state.y)} ${s.n}${colon}${p.samples} · ${s.run} #${escapeHtml(p.runId)}
`,
+ `${escapeHtml(p.label)} ${s.deployment}${colon}${escapeHtml(layoutLabel(p, locale))} ${escapeHtml(xLabel)}${colon}${formatMetric(p.x, state.x)} ${escapeHtml(yLabel)}${colon}${formatMetric(p.y, state.y)} ${s.n}${colon}${p.samples} · ${s.run} #${escapeHtml(p.runId)}
`,
onPointClick: onSelect,
}}
zoom={{
@@ -217,7 +178,7 @@ export default function VideoHardwareChart({
}
caption={
- {caption.join(' ')}
+ {multiLayout ? s.multi : s.single(layouts || '—')}
}
/>
diff --git a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
index 01bfafed8..9520d49fc 100644
--- a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
+++ b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
@@ -13,21 +13,16 @@ const CARD_METRICS = [
'p50Latency',
'videosPerGpuHour',
'dollarsPerVideo',
- 'apiPricePerVideo',
- 'profitPerGpuHour',
'kjPerVideo',
- 'powerPctCap',
] as const satisfies readonly MetricId[];
const STRINGS = {
en: {
p50Latency: 'P50 time to video (s)',
videosPerGpuHour: 'Videos / GPU-hr',
dollarsPerVideo: 'TCO / video',
- apiPricePerVideo: 'API $/video',
- profitPerGpuHour: 'Profit / GPU-hr',
kjPerVideo: 'kJ / video',
- powerPctCap: 'Board power / limit',
p90: 'P90',
+ api: 'API list',
gpus: 'GPUs',
of: 'of',
unavailable: 'Not measured',
@@ -37,11 +32,9 @@ const STRINGS = {
p50Latency: 'P50 出片时间(s)',
videosPerGpuHour: '视频数 / GPU 小时',
dollarsPerVideo: 'TCO / 条视频',
- apiPricePerVideo: 'API 标价 / 条视频',
- profitPerGpuHour: '利润 / GPU 小时',
kjPerVideo: 'kJ / 条视频',
- powerPctCap: '板卡功率 / 上限',
p90: 'P90',
+ api: 'API 标价',
gpus: '张 GPU',
of: '/',
unavailable: '未测得',
@@ -49,7 +42,11 @@ const STRINGS = {
},
};
-/** One card per campaign hardware, showing its most efficient deployment; hardware without a valid run says so instead of vanishing. */
+/**
+ * One card per campaign hardware on its most efficient deployment: time to
+ * video, output per GPU-hour, TCO cost per video beside the API list price,
+ * and energy per video. Hardware without a valid run says so instead of vanishing.
+ */
export default function VideoKpiCards({
points,
state,
@@ -66,6 +63,15 @@ export default function VideoKpiCards({
const s = STRINGS[locale];
const options = metricOptions(state);
const cells = latestVideoCells(points);
+ const secondary = (point: VideoPoint, id: (typeof CARD_METRICS)[number]) => {
+ if (id === 'p50Latency')
+ return `${s.p90} ${formatMetric(metricValue(point, 'p90Latency', options), 'p90Latency')}`;
+ if (id === 'dollarsPerVideo') {
+ const api = metricValue(point, 'apiPricePerVideo', options);
+ return api === null ? null : `${s.api} ${formatMetric(api, 'apiPricePerVideo')}`;
+ }
+ return null;
+ };
return (
{VIDEO_HARDWARE_ROSTER.map(({ key, unavailable }) => {
@@ -96,21 +102,22 @@ export default function VideoKpiCards({
) : point ? (
- {CARD_METRICS.map((id) => (
-
-
{s[id]}
-
- {formatMetric(metricValue(point, id, options), id)}
- {id === 'powerPctCap' && metricValue(point, id, options) !== null && '%'}
- {id === 'p50Latency' && (
-
- {s.p90}{' '}
- {formatMetric(metricValue(point, 'p90Latency', options), 'p90Latency')}
-
- )}
-
-
- ))}
+ {CARD_METRICS.map((id) => {
+ const note = secondary(point, id);
+ return (
+
+
{s[id]}
+
+ {formatMetric(metricValue(point, id, options), id)}
+ {note && (
+
+ {note}
+
+ )}
+
+
+ );
+ })}
) : (
diff --git a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
index d85893240..c9ccc77cf 100644
--- a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
+++ b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
@@ -12,8 +12,6 @@ const STRINGS = {
en: {
hardware: 'Hardware',
deployment: 'Deployment',
- c: 'C',
- queued: 'queued',
counts: 'Valid / scheduled',
power: 'Board power (W)',
run: 'CI run',
@@ -21,8 +19,6 @@ const STRINGS = {
zh: {
hardware: '硬件',
deployment: '部署',
- c: 'C',
- queued: '排队',
counts: '有效 / 计划',
power: '板卡功率(W)',
run: 'CI 运行',
@@ -35,21 +31,14 @@ const METRIC_COLUMNS: readonly MetricId[] = [
'videosPerDollar',
'dollarsPerVideo',
'apiPricePerVideo',
- 'revenuePerGpuHour',
- 'profitPerGpuHour',
- 'apiPriceMultiple',
'kjPerVideo',
'powerPctCap',
];
-/** Rows for the plotted cells: every deployment, queued cells on request, plus provenance. */
-export function videoTableRows(
- points: VideoPoint[],
- state: VideoDashboardState,
- hidden: ReadonlySet,
-): VideoPoint[] {
+/** Rows for the plotted cells: every measured deployment, plus provenance. Queued cells stay in the evidence panel. */
+export function videoTableRows(points: VideoPoint[], hidden: ReadonlySet): VideoPoint[] {
return latestVideoCells(points).filter(
- (p) => p.hardwareKey && !hidden.has(p.hardwareKey) && (state.queue || !isQueueing(p)),
+ (p) => p.hardwareKey && !hidden.has(p.hardwareKey) && !isQueueing(p),
);
}
@@ -65,7 +54,7 @@ export default function VideoPointsTable({
const locale = useLocale();
const s = STRINGS[locale];
const options = metricOptions(state);
- const rows = videoTableRows(points, state, hidden);
+ const rows = videoTableRows(points, hidden);
const columns: DataTableColumn[] = [
{
header: s.hardware,
@@ -80,13 +69,6 @@ export default function VideoPointsTable({
sortValue: (p) => p.participating ?? 0,
importance: 'key',
},
- {
- header: s.c,
- align: 'right',
- cell: (p) => (isQueueing(p) ? `${p.concurrency} · ${s.queued}` : (p.concurrency ?? '—')),
- sortValue: (p) => p.concurrency ?? 0,
- importance: 'key',
- },
{
header: s.counts,
align: 'right',
diff --git a/packages/app/src/components/video-benchmark/chart-domain.test.ts b/packages/app/src/components/video-benchmark/chart-domain.test.ts
index 578de9fb7..2ccc93ad6 100644
--- a/packages/app/src/components/video-benchmark/chart-domain.test.ts
+++ b/packages/app/src/components/video-benchmark/chart-domain.test.ts
@@ -1,11 +1,12 @@
import { describe, expect, it } from 'vitest';
import { zeroAnchoredDomain } from './chart-domain';
-// Profit per GPU-hour for the retained H100/H200/B200 C1 cells at $0.034/video-s
-// (cypress/fixtures/api/video-history.json, asserted per point in metrics.test.ts):
-// every hardware loses money at the 3-year rental tier ($2.00/$2.90/$3.70 GPU-hr)
-// on the participating basis, while on the allocated basis at the hyperscaler
-// tier only H200 stays positive.
+// Every Y metric the chart plots today is positive-only, but the helper stays
+// sign-agnostic (chart-domain.ts), so two signed samples keep the shapes it must
+// still handle: an all-negative set and a mixed-sign set, sized like $/GPU-hr
+// margins of the retained H100/H200/B200 C1 cells. VIDEOS_PER_DOLLAR is their
+// hyperscaler-tier videos per $1 TCO (cypress/fixtures/api/video-history.json,
+// asserted per point in metrics.test.ts).
const RENTAL_LOSSES = [-0.5382, -1.2753, -0.5649];
const ALLOCATED_HYPERSCALER = [-0.4391, 0.4047, -0.16];
// Videos per $1 TCO at the hyperscaler tier: H100, H200, B200.
diff --git a/packages/app/src/components/video-benchmark/compare.test.ts b/packages/app/src/components/video-benchmark/compare.test.ts
index 99a5ac52a..8c9ac4a0d 100644
--- a/packages/app/src/components/video-benchmark/compare.test.ts
+++ b/packages/app/src/components/video-benchmark/compare.test.ts
@@ -19,7 +19,7 @@ import type { StoredArtifact, StoredSource } from './stored';
// Retained H100/H200/B200 C1/C2/C4 observations of the 2026-09-09 campaign.
const points = videoPoints([history as unknown as VideoHistoryPage]);
const c1 = (key: string) => comparablePoints(points).find((p) => p.hardwareKey === key)!;
-const opts = { tier: 'h', basis: 'participating' } as const;
+const opts = { tier: 'h' } as const;
const row = (rows: ReturnType, id: string) =>
rows.find((item) => item.id === id)!;
@@ -84,43 +84,28 @@ describe('comparablePoints', () => {
});
describe('compareMetrics', () => {
- it('reads B200 against H100 at C1: faster, cheaper, less energy, closer to its cap', () => {
+ it('reads B200 against H100 at C1: faster, cheaper and less energy per video', () => {
const rows = compareMetrics(c1('h100'), c1('b200'), opts);
- expect(rows.map((r) => r.id)).toEqual([
- 'p50Latency',
- 'p90Latency',
- 'videosPerGpuHour',
- 'videosPerDollar',
- 'dollarsPerVideo',
- 'kjPerVideo',
- 'powerPctCap',
- ]);
+ expect(rows.map((r) => r.id)).toEqual(['p50Latency', 'dollarsPerVideo', 'kjPerVideo']);
const p50 = row(rows, 'p50Latency');
expect(p50.baseline).toBeCloseTo(167.33, 2);
expect(p50.candidate).toBeCloseTo(77.94, 2);
expect(p50.ratio).toBeCloseTo(0.4658, 3);
expect(p50.deltaPercent).toBeCloseTo(-53.42, 1);
expect(p50.candidateBetter).toBe(true);
- expect(row(rows, 'p90Latency').ratio).toBeCloseTo(0.4659, 3);
- const rate = row(rows, 'videosPerGpuHour');
- expect(rate.baseline).toBeCloseTo(5.374, 3);
- expect(rate.candidate).toBeCloseTo(11.526, 3);
- expect(rate.ratio).toBeCloseTo(2.1447, 3);
- expect(rate.candidateBetter).toBe(true);
+ // Hyperscaler tier: $1.17 / 5.374 and $1.73 / 11.526 videos per participating GPU-hour.
const cost = row(rows, 'dollarsPerVideo');
expect(cost.baseline).toBeCloseTo(0.2177, 4);
expect(cost.candidate).toBeCloseTo(0.1501, 4);
+ expect(cost.ratio).toBeCloseTo(0.6894, 3);
expect(cost.deltaPercent).toBeCloseTo(-31.06, 1);
expect(cost.candidateBetter).toBe(true);
- expect(row(rows, 'videosPerDollar').deltaPercent).toBeCloseTo(45.05, 1);
const energy = row(rows, 'kjPerVideo');
expect(energy.baseline).toBeCloseTo(431.1, 1);
expect(energy.candidate).toBeCloseTo(301.1, 1);
+ expect(energy.ratio).toBeCloseTo(0.6983, 3);
+ expect(energy.deltaPercent).toBeCloseTo(-30.17, 1);
expect(energy.candidateBetter).toBe(true);
- const power = row(rows, 'powerPctCap');
- expect(power.baseline).toBeCloseTo(91.95, 2);
- expect(power.candidate).toBeCloseTo(96.4, 2);
- expect(power.candidateBetter).toBe(true);
});
it('flips the verdict when the slower hardware is the candidate', () => {
const rows = compareMetrics(c1('b200'), c1('h200'), opts);
@@ -129,8 +114,8 @@ describe('compareMetrics', () => {
expect(row(rows, 'dollarsPerVideo').candidateBetter).toBe(false);
});
it('propagates missing inputs as null and treats equal values as neither better', () => {
- const noPower = { ...c1('b200'), energyKj: null, enforcedLimitW: null, samples: 5 };
- const rows = compareMetrics(c1('h100'), noPower, opts);
+ const unmeasured = { ...c1('b200'), energyKj: null, wallSeconds: null, samples: 5 };
+ const rows = compareMetrics(c1('h100'), unmeasured, opts);
expect(row(rows, 'kjPerVideo')).toEqual({
id: 'kjPerVideo',
baseline: c1('h100').energyKj,
@@ -139,21 +124,41 @@ describe('compareMetrics', () => {
deltaPercent: null,
candidateBetter: null,
});
- expect(row(rows, 'powerPctCap').candidate).toBeNull();
- expect(row(rows, 'p90Latency').candidate).toBeNull();
- expect(row(rows, 'p50Latency').ratio).not.toBeNull();
+ expect(row(rows, 'dollarsPerVideo')).toMatchObject({
+ baseline: expect.closeTo(0.2177, 4),
+ candidate: null,
+ ratio: null,
+ candidateBetter: null,
+ });
+ // P50 has no sample floor, unlike P90 in the run views.
+ expect(row(rows, 'p50Latency').ratio).toBeCloseTo(0.4658, 3);
+ // A zero baseline has no ratio either.
+ expect(
+ row(compareMetrics({ ...c1('h100'), p50: 0 }, c1('b200'), opts), 'p50Latency'),
+ ).toMatchObject({
+ baseline: 0,
+ candidate: expect.closeTo(77.94, 2),
+ ratio: null,
+ deltaPercent: null,
+ candidateBetter: null,
+ });
for (const same of compareMetrics(c1('h100'), c1('h100'), opts)) {
expect(same.ratio).toBe(1);
expect(same.deltaPercent).toBe(0);
expect(same.candidateBetter).toBeNull();
}
});
- it('moves only the cost rows with the tier and GPU basis', () => {
- const rows = compareMetrics(c1('h100'), c1('b200'), { tier: 'r', basis: 'allocated' });
- // H100 8 allocated: 2.00 / 2.687 videos per GPU-hr; B200 8 allocated: 3.70 / 5.763.
- expect(row(rows, 'dollarsPerVideo').baseline).toBeCloseTo(0.7443, 3);
- expect(row(rows, 'dollarsPerVideo').candidate).toBeCloseTo(0.642, 3);
- expect(row(rows, 'videosPerGpuHour').baseline).toBeCloseTo(2.687, 3);
+ it('moves only the cost row with the tier', () => {
+ const rows = compareMetrics(c1('h100'), c1('b200'), { tier: 'r' });
+ // Rental $2.00 / 5.374 and $3.70 / 11.526 videos per GPU-hour, still per participating GPU.
+ const cost = row(rows, 'dollarsPerVideo');
+ expect(cost.baseline).toBeCloseTo(0.3722, 3);
+ expect(cost.candidate).toBeCloseTo(0.321, 3);
+ expect(cost.ratio).toBeCloseTo(0.8626, 3);
+ expect(cost.candidateBetter).toBe(true);
+ const atHyperscaler = compareMetrics(c1('h100'), c1('b200'), opts);
+ expect(row(rows, 'p50Latency')).toEqual(row(atHyperscaler, 'p50Latency'));
+ expect(row(rows, 'kjPerVideo')).toEqual(row(atHyperscaler, 'kjPerVideo'));
expect(row(rows, 'p50Latency').ratio).toBeCloseTo(0.4658, 3);
expect(row(rows, 'kjPerVideo').ratio).toBeCloseTo(0.6984, 3);
});
diff --git a/packages/app/src/components/video-benchmark/compare.ts b/packages/app/src/components/video-benchmark/compare.ts
index 753e5491d..4d7cbe1b1 100644
--- a/packages/app/src/components/video-benchmark/compare.ts
+++ b/packages/app/src/components/video-benchmark/compare.ts
@@ -14,12 +14,8 @@ import { storedBundle, type StoredArtifact, type StoredSource } from './stored';
/** Metrics the compare table shows, in row order. */
export const COMPARE_METRICS = [
'p50Latency',
- 'p90Latency',
- 'videosPerGpuHour',
- 'videosPerDollar',
'dollarsPerVideo',
'kjPerVideo',
- 'powerPctCap',
] as const satisfies readonly MetricId[];
export type CompareMetricId = (typeof COMPARE_METRICS)[number];
@@ -37,13 +33,13 @@ export interface CompareRow {
/**
* One cell a reader can pick per registry hardware: its most efficient
- * non-queued deployment (chip basis) with a P50. Queued cells never qualify.
+ * non-queued deployment (per participating GPU) with a P50. Queued cells never qualify.
*/
export function comparablePoints(points: VideoPoint[]): VideoPoint[] {
const cells = latestVideoCells(points);
const keys = [...new Set(cells.flatMap((p) => (p.hardwareKey === null ? [] : [p.hardwareKey])))];
return keys.flatMap((key) => {
- const lead = leadCell(cells, key, { tier: 'h', basis: 'participating' });
+ const lead = leadCell(cells, key, { tier: 'h' });
return lead && lead.p50 !== null ? [lead] : [];
});
}
diff --git a/packages/app/src/components/video-benchmark/deployment.ts b/packages/app/src/components/video-benchmark/deployment.ts
index 02ffbca0e..6183d91d0 100644
--- a/packages/app/src/components/video-benchmark/deployment.ts
+++ b/packages/app/src/components/video-benchmark/deployment.ts
@@ -57,7 +57,7 @@ export function sharedLayoutCells(cells: T[]): T[] {
return keys.flatMap((hardwareKey) => {
const cell =
deployments.find((p) => p.hardwareKey === hardwareKey && deploymentKey(p) === shared) ??
- leadCell(deployments, hardwareKey, { tier: 'h', basis: 'participating' });
+ leadCell(deployments, hardwareKey, { tier: 'h' });
return cell ? [cell as T] : [];
});
}
diff --git a/packages/app/src/components/video-benchmark/evidence.test.ts b/packages/app/src/components/video-benchmark/evidence.test.ts
index d28e425b3..e019763dd 100644
--- a/packages/app/src/components/video-benchmark/evidence.test.ts
+++ b/packages/app/src/components/video-benchmark/evidence.test.ts
@@ -103,14 +103,6 @@ describe('concurrencyPlateau', () => {
expect(row('b200', 4)?.throughputRatioVsC1).toBeCloseTo(1.0144, 3);
expect(row('b200', 4)?.latencyRatioVsC1).toBeCloseTo(3.9423, 3);
});
- it('switches the throughput denominator with the basis without moving the ratios', () => {
- const rows = concurrencyPlateau(points, 'allocated');
- const h100 = rows.filter((r) => r.hardwareKey === 'h100');
- expect(h100[0].videosPerGpuHour).toBeCloseTo(2.687, 3);
- expect(h100[2].throughputRatioVsC1).toBeCloseTo(0.9989, 3);
- // H200 allocated 4 of 4, so its denominator is unchanged.
- expect(rows.find((r) => r.hardwareKey === 'h200')?.videosPerGpuHour).toBeCloseTo(5.973, 3);
- });
it('leaves ratios null without a C1 baseline and never reports 0', () => {
const rows = concurrencyPlateau(
points.filter((p) => !(p.hardwareKey === 'h200' && p.concurrency === 1)),
diff --git a/packages/app/src/components/video-benchmark/evidence.ts b/packages/app/src/components/video-benchmark/evidence.ts
index 57bcaa545..577efc262 100644
--- a/packages/app/src/components/video-benchmark/evidence.ts
+++ b/packages/app/src/components/video-benchmark/evidence.ts
@@ -1,7 +1,7 @@
import { GPU_SPECS } from '@/lib/gpu-specs';
import { deploymentKey, sharedLayoutCells } from './deployment';
import { hardwareSort } from './hardware';
-import { metricValue, type GpuBasis, type MetricOptions, type VideoPoint } from './metrics';
+import { metricValue, type MetricOptions, type VideoPoint } from './metrics';
import { latestVideoCells } from './points';
/**
@@ -33,7 +33,7 @@ function measuredCells(points: VideoPoint[]): MeasuredPoint[] {
}
/** The cost tier only enters priced metrics; nothing read here is priced. */
-const metricOptions = (basis: GpuBasis): MetricOptions => ({ tier: 'h', basis });
+const options: MetricOptions = { tier: 'h' };
export interface PowerUtilizationRow {
hardwareKey: string;
@@ -50,7 +50,7 @@ export function powerUtilization(points: VideoPoint[]): PowerUtilizationRow[] {
hardwareKey: p.hardwareKey,
avgPowerW: positive(p.avgPowerW) ? p.avgPowerW : null,
enforcedLimitW: positive(p.enforcedLimitW) ? p.enforcedLimitW : null,
- percentOfCap: metricValue(p, 'powerPctCap', metricOptions('participating')),
+ percentOfCap: metricValue(p, 'powerPctCap', options),
}));
}
@@ -92,14 +92,9 @@ export interface ConcurrencyPlateauRow {
/**
* Every measured cell against its hardware's C1 cell. On a batch-one server a
* flat throughput ratio with latency scaling by C says client concurrency only
- * queues requests. `basis` picks the GPU denominator the rest of the dashboard
- * shows; ratios within one hardware are unaffected unless its allocation changed.
+ * queues requests. Throughput is per participating GPU, as everywhere else.
*/
-export function concurrencyPlateau(
- points: VideoPoint[],
- basis: GpuBasis = 'participating',
-): ConcurrencyPlateauRow[] {
- const options = metricOptions(basis);
+export function concurrencyPlateau(points: VideoPoint[]): ConcurrencyPlateauRow[] {
const baseline = new Map(
sharedLayoutCells(measuredCells(points)).map((p) => [p.hardwareKey, p] as const),
);
diff --git a/packages/app/src/components/video-benchmark/metrics.test.ts b/packages/app/src/components/video-benchmark/metrics.test.ts
index d7e7d5f0d..03cb96e0a 100644
--- a/packages/app/src/components/video-benchmark/metrics.test.ts
+++ b/packages/app/src/components/video-benchmark/metrics.test.ts
@@ -1,7 +1,18 @@
import { describe, expect, it } from 'vitest';
-import { formatMetric, metricLabel, metricValue, type VideoPoint } from './metrics';
+import {
+ formatMetric,
+ metricLabel,
+ metricValue,
+ VIDEO_METRICS,
+ X_METRICS,
+ Y_METRICS,
+ type MetricId,
+ type MetricOptions,
+ type VideoPoint,
+} from './metrics';
-// H200 and H100 C1 cells from the retained 2026-09-09 serving-smoke artifacts.
+// H200, H100 and B200 C1 cells from the retained 2026-09-09 serving-smoke artifacts
+// (cypress/fixtures/api/video-history.json).
const h200: VideoPoint = {
id: '34342452354.10107476604:c1',
runId: '34342452354',
@@ -33,6 +44,7 @@ const h200: VideoPoint = {
status: 'complete',
observedAt: '2026-09-09T10:00:00Z',
};
+// H100 and B200 reserved eight boards and generated on four.
const h100: VideoPoint = {
...h200,
id: 'x',
@@ -45,84 +57,101 @@ const h100: VideoPoint = {
energyKj: 431.14963489170344,
avgPowerW: 2574.550733165641,
};
-const opts = { tier: 'h', basis: 'participating' } as const;
+const b200: VideoPoint = {
+ ...h200,
+ id: 'y',
+ hardwareKey: 'b200',
+ hardwareName: 'NVIDIA B200',
+ p50: 77.94495720259147,
+ p90: 78.31597462110221,
+ wallSeconds: 1561.6792716470081,
+ allocated: 8,
+ energyKj: 301.08754501100987,
+ avgPowerW: 3856.016973742528,
+ enforcedLimitW: 4000,
+};
+const opts: MetricOptions = { tier: 'h' };
// H3 768p list price captured 2026-09-19 (api-reference.ts), USD per video-second.
-const priced = { ...opts, apiPricePerVideoSecond: 0.034 };
+const priced: MetricOptions = { ...opts, apiPricePerVideoSecond: 0.034 };
describe('video metrics', () => {
+ it('registers the two axis groups plus the two card-only metrics', () => {
+ expect([...X_METRICS]).toEqual(['p90Latency', 'p50Latency']);
+ expect([...Y_METRICS]).toEqual([
+ 'videosPerDollar',
+ 'dollarsPerVideo',
+ 'videosPerGpuHour',
+ 'kjPerVideo',
+ ]);
+ expect(Object.keys(VIDEO_METRICS).toSorted()).toEqual(
+ [...X_METRICS, ...Y_METRICS, 'powerPctCap', 'apiPricePerVideo'].toSorted(),
+ );
+ });
it('derives throughput per GPU-hour from valid clips, wall time and participating GPUs', () => {
+ // 20 clips × 3600 s / (wall s × 4 boards).
expect(metricValue(h200, 'videosPerGpuHour', opts)).toBeCloseTo(5.9732, 3);
- expect(metricValue(h200, 'videoSecondsPerGpuHour', opts)).toBeCloseTo(47.786, 2);
- });
- it('switches the denominator to allocated GPUs on request', () => {
expect(metricValue(h100, 'videosPerGpuHour', opts)).toBeCloseTo(5.3741, 3);
- expect(metricValue(h100, 'videosPerGpuHour', { ...opts, basis: 'allocated' })).toBeCloseTo(
+ expect(metricValue(b200, 'videosPerGpuHour', opts)).toBeCloseTo(11.526, 3);
+ });
+ it('divides by the participating boards, never the allocation', () => {
+ // The idle half of an 8-board reservation is stated beside the numbers, not billed.
+ expect(metricValue({ ...h100, allocated: 4 }, 'videosPerGpuHour', opts)).toBe(
+ metricValue(h100, 'videosPerGpuHour', opts),
+ );
+ expect(metricValue({ ...h100, allocated: null }, 'dollarsPerVideo', opts)).toBe(
+ metricValue(h100, 'dollarsPerVideo', opts),
+ );
+ expect(metricValue({ ...h100, participating: 8 }, 'videosPerGpuHour', opts)).toBeCloseTo(
2.687,
3,
);
});
it('prices videos with HW_REGISTRY tiers', () => {
- expect(metricValue(h200, 'videosPerDollar', opts)).toBeCloseTo(4.896, 2);
+ // Hyperscaler $1.22/$1.17/$1.73 and rental $2.90/$2.00/$3.70 per GPU-hour for H200/H100/B200.
+ expect(metricValue(h200, 'videosPerDollar', opts)).toBeCloseTo(4.8961, 3);
expect(metricValue(h200, 'dollarsPerVideo', opts)).toBeCloseTo(0.2042, 3);
- expect(metricValue(h200, 'dollarsPerVideo', { ...opts, tier: 'r' })).toBeCloseTo(0.4855, 3);
- expect(metricValue(h200, 'dollarsPerVideoSecond', opts)).toBeCloseTo(0.02553, 4);
- expect(metricValue(h100, 'dollarsPerVideo', { ...opts, basis: 'allocated' })).toBeCloseTo(
- 0.4354,
- 3,
- );
+ expect(metricValue(h200, 'dollarsPerVideo', { tier: 'r' })).toBeCloseTo(0.4855, 3);
+ expect(metricValue(h100, 'videosPerDollar', opts)).toBeCloseTo(4.5933, 3);
+ expect(metricValue(h100, 'dollarsPerVideo', opts)).toBeCloseTo(0.2177, 3);
+ expect(metricValue(h100, 'dollarsPerVideo', { tier: 'r' })).toBeCloseTo(0.3722, 3);
+ expect(metricValue(b200, 'videosPerDollar', opts)).toBeCloseTo(6.6625, 3);
+ expect(metricValue(b200, 'dollarsPerVideo', opts)).toBeCloseTo(0.1501, 3);
+ expect(metricValue(b200, 'dollarsPerVideo', { tier: 'r' })).toBeCloseTo(0.321, 3);
+ // Videos per $1 TCO is exactly the reciprocal of the TCO cost per video.
+ expect(
+ metricValue(h200, 'videosPerDollar', opts)! * metricValue(h200, 'dollarsPerVideo', opts)!,
+ ).toBeCloseTo(1, 12);
});
- it('exposes latency, generation speed, energy and power ratios', () => {
+ it('exposes latency, energy and board power against the enforced limit', () => {
expect(metricValue(h200, 'p90Latency', opts)).toBeCloseTo(151.105, 3);
expect(metricValue(h200, 'p50Latency', opts)).toBeCloseTo(150.614, 3);
- expect(metricValue(h200, 'genSpeed', opts)).toBeCloseTo(192 / 150.61379817902343, 6);
expect(metricValue(h200, 'kjPerVideo', opts)).toBeCloseTo(410.954, 2);
- expect(metricValue(h200, 'videosPerKwh', opts)).toBeCloseTo(8.76, 2);
expect(metricValue(h200, 'powerPctCap', opts)).toBeCloseTo(97.41, 1);
+ expect(metricValue(b200, 'powerPctCap', opts)).toBeCloseTo(96.4, 1);
});
- it('prices the clip at the API reference and derives revenue, profit and headroom', () => {
- // 0.034 $/s × 8 s clip; 5.9732 videos/GPU-hr × $0.272; − $1.22 H200 hyperscaler GPU-hr.
+ it('prices the clip at the API list price, independent of hardware and tier', () => {
+ // 0.034 $/video-s × 8 s clip.
expect(metricValue(h200, 'apiPricePerVideo', priced)).toBeCloseTo(0.272, 6);
- expect(metricValue(h200, 'revenuePerGpuHour', priced)).toBeCloseTo(1.6247, 3);
- expect(metricValue(h200, 'profitPerGpuHour', priced)).toBeCloseTo(0.4047, 3);
- // $0.272 API ÷ $0.2042 TCO per video.
- expect(metricValue(h200, 'apiPriceMultiple', priced)).toBeCloseTo(1.332, 3);
- // Rental tier: same revenue, $2.90 GPU-hr → loss; headroom drops below 1.
- expect(metricValue(h200, 'profitPerGpuHour', { ...priced, tier: 'r' })).toBeCloseTo(-1.2753, 3);
- expect(metricValue(h200, 'apiPriceMultiple', { ...priced, tier: 'r' })).toBeCloseTo(0.5603, 3);
+ expect(metricValue(h100, 'apiPricePerVideo', { ...priced, tier: 'r' })).toBeCloseTo(0.272, 6);
+ expect(
+ metricValue({ ...b200, hardwareKey: null, wallSeconds: null }, 'apiPricePerVideo', priced),
+ ).toBeCloseTo(0.272, 6);
+ expect(
+ metricValue(h200, 'apiPricePerVideo', { ...priced, apiPricePerVideoSecond: 0.047 }),
+ ).toBeCloseTo(0.376, 6);
});
- it('halves revenue on the allocated basis when only half the reserved GPUs generate', () => {
- // H100: 4 of 8 allocated boards participate → 2.687 videos/GPU-hr × $0.272 − $1.17.
- expect(metricValue(h100, 'revenuePerGpuHour', priced)).toBeCloseTo(1.4618, 3);
- expect(metricValue(h100, 'profitPerGpuHour', priced)).toBeCloseTo(0.2918, 3);
- const allocated = { ...priced, basis: 'allocated' } as const;
- expect(metricValue(h100, 'revenuePerGpuHour', allocated)).toBeCloseTo(0.7309, 3);
- expect(metricValue(h100, 'profitPerGpuHour', allocated)).toBeCloseTo(-0.4391, 3);
- // The clip price itself does not depend on the GPU basis.
- expect(metricValue(h100, 'apiPricePerVideo', allocated)).toBeCloseTo(0.272, 6);
- expect(metricValue(h100, 'apiPriceMultiple', allocated)).toBeCloseTo(0.6247, 3);
- });
- it('returns null for every API-priced metric without a positive price or clip length', () => {
- const ids = [
- 'apiPricePerVideo',
- 'revenuePerGpuHour',
- 'profitPerGpuHour',
- 'apiPriceMultiple',
- ] as const;
- for (const id of ids) {
- expect(metricValue(h200, id, opts)).toBeNull();
- expect(metricValue(h200, id, { ...opts, apiPricePerVideoSecond: null })).toBeNull();
- expect(metricValue(h200, id, { ...opts, apiPricePerVideoSecond: 0 })).toBeNull();
- expect(metricValue(h200, id, { ...opts, apiPricePerVideoSecond: -0.01 })).toBeNull();
- expect(metricValue(h200, id, { ...opts, apiPricePerVideoSecond: Number.NaN })).toBeNull();
- expect(metricValue({ ...h200, durationSeconds: null }, id, priced)).toBeNull();
+ it('returns null for the API list price without a positive price or clip length', () => {
+ expect(metricValue(h200, 'apiPricePerVideo', opts)).toBeNull();
+ for (const price of [null, 0, -0.01, Number.NaN, Number.POSITIVE_INFINITY]) {
+ expect(
+ metricValue(h200, 'apiPricePerVideo', { ...opts, apiPricePerVideoSecond: price }),
+ ).toBeNull();
}
- // A price alone is not enough: revenue, profit and headroom still need throughput and a tier cost.
- expect(metricValue({ ...h200, wallSeconds: null }, 'revenuePerGpuHour', priced)).toBeNull();
- expect(metricValue({ ...h200, hardwareKey: null }, 'profitPerGpuHour', priced)).toBeNull();
- expect(metricValue({ ...h200, hardwareKey: null }, 'apiPriceMultiple', priced)).toBeNull();
- expect(metricValue({ ...h200, wallSeconds: null }, 'apiPricePerVideo', priced)).toBeCloseTo(
- 0.272,
- 6,
+ expect(metricValue({ ...h200, durationSeconds: null }, 'apiPricePerVideo', priced)).toBeNull();
+ expect(metricValue({ ...h200, durationSeconds: 0 }, 'apiPricePerVideo', priced)).toBeNull();
+ // The price never leaks into the TCO metrics.
+ expect(metricValue(h200, 'dollarsPerVideo', priced)).toBe(
+ metricValue(h200, 'dollarsPerVideo', opts),
);
});
it('returns null instead of zero for missing inputs', () => {
@@ -134,42 +163,53 @@ describe('video metrics', () => {
wallSeconds: null,
enforcedLimitW: null,
};
- expect(metricValue(broken, 'videosPerDollar', opts)).toBeNull();
- expect(metricValue(broken, 'videosPerGpuHour', opts)).toBeNull();
- expect(metricValue(broken, 'kjPerVideo', opts)).toBeNull();
- expect(metricValue(broken, 'videosPerKwh', opts)).toBeNull();
+ for (const id of Y_METRICS) expect(metricValue(broken, id, opts)).toBeNull();
expect(metricValue(broken, 'powerPctCap', opts)).toBeNull();
+ // Same display floor as the run views: P90 needs ten valid samples, P50 does not.
expect(metricValue({ ...h200, samples: 9 }, 'p90Latency', opts)).toBeNull();
+ expect(metricValue({ ...h200, samples: 9 }, 'p50Latency', opts)).toBeCloseTo(150.614, 3);
expect(metricValue({ ...h200, participating: null }, 'videosPerGpuHour', opts)).toBeNull();
+ expect(metricValue({ ...h200, participating: 0 }, 'videosPerGpuHour', opts)).toBeNull();
+ expect(metricValue({ ...h200, participating: 2.5 }, 'videosPerGpuHour', opts)).toBeNull();
+ expect(metricValue({ ...h200, energyKj: 0 }, 'kjPerVideo', opts)).toBeNull();
+ expect(metricValue({ ...h200, avgPowerW: 0 }, 'powerPctCap', opts)).toBeNull();
+ // Hardware outside HW_REGISTRY has a rate but no price.
+ expect(
+ metricValue({ ...h200, hardwareKey: 'unknown-gpu' }, 'videosPerGpuHour', opts),
+ ).toBeCloseTo(5.9732, 3);
+ expect(
+ metricValue({ ...h200, hardwareKey: 'unknown-gpu' }, 'dollarsPerVideo', opts),
+ ).toBeNull();
+ expect(
+ metricValue({ ...h200, hardwareKey: 'unknown-gpu' }, 'videosPerDollar', opts),
+ ).toBeNull();
});
it('labels tiered metrics with the cost tier and formats by metric', () => {
expect(metricLabel('videosPerDollar', 'en', opts)).toBe(
'Videos per $1 TCO (Owning at Large Hyperscaler Volume)',
);
- expect(metricLabel('videosPerDollar', 'zh', { ...opts, tier: 'r' })).toBe(
+ expect(metricLabel('videosPerDollar', 'zh', { tier: 'r' })).toBe(
'每 1 美元 TCO 生成视频数(租赁 - 3 年承诺)',
);
+ expect(metricLabel('dollarsPerVideo', 'zh', opts)).toBe(
+ '每条视频 TCO 成本(Hyperscaler 自有设备)',
+ );
expect(metricLabel('p90Latency', 'en', opts)).toBe('P90 time to video (s)');
+ expect(metricLabel('kjPerVideo', 'zh', opts)).toBe('每条视频 GPU 板卡能耗(kJ)');
+ expect(metricLabel('apiPricePerVideo', 'en', opts)).toBe('API list price per video');
+ expect(metricLabel('apiPricePerVideo', 'zh', opts)).toBe('每条视频 API 标价');
+ // Only the priced TCO metrics carry the tier.
+ const tiered = (Object.keys(VIDEO_METRICS) as MetricId[]).filter(
+ (id) => metricLabel(id, 'en', opts) !== metricLabel(id, 'en', { tier: 'r' }),
+ );
+ expect(tiered).toEqual(['videosPerDollar', 'dollarsPerVideo']);
expect(formatMetric(0.20419, 'dollarsPerVideo')).toBe('$0.204');
+ expect(formatMetric(0.15, 'dollarsPerVideo')).toBe('$0.150');
+ expect(formatMetric(0.272, 'apiPricePerVideo')).toBe('$0.272');
expect(formatMetric(null, 'kjPerVideo')).toBe('—');
expect(formatMetric(151.10486, 'p90Latency')).toBe('151.1');
- expect(formatMetric(1234.5, 'videoSecondsPerGpuHour')).toBe('1,234.5');
- });
- it('labels and formats the API-priced metrics, with the sign before the currency symbol', () => {
- expect(metricLabel('profitPerGpuHour', 'en', opts)).toBe(
- 'Profit per GPU-hour, API list price − TCO (Owning at Large Hyperscaler Volume)',
- );
- expect(metricLabel('apiPriceMultiple', 'zh', { ...opts, tier: 'r' })).toBe(
- 'API 标价 ÷ 每条视频 TCO 成本(租赁 - 3 年承诺)',
- );
- expect(metricLabel('revenuePerGpuHour', 'en', opts)).toBe(
- 'Revenue per GPU-hour at API list price',
- );
- expect(metricLabel('apiPricePerVideo', 'zh', opts)).toBe('每条视频 API 标价');
- expect(formatMetric(0.272, 'apiPricePerVideo')).toBe('$0.272');
- expect(formatMetric(1.62471, 'revenuePerGpuHour')).toBe('$1.62');
- expect(formatMetric(-0.43913, 'profitPerGpuHour')).toBe('-$0.44');
- expect(formatMetric(1.3318, 'apiPriceMultiple')).toBe('1.33');
- expect(formatMetric(-1.5, 'p50Latency')).toBe('-1.5');
+ expect(formatMetric(1234.5, 'videosPerGpuHour')).toBe('1,234.5');
+ expect(formatMetric(4.8961, 'videosPerDollar')).toBe('4.9');
+ expect(formatMetric(97.41, 'powerPctCap')).toBe('97.4');
});
});
diff --git a/packages/app/src/components/video-benchmark/metrics.ts b/packages/app/src/components/video-benchmark/metrics.ts
index aea6ee6e3..0e86c9319 100644
--- a/packages/app/src/components/video-benchmark/metrics.ts
+++ b/packages/app/src/components/video-benchmark/metrics.ts
@@ -1,8 +1,5 @@
import { costPerGpuHour, type CostTier } from './hardware';
-/** Denominator for per-GPU metrics: boards that generated the clip vs. boards the job reserved. */
-export type GpuBasis = 'participating' | 'allocated';
-
/** One published serving cell (hardware × client concurrency) flattened for the dashboard. */
export interface VideoPoint {
id: string;
@@ -16,7 +13,9 @@ export interface VideoPoint {
/** Human-readable workload summary from the projection (resolution · duration · fps · steps · model @ rev · seeds · prompt). */
workload: string;
concurrency: number | null;
+ /** Boards that generated the clip: the denominator of every per-GPU metric. */
participating: number | null;
+ /** Boards the job reserved; the surplus sat idle and is shown, not billed. */
allocated: number | null;
/** Model replicas behind the endpoint; null for bundles that predate the deployment record. */
replicas: number | null;
@@ -41,31 +40,16 @@ export interface VideoPoint {
observedAt: string | null;
}
-export type XMetricId = 'p90Latency' | 'p50Latency' | 'genSpeed';
-export type YMetricId =
- | 'videosPerDollar'
- | 'videosPerGpuHour'
- | 'videoSecondsPerGpuHour'
- | 'dollarsPerVideo'
- | 'kjPerVideo'
- | 'videosPerKwh'
- | 'revenuePerGpuHour'
- | 'profitPerGpuHour'
- | 'apiPriceMultiple';
-export type MetricId =
- | XMetricId
- | YMetricId
- | 'powerPctCap'
- | 'dollarsPerVideoSecond'
- | 'apiPricePerVideo';
+export type XMetricId = 'p90Latency' | 'p50Latency';
+export type YMetricId = 'videosPerDollar' | 'dollarsPerVideo' | 'videosPerGpuHour' | 'kjPerVideo';
+/** Axis metrics plus the two the cards and evidence read but the chart does not plot. */
+export type MetricId = XMetricId | YMetricId | 'powerPctCap' | 'apiPricePerVideo';
export interface MetricOptions {
tier: CostTier;
- basis: GpuBasis;
/**
* USD an API bills per video-second of the same clip (`H3_API_REFERENCE` or
- * the reader's override). Missing or non-positive → every API-priced metric
- * is null.
+ * the reader's override). Missing or non-positive → the API list price is null.
*/
apiPricePerVideoSecond?: number | null;
}
@@ -82,17 +66,12 @@ interface MetricDefinition {
currency?: boolean;
}
-export const X_METRICS: readonly XMetricId[] = ['p90Latency', 'p50Latency', 'genSpeed'];
+export const X_METRICS: readonly XMetricId[] = ['p90Latency', 'p50Latency'];
export const Y_METRICS: readonly YMetricId[] = [
'videosPerDollar',
- 'videosPerGpuHour',
- 'videoSecondsPerGpuHour',
'dollarsPerVideo',
+ 'videosPerGpuHour',
'kjPerVideo',
- 'videosPerKwh',
- 'revenuePerGpuHour',
- 'profitPerGpuHour',
- 'apiPriceMultiple',
];
export const COST_TIERS: readonly CostTier[] = ['h', 'r'];
@@ -117,13 +96,6 @@ export const VIDEO_METRICS: Record = {
polarity: 'lower',
digits: 1,
},
- genSpeed: {
- label: 'Generation speed (frames/s per request)',
- labelZh: '生成速度(每请求 frames/s)',
- unit: 'frames/s',
- polarity: 'higher',
- digits: 2,
- },
videosPerDollar: {
label: 'Videos per $1 TCO',
labelZh: '每 1 美元 TCO 生成视频数',
@@ -132,20 +104,6 @@ export const VIDEO_METRICS: Record = {
digits: 2,
tiered: true,
},
- videosPerGpuHour: {
- label: 'Videos per GPU-hour',
- labelZh: '每 GPU 小时生成视频数',
- unit: 'videos/GPU-hr',
- polarity: 'higher',
- digits: 2,
- },
- videoSecondsPerGpuHour: {
- label: 'Video seconds per GPU-hour',
- labelZh: '每 GPU 小时生成视频秒数',
- unit: 'video-s/GPU-hr',
- polarity: 'higher',
- digits: 1,
- },
dollarsPerVideo: {
label: 'TCO cost per video',
labelZh: '每条视频 TCO 成本',
@@ -155,14 +113,12 @@ export const VIDEO_METRICS: Record = {
tiered: true,
currency: true,
},
- dollarsPerVideoSecond: {
- label: 'TCO cost per video-second',
- labelZh: '每秒视频时长 TCO 成本',
- unit: '$/video-s',
- polarity: 'lower',
- digits: 4,
- tiered: true,
- currency: true,
+ videosPerGpuHour: {
+ label: 'Videos per GPU-hour',
+ labelZh: '每 GPU 小时生成视频数',
+ unit: 'videos/GPU-hr',
+ polarity: 'higher',
+ digits: 2,
},
kjPerVideo: {
label: 'GPU-board energy per video (kJ)',
@@ -171,13 +127,6 @@ export const VIDEO_METRICS: Record = {
polarity: 'lower',
digits: 1,
},
- videosPerKwh: {
- label: 'Videos per GPU-board kWh',
- labelZh: '每 kWh GPU 板卡电能生成视频数',
- unit: 'videos/kWh',
- polarity: 'higher',
- digits: 2,
- },
powerPctCap: {
label: 'Mean board power / enforced limit (%)',
labelZh: '板卡平均功率 / 生效功率上限(%)',
@@ -185,8 +134,7 @@ export const VIDEO_METRICS: Record = {
polarity: 'higher',
digits: 1,
},
- // API-priced metrics: list price × clip length, seen from the self-hosting
- // operator's side, so more revenue, profit or price headroom is "higher".
+ // What the API lists for the same clip: a reference beside the TCO cost, never plotted.
apiPricePerVideo: {
label: 'API list price per video',
labelZh: '每条视频 API 标价',
@@ -195,67 +143,34 @@ export const VIDEO_METRICS: Record = {
digits: 3,
currency: true,
},
- revenuePerGpuHour: {
- label: 'Revenue per GPU-hour at API list price',
- labelZh: '按 API 标价计的每 GPU 小时收入',
- unit: '$/GPU-hr',
- polarity: 'higher',
- digits: 2,
- currency: true,
- },
- // Tiered labels take the cost tier in parentheses, so they carry no unit parentheses of their own.
- profitPerGpuHour: {
- label: 'Profit per GPU-hour, API list price − TCO',
- labelZh: '每 GPU 小时利润,API 标价 − TCO',
- unit: '$/GPU-hr',
- polarity: 'higher',
- digits: 2,
- tiered: true,
- currency: true,
- },
- apiPriceMultiple: {
- label: 'API list price ÷ TCO cost per video',
- labelZh: 'API 标价 ÷ 每条视频 TCO 成本',
- unit: '×',
- polarity: 'higher',
- digits: 2,
- tiered: true,
- },
};
const finite = (n: number | null | undefined): n is number =>
typeof n === 'number' && Number.isFinite(n);
const positive = (n: number | null | undefined): n is number => finite(n) && n > 0;
-function gpus(point: VideoPoint, basis: GpuBasis): number | null {
- const n = basis === 'allocated' ? point.allocated : point.participating;
+/**
+ * Per-GPU metrics divide by the boards that generated the clip. The retained
+ * H100 and B200 jobs reserved eight boards and used four; the idle ones are
+ * stated beside the numbers (KPI header, chart note) rather than billed.
+ */
+function gpus(point: VideoPoint): number | null {
+ const n = point.participating;
return positive(n) && Number.isSafeInteger(n) ? n : null;
}
-function videosPerGpuHour(point: VideoPoint, basis: GpuBasis): number | null {
- const n = gpus(point, basis);
+function videosPerGpuHour(point: VideoPoint): number | null {
+ const n = gpus(point);
if (!positive(point.valid) || !positive(point.wallSeconds) || n === null) return null;
return (point.valid * 3600) / (point.wallSeconds * n);
}
function dollarsPerVideo(point: VideoPoint, options: MetricOptions): number | null {
- const rate = videosPerGpuHour(point, options.basis);
+ const rate = videosPerGpuHour(point);
const cost = point.hardwareKey ? costPerGpuHour(point.hardwareKey, options.tier) : null;
return rate !== null && cost !== null ? cost / rate : null;
}
-/** What an API would bill for one clip of this cell's length at the reference price. */
-function apiPricePerVideo(point: VideoPoint, options: MetricOptions): number | null {
- const price = options.apiPricePerVideoSecond;
- return positive(price) && positive(point.durationSeconds) ? price * point.durationSeconds : null;
-}
-
-function revenuePerGpuHour(point: VideoPoint, options: MetricOptions): number | null {
- const rate = videosPerGpuHour(point, options.basis);
- const price = apiPricePerVideo(point, options);
- return rate !== null && price !== null ? rate * price : null;
-}
-
/** Every formula returns null (never 0) when an input is missing or invalid. */
export function metricValue(
point: VideoPoint,
@@ -273,19 +188,8 @@ export function metricValue(
value = point.p50;
break;
}
- case 'genSpeed': {
- value =
- positive(point.frameCount) && positive(point.p50) ? point.frameCount / point.p50 : null;
- break;
- }
case 'videosPerGpuHour': {
- value = videosPerGpuHour(point, options.basis);
- break;
- }
- case 'videoSecondsPerGpuHour': {
- const rate = videosPerGpuHour(point, options.basis);
- value =
- rate !== null && positive(point.durationSeconds) ? rate * point.durationSeconds : null;
+ value = videosPerGpuHour(point);
break;
}
case 'videosPerDollar': {
@@ -297,20 +201,10 @@ export function metricValue(
value = dollarsPerVideo(point, options);
break;
}
- case 'dollarsPerVideoSecond': {
- const cost = dollarsPerVideo(point, options);
- value =
- cost !== null && positive(point.durationSeconds) ? cost / point.durationSeconds : null;
- break;
- }
case 'kjPerVideo': {
value = positive(point.energyKj) ? point.energyKj : null;
break;
}
- case 'videosPerKwh': {
- value = positive(point.energyKj) ? 3600 / point.energyKj : null;
- break;
- }
case 'powerPctCap': {
value =
positive(point.avgPowerW) && positive(point.enforcedLimitW)
@@ -319,25 +213,10 @@ export function metricValue(
break;
}
case 'apiPricePerVideo': {
- value = apiPricePerVideo(point, options);
- break;
- }
- case 'revenuePerGpuHour': {
- value = revenuePerGpuHour(point, options);
- break;
- }
- case 'profitPerGpuHour': {
- // Negative when the API list price does not cover the tier's GPU-hour.
- const revenue = revenuePerGpuHour(point, options);
- const cost = point.hardwareKey ? costPerGpuHour(point.hardwareKey, options.tier) : null;
- value = revenue !== null && cost !== null ? revenue - cost : null;
- break;
- }
- case 'apiPriceMultiple': {
- // > 1 means the API list price exceeds the self-hosted TCO cost of the clip.
- const price = apiPricePerVideo(point, options);
- const cost = dollarsPerVideo(point, options);
- value = price !== null && cost !== null ? price / cost : null;
+ // List price × clip length; the reader's override is validated upstream.
+ const price = options.apiPricePerVideoSecond;
+ value =
+ positive(price) && positive(point.durationSeconds) ? price * point.durationSeconds : null;
break;
}
}
@@ -352,14 +231,12 @@ export function metricLabel(id: MetricId, locale: 'en' | 'zh', options: MetricOp
return locale === 'zh' ? `${base}(${tier})` : `${base} (${tier})`;
}
-/** Sign precedes the currency symbol (`-$0.44`), as profit per GPU-hour can be negative. */
export function formatMetric(value: number | null, id: MetricId): string {
if (value === null) return '—';
const def = VIDEO_METRICS[id];
- const text = Math.abs(value).toLocaleString('en-US', {
+ const text = value.toLocaleString('en-US', {
minimumFractionDigits: def.currency ? def.digits : 0,
maximumFractionDigits: def.digits,
});
- const sign = value < 0 ? '-' : '';
- return def.currency ? `${sign}$${text}` : `${sign}${text}`;
+ return def.currency ? `$${text}` : text;
}
diff --git a/packages/app/src/components/video-benchmark/plot.test.ts b/packages/app/src/components/video-benchmark/plot.test.ts
index bbbda936c..72730b6cd 100644
--- a/packages/app/src/components/video-benchmark/plot.test.ts
+++ b/packages/app/src/components/video-benchmark/plot.test.ts
@@ -1,7 +1,10 @@
import { describe, expect, it } from 'vitest';
-import type { VideoPoint } from './metrics';
+import history from '../../../cypress/fixtures/api/video-history.json';
+import type { VideoHistoryPage } from './history';
+import { X_METRICS, Y_METRICS, type VideoPoint } from './metrics';
import { plotVideoPoints } from './plot';
-import { DEFAULT_VIDEO_DASHBOARD_STATE } from './video-url-state';
+import { videoPoints } from './points';
+import { DEFAULT_VIDEO_DASHBOARD_STATE, type VideoDashboardState } from './video-url-state';
const base: VideoPoint = {
id: 'h200-4g-c1',
@@ -62,8 +65,9 @@ const h200 = [
p50: 159,
wallSeconds: 3100,
}), // 5.81
- cell({ id: 'h200-4g-c2', concurrency: 2, p90: 300, p50: 299, wallSeconds: 2990 }), // queued, marginally higher rate
];
+// Two clients on the one-replica 4-board deployment: queued, with a marginally higher rate than C1.
+const queued = cell({ id: 'h200-4g-c2', concurrency: 2, p90: 300, p50: 299, wallSeconds: 2990 });
const b200 = cell({
id: 'b200-4g',
hardwareKey: 'b200',
@@ -73,63 +77,97 @@ const b200 = cell({
wallSeconds: 1560,
});
const colorFor = (key: string) => `color-${key}`;
-const state = {
+const state: VideoDashboardState = {
...DEFAULT_VIDEO_DASHBOARD_STATE,
- x: 'p90Latency' as const,
- y: 'videosPerGpuHour' as const,
+ x: 'p90Latency',
+ y: 'videosPerGpuHour',
};
+const plot = (
+ points: VideoPoint[],
+ s: VideoDashboardState = state,
+ hidden: ReadonlySet = new Set(),
+) => plotVideoPoints(points, s, colorFor, hidden);
+const ids = (points: { id: string }[]) => points.map((p) => p.id);
describe('plotVideoPoints', () => {
- it('builds a per-hardware frontier over deployments and leaves queued cells out of it', () => {
- const plot = plotVideoPoints([...h200, b200], state, colorFor, new Set());
- expect(plot.frontiers.h200.map((p) => p.id)).toEqual(['h200-8g', 'h200-4g-c1', 'h200-2g']);
- expect(plot.frontiers.b200.map((p) => p.id)).toEqual(['b200-4g']);
- expect(plot.plotted.map((p) => p.id)).toEqual([
+ it('builds a per-hardware frontier over deployments and marks the points on it', () => {
+ const out = plot([...h200, b200]);
+ expect(Object.keys(out).toSorted()).toEqual(['frontiers', 'multiLayout', 'plotted']);
+ expect(ids(out.frontiers.h200)).toEqual(['h200-8g', 'h200-4g-c1', 'h200-2g']);
+ expect(ids(out.frontiers.b200)).toEqual(['b200-4g']);
+ expect(ids(out.plotted)).toEqual([
'h200-4g-c1',
'h200-8g',
'h200-2g',
'h200-4g-tp4',
'b200-4g',
]);
- expect(plot.plotted.find((p) => p.id === 'h200-4g-tp4')?.optimal).toBe(false);
- expect(plot.multiLayout).toBe(true);
- // B200 is faster and more efficient than every H200 deployment, so it is the whole global frontier.
- expect(plot.global.map((p) => p.id)).toEqual(['b200-4g']);
+ expect(out.plotted.map((p) => p.optimal)).toEqual([true, true, true, false, true]);
+ expect(out.plotted[1]).toMatchObject({
+ x: 85,
+ y: expect.closeTo(5.2941, 3),
+ color: 'color-h200',
+ label: 'H200',
+ });
+ expect(out.multiLayout).toBe(true);
});
- it('shows queued cells only on request, faded from every frontier', () => {
- const plot = plotVideoPoints(h200, { ...state, queue: true }, colorFor, new Set());
- const queued = plot.plotted.filter((p) => p.queued);
- expect(queued.map((p) => p.id)).toEqual(['h200-4g-c2']);
- expect(plot.frontiers.h200.map((p) => p.id)).not.toContain('h200-4g-c2');
- expect(plot.global.map((p) => p.id)).not.toContain('h200-4g-c2');
+ it('never plots a queued cell: more clients than replicas only queue on the batch-one server', () => {
+ const out = plot([...h200, queued]);
+ expect(ids(out.plotted)).not.toContain('h200-4g-c2');
+ expect(ids(out.frontiers.h200)).toEqual(['h200-8g', 'h200-4g-c1', 'h200-2g']);
+ // No axis pair or cost tier re-admits it.
+ for (const x of X_METRICS) {
+ for (const y of Y_METRICS) {
+ expect(ids(plot([base, queued], { ...state, x, y, tier: 'r' }).plotted)).toEqual([
+ 'h200-4g-c1',
+ ]);
+ }
+ }
+ // An unrecorded replica count reads as one; one client per replica is not queueing.
+ expect(ids(plot([cell({ id: 'c4-r2', concurrency: 4, replicas: 2 })]).plotted)).toEqual([]);
+ expect(ids(plot([cell({ id: 'c2-r2', concurrency: 2, replicas: 2 })]).plotted)).toEqual([
+ 'c2-r2',
+ ]);
+ expect(ids(plot([cell({ id: 'c-na', concurrency: null })]).plotted)).toEqual(['c-na']);
});
- it('optimal-only hides dominated deployments and queued cells', () => {
- const plot = plotVideoPoints(
- h200,
- { ...state, queue: true, optimal: true },
- colorFor,
- new Set(),
+ it('plots only the C1 cells of the retained campaign, whose C2 and C4 cells queue on one replica', () => {
+ // H100/H200/B200 C1/C2/C4 of 2026-09-09, n = 20 each, replicas unrecorded → one endpoint.
+ const out = plot(
+ videoPoints([history as unknown as VideoHistoryPage]),
+ DEFAULT_VIDEO_DASHBOARD_STATE,
);
- expect(plot.plotted.map((p) => p.id)).toEqual(['h200-4g-c1', 'h200-8g', 'h200-2g']);
+ expect(out.plotted.map((p) => [p.hardwareKey, p.concurrency])).toEqual([
+ ['b200', 1],
+ ['h200', 1],
+ ['h100', 1],
+ ]);
+ // P90 time to video against videos per $1 TCO at the hyperscaler tier ($1.73/$1.22/$1.17 GPU-hr).
+ expect(out.plotted.map((p) => [p.x, p.y])).toEqual([
+ [expect.closeTo(78.316, 3), expect.closeTo(6.6625, 3)],
+ [expect.closeTo(151.105, 3), expect.closeTo(4.8961, 3)],
+ [expect.closeTo(168.1135, 3), expect.closeTo(4.5933, 3)],
+ ]);
+ expect(out.multiLayout).toBe(false);
+ expect(Object.values(out.frontiers).map((f) => f.length)).toEqual([1, 1, 1]);
+ expect(out.plotted.every((p) => p.optimal)).toBe(true);
});
it('is a scatter of single deployments when each hardware has one layout', () => {
- const plot = plotVideoPoints([base, b200], state, colorFor, new Set());
- expect(plot.multiLayout).toBe(false);
- expect(Object.values(plot.frontiers).every((f) => f.length === 1)).toBe(true);
- expect(plot.global.map((p) => p.id)).toEqual(['b200-4g']);
+ const out = plot([base, b200]);
+ expect(out.multiLayout).toBe(false);
+ expect(Object.values(out.frontiers).every((f) => f.length === 1)).toBe(true);
+ expect(out.plotted.every((p) => p.optimal)).toBe(true);
});
it('drops hidden hardware and cells missing either metric', () => {
- const plot = plotVideoPoints(
+ const out = plot(
[
base,
b200,
cell({ id: 'no-p90', hardwareKey: 'h100', hardwareName: 'H100', samples: 4, p90: null }),
],
state,
- colorFor,
new Set(['b200']),
);
- expect(plot.plotted.map((p) => p.id)).toEqual(['h200-4g-c1']);
- expect(plot.frontiers).not.toHaveProperty('b200');
+ expect(ids(out.plotted)).toEqual(['h200-4g-c1']);
+ expect(out.frontiers).not.toHaveProperty('b200');
});
});
diff --git a/packages/app/src/components/video-benchmark/plot.ts b/packages/app/src/components/video-benchmark/plot.ts
index dd705ac32..c0f1b3b8a 100644
--- a/packages/app/src/components/video-benchmark/plot.ts
+++ b/packages/app/src/components/video-benchmark/plot.ts
@@ -10,28 +10,24 @@ export interface PlottedVideoPoint extends VideoPoint {
y: number;
color: string;
label: string;
- /** Client concurrency above one request per replica: the same deployment under load. */
- queued: boolean;
- /** On its hardware's Pareto frontier (deployment cells only). */
+ /** On its hardware's Pareto frontier over deployments. */
optimal: boolean;
}
export interface VideoPlot {
- /** Cells to draw: deployments (dominated ones unless `optimal`), plus queued cells when `queue`. */
+ /** Deployment cells to draw, one per hardware until a GPUs-per-video sweep lands. */
plotted: PlottedVideoPoint[];
/** Per-hardware Pareto frontier over its deployment cells, ascending x; lines need two or more. */
frontiers: Record;
- /** Cross-hardware Pareto frontier over every deployment cell. */
- global: PlottedVideoPoint[];
/** True once any hardware has more than one measured deployment. */
multiLayout: boolean;
}
/**
* The chart's data model. A hardware's curve is the Pareto frontier over its
- * measured deployments (GPUs per video and how they split the model); client
- * concurrency on a batch-one server only queues requests, so queued cells are
- * plotted as evidence but never join a frontier.
+ * measured deployments (GPUs per video and how they split the model). Client
+ * concurrency above one request per replica only queues on the batch-one
+ * server, so those cells stay in the evidence panel and never reach the chart.
*/
export function plotVideoPoints(
points: VideoPoint[],
@@ -40,8 +36,8 @@ export function plotVideoPoints(
hidden: ReadonlySet,
): VideoPlot {
const options = metricOptions(state);
- const cells: PlottedVideoPoint[] = latestVideoCells(points).flatMap((p) => {
- if (!p.hardwareKey || hidden.has(p.hardwareKey)) return [];
+ const plotted: PlottedVideoPoint[] = latestVideoCells(points).flatMap((p) => {
+ if (!p.hardwareKey || hidden.has(p.hardwareKey) || isQueueing(p)) return [];
const x = metricValue(p, state.x, options);
const y = metricValue(p, state.y, options);
if (x === null || y === null) return [];
@@ -52,14 +48,12 @@ export function plotVideoPoints(
y,
color: colorFor(p.hardwareKey),
label: hardwareLabel(p.hardwareKey),
- queued: isQueueing(p),
optimal: false,
},
];
});
- const deployments = cells.filter((p) => !p.queued);
const byHardware = new Map();
- for (const p of deployments) {
+ for (const p of plotted) {
const list = byHardware.get(p.hardwareKey!) ?? [];
list.push(p);
byHardware.set(p.hardwareKey!, list);
@@ -73,12 +67,5 @@ export function plotVideoPoints(
for (const p of frontiers[key]) p.optimal = true;
if (new Set(list.map(deploymentKey)).size > 1) multiLayout = true;
}
- const shown = state.optimal ? deployments.filter((p) => p.optimal) : deployments;
- const queued = state.queue && !state.optimal ? cells.filter((p) => p.queued) : [];
- return {
- plotted: [...shown, ...queued],
- frontiers,
- global: paretoFrontier(deployments, xBetter, yBetter),
- multiLayout,
- };
+ return { plotted, frontiers, multiLayout };
}
diff --git a/packages/app/src/components/video-benchmark/video-url-state.test.ts b/packages/app/src/components/video-benchmark/video-url-state.test.ts
index e7dcb3b19..48c12a888 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.test.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.test.ts
@@ -1,39 +1,47 @@
import { describe, expect, it } from 'vitest';
import { H3_API_REFERENCE } from './api-reference';
+import { X_METRICS, Y_METRICS } from './metrics';
import {
DEFAULT_VIDEO_DASHBOARD_STATE,
metricOptions,
parseApiPrice,
readVideoDashboardState,
writeVideoDashboardState,
+ type VideoDashboardState,
} from './video-url-state';
describe('video dashboard URL state', () => {
it('falls back to defaults for missing or invalid params', () => {
expect(readVideoDashboardState('')).toEqual(DEFAULT_VIDEO_DASHBOARD_STATE);
+ expect(readVideoDashboardState('?v_x=bogus&v_y=nope&v_tier=z&v_view=pie&v_api=free')).toEqual(
+ DEFAULT_VIDEO_DASHBOARD_STATE,
+ );
+ });
+ it('ignores retired params and metric ids, so old share links open on the defaults', () => {
+ // The GPU-basis switch, the queue/optimal/frontier toggles and the profit axes are gone.
expect(
readVideoDashboardState(
- '?v_x=bogus&v_y=nope&v_tier=z&v_basis=q&v_view=pie&v_queue=yes&v_api=free',
+ '?v_basis=allocated&v_queue=1&v_opt=1&v_frontier=1&v_x=genSpeed&v_y=profitPerGpuHour',
),
).toEqual(DEFAULT_VIDEO_DASHBOARD_STATE);
+ // Each axis accepts only its own metrics; the card-only metrics are not axes.
+ expect(readVideoDashboardState('?v_x=videosPerDollar').x).toBe('p90Latency');
+ expect(readVideoDashboardState('?v_y=p50Latency').y).toBe('videosPerDollar');
+ expect(readVideoDashboardState('?v_y=apiPricePerVideo').y).toBe('videosPerDollar');
});
it('reads every supported param', () => {
expect(
- readVideoDashboardState(
- '?v_x=genSpeed&v_y=kjPerVideo&v_tier=r&v_basis=allocated&v_queue=1&v_opt=1&v_frontier=1&v_view=table&v_api=0.047',
- ),
- ).toEqual({
- x: 'genSpeed',
- y: 'kjPerVideo',
- tier: 'r',
- basis: 'allocated',
- queue: true,
- optimal: true,
- frontier: true,
- view: 'table',
- apiPrice: 0.047,
- });
- expect(readVideoDashboardState('?v_y=profitPerGpuHour').y).toBe('profitPerGpuHour');
+ readVideoDashboardState('?v_x=p50Latency&v_y=kjPerVideo&v_tier=r&v_view=table&v_api=0.047'),
+ ).toEqual({ x: 'p50Latency', y: 'kjPerVideo', tier: 'r', view: 'table', apiPrice: 0.047 });
+ expect([...X_METRICS]).toEqual(['p90Latency', 'p50Latency']);
+ expect([...Y_METRICS]).toEqual([
+ 'videosPerDollar',
+ 'dollarsPerVideo',
+ 'videosPerGpuHour',
+ 'kjPerVideo',
+ ]);
+ for (const x of X_METRICS) expect(readVideoDashboardState(`?v_x=${x}`).x).toBe(x);
+ for (const y of Y_METRICS) expect(readVideoDashboardState(`?v_y=${y}`).y).toBe(y);
});
it('defaults the API price to the dated reference and rejects non-positive or malformed prices', () => {
expect(DEFAULT_VIDEO_DASHBOARD_STATE.apiPrice).toBe(H3_API_REFERENCE.pricePerVideoSecondUsd);
@@ -55,19 +63,31 @@ describe('video dashboard URL state', () => {
const out = writeVideoDashboardState(url, {
...DEFAULT_VIDEO_DASHBOARD_STATE,
tier: 'r',
- queue: true,
+ view: 'table',
});
expect(out.searchParams.get('run')).toBe('1');
+ // The page's own `view` param is not the chart/table switch, which lives under `v_view`.
expect(out.searchParams.get('view')).toBe('results');
expect(out.searchParams.get('v_tier')).toBe('r');
- expect(out.searchParams.get('v_queue')).toBe('1');
+ expect(out.searchParams.get('v_view')).toBe('table');
expect(out.searchParams.has('v_x')).toBe(false);
+ expect(out.searchParams.has('v_y')).toBe(false);
expect(out.searchParams.has('v_api')).toBe(false);
expect(url.searchParams.has('v_tier')).toBe(false);
const reset = writeVideoDashboardState(out, DEFAULT_VIDEO_DASHBOARD_STATE);
expect([...reset.searchParams.keys()].filter((k) => k.startsWith('v_'))).toEqual([]);
expect(reset.searchParams.get('run')).toBe('1');
});
+ it('round-trips the axis metrics', () => {
+ const chosen: VideoDashboardState = {
+ ...DEFAULT_VIDEO_DASHBOARD_STATE,
+ x: 'p50Latency',
+ y: 'dollarsPerVideo',
+ };
+ const out = writeVideoDashboardState(new URL('https://x.test/video'), chosen);
+ expect(out.search).toBe('?v_x=p50Latency&v_y=dollarsPerVideo');
+ expect(readVideoDashboardState(out.search)).toEqual(chosen);
+ });
it('round-trips an overridden API price and drops an invalid one', () => {
const url = new URL('https://x.test/video');
const out = writeVideoDashboardState(url, { ...DEFAULT_VIDEO_DASHBOARD_STATE, apiPrice: 0.05 });
@@ -92,20 +112,15 @@ describe('video dashboard URL state', () => {
}).searchParams.has('v_api'),
).toBe(false);
});
- it('maps state to metric options, including the API price', () => {
+ it('maps state to metric options: the cost tier and the API price, nothing else', () => {
expect(metricOptions(DEFAULT_VIDEO_DASHBOARD_STATE)).toEqual({
tier: 'h',
- basis: 'participating',
apiPricePerVideoSecond: 0.034,
});
- expect(
- metricOptions({
- ...DEFAULT_VIDEO_DASHBOARD_STATE,
- tier: 'r',
- basis: 'allocated',
- apiPrice: 0.05,
- }),
- ).toEqual({ tier: 'r', basis: 'allocated', apiPricePerVideoSecond: 0.05 });
+ expect(metricOptions({ ...DEFAULT_VIDEO_DASHBOARD_STATE, tier: 'r', apiPrice: 0.05 })).toEqual({
+ tier: 'r',
+ apiPricePerVideoSecond: 0.05,
+ });
expect(
metricOptions({ ...DEFAULT_VIDEO_DASHBOARD_STATE, apiPrice: -1 }).apiPricePerVideoSecond,
).toBeNull();
diff --git a/packages/app/src/components/video-benchmark/video-url-state.ts b/packages/app/src/components/video-benchmark/video-url-state.ts
index 29626b1e1..9b4e22b99 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.ts
@@ -4,7 +4,6 @@ import {
COST_TIERS,
X_METRICS,
Y_METRICS,
- type GpuBasis,
type MetricOptions,
type XMetricId,
type YMetricId,
@@ -14,15 +13,8 @@ export interface VideoDashboardState {
x: XMetricId;
y: YMetricId;
tier: CostTier;
- basis: GpuBasis;
- /** Also plot queued client-concurrency cells (C > replicas) as faded markers. */
- queue: boolean;
- /** Hide deployments dominated by another deployment of the same hardware. */
- optimal: boolean;
- /** Draw the cross-hardware Pareto frontier over all deployments. */
- frontier: boolean;
view: 'chart' | 'table';
- /** USD per video-second the API-priced metrics assume; the dated reference unless the reader overrides it. */
+ /** USD per video-second the API list price assumes; the dated reference unless the reader overrides it. */
apiPrice: number;
}
@@ -30,15 +22,10 @@ export const DEFAULT_VIDEO_DASHBOARD_STATE: VideoDashboardState = {
x: 'p90Latency',
y: 'videosPerDollar',
tier: 'h',
- basis: 'participating',
- queue: false,
- optimal: false,
- frontier: false,
view: 'chart',
apiPrice: H3_API_REFERENCE.pricePerVideoSecondUsd,
};
-const BASES: readonly GpuBasis[] = ['participating', 'allocated'];
const VIEWS: readonly VideoDashboardState['view'][] = ['chart', 'table'];
const pick = (allowed: readonly T[], value: string | null, fallback: T): T =>
@@ -57,10 +44,9 @@ export function parseApiPrice(raw: string | number | null | undefined): number |
return rounded > 0 ? rounded : null;
}
-/** Metric inputs the dashboard controls select, so no component rebuilds `{ tier, basis }` by hand. */
+/** Metric inputs the dashboard controls select, so no component rebuilds them by hand. */
export const metricOptions = (state: VideoDashboardState): MetricOptions => ({
tier: state.tier,
- basis: state.basis,
apiPricePerVideoSecond: parseApiPrice(state.apiPrice),
});
@@ -72,10 +58,6 @@ export function readVideoDashboardState(search: string): VideoDashboardState {
x: pick(X_METRICS, p.get('v_x'), d.x),
y: pick(Y_METRICS, p.get('v_y'), d.y),
tier: pick(COST_TIERS, p.get('v_tier'), d.tier),
- basis: pick(BASES, p.get('v_basis'), d.basis),
- queue: p.get('v_queue') === '1',
- optimal: p.get('v_opt') === '1',
- frontier: p.get('v_frontier') === '1',
view: pick(VIEWS, p.get('v_view'), d.view),
apiPrice: parseApiPrice(p.get('v_api')) ?? d.apiPrice,
};
@@ -90,10 +72,6 @@ export function writeVideoDashboardState(url: URL, state: VideoDashboardState):
set('v_x', state.x === d.x ? null : state.x);
set('v_y', state.y === d.y ? null : state.y);
set('v_tier', state.tier === d.tier ? null : state.tier);
- set('v_basis', state.basis === d.basis ? null : state.basis);
- set('v_queue', state.queue ? '1' : null);
- set('v_opt', state.optimal ? '1' : null);
- set('v_frontier', state.frontier ? '1' : null);
set('v_view', state.view === d.view ? null : state.view);
const apiPrice = parseApiPrice(state.apiPrice);
set('v_api', apiPrice === null || apiPrice === d.apiPrice ? null : String(apiPrice));
From 9bc6baa4163a09f5490f967d9f906ab4acd15bb7 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sun, 20 Sep 2026 13:08:45 -0700
Subject: [PATCH 086/104] refactor: remove the legacy /video viewer, trade-off
chart and CI-run browser
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The dashboard, Compare and Evidence panels replace the per-run viewer; the
Performance history list stays in the collapsible section and opens for
history-* deep links. Keep the data layer (bundle, stored, archive, serving,
fidelity, tradeoff points) that the history API and Compare still read, and
trim the comments that still described removed metrics.
中文:删除旧的 /video 按运行查看器、trade-off 图表和 CI 运行浏览;仪表板、Compare 与证据面板取而代之,性能历史列表保留在可展开区块并响应 history-* 深链接。保留 history API 与 Compare 仍在读取的数据层(bundle、stored、archive、serving、fidelity、tradeoff points),并修掉仍在描述已删指标的注释。
---
docs/video-history.md | 4 +-
docs/videogenx-dashboard.md | 2 +-
.../cypress/component/video-ci-runs.cy.tsx | 523 ----------
.../cypress/component/video-compare.cy.tsx | 2 -
.../cypress/component/video-dashboard.cy.tsx | 11 +-
.../cypress/component/video-fidelity.cy.tsx | 133 ---
.../component/video-results-navigation.cy.tsx | 165 ---
.../component/video-serving-results.cy.tsx | 399 --------
.../cypress/component/video-tradeoff.cy.tsx | 290 ------
packages/app/cypress/e2e/navigation.cy.ts | 134 +--
.../app/cypress/e2e/video-dashboard.cy.ts | 11 +-
.../video-benchmark/FidelityResults.tsx | 493 ---------
.../video-benchmark/ResultPower.tsx | 236 -----
.../video-benchmark/ResultSummary.tsx | 246 -----
.../video-benchmark/ServingResults.tsx | 883 ----------------
.../video-benchmark/VideoBenchmark.tsx | 965 ------------------
.../video-benchmark/VideoCIRuns.tsx | 730 -------------
.../video-benchmark/VideoDashboard.tsx | 45 +-
.../video-benchmark/VideoHistory.tsx | 29 +-
.../video-benchmark/VideoTradeoff.tsx | 605 -----------
.../video-benchmark/chart-domain.ts | 5 +-
.../video-benchmark/comparison.test.ts | 36 -
.../components/video-benchmark/comparison.ts | 21 -
.../components/video-benchmark/deployment.ts | 2 +-
.../components/video-benchmark/frontier.ts | 2 +-
.../components/video-benchmark/report.test.ts | 42 -
.../src/components/video-benchmark/report.ts | 43 -
27 files changed, 48 insertions(+), 6009 deletions(-)
delete mode 100644 packages/app/cypress/component/video-ci-runs.cy.tsx
delete mode 100644 packages/app/cypress/component/video-fidelity.cy.tsx
delete mode 100644 packages/app/cypress/component/video-results-navigation.cy.tsx
delete mode 100644 packages/app/cypress/component/video-serving-results.cy.tsx
delete mode 100644 packages/app/cypress/component/video-tradeoff.cy.tsx
delete mode 100644 packages/app/src/components/video-benchmark/FidelityResults.tsx
delete mode 100644 packages/app/src/components/video-benchmark/ResultPower.tsx
delete mode 100644 packages/app/src/components/video-benchmark/ResultSummary.tsx
delete mode 100644 packages/app/src/components/video-benchmark/ServingResults.tsx
delete mode 100644 packages/app/src/components/video-benchmark/VideoBenchmark.tsx
delete mode 100644 packages/app/src/components/video-benchmark/VideoCIRuns.tsx
delete mode 100644 packages/app/src/components/video-benchmark/VideoTradeoff.tsx
delete mode 100644 packages/app/src/components/video-benchmark/comparison.test.ts
delete mode 100644 packages/app/src/components/video-benchmark/comparison.ts
delete mode 100644 packages/app/src/components/video-benchmark/report.test.ts
delete mode 100644 packages/app/src/components/video-benchmark/report.ts
diff --git a/docs/video-history.md b/docs/video-history.md
index 6063551bf..13de6f18d 100644
--- a/docs/video-history.md
+++ b/docs/video-history.md
@@ -1,6 +1,6 @@
# Video performance history
-`/video` and `/zh/video` lead with the cross-hardware dashboard (see [VideoGenX dashboard](./videogenx-dashboard.md)); the run, results and **Performance history** views described here live in the collapsible "Runs, videos & evidence" section below it, which opens automatically when the URL carries any of `run`, `artifact`, `source`, `cell`, `view`, `compare` or `history-*`. Explicit run/artifact/source/cell URLs retain the existing video viewer. `?view=results` opens the first readable artifact/source from the newest published page; `?view=history` restores history. History filters use `history-hardware`, `history-concurrency`, and `history-query` in the URL. Videos & result follows the same published-first path when no run is selected; empty or failed reads show a recoverable message. Browse CI runs explicitly opens legacy Actions discovery. Returning to History cancels pending result selection; Refresh and reload preserve the selected artifact/source/cell.
+`/video` and `/zh/video` lead with the cross-hardware dashboard (see [VideoGenX dashboard](./videogenx-dashboard.md)); the **Performance history** list described here sits in a collapsible section below it, which opens automatically when the URL carries a `history-*` filter (`history-hardware`, `history-concurrency`, `history-query`). Each entry links to its original GitHub Actions run. The earlier per-run viewer, trade-off chart and CI-run browser were removed with the dashboard rebuild; clips are compared in the dashboard's Compare panel.
## Read path
@@ -24,7 +24,7 @@ Each observation also carries the cell's participating and allocated GPU counts,
## 中文说明
-`/video` 与 `/zh/video` 首屏为跨硬件仪表板(见 [VideoGenX 仪表板](./videogenx-dashboard.md));本文描述的运行、结果与“性能历史”视图位于其下方可展开的“运行、视频与证据”区块,URL 带有 `run`、`artifact`、`source`、`cell`、`view`、`compare` 或 `history-*` 参数时自动展开。原有 run/artifact/source/cell 链接仍打开对应结果;`?view=results` 打开最新发布页面中首个可读取的产物与原始运行;未选择运行时,“视频与结果”也使用该入口。空列表或读取失败会显示可恢复的提示;只有点击“浏览 CI 运行”才扫描 GitHub Actions。返回性能历史会取消正在进行的结果选择;刷新和重新加载保留产物、原始运行及并发配置。历史筛选条件保存在 URL,刷新后恢复。
+`/video` 与 `/zh/video` 首屏为跨硬件仪表板(见 [VideoGenX 仪表板](./videogenx-dashboard.md));本文描述的“性能历史”列表位于其下方可展开的区块,URL 带有 `history-*` 筛选参数(`history-hardware`、`history-concurrency`、`history-query`)时自动展开。每条记录链接到原始 GitHub Actions 运行。原有的按运行查看结果、trade-off 图表与 CI 运行浏览已随仪表板重建移除;视频对比由仪表板的 Compare 面板提供。
历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。每个 cell 另附参与/已分配 GPU 数、测量窗口秒数、视频时长与帧数、板卡平均功率之和、记录的生效功率上限之和(无快照时为 null)、配置的 `tp_size` / `ulysses_degree` / `attention_backend`,以及端点的副本数(`execution.deployment.replica_count`,早于该记录的产物包为 null);这些都是同一 `schemaVersion: 1` 下可为空的附加字段,硬件仪表板据此推导全部指标,浏览器不再解析产物包。
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
index b747f75d5..90a11a807 100644
--- a/docs/videogenx-dashboard.md
+++ b/docs/videogenx-dashboard.md
@@ -41,7 +41,7 @@ Today every hardware has exactly one measured deployment (4 GPUs per video, TP2
## 中文说明
-`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;原有的运行/视频/历史视图收进可展开的“运行、视频与证据”区块,`?run=`、`?view=`、`?compare=` 和 `history-*` 深链接会自动展开该区块。`video-url-state.ts` 管理 `v_x`、`v_y`、`v_tier`、`v_view`、`v_api` 五个 URL 参数,默认值不写入 URL。X 轴可选 P90(默认)或 P50 出片时间;Y 轴可选每 1 美元 TCO 视频数(默认,Hyperscaler 自有设备档位,单价与 `/inference` 同源)、每条视频 TCO 成本、每 GPU 小时视频数和每条视频 GPU 板卡能耗(kJ)。所有按 GPU 计的指标都以参与计算的 GPU 为分母(每条视频 4 张,TP2 × Ulysses 2),而不是任务预留的板卡数;保留数据中 H100 与 B200 的运行预留了 8 张却只用 4 张,图表标题下方的说明会点名这些硬件,对应 KPI 卡标题显示“4 / 8 张 GPU”。空闲板卡只作说明、不计成本,没有 GPU 口径切换。两条坐标轴都从 0 起,便于按长度比较。
+`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;已发布结果的“性能历史”列表收进可展开区块,`history-*` 深链接会自动展开;原有的按运行查看、trade-off 图表与 CI 运行浏览已移除。`video-url-state.ts` 管理 `v_x`、`v_y`、`v_tier`、`v_view`、`v_api` 五个 URL 参数,默认值不写入 URL。X 轴可选 P90(默认)或 P50 出片时间;Y 轴可选每 1 美元 TCO 视频数(默认,Hyperscaler 自有设备档位,单价与 `/inference` 同源)、每条视频 TCO 成本、每 GPU 小时视频数和每条视频 GPU 板卡能耗(kJ)。所有按 GPU 计的指标都以参与计算的 GPU 为分母(每条视频 4 张,TP2 × Ulysses 2),而不是任务预留的板卡数;保留数据中 H100 与 B200 的运行预留了 8 张却只用 4 张,图表标题下方的说明会点名这些硬件,对应 KPI 卡标题显示“4 / 8 张 GPU”。空闲板卡只作说明、不计成本,没有 GPU 口径切换。两条坐标轴都从 0 起,便于按长度比较。
曲线来自部署而不是并发:pinned H3 服务是 batch-one、单副本,客户端并发只会排队(保留数据中 C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 线性增长),把这些点连起来画出的只是队列,因此图表绝不连接它们。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表(KPI 卡、Compare 面板和图例都用它);`plot.ts` 只用未排队的 cell 绘图——排队 cell 不会进入图表、表格和 CSV,只出现在证据面板——再按硬件对剩余部署点求 Pareto 前沿:某硬件有两个及以上前沿部署时自动画出实线,被支配的部署以淡色显示。这些行为都没有开关,没有“显示排队请求”,没有“仅最优”,也没有跨硬件前沿,所有读者看到的是同一张图。目前每种硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的三点散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
diff --git a/packages/app/cypress/component/video-ci-runs.cy.tsx b/packages/app/cypress/component/video-ci-runs.cy.tsx
deleted file mode 100644
index 86d176e78..000000000
--- a/packages/app/cypress/component/video-ci-runs.cy.tsx
+++ /dev/null
@@ -1,523 +0,0 @@
-import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
-import VideoCIRuns from '@/components/video-benchmark/VideoCIRuns';
-import ResultPower from '@/components/video-benchmark/ResultPower';
-import VideoSelect from '@/components/video-benchmark/VideoSelect';
-import { videoHistoryEntry } from '@/components/video-benchmark/history';
-import { servingArtifact, videoRun as run } from '../support/video-artifacts';
-
-describe('H3 automatic CI viewer (synthetic API fixtures)', () => {
- beforeEach(() => {
- cy.intercept('GET', '**/api/video-runs*format=media', { statusCode: 204 });
- cy.intercept('GET', '/api/video-runs?format=history&page=1', {
- schemaVersion: 1,
- entries: [],
- nextPage: null,
- });
- cy.window().then((win) =>
- win.history.replaceState(null, '', `${win.location.pathname}?view=results`),
- );
- });
- it('defaults to published history and keeps filters and source selection in the shared URL', () => {
- const entry = videoHistoryEntry(servingArtifact(), '2026-09-09T00:00:00Z');
- cy.window().then((win) => win.history.replaceState(null, '', win.location.pathname));
- cy.intercept('GET', '/api/video-runs?format=history&page=1', {
- schemaVersion: 1,
- entries: [entry],
- nextPage: null,
- }).as('history');
- cy.intercept('GET', '/api/video-runs?page=1', () => {
- throw new Error('Published discovery must not scan recent Actions');
- });
- cy.intercept('GET', '/api/video-runs?run=123', {
- run: run(123, 'success'),
- artifacts: [entry.artifact],
- });
- cy.intercept('GET', '**/api/video-runs*format=media', servingArtifact());
- cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
- cy.mount(
-
-
- ,
- );
- cy.wait('@history');
- cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
- cy.get('[data-testid="video-history"]').should('contain', 'no matched version baseline');
- cy.get('[aria-label="Client concurrency"]').click();
- cy.contains('[role="option"]', 'C4').click();
- cy.get('[data-testid="video-history-observation"]')
- .should('have.length', 1)
- .and('contain', '300 / —');
- cy.location('search').should('contain', 'history-concurrency=4');
- cy.get('[data-testid="video-history-observation"] button').click();
- cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C4');
- cy.location('search').should('contain', 'cell=c4').and('contain', 'history-concurrency=4');
- cy.contains('button', 'Performance history').click();
- cy.get('[data-testid="video-history-observation"]').should('have.length', 1);
- });
- it('renders retained metrics and missing data in Chinese within a mobile viewport', () => {
- cy.viewport(390, 844);
- const entry = videoHistoryEntry(servingArtifact(), '2026-09-09T00:00:00Z');
- cy.window().then((win) =>
- win.history.replaceState(
- null,
- '',
- `${win.location.pathname}?view=history&history-concurrency=1`,
- ),
- );
- cy.intercept('GET', '/api/video-runs?format=history&page=1', {
- schemaVersion: 1,
- entries: [entry],
- nextPage: null,
- });
- cy.mount(
-
-
- ,
- );
- cy.get('[data-testid="video-history-observation"]')
- .should('have.length', 1)
- .and('contain', '120 / —')
- .and('contain', '168')
- .and('contain', '已完成');
- cy.contains('尚未选择匹配的版本基线').should('be.visible');
- cy.get('[data-testid="video-history"]').then(($history) =>
- expect($history[0].getBoundingClientRect().right).to.be.at.most(390),
- );
- });
- it('keeps an open long-label menu within mobile bounds and supports keyboard selection', () => {
- cy.viewport(390, 844);
- const change = cy.stub().as('selection');
- cy.mount(
-
-
-
,
- );
- cy.get('[role="combobox"]').focus().type('{enter}');
- cy.get('[role="listbox"]')
- .should('be.visible')
- .then(($menu) => {
- const rect = $menu[0].getBoundingClientRect();
- expect(rect.left).to.be.at.least(0);
- expect(rect.right).to.be.at.most(390);
- });
- cy.get('[role="option"]').last().focus().type('{enter}');
- cy.get('@selection').should('have.been.calledWith', 'second');
- cy.get('[role="listbox"]').should('not.exist');
- cy.get('[role="combobox"]').should('have.focus');
- });
- it('browses CI runs explicitly and switches to a failed run without inventing media', () => {
- cy.intercept('GET', '/api/video-runs?page=1', {
- runs: [run(20, 'success'), run(10, 'failure')],
- nextPage: null,
- });
- cy.intercept('GET', '/api/video-runs?run=20', { run: run(20, 'success'), artifacts: [] }).as(
- 'latest',
- );
- cy.intercept('GET', '/api/video-runs?run=10', { run: run(10, 'failure'), artifacts: [] }).as(
- 'failed',
- );
- cy.mount(
-
-
- ,
- );
- cy.contains('button', 'Browse CI runs').click();
- cy.wait('@latest');
- cy.contains('No result artifact for this run yet').should('be.visible');
- cy.get('[role="combobox"][aria-label="CI run"]').click();
- cy.contains('[role="option"]', '#10 · failure').click();
- cy.wait('@failed');
- cy.contains('summary', 'Run details and artifact selection').click();
- cy.contains('a', '#10 · completed / failure').should('be.visible');
- cy.get('video').should('not.exist');
- });
- it('starts shared-artifact loading before run metadata finishes', () => {
- let releaseRun: (() => void) | undefined;
- let mediaStarted = false;
- cy.window().then((win) =>
- win.history.replaceState(null, '', `${win.location.pathname}?run=30&artifact=40`),
- );
- cy.intercept(
- 'GET',
- '/api/video-runs?run=30',
- (req) =>
- new Promise((resolve) => {
- releaseRun = () => {
- req.reply({
- run: run(30, 'success'),
- artifacts: [{ id: 40, name: 'h3-results-30-1', expired: false, size_in_bytes: 100 }],
- });
- resolve();
- };
- }),
- );
- cy.intercept('GET', '**/api/video-runs*format=media', (req) => {
- mediaStarted = true;
- req.reply({ statusCode: 204 });
- });
- cy.intercept('GET', '/api/video-runs?run=30&artifact=40', {
- statusCode: 502,
- body: { error: 'Synthetic ZIP fallback' },
- });
- cy.mount(
-
-
- ,
- );
- cy.wrap(null).should(() => {
- expect(mediaStarted).to.equal(true);
- expect(releaseRun).to.be.a('function');
- });
- cy.then(() => releaseRun?.());
- cy.get('[data-testid="video-ci-runs"] [role="alert"]').should(
- 'contain',
- 'Synthetic ZIP fallback',
- );
- });
- it('keeps navigation and bundle validation errors visible on an empty tradeoff link', () => {
- cy.window().then((win) =>
- win.history.replaceState(
- null,
- '',
- `${win.location.pathname}?run=30&artifact=40&view=tradeoff`,
- ),
- );
- cy.intercept('GET', '/api/video-runs?run=30', {
- run: run(30, 'success'),
- artifacts: [{ id: 40, name: 'h3-results-30-1', expired: false, size_in_bytes: 100 }],
- });
- cy.intercept('GET', '**/api/video-runs*format=media', {
- storageVersion: 1,
- runId: '30',
- artifact: { id: 40, name: 'h3-results-30-1', expired: false, size_in_bytes: 100 },
- sources: [
- {
- id: '30',
- assets: [],
- checksums: [['manifest.json', 'synthetic']],
- texts: [['gpu/supervisor/baseline/telemetry.jsonl', 'broken JSON']],
- documents: [
- ['manifest.json', { run_id: '30' }],
- [
- 'gpu/gpu-job.json',
- {
- roles: {
- baseline: {
- telemetry_summary: {
- qualified: true,
- requested_interval_seconds: 1,
- gpu_identity: [{ uuid: 'GPU-synthetic' }],
- },
- },
- },
- },
- ],
- ],
- },
- ],
- });
- cy.mount(
-
-
- ,
- );
- cy.contains('button', 'Videos & result').should('be.visible');
- cy.contains('[role="alert"]', 'JSON').should('be.visible');
- cy.contains('button', 'Videos & result').click();
- cy.get('[data-testid="video-tradeoff"]').should('not.be.visible');
- cy.contains('[role="alert"]', 'JSON').should('be.visible');
- });
- it('keeps the shared run selected when browsing the first catalog page', () => {
- cy.window().then((win) =>
- win.history.replaceState(null, '', `${win.location.pathname}?run=30`),
- );
- cy.intercept('GET', '/api/video-runs?run=30', { run: run(30, 'success'), artifacts: [] }).as(
- 'shared',
- );
- cy.intercept('GET', '/api/video-runs?page=1', { runs: [run(20, 'success')], nextPage: 2 }).as(
- 'browse',
- );
- cy.mount(
-
-
- ,
- );
- cy.wait('@shared');
- cy.get('[role="combobox"][aria-label="CI run"]').should('contain.text', '#30');
- cy.contains('button', 'Older runs').should('not.exist');
- cy.contains('button', 'Browse CI runs').click();
- cy.wait('@browse');
- cy.get('[role="combobox"][aria-label="CI run"]').should('contain.text', '#30').click();
- cy.contains('[role="option"]', '#20 · success').should('be.visible');
- cy.get('[role="listbox"]').type('{esc}');
- cy.contains('button', 'Older runs').should('be.visible');
- cy.location('search').should('contain', 'run=30');
- });
- it('keeps a direct selection and its download active when an older catalog arrives', () => {
- let releaseList: (() => void) | undefined;
- cy.intercept(
- 'GET',
- '/api/video-runs?page=1',
- (req) =>
- new Promise((resolve) => {
- releaseList = () => {
- req.reply({ runs: [run(20, 'success')], nextPage: null });
- resolve();
- };
- }),
- ).as('catalog');
- cy.intercept('GET', '/api/video-runs?run=30', {
- run: run(30, 'success'),
- artifacts: [{ id: 40, name: 'h3-results-30-1', expired: false, size_in_bytes: 100 }],
- }).as('direct');
- cy.intercept('GET', '/api/video-runs?run=30&artifact=40', {
- delay: 3000,
- statusCode: 502,
- body: { error: 'Synthetic download failure' },
- }).as('zip');
- cy.mount(
-
-
- ,
- );
- cy.contains('button', 'Browse CI runs').click();
- cy.wrap(null).should(() => expect(releaseList).to.be.a('function'));
- cy.contains('summary', 'Run details and artifact selection').click();
- cy.get('input[aria-label="GitHub run ID"]').type('30');
- cy.contains('button', 'Open run').click();
- cy.wait('@direct');
- cy.get('[role="combobox"][aria-label="Result artifact"]').should(
- 'contain.text',
- 'h3-results-30-1',
- );
- cy.then(() => releaseList?.());
- cy.wait('@catalog');
- cy.get('[role="combobox"][aria-label="CI run"]').should('contain.text', '#30');
- cy.get('[role="status"]').should('be.visible');
- cy.wait('@zip');
- cy.get('[role="alert"]').should('contain', 'Synthetic download failure');
- });
- it('shows stored measurements without downloading the archive', () => {
- const artifact = {
- id: 40,
- name: 'h3-results-30-1',
- expired: false,
- size_in_bytes: 100,
- stored: true,
- };
- cy.intercept('GET', '/api/video-runs?page=1', { runs: [run(30, 'success')], nextPage: null });
- cy.intercept('GET', '/api/video-runs?run=30', {
- run: run(30, 'success'),
- artifacts: [artifact],
- });
- cy.intercept('GET', '/api/video-runs?run=30&artifact=40', () => {
- throw new Error('Stored results must not fetch the ZIP');
- });
- cy.intercept('GET', '**/api/video-runs*format=media', {
- storageVersion: 1,
- runId: '30',
- artifact,
- sources: [
- {
- id: '30',
- assets: [],
- texts: [],
- checksums: [['manifest.json', 'a'.repeat(64)]],
- documents: [
- ['manifest.json', { run_id: '30' }],
- [
- 'ci.json',
- { phase: 'complete', regression_status: 'inconclusive', release_qualified: false },
- ],
- [
- 'report/evidence.json',
- {
- policy: { calibration_status: 'uncalibrated' },
- roles: {
- baseline: {
- summary: { latency_median_seconds: 150, valid_clips_per_second: 0.01 },
- },
- candidate: {
- summary: { latency_median_seconds: 120, valid_clips_per_second: 0.02 },
- },
- },
- },
- ],
- ],
- },
- ],
- });
- cy.mount(
-
-
- ,
- );
- cy.contains('button', 'Browse CI runs').click();
- cy.get('[data-testid="result-summary"]')
- .should('contain', 'Media stored for direct playback')
- .and('contain', 'uncalibrated');
- cy.contains('tr', 'Latency')
- .should('contain', '150')
- .and('contain', '120')
- .and('contain', '-20%');
- cy.contains('tr', 'Valid clips').should('contain', '36').and('contain', '72');
- cy.contains('tr', 'Mean GPU power').find('[aria-label="Unavailable"]').should('have.length', 2);
- });
- it('opens the shared serving cell and switches from the chart without reloading the CI artifact', () => {
- const saved = servingArtifact();
- cy.window().then((win) =>
- win.history.replaceState(
- null,
- '',
- `${win.location.pathname}?run=123&artifact=40&source=123&cell=c4`,
- ),
- );
- cy.intercept('GET', '/api/video-runs?run=123', {
- run: run(123, 'success'),
- artifacts: [saved.artifact],
- }).as('servingRun');
- cy.intercept('GET', '**/api/video-runs*format=media', saved).as('servingMedia');
- cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
- cy.intercept('GET', '/api/video-runs?run=123&artifact=40', () => {
- throw new Error('Stored serving results must not fetch the ZIP');
- });
- cy.mount(
-
-
- ,
- );
- cy.wait(['@servingRun', '@servingMedia']);
- cy.get('[data-testid="serving-selected-metrics"]')
- .should('contain', 'C4')
- .and('contain', '300 s');
- cy.get('[data-testid="serving-media"] video').should(
- 'have.attr',
- 'src',
- 'https://media.test/gpu/c4/baseline/artifacts/measurement-r001-c001.mp4',
- );
- cy.get('[data-testid="serving-media"] [aria-label="Clip / request"]').click();
- cy.contains('[role="option"]', 'Warmup').click();
- cy.get('[data-testid="serving-media"] video').should(
- 'have.attr',
- 'src',
- 'https://media.test/gpu/c4/baseline/artifacts/warmup-001.mp4',
- );
- cy.contains('button', 'Hardware tradeoffs').click();
- cy.get('[data-testid="video-tradeoff"] tbody tr')
- .should('have.length', 3)
- .first()
- .find('button')
- .click();
- cy.contains('button', 'Open videos and full result').click();
- cy.get('[data-testid="serving-selected-metrics"]')
- .should('be.visible')
- .and('contain', 'C1')
- .and('contain', '120 s');
- cy.get('[data-testid="serving-media"] video').should(
- 'have.attr',
- 'src',
- 'https://media.test/gpu/c1/baseline/artifacts/measurement-r001-c001.mp4',
- );
- cy.location('search').should('contain', 'cell=c1');
- cy.get('@servingRun.all').should('have.length', 1);
- cy.get('@servingMedia.all').should('have.length', 1);
- cy.get('[data-testid="result-summary"]').should('not.exist');
- });
- it('shows a malformed serving matrix error instead of empty paired results', () => {
- const saved = servingArtifact();
- const source = saved.sources[0];
- source.documents = source.documents.map(([path, document]) => [
- path,
- path === 'serving-smoke.json'
- ? { schema_version: '9.0.0', bundle_type: 'h3_serving_smoke_matrix' }
- : document,
- ]);
- cy.window().then((win) =>
- win.history.replaceState(
- null,
- '',
- `${win.location.pathname}?run=123&artifact=40&view=tradeoff`,
- ),
- );
- cy.intercept('GET', '/api/video-runs?run=123', {
- run: run(123, 'success'),
- artifacts: [saved.artifact],
- });
- cy.intercept('GET', '**/api/video-runs*format=media', saved);
- cy.mount(
-
-
- ,
- );
- cy.contains('[role="alert"]', 'Invalid H3 serving matrix: unsupported matrix contract').should(
- 'be.visible',
- );
- cy.get('[data-testid="serving-results"], [data-testid="result-summary"]').should('not.exist');
- cy.get('video').should('not.exist');
- });
- it('reports expiration without downloading or substituting another artifact', () => {
- cy.intercept('GET', '/api/video-runs?page=1', { runs: [run(30, 'success')], nextPage: null });
- cy.intercept('GET', '/api/video-runs?run=30', {
- run: run(30, 'success'),
- artifacts: [{ id: 40, name: 'h3-results-30-1', expired: true, size_in_bytes: 100 }],
- });
- cy.mount(
-
-
- ,
- );
- cy.contains('button', 'Browse CI runs').click();
- cy.get('[role="alert"]').should('contain', 'Expired');
- cy.get('video').should('not.exist');
- cy.get('[role="combobox"][aria-label="Result artifact"]').should(
- 'contain.text',
- 'h3-results-30-1',
- );
- });
- it('withholds invalid generation measurements and separates warmup energy', () => {
- const power = {
- phases: {
- measurement: {
- valid: false,
- status: 'invalid',
- invalid_reasons: ['unbracketed'],
- aggregate: { avg_power_w: 999 },
- },
- warmup: {
- valid: true,
- status: 'valid',
- duration_seconds: 2,
- aggregate: {
- avg_power_w: 100,
- energy_j: 200,
- joules_per_valid_clip: 200,
- observed_peak_power_w: 110,
- },
- per_gpu: { 'GPU-fixture': { avg_power_w: 100, observed_peak_power_w: 110 } },
- },
- },
- };
- cy.mount(
-
-
- ,
- );
- cy.get('[data-testid="result-power"]')
- .should('contain', 'unbracketed')
- .and('not.contain', '999');
- cy.get('[role="combobox"][aria-label="Power window"]').click();
- cy.contains('[role="option"]', 'Warmup').click();
- cy.get('[data-testid="result-power"]')
- .should('contain', '0.2')
- .and('contain', 'GPU-fixture')
- .and('not.contain', 'unbracketed');
- });
-});
diff --git a/packages/app/cypress/component/video-compare.cy.tsx b/packages/app/cypress/component/video-compare.cy.tsx
index c2c8fa0f2..442ab96db 100644
--- a/packages/app/cypress/component/video-compare.cy.tsx
+++ b/packages/app/cypress/component/video-compare.cy.tsx
@@ -76,7 +76,6 @@ describe('Video compare panel (retained fixture)', () => {
clip('candidate').should('contain', 'B200').find('video').should('exist');
cy.get('[data-testid="video-compare-baseline"]').should('contain', 'H100');
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'B200');
- // Exactly three delta rows: time to video, TCO cost per video and energy per video.
table()
.find('tbody tr')
.should(($rows) => {
@@ -108,7 +107,6 @@ describe('Video compare panel (retained fixture)', () => {
cy.get('[data-testid="video-compare"]')
.should('contain', 'retained CI outputs')
.and('not.contain', 'GPU basis');
- // Arena only: no blind mode and no case dropdown, just the two hardware selects.
cy.get('[data-testid="video-compare-blind"]').should('not.exist');
cy.get('[data-testid="video-compare-controls"] [role="combobox"]').should(($boxes) => {
expect([...$boxes].map((el) => el.getAttribute('aria-label'))).to.deep.equal([
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index 07e035b6f..7e7da209e 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -152,7 +152,6 @@ describe('Video hardware dashboard (retained fixture)', () => {
headers().should(($ths) => {
expect([...$ths].map((el) => el.textContent?.trim())).to.deep.equal(ALL_COLUMNS);
});
- // B200 C1: 77.9 s / 78.3 s, 11.53 videos/GPU-hr, 6.66 videos per $1, $0.150, $0.272 API, 301.1 kJ, 96.4 %, 3,856 W.
cy.contains('[data-testid="video-points-table"] tbody tr', 'B200').should(($row) => {
const cells = [...$row.find('td')].map((el) => el.textContent?.trim());
expect(cells.slice(0, 12)).to.deep.equal([
@@ -183,17 +182,17 @@ describe('Video hardware dashboard (retained fixture)', () => {
.and('contain', 'B200')
.and('not.contain', 'H100');
cy.location('search').should('contain', 'v_view=table');
- cy.get('[data-testid="video-runs-section"]').should('not.have.attr', 'open');
+ cy.get('[data-testid="video-history-section"]').should('not.have.attr', 'open');
});
- it('restores v_ params from the URL and opens the runs section for run deep links', () => {
- mount('/video', '?v_y=kjPerVideo&v_x=p50Latency&v_tier=r&view=history');
+ it('restores v_ params from the URL and opens the history section for history deep links', () => {
+ mount('/video', '?v_y=kjPerVideo&v_x=p50Latency&v_tier=r&history-hardware=H200');
points().should('have.length', 3);
cy.get('[data-testid="video-chart-card"]')
.should('contain', 'GPU-board energy per video (kJ) vs. P50 time to video (s)')
.and('contain', 'Cost tier: Rent - 3 Year Commit');
kpi('h200').should('contain', '$0.485');
- cy.get('[data-testid="video-runs-section"]').should('have.attr', 'open');
- cy.get('[data-testid="video-ci-runs"]').should('exist');
+ cy.get('[data-testid="video-history-section"]').should('have.attr', 'open');
+ cy.get('[data-testid="video-history"] h1').should('contain', 'Performance history');
});
it('reprices the API list price beside the TCO cost, in the cards, the table and the URL', () => {
mount();
diff --git a/packages/app/cypress/component/video-fidelity.cy.tsx b/packages/app/cypress/component/video-fidelity.cy.tsx
deleted file mode 100644
index e13eab67a..000000000
--- a/packages/app/cypress/component/video-fidelity.cy.tsx
+++ /dev/null
@@ -1,133 +0,0 @@
-import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
-import FidelityResults from '@/components/video-benchmark/FidelityResults';
-import { fidelityFixture } from '@/components/video-benchmark/fidelity.fixture';
-import { at } from '@/components/video-benchmark/bundle';
-
-// Synthetic non-playable bytes validate controls, URL binding, and accounting only.
-// Actual decoded video/audio playback is verified separately using retained CI output.
-const mount = (props: React.ComponentProps, locale = '/video') =>
- cy.mount(
-
-
- ,
- );
-
-describe('Native paired fidelity UI (synthetic artifacts)', () => {
- it('distinguishes valid media from 18 threshold failures and changes both selected videos', () => {
- cy.then(() => fidelityFixture({ pairs: 20, failedPairs: 18 })).then((fixture) => {
- mount({ published: fixture.published, runId: fixture.runId });
- cy.contains('p', 'Matched valid pairs').next().should('have.text', '20');
- cy.contains('p', 'Pairs outside fidelity thresholds').next().should('have.text', '18');
- cy.contains('dt', 'Threshold calibration').next().should('have.text', 'Uncalibrated');
- cy.contains('dt', 'Release qualified').next().should('have.text', 'No');
- cy.contains('dt', 'Video/audio technical validity').next().should('have.text', 'Yes');
- for (const role of ['Baseline', 'Candidate'])
- cy.get(`video[aria-label="${role}"]`)
- .should('have.prop', 'controls', true)
- .and('have.prop', 'muted', false)
- .and('have.attr', 'preload', 'metadata');
- const initial = ['baseline', 'candidate'].map(
- (role) => `report/${at(fixture.portable, 'slots', 0, role, 'artifact_path')}`,
- );
- const next = ['baseline', 'candidate'].map(
- (role) => `report/${at(fixture.portable, 'slots', 1, role, 'artifact_path')}`,
- );
- for (const [index, role] of ['Baseline', 'Candidate'].entries())
- cy.get(`video[aria-label="${role}"]`).should(
- 'have.attr',
- 'src',
- fixture.published.assets.find(([path]) => path === initial[index])![1].url,
- );
- cy.get('[aria-label="Paired clip"]').click();
- cy.get('[role="option"]').should('have.length', 20);
- cy.contains('[role="option"]', 'synthetic-case-2').click();
- for (const [index, role] of ['Baseline', 'Candidate'].entries())
- cy.get(`video[aria-label="${role}"]`).should(
- 'have.attr',
- 'src',
- fixture.published.assets.find(([path]) => path === next[index])![1].url,
- );
- cy.contains('Synthetic test prompt 2').should('be.visible');
- cy.contains('a', 'Raw comparison JSON').should(
- 'have.attr',
- 'href',
- fixture.published.assets.find(([path]) => path === 'comparison.json')![1].downloadUrl,
- );
- cy.contains('a', 'CI #101').should(
- 'have.attr',
- 'href',
- 'https://github.com/SemiAnalysisAI/InferenceX/actions/runs/101',
- );
- });
- });
-
- it('rewrites report media/download links and removes scripts and external resources', () => {
- cy.then(() => fidelityFixture()).then((fixture) => {
- mount({ published: fixture.published, runId: fixture.runId });
- cy.get('iframe').should('not.exist');
- cy.contains('summary', 'Original report').click();
- cy.get('iframe')
- .should('have.attr', 'sandbox', 'allow-same-origin allow-downloads')
- .should(($iframe) => {
- const doc = $iframe[0].contentDocument!;
- const path = `report/${at(fixture.portable, 'slots', 0, 'baseline', 'artifact_path')}`;
- expect(doc.querySelector('video')?.getAttribute('src')).to.equal(
- fixture.published.assets.find(([key]) => key === path)![1].url,
- );
- expect(doc.querySelector('a')?.getAttribute('href')).to.equal(
- fixture.published.assets.find(([key]) => key === 'report/index.comparison.json')![1]
- .url,
- );
- expect(doc.querySelectorAll('script')).to.have.length(0);
- expect(doc.querySelector('img')?.hasAttribute('src')).to.equal(false);
- expect(doc.body.dataset.scriptRan).to.equal(undefined);
- });
- cy.contains('summary', 'Original report').click();
- cy.get('iframe').should('not.exist');
- });
- });
-
- it('loads a raw sealed bundle and revokes owned object URLs when unmounted', () => {
- cy.window().then((win) => {
- cy.spy(win.URL, 'revokeObjectURL').as('revoke');
- });
- cy.then(() => fidelityFixture()).then((fixture) => {
- mount({ reader: fixture.read, runId: fixture.runId });
- cy.get('[data-testid="fidelity-results"]').should('be.visible');
- cy.get('video[aria-label="Baseline"]')
- .invoke('attr', 'src')
- .then((url) => {
- expect(url).to.match(/^blob:/u);
- cy.mount(Unmounted synthetic reader
);
- cy.get('@revoke').should('have.been.calledWith', url);
- });
- });
- });
-
- it('clears old evidence and reports an invalid or empty comparison', () => {
- cy.then(() => fidelityFixture()).then((fixture) => {
- mount({ published: fixture.published, runId: fixture.runId });
- cy.get('[data-testid="fidelity-results"]').should('be.visible');
- const invalid = structuredClone(fixture.published);
- for (const [path, value] of invalid.documents)
- if (['comparison.json', 'report/index.comparison.json'].includes(path))
- Object.assign(value!, { slots: [] });
- mount({ published: invalid, runId: fixture.runId });
- cy.contains('[role="alert"]', 'Could not load paired evidence').should('be.visible');
- cy.get('[data-testid="fidelity-results"]').should('not.exist');
- cy.get('video').should('not.exist');
- });
- });
-
- it('renders Chinese status and original-audio controls without relabeling failures as invalid media', () => {
- cy.then(() => fidelityFixture()).then((fixture) => {
- mount({ published: fixture.published, runId: fixture.runId }, '/zh/video');
- cy.contains('成对视频保真度').should('be.visible');
- cy.contains('p', '超出保真度阈值的视频对').next().should('have.text', '1');
- cy.contains('dt', '视频与音频技术有效性').next().should('have.text', '是');
- cy.contains('dt', '阈值校准状态').next().should('have.text', '未校准');
- cy.get('video[aria-label="基线"]').should('have.prop', 'muted', false);
- cy.get('video[aria-label="候选"]').should('have.prop', 'controls', true);
- });
- });
-});
diff --git a/packages/app/cypress/component/video-results-navigation.cy.tsx b/packages/app/cypress/component/video-results-navigation.cy.tsx
deleted file mode 100644
index d996c7360..000000000
--- a/packages/app/cypress/component/video-results-navigation.cy.tsx
+++ /dev/null
@@ -1,165 +0,0 @@
-import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
-import VideoCIRuns from '@/components/video-benchmark/VideoCIRuns';
-import { videoHistoryEntry } from '@/components/video-benchmark/history';
-import { servingArtifact, videoRun } from '../support/video-artifacts';
-
-describe('Published video result navigation', () => {
- const saved = servingArtifact();
- const page = { schemaVersion: 1, entries: [videoHistoryEntry(saved, null)], nextPage: null };
- beforeEach(() => {
- cy.window().then((win) =>
- win.history.replaceState(null, '', `${win.location.pathname}?view=results`),
- );
- cy.intercept('GET', '/api/video-runs?format=history&page=1', page).as('published');
- cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null }).as('recent');
- cy.intercept('GET', '/api/video-runs?run=123', {
- run: videoRun(123, 'success'),
- artifacts: [saved.artifact],
- }).as('run');
- cy.intercept('GET', '**/api/video-runs*format=media', saved).as('media');
- cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
- });
- it('opens published videos from History when recent Actions contain no H3 runs', () => {
- cy.window().then((win) => win.history.replaceState(null, '', win.location.pathname));
- cy.mount(
-
-
- ,
- );
- cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
- cy.contains('button', 'Videos & result').click();
- cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C1');
- cy.location('search').should('contain', 'view=results').and('contain', 'run=123');
- cy.get('@recent.all').should('have.length', 0);
- });
- it('shows the Chinese published empty state and scans CI only after an explicit request', () => {
- cy.intercept('GET', '/api/video-runs?format=history&page=1', {
- schemaVersion: 1,
- entries: [],
- nextPage: null,
- });
- cy.mount(
-
-
- ,
- );
- cy.contains('最新发布页面中没有可读取的结果').should('be.visible');
- cy.get('@recent.all').should('have.length', 0);
- cy.contains('button', '浏览 CI 运行').click();
- cy.wait('@recent');
- cy.contains('本页 GitHub 历史中没有 H3 运行').should('be.visible');
- cy.contains('button', '性能历史').should('be.enabled');
- cy.location('search').should('contain', 'view=results');
- cy.contains('button', '视频与结果').click();
- cy.contains('最新发布页面中没有可读取的结果').should('be.visible');
- cy.contains('button', '浏览 CI 运行').should('be.enabled');
- });
- it('retries a failed published read and skips unreadable sources without scanning CI', () => {
- let reads = 0;
- cy.intercept('GET', '/api/video-runs?format=history&page=1', (req) => {
- if (++reads === 1) req.reply({ statusCode: 503, body: { error: 'Unavailable' } });
- else
- req.reply({
- ...page,
- entries: [
- { ...page.entries[0], error: 'Unreadable index', sources: [] },
- ...page.entries,
- ],
- });
- });
- cy.mount(
-
-
- ,
- );
- cy.get('[role="alert"]').should('contain', 'Could not load published results');
- cy.contains('button', 'Retry').click();
- cy.get('[data-testid="serving-selected-metrics"]').should('be.visible');
- cy.get('@recent.all').should('have.length', 0);
- });
- it('does not select a stale published response after returning to History', () => {
- let release: (() => void) | undefined;
- cy.window().then((win) => {
- const fetch = win.fetch.bind(win);
- let first = true;
- cy.stub(win, 'fetch').callsFake((input: RequestInfo | URL, init?: RequestInit) => {
- if (String(input).includes('format=history') && first) {
- first = false;
- return new Promise((resolve) => {
- release = () => resolve(Response.json(page));
- });
- }
- return fetch(input, init);
- });
- });
- cy.mount(
-
-
- ,
- );
- cy.wrap(null).should(() => expect(release).to.be.a('function'));
- cy.contains('button', 'Performance history').click();
- cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
- cy.then(() => release?.());
- cy.get('@run.all').should('have.length', 0);
- cy.location('search').should('contain', 'view=history').and('not.contain', 'run=');
- cy.contains('button', 'Performance history').should('have.attr', 'aria-pressed', 'true');
- });
- it('retries the shared C4 selection after a refresh metadata failure', () => {
- cy.window().then((win) =>
- win.history.replaceState(
- null,
- '',
- `${win.location.pathname}?view=results&run=123&artifact=40&source=123&cell=c4`,
- ),
- );
- let reads = 0;
- cy.intercept('GET', '/api/video-runs?run=123', (req) => {
- if (++reads === 2) req.reply({ statusCode: 503, body: { error: 'CI run unavailable' } });
- else req.reply({ run: videoRun(123, 'success'), artifacts: [saved.artifact] });
- });
- cy.mount(
-
-
- ,
- );
- cy.get('[data-testid="serving-selected-metrics"]').should('contain', 'C4');
- cy.contains('button', 'Refresh').click();
- cy.get('[role="alert"]').should('contain', 'CI run unavailable');
- cy.contains('button', 'Retry').click();
- cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C4');
- cy.get('@published.all').should('have.length', 0);
- cy.location('search').should('contain', 'cell=c4');
- });
- it('resumes the selected artifact when media loading was cancelled by returning to History', () => {
- let release: (() => void) | undefined;
- cy.window().then((win) => {
- const fetch = win.fetch.bind(win);
- let first = true;
- cy.stub(win, 'fetch').callsFake((input: RequestInfo | URL, init?: RequestInit) => {
- if (String(input).includes('format=media') && first) {
- first = false;
- return new Promise((resolve) => {
- release = () => resolve(Response.json(saved));
- });
- }
- return fetch(input, init);
- });
- });
- cy.mount(
-
-
- ,
- );
- cy.wait('@run');
- cy.get('[aria-label="CI run"]').should('contain', '#123');
- cy.contains('button', 'Performance history').click();
- cy.then(() => release?.());
- cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
- cy.contains('button', 'Performance history').should('have.attr', 'aria-pressed', 'true');
- cy.contains('button', 'Videos & result').click();
- cy.get('[data-testid="serving-selected-metrics"]').should('be.visible');
- cy.get('@media.all').should('have.length', 1);
- cy.get('@recent.all').should('have.length', 0);
- });
-});
diff --git a/packages/app/cypress/component/video-serving-results.cy.tsx b/packages/app/cypress/component/video-serving-results.cy.tsx
deleted file mode 100644
index f62b313d8..000000000
--- a/packages/app/cypress/component/video-serving-results.cy.tsx
+++ /dev/null
@@ -1,399 +0,0 @@
-import { useState } from 'react';
-import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
-import ServingResults from '@/components/video-benchmark/ServingResults';
-import type { ServingCell } from '@/components/video-benchmark/serving';
-import { at, entries, rows, type Bundle } from '@/components/video-benchmark/bundle';
-
-// Synthetic fixtures exercise the serving contract; they are never benchmark results.
-const cells: ServingCell[] = [1, 2, 4].map((concurrency) => {
- const id = `c${concurrency}`;
- const request = (phase: string, slot: string) => ({
- phase,
- slot_id: slot,
- artifact_path: `artifacts/${slot}.mp4`,
- prompt: 'Synthetic test prompt only',
- seed: 11,
- submit_to_media_seconds: 120 * concurrency,
- media_validation_seconds: 0.6,
- media: {
- valid: true,
- video: { duration_seconds: 4.4583, width: 1344, height: 768, frame_count: 107, fps: 24 },
- audio: { sample_rate_hz: 32000, channels: 2 },
- checks: [{ name: 'media.decode', status: 'passed' }],
- },
- });
- return {
- id,
- concurrency,
- runPath: `gpu/${id}/baseline/run.json`,
- jobPath: `gpu/${id}/gpu-job.json`,
- powerPath: `gpu/${id}/power.json`,
- specPath: `gpu/${id}/spec.json`,
- cell: {
- status: 'complete',
- verified: true,
- completion: {
- valid: 4,
- scheduled: 4,
- completed: 4,
- failed: 0,
- not_started: 0,
- unfinished: 0,
- },
- metrics: {
- client_ready_p50_seconds: 120 * concurrency,
- valid_clips_per_second: 1 / 120,
- measurement: { wall_seconds: 480 },
- serving: {
- client_ready_latency_seconds: { sample_count: 4, p90: null },
- valid_video_seconds_per_second: 4.4583 / 120,
- peak_client_in_flight: concurrency,
- },
- },
- },
- run: {
- records: [request('warmup', 'warmup-001'), request('measurement', 'measurement-r001-c001')],
- plan: { generation: { duration_seconds: 4, frame_count: 107, num_inference_steps: 50 } },
- configuration: {
- model_id: 'Synthetic model',
- model_revision: 'synthetic-model-revision',
- runtime_revision: 'synthetic-runtime-revision',
- },
- },
- job: {
- roles: {
- baseline: {
- power_configuration_before: {
- status: 'recorded',
- observed_at: '2026-09-09T01:00:00Z',
- gpus: ['GPU-test', 'GPU-test-2'].map((uuid) => ({
- uuid,
- configured_limit_w: 700,
- enforced_limit_w: 700,
- })),
- },
- power_configuration_after: {
- status: 'recorded',
- observed_at: '2026-09-09T02:00:00Z',
- gpus: ['GPU-test', 'GPU-test-2'].map((uuid) => ({
- uuid,
- configured_limit_w: 700,
- enforced_limit_w: 700,
- })),
- },
- telemetry_summary: {
- gpu_identity: [{ name: 'Synthetic GPU', uuid: 'GPU-test' }],
- measurement_observed_memory_peak_mib_by_gpu: { 'GPU-test': 100000 },
- },
- },
- },
- },
- spec: { gpu_uuids: ['GPU-test', 'GPU-test-2'], server: { ulysses_degree: 2, tp_size: 1 } },
- power: {
- semantics: { power_unit: 'W' },
- phases: {
- measurement: {
- valid: true,
- duration_seconds: 479.9,
- aggregate: {
- avg_power_w: 1374,
- observed_peak_power_w: 1394,
- energy_j: 656721,
- joules_per_valid_clip: 164180,
- },
- per_gpu: {
- 'GPU-test': { avg_power_w: 687, observed_peak_power_w: 697 },
- 'GPU-test-2': { avg_power_w: 687, observed_peak_power_w: 697 },
- },
- },
- startup: {
- valid: false,
- invalid_reasons: ['Synthetic missing telemetry'],
- aggregate: { avg_power_w: 999999 },
- },
- },
- },
- };
-});
-const bundle: Bundle = {
- manifest: {
- run_id: '123',
- git_commit: 'synthetic-backend-sha',
- resources: { requested: { gpus: 8 } },
- },
- ci: { slurm_job: { AllocTRES: 'cpu=32,mem=512G,gres/gpu=8' } },
- result: null,
- job: null,
- report: null,
- comparison: null,
- documents: new Map(),
- files: new Map(),
- checksums: new Map(),
- manifestSha256: 'synthetic-manifest-sha',
-};
-const urls = new Map(
- cells.flatMap((cell) =>
- ['measurement-r001-c001', 'warmup-001'].map((slot): [string, string] => [
- `gpu/${cell.id}/baseline/artifacts/${slot}.mp4`,
- `https://media.example.test/${cell.id}/${slot}.mp4`,
- ]),
- ),
-);
-
-function mount(
- props: Partial> = {},
- locale = '/video',
-) {
- cy.mount(
-
-
- ,
- );
-}
-
-function LinkedSelection() {
- const [cell, setCell] = useState('c1');
- return (
-
- setCell('c4')}>Open C4 from chart
-
-
- );
-}
-
-describe('H3 serving results (synthetic fixtures)', () => {
- it('follows chart-driven cell changes while the result remains mounted', () => {
- cy.mount( );
- cy.contains('button', 'C1').should('have.attr', 'aria-pressed', 'true');
- cy.get('[aria-label="Clip / request"]').click();
- cy.contains('[role="option"]', 'Warmup').click();
- cy.get('video').should('have.attr', 'src', 'https://media.example.test/c1/warmup-001.mp4');
- cy.contains('button', 'Open C4 from chart').click();
- cy.contains('button', /^C4$/u).should('have.attr', 'aria-pressed', 'true');
- cy.get('video').should(
- 'have.attr',
- 'src',
- 'https://media.example.test/c4/measurement-r001-c001.mp4',
- );
- cy.contains('button', 'C2').click();
- cy.contains('button', 'C2').should('have.attr', 'aria-pressed', 'true');
- });
- it('renders a parent-created blob in the report while keeping scripts disabled', () => {
- cy.window().then((win) => {
- const blobUrl = win.URL.createObjectURL(
- new Blob(
- [
- ' ',
- ],
- { type: 'image/svg+xml' },
- ),
- );
- mount({
- html: `Download synthetic blob `,
- });
- cy.get('iframe').should('not.exist');
- cy.contains('summary', 'Original report').click();
- cy.get('iframe')
- .should('have.attr', 'sandbox', 'allow-same-origin allow-downloads')
- .should(($frame) => {
- const doc = $frame[0].contentDocument;
- expect(doc?.querySelector('img')?.naturalWidth).to.equal(2);
- expect(doc?.querySelector('a')?.getAttribute('href')).to.equal(blobUrl);
- expect(doc?.body.dataset.scriptRan).to.equal(undefined);
- })
- .then(() => win.URL.revokeObjectURL(blobUrl));
- cy.contains('summary', 'Original report').click();
- cy.get('iframe').should('not.exist');
- });
- });
-
- it('shows each concurrency without manufacturing a candidate and separates participating and allocated GPU counts', () => {
- const change = cy.stub().as('change');
- mount({ onCellChange: change });
- cy.get('[data-testid="serving-matrix"] tbody tr').should('have.length', 3);
- cy.get('[data-testid="serving-matrix"]').within(() => {
- cy.contains('th', 'Energy / valid clip (kJ/clip)').should('be.visible');
- cy.contains('td', '164.18').should('be.visible');
- cy.contains('th', 'Mean / enforced limit (%)').should('be.visible');
- cy.contains('td', '98.14').should('be.visible');
- });
- cy.get('[data-testid="serving-selected-metrics"]').within(() => {
- cy.contains('120 s').should('be.visible');
- cy.contains('p', '15').should('be.visible');
- cy.contains('dt', 'P90 delivery latency').next().should('have.text', 'Unavailable');
- });
- cy.get('[aria-label="GPU normalization"]').click();
- cy.contains('[role="option"]', 'All allocated GPUs').click();
- cy.get('[data-testid="serving-selected-metrics"]').contains('p', '3.75').should('be.visible');
- cy.get('video')
- .should('have.attr', 'src', 'https://media.example.test/c1/measurement-r001-c001.mp4')
- .and('have.prop', 'muted', false);
- cy.contains('button', /^C4$/u).click();
- cy.get('@change').should('have.been.calledWith', 'c4');
- cy.get('[data-testid="serving-selected-metrics"]').should('contain', '480 s');
- cy.get('video').should(
- 'have.attr',
- 'src',
- 'https://media.example.test/c4/measurement-r001-c001.mp4',
- );
- cy.get('[aria-label="Clip / request"]').click();
- cy.contains('[role="option"]', 'Warmup').click();
- cy.get('video').should('have.attr', 'src', 'https://media.example.test/c4/warmup-001.mp4');
- cy.get('[data-testid="serving-selected-metrics"]').should('contain', '4 / 4');
- cy.contains('a', 'Download original MP4').should(
- 'have.attr',
- 'href',
- 'https://media.example.test/c4/warmup-001.mp4',
- );
- cy.contains('Baseline').should('not.exist');
- cy.contains('Candidate').should('not.exist');
- });
-
- it('shows server stages separately from delivery and retains partial coverage', () => {
- const distribution = {
- values: [1, 2, 3, 4],
- sample_count: 4,
- valid_clip_count: 4,
- missing_count: 0,
- p50: 2.5,
- p90: null,
- p95: null,
- };
- const original = cells[0];
- const record = rows(at(original.run, 'records'))[1];
- const timed = {
- ...original,
- run: {
- ...Object.fromEntries(entries(original.run)),
- summary: { valid: 4 },
- serving: {
- queue_delay_seconds: distribution,
- server_ready_latency_seconds: {
- ...distribution,
- values: [120, 121],
- sample_count: 2,
- missing_count: 2,
- p50: 999999,
- },
- observed_batch_sizes: [1, 1, 1, 1],
- observed_replica_ids: [0],
- },
- records: [
- {
- ...Object.fromEntries(entries(record)),
- job_id: 'synthetic-request',
- server_timings: {
- schema_version: '1.0.0',
- status: 'complete',
- request_id: 'synthetic-request',
- instance_id: 'synthetic-instance',
- clock_id: 'synthetic-clock',
- clock: 'time.monotonic_ns; same Linux boot and time namespace; nanoseconds',
- observed_batch_size: 1,
- replica_id: 0,
- server_ready_latency_seconds: 119,
- prequeue_seconds: 1,
- queue_delay_seconds: 0,
- execution_seconds: 117,
- postprocess_seconds: 1,
- },
- },
- ],
- },
- };
- mount({ cells: [timed] });
- cy.get('[data-testid="serving-server-timing"]').within(() => {
- cy.contains('tr', 'Queue delay').should('contain', '2.5').and('contain', '4 / 4 / 0');
- cy.contains('tr', 'Received → media ready')
- .should('contain', 'Unavailable')
- .and('contain', '2 / 4 / 2')
- .and('not.contain', '999,999');
- cy.contains('dt', 'Observed batch sizes').next().should('have.text', '1');
- cy.contains('dt', 'Observed replica IDs').next().should('have.text', '0');
- });
- cy.get('[data-testid="request-server-timing"]').within(() => {
- cy.get('summary').click();
- cy.contains('dt', 'Queue delay').next().should('have.text', '0 s');
- cy.contains('dt', 'Received → media ready').next().should('have.text', '119 s');
- cy.contains('time.monotonic_ns').should('be.visible');
- });
- cy.contains('dt', 'This request: submission → downloaded media')
- .next()
- .should('have.text', '120 s');
- mount({ cells: [timed] }, '/zh/video');
- cy.get('[data-testid="serving-server-timing"]').within(() => {
- cy.contains('tr', '排队时长').should('contain', '2.5');
- cy.contains('tr', '接收请求 → 媒体就绪')
- .should('contain', '无数据')
- .and('contain', '2 / 4 / 2');
- });
- });
-
- it('distinguishes requested and decoded duration and withholds invalid power', () => {
- mount();
- cy.contains('dt', 'Requested duration (s)').next().should('have.text', '4');
- cy.contains('dt', 'Decoded video duration (s)').next().should('have.text', '4.4583');
- cy.get('[data-testid="serving-power"]').within(() => {
- cy.contains('dt', 'Energy / valid clip (kJ/clip)').next().should('have.text', '164.18');
- cy.get('[aria-label="Power window"]').click();
- });
- cy.contains('[role="option"]', 'Startup').click();
- cy.get('[data-testid="serving-power"]').within(() => {
- cy.contains('dt', 'Aggregate mean (W)').next().should('have.text', 'Unavailable');
- cy.contains('dt', 'Mean / enforced limit (%)').next().should('have.text', 'Unavailable');
- cy.contains('Synthetic missing telemetry').should('be.visible');
- cy.contains('999,999').should('not.exist');
- });
- });
-
- it('withholds headline metrics and power for an unverified configuration', () => {
- mount({
- cells: [
- {
- ...cells[0],
- cell: {
- verified: false,
- status: 'failed',
- metrics: { client_ready_p50_seconds: 999999, valid_clips_per_second: 999999 },
- },
- },
- ],
- });
- cy.get('[data-testid="serving-selected-metrics"]').should('not.contain', '999,999');
- cy.get('[data-testid="serving-matrix"]').should('not.contain', '999,999');
- cy.contains('dt', 'Measurement verified').next().should('have.text', 'No');
- cy.get('[data-testid="serving-power"]').within(() => {
- cy.contains('dt', 'Aggregate mean (W)').next().should('have.text', 'Unavailable');
- cy.contains('dt', 'Mean / enforced limit (%)').next().should('have.text', 'Unavailable');
- });
- });
-
- it('supports Chinese copy and missing request, media, and allocation data', () => {
- mount({ urls: new Map(), bundle: { ...bundle, ci: null } }, '/zh/video');
- cy.contains('并发服务测试结果').should('be.visible');
- cy.contains('此请求暂无可用媒体。').should('be.visible');
- cy.get('video').should('not.exist');
- cy.get('[data-testid="serving-server-timing"]').should('contain', '无数据');
- cy.contains('p', '有效视频 / 参与计算 GPU 小时').next().should('have.text', '15');
- cy.get('[aria-label="GPU 归一化口径"]').click();
- cy.contains('[role="option"]', '所有已分配 GPU').click();
- cy.contains('p', '有效视频 / 已分配 GPU 小时').next().should('have.text', '无数据');
- mount({ cells: [{ ...cells[0], run: null, job: null, spec: null, power: null }] });
- cy.contains('No request records are available for this configuration.').should('be.visible');
- });
-});
diff --git a/packages/app/cypress/component/video-tradeoff.cy.tsx b/packages/app/cypress/component/video-tradeoff.cy.tsx
deleted file mode 100644
index 1025b50d9..000000000
--- a/packages/app/cypress/component/video-tradeoff.cy.tsx
+++ /dev/null
@@ -1,290 +0,0 @@
-import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
-import VideoTradeoff from '@/components/video-benchmark/VideoTradeoff';
-import type { TradeoffRun } from '@/components/video-benchmark/tradeoff';
-import { at, entries, rows, type Json } from '@/components/video-benchmark/bundle';
-import { servingFixture } from '@/components/video-benchmark/serving.fixture';
-
-const role = {
- metrics: {
- status: 'valid',
- measurement: { wall_seconds: 3600, concurrency: 2 },
- completion: { valid: 10, completed: 10, scheduled: 11, failed: 1 },
- },
- records: Array.from({ length: 10 }, (_, i) => ({
- phase: 'measurement',
- status: 'succeeded',
- submit_to_media_seconds: i + 1,
- media: { valid: true, video: { duration_seconds: 8 } },
- })),
-};
-const run: TradeoffRun = {
- exportRun: '20',
- artifact: '30',
- bundle: {
- manifest: { run_id: '10' },
- manifestSha256: 'synthetic-only',
- result: {
- schema_version: '1.0.0',
- bundle_type: 'h3_benchmark_result',
- workload: {
- plan: {
- model_id: 'synthetic',
- model_revision: 'synthetic-revision',
- generation: {
- width: 1280,
- height: 720,
- fps: 24,
- duration_seconds: 8,
- num_inference_steps: 50,
- },
- cases: [{ prompt: 'Synthetic test only', seed: 1 }],
- },
- },
- hardware: {
- reserved_gpu_count: 8,
- selected_gpu_count: 4,
- devices: [{ name: 'Synthetic GPU' }],
- },
- roles: { baseline: role, candidate: role },
- },
- },
-};
-
-describe('Video tradeoff chart (synthetic fixtures)', () => {
- it('plots participating GPU efficiency by default and requires assumptions for the cost axis', () => {
- const open = cy.stub().as('open');
- cy.mount(
-
-
- ,
- );
- cy.get('[role="combobox"][aria-label="Efficiency axis · higher is better"]').should(
- 'contain',
- 'Valid clips / participating GPU-hour',
- );
- cy.get('[data-testid="video-tradeoff-chart"] circle.point').should('have.length', 2);
- cy.contains('td', '2.5').should('be.visible');
- cy.get('[role="combobox"][aria-label="Efficiency axis · higher is better"]').click();
- cy.contains('[role="option"]', 'Valid clips / allocated GPU-hour').click();
- cy.contains('td', '1.25').should('be.visible');
- cy.contains('dd', '8 / 4').should('be.visible');
- cy.get('[role="combobox"][aria-label="Efficiency axis · higher is better"]').click();
- cy.contains('[role="option"]', 'Valid clips / USD').click();
- cy.contains('No points qualify for these axes yet.').should('be.visible');
- cy.get('input[aria-label="Whole deployment cost (USD/hour)"]').type('2');
- cy.get('circle.point').should('not.exist');
- cy.get('input[aria-label="Cost source and included items"]').type(
- 'Synthetic complete-deployment cost',
- );
- cy.get('input[aria-label="Cost as of"]').type('2026-09-09');
- cy.get('circle.point').should('have.length', 1);
- cy.contains('td', '5').should('be.visible');
- cy.contains('button', 'Open videos and full result').click();
- cy.get('@open').should('have.been.calledOnce');
- });
- it('still withholds P90 for single-request results until median diagnostics are selected', () => {
- const single = structuredClone(run);
- const result = single.bundle.result as { roles: Record };
- for (const point of Object.values(result.roles)) {
- point.records = point.records.slice(0, 1);
- point.metrics.completion = { valid: 1, completed: 1, scheduled: 1, failed: 0 };
- }
- cy.mount(
-
- undefined} />
- ,
- );
- cy.contains('No points qualify for these axes yet.').should('be.visible');
- cy.get('circle.point').should('not.exist');
- cy.contains('button', 'Inspect available serial results').click();
- cy.get('[role="combobox"][aria-label="Latency axis · lower is better"]').should(
- 'contain',
- 'Median client-ready latency (s)',
- );
- cy.get('circle.point').should('have.length', 2);
- });
- it('shows an empty state without inventing fixture results', () => {
- cy.mount(
-
- undefined} />
- ,
- );
- cy.contains('Open a CI result').should('be.visible');
- cy.get('circle.point').should('not.exist');
- });
- it('distinguishes groups with the same short label and exposes their full workload', () => {
- const other = structuredClone(run);
- other.bundle.manifestSha256 = 'different-synthetic-workload';
- const result = other.bundle.result as {
- workload: { plan: { generation: Record } };
- };
- result.workload.plan.generation.guidance_scale = 4;
- cy.mount(
-
- undefined} />
- ,
- );
- cy.get('[role="combobox"][aria-label="Matched workload"]').click();
- cy.get('[role="option"]').should('have.length', 2);
- cy.contains('[role="option"]', '#1').should('be.visible');
- cy.contains('[role="option"]', '#2').click();
- cy.contains('summary', 'Matched workload').click();
- cy.get('[data-testid="tradeoff-detail"] pre').first().should('contain', '"guidance_scale": 4');
- });
-});
-
-const matrix = (): TradeoffRun => ({
- exportRun: '123',
- artifact: '456',
- bundle: { ...servingFixture(), result: null, manifestSha256: 'synthetic-serving' },
-});
-
-describe('Video serving matrix chart (synthetic contract fixture)', () => {
- it('shows server coverage in point details without changing the client latency axis', () => {
- const timed = matrix();
- const documents = timed.bundle.documents!;
- const runPath = 'gpu/c1/baseline/run.json';
- const source = documents.get(runPath)!;
- const serving = {
- ...Object.fromEntries(entries(at(source, 'serving'))),
- observed_batch_sizes: [1, 1, 1, 1],
- observed_replica_ids: [0],
- queue_delay_seconds: {
- values: [0, 1, 2, 3],
- sample_count: 4,
- valid_clip_count: 4,
- missing_count: 0,
- p50: 1.5,
- p90: null,
- p95: null,
- },
- };
- documents.set(runPath, { ...Object.fromEntries(entries(source)), serving });
- const matrixDoc = documents.get('serving-smoke.json')!;
- documents.set('serving-smoke.json', {
- ...Object.fromEntries(entries(matrixDoc)),
- cells: rows(at(matrixDoc, 'cells')).map((cell, index) =>
- index
- ? cell
- : {
- ...Object.fromEntries(entries(cell)),
- metrics: { ...Object.fromEntries(entries(at(cell, 'metrics'))), serving },
- },
- ),
- });
- cy.mount(
-
- undefined} />
- ,
- );
- cy.contains('dt', 'Observed batch sizes').next().should('have.text', '1');
- cy.contains('dt', 'Observed replica IDs').next().should('have.text', '0');
- cy.get('[data-testid="tradeoff-server-timing"]').within(() => {
- cy.get('summary').click();
- cy.contains('dt', 'Queue delay')
- .next()
- .should('contain', '1.5 / — / —')
- .and('contain', '4 / 4 / 0');
- });
- cy.get('[aria-label="Latency axis · lower is better"]').should(
- 'contain',
- 'Median client-ready latency (s)',
- );
- cy.get('circle.point').should('have.length', 3);
- });
-
- it('defaults to P90 when individual serving cells have enough samples', () => {
- const formal = matrix();
- formal.bundle = {
- ...servingFixture('123', 'NVIDIA H200', 20),
- result: null,
- manifestSha256: 'synthetic-formal',
- };
- cy.mount(
-
- undefined} />
- ,
- );
- cy.get('[role="combobox"][aria-label="Latency axis · lower is better"]').should(
- 'contain',
- 'P90 client-ready latency (s)',
- );
- cy.get('circle.point').should('have.length', 3);
- cy.get('tbody tr')
- .should('have.length', 3)
- .each((row) => {
- cy.wrap(row).should('contain', '20 / 20 / 20');
- });
- });
- it('shows three labeled cell medians and opens the selected concurrency result', () => {
- const open = cy.stub().as('openCell');
- cy.mount(
-
-
- ,
- );
- cy.get('[role="combobox"][aria-label="Latency axis · lower is better"]').should(
- 'contain',
- 'Median client-ready latency (s)',
- );
- cy.get('circle.point').should('have.length', 3);
- cy.get('path.line-path')
- .should('have.length', 1)
- .invoke('attr', 'd')
- .should('match', /^M[^L]+L[^L]+L[^L]+$/u);
- cy.contains('Lines connect measured concurrency settings').should('be.visible');
- cy.get('path.line-path')
- .invoke('attr', 'd')
- .then((before) => {
- cy.get('[data-testid="video-tradeoff-chart"] svg').trigger('wheel', {
- deltaY: -200,
- shiftKey: true,
- clientX: 400,
- clientY: 300,
- force: true,
- });
- cy.get('path.line-path').invoke('attr', 'd').should('not.equal', before);
- });
- cy.get('text.serving-point-label')
- .should('have.length', 3)
- .then((labels) => {
- expect([...labels].map((label) => label.textContent)).to.deep.equal(['C1', 'C2', 'C4']);
- });
- cy.contains('Closed-loop smoke · serving capacity not qualified').should('be.visible');
- cy.get('tbody tr')
- .should('have.length', 3)
- .each((row) => {
- cy.wrap(row).should('contain', '4 / 4 / 4').and('contain', '15');
- });
- cy.get('[role="combobox"][aria-label="Latency axis · lower is better"]').click();
- cy.contains('[role="option"]', 'P90 client-ready latency (s)').click();
- cy.get('circle.point').should('not.exist');
- cy.get('path.line-path').should('not.exist');
- cy.contains('No points qualify for these axes yet.').should('be.visible');
- cy.contains('button', 'Show cell medians').click();
- cy.get('circle.point').should('have.length', 3);
- cy.get('path.line-path').should('have.length', 1);
- cy.contains('tbody button', 'Client concurrency 4').click();
- cy.contains('button', 'Open videos and full result').click();
- cy.get('@openCell')
- .should('have.been.calledOnce')
- .its('firstCall.args.0.cellId')
- .should('equal', 'c4');
- });
- it('shows the Chinese serving labels with per-cell medians', () => {
- cy.mount(
-
- undefined} />
- ,
- );
- cy.get('[role="combobox"][aria-label="延迟轴 · 越低越好"]').should(
- 'contain',
- '客户端就绪延迟中位数(秒)',
- );
- cy.get('circle.point').should('have.length', 3);
- cy.get('path.line-path').should('have.length', 1);
- cy.contains('各并发数的实测结果').should('be.visible');
- cy.contains('客户端并发数 2').should('be.visible');
- cy.contains('闭环冒烟测试 · 服务容量未经验证').should('be.visible');
- });
-});
diff --git a/packages/app/cypress/e2e/navigation.cy.ts b/packages/app/cypress/e2e/navigation.cy.ts
index 71ffb0537..2ff0acffa 100644
--- a/packages/app/cypress/e2e/navigation.cy.ts
+++ b/packages/app/cypress/e2e/navigation.cy.ts
@@ -1,7 +1,7 @@
import { SUPPLEMENTAL_BENCHMARK_ROWS } from '../../src/lib/benchmarks/supplemental-benchmarks';
import { OVERLAY_RUN_ID, OVERLAY_RUN_URL } from '../support/overlay-fixtures';
import { videoHistoryEntry } from '../../src/components/video-benchmark/history';
-import { servingArtifact, videoRun } from '../support/video-artifacts';
+import { servingArtifact } from '../support/video-artifacts';
const datum = (el: Element) => (el as Element & { __data__: { x: number; y: number } }).__data__;
@@ -371,16 +371,15 @@ describe('TPUv7 results', { testIsolation: true }, () => {
});
});
-describe('H3 video artifact viewer', () => {
+describe('H3 video performance history', () => {
beforeEach(() => {
- cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null });
cy.intercept('GET', '/api/video-runs?format=history&page=*', {
schemaVersion: 1,
entries: [],
nextPage: null,
});
});
- it('opens old published entries by default and restores history filters after reload', () => {
+ it('opens published history behind the dashboard and restores its filters after reload', () => {
const entry = videoHistoryEntry(servingArtifact(), '2026-09-09T00:00:00Z');
cy.intercept('GET', '/api/video-runs?format=history&page=1', {
schemaVersion: 1,
@@ -389,8 +388,8 @@ describe('H3 video artifact viewer', () => {
}).as('history');
cy.visit('/video');
cy.wait('@history');
- // The hardware dashboard leads; the run/history views live in a collapsible section.
- cy.get('[data-testid="video-runs-section"] summary').click();
+ cy.get('[data-testid="video-history"]').should('not.exist');
+ cy.get('[data-testid="video-history-section"] summary').click();
cy.get('[data-testid="video-history"] h1').should('contain', 'Performance history');
cy.get('[data-testid="video-history-observation"]').should('have.length', 3);
cy.get('[aria-label="Client concurrency"]').click();
@@ -405,117 +404,13 @@ describe('H3 video artifact viewer', () => {
.and('contain', '240 / —');
cy.location('search').should('contain', 'history-concurrency=2');
});
- it('opens the first published result directly and preserves the selection on refresh and reload', () => {
- const saved = servingArtifact();
- cy.intercept('GET', '/api/video-runs?format=history&page=1', {
- schemaVersion: 1,
- entries: [videoHistoryEntry(saved, null)],
- nextPage: null,
- }).as('published');
- cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null }).as('recent');
- cy.intercept('GET', '/api/video-runs?run=123', {
- run: videoRun(123, 'success'),
- artifacts: [saved.artifact],
- }).as('run');
- cy.intercept('GET', '**/api/video-runs*format=media', saved);
- cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
- cy.visit('/video?view=results');
- cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C1');
- cy.contains('[data-testid="serving-matrix"] button', 'C4').click();
- cy.get('@published.all').then((requests) => {
- const initialReads = requests.length;
- cy.contains('button', 'Refresh').click();
- cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C4');
- cy.get('@published.all').should('have.length', initialReads);
- });
- cy.location('search').should('contain', 'view=results').and('contain', 'cell=c4');
- cy.reload();
- cy.get('[data-testid="serving-selected-metrics"]').should('be.visible').and('contain', 'C4');
- cy.contains('button', 'Videos & result').should('have.attr', 'aria-pressed', 'true');
- cy.get('@recent.all').should('have.length', 0);
- });
- it('shares a comparison built by opening two CI runs through the page', () => {
- for (const saved of [
- servingArtifact(123, 40, 'NVIDIA H200'),
- servingArtifact(456, 41, 'NVIDIA B200'),
- ]) {
- cy.intercept('GET', `/api/video-runs?run=${saved.runId}`, {
- run: videoRun(Number(saved.runId), 'success'),
- artifacts: [saved.artifact],
- });
- cy.intercept(
- 'GET',
- `/api/video-runs?run=${saved.runId}&artifact=${saved.artifact.id}&format=media`,
- saved,
- );
- }
- cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
- cy.visit('/video?view=tradeoff&run=123&artifact=40');
- cy.get('[data-testid="video-tradeoff"] tbody tr').should('have.length', 3);
- cy.contains('summary', 'Run details and artifact selection').click();
- cy.get('[data-testid="video-ci-runs"] form input').type('456');
- cy.get('[data-testid="video-ci-runs"] form').submit();
- cy.get('[data-testid="video-tradeoff"] tbody tr').should('have.length', 6);
- cy.location().should((location) => {
- const params = new URLSearchParams(location.search);
- expect(params.get('run')).to.equal('456');
- expect(params.get('compare')).to.equal('123.40,456.41');
- });
- cy.reload();
- cy.get('[data-testid="video-tradeoff"] tbody tr').should('have.length', 6);
- cy.get('[data-testid="video-tradeoff"]')
- .should('contain', 'NVIDIA H200')
- .and('contain', 'NVIDIA B200');
- });
- it('restores a cross-hardware comparison on reload and retains good results when one artifact fails', () => {
- const h200 = servingArtifact(123, 40, 'NVIDIA H200');
- const b200 = servingArtifact(456, 41, 'NVIDIA B200');
- for (const saved of [h200, b200]) {
- cy.intercept('GET', `/api/video-runs?run=${saved.runId}`, {
- run: videoRun(Number(saved.runId), 'success'),
- artifacts: [saved.artifact],
- });
- cy.intercept(
- 'GET',
- `/api/video-runs?run=${saved.runId}&artifact=${saved.artifact.id}&format=media`,
- saved,
- );
- }
- cy.intercept('GET', '/api/video-runs?run=789&artifact=42&format=media', {
- statusCode: 503,
- body: { error: 'Synthetic unavailable artifact' },
- });
- cy.intercept('GET', 'https://media.test/**', { statusCode: 204 });
- cy.visit('/video?view=tradeoff&run=123&artifact=40&source=123&compare=123.40,456.41,789.42');
- cy.get('[data-testid="video-tradeoff"] tbody tr').should('have.length', 6);
- cy.get('[data-testid="tradeoff-detail"]').should('contain', 'NVIDIA H200');
- cy.get('[data-testid="video-tradeoff"]')
- .should('contain', 'NVIDIA H200')
- .and('contain', 'NVIDIA B200');
- cy.get('[role="alert"]').should('contain', 'Some comparison results could not be loaded');
- cy.reload();
- cy.get('[data-testid="video-tradeoff"] tbody tr').should('have.length', 6);
- cy.get('[data-testid="tradeoff-detail"]').should('contain', 'NVIDIA H200');
- cy.contains(
- '[data-testid="video-tradeoff"] tbody button',
- /NVIDIA B200.*Client concurrency 4/,
- ).click();
- cy.contains('button', 'Open videos and full result').click();
- cy.get('[data-testid="serving-selected-metrics"]').should('contain', 'C4');
- cy.location('search').should('include', 'run=456').and('include', 'compare=');
- cy.get('[data-testid="serving-media"] video')
- .should('have.attr', 'src')
- .and('include', '/gpu/c4/');
- });
- it('uses the shared unlock for navigation and keeps an empty viewer free of sample results', () => {
+ it('keeps the hidden Video tab behind the shared unlock and noindex', () => {
cy.viewport(1440, 1000);
- cy.visit('/video?view=results', {
+ cy.visit('/video', {
onBeforeLoad(win) {
win.localStorage.removeItem('inferencex-feature-gate');
},
});
- cy.contains('button', 'Browse CI runs').click();
- cy.get('[data-testid="video-ci-runs"]').should('contain', 'No H3 runs in this page');
cy.get('video[data-role]').should('not.exist');
cy.get('[data-testid="tab-trigger-hidden"]').should('not.exist');
cy.get('body').type('{upArrow}{upArrow}{downArrow}{downArrow}');
@@ -523,17 +418,10 @@ describe('H3 video artifact viewer', () => {
cy.contains('a', 'Video').should('have.attr', 'href', '/video');
cy.get('head meta[name="robots"]').should('have.attr', 'content', 'noindex, nofollow');
});
- it('shows a recoverable load error and the Chinese empty state', () => {
- cy.visit('/video?view=results');
- cy.contains('summary', 'Local artifact tools').click();
- cy.get('[data-testid="video-benchmark"]').contains('summary', 'Manifest URL').click();
- cy.get('input[aria-label="Manifest URL"]').type('https://example.com/wrong.json');
- cy.contains('button', 'Load manifest').click();
- cy.get('[role="alert"]').should('contain', 'Could not load this bundle');
- cy.get('video[data-role]').should('not.exist');
- cy.visit('/zh/video?view=results');
- cy.contains('button', '浏览 CI 运行').click();
- cy.get('[data-testid="video-ci-runs"]').should('contain', '本页 GitHub 历史中没有 H3 运行');
+ it('renders the Chinese history section for a history deep link', () => {
+ cy.visit('/zh/video?history-hardware=H200');
+ cy.get('[data-testid="video-history-section"]').should('have.attr', 'open');
+ cy.get('[data-testid="video-history"] h1').should('contain', '性能历史');
cy.get('head meta[name="robots"]').should('have.attr', 'content', 'noindex, nofollow');
});
});
diff --git a/packages/app/cypress/e2e/video-dashboard.cy.ts b/packages/app/cypress/e2e/video-dashboard.cy.ts
index 8cc60af1b..5fc3cba80 100644
--- a/packages/app/cypress/e2e/video-dashboard.cy.ts
+++ b/packages/app/cypress/e2e/video-dashboard.cy.ts
@@ -76,8 +76,8 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
cy.get('[data-testid="video-kpi-card"][data-hardware="h100"]')
.should('contain', '4 of 8 GPUs')
.and('contain', '$0.372');
- cy.get('[data-testid="video-runs-section"]').should('not.have.attr', 'open');
- cy.get('[data-testid="video-ci-runs"]').should('not.exist');
+ cy.get('[data-testid="video-history-section"]').should('not.have.attr', 'open');
+ cy.get('[data-testid="video-history"]').should('not.exist');
});
it('lists only the measured deployments in the table view, without a concurrency column', () => {
cy.visit('/video?v_view=table');
@@ -207,7 +207,6 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
'contain',
'Cost tier: Owning at Large Hyperscaler Volume.',
);
- // Swapping sides flips the deltas and records the pair in the URL.
cy.get('[data-testid="video-compare-swap"]').click();
cy.get('[data-testid="video-compare-baseline"]').should('contain', 'B200');
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H100');
@@ -217,9 +216,9 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
.should('have.attr', 'data-tone', 'worse');
cy.location('search').should('contain', 'v_base=b200').and('contain', 'v_cand=h100');
});
- it('opens the runs section for history deep links and renders the Chinese dashboard', () => {
- cy.visit('/video?view=history');
- cy.get('[data-testid="video-runs-section"]').should('have.attr', 'open');
+ it('opens the history section for history deep links and renders the Chinese dashboard', () => {
+ cy.visit('/video?history-hardware=H200');
+ cy.get('[data-testid="video-history-section"]').should('have.attr', 'open');
cy.get('[data-testid="video-history"] h1').should('contain', 'Performance history');
cy.visit('/zh/video');
cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 3);
diff --git a/packages/app/src/components/video-benchmark/FidelityResults.tsx b/packages/app/src/components/video-benchmark/FidelityResults.tsx
deleted file mode 100644
index 1c8042a39..000000000
--- a/packages/app/src/components/video-benchmark/FidelityResults.tsx
+++ /dev/null
@@ -1,493 +0,0 @@
-'use client';
-
-import { useEffect, useState } from 'react';
-import { Card } from '@/components/ui/card';
-import { Heading } from '@/components/ui/heading';
-import { useLocale } from '@/lib/i18n/use-locale';
-import { track } from '@/lib/analytics/analytics';
-import VideoSelect from './VideoSelect';
-import { at, ROLES, rows, text, type Json } from './bundle';
-import { fidelitySource, loadFidelityBundle, type FidelityBundle } from './fidelity';
-import { storedFidelityBundle, type StoredSource } from './stored';
-import { renderReportHtml } from './report';
-
-const STRINGS = {
- en: {
- title: 'Paired video fidelity',
- intro: 'CPU comparison of retained C1 videos. No new video generation.',
- pairs: 'Matched valid pairs',
- outside: 'Pairs outside fidelity thresholds',
- inconclusive: 'Inconclusive pairs',
- calibration: 'Threshold calibration',
- qualification: 'Release qualified',
- unavailable: 'Unavailable',
- uncalibrated: 'Uncalibrated',
- yes: 'Yes',
- no: 'No',
- note: 'Technical validity covers decoding, geometry and continuity. Paired pixel/audio comparisons measure output drift using exploratory thresholds; they do not establish perceptual quality, prompt adherence or a hardware quality winner.',
- loading: 'Loading and verifying paired evidence…',
- error: 'Could not load paired evidence',
- slot: 'Paired clip',
- baseline: 'Baseline',
- candidate: 'Candidate',
- prompt: 'Prompt',
- seed: 'Seed',
- audio: 'Play one side at a time to compare original audio.',
- download: 'Download original MP4',
- noMedia: 'No media for this observation',
- mediaError: 'The browser could not play this media. Download the original MP4 to inspect it.',
- latency: 'Submission to downloaded media (s)',
- integrity: 'Video/audio technical validity',
- details: 'Generation settings and revisions',
- runtime: 'Runtime revision',
- model: 'Model revision',
- metrics: 'Measured fidelity',
- psnr: 'Video PSNR (dB)',
- mae: 'Video MAE (normalized 0–1)',
- identical: 'Identical frames; finite PSNR undefined',
- spectral: 'Audio spectral cosine',
- rms: 'Audio RMS ratio (candidate / baseline)',
- waveform: 'Audio waveform MAE (PCM amplitude)',
- frames: 'Compared / total video frames',
- videoCoverage: 'Video sample coverage (fraction)',
- audioCoverage: 'Audio sample coverage (fraction)',
- audioSamples: 'Compared audio samples / channel',
- checks: 'Recorded checks and thresholds',
- check: 'Check',
- status: 'Recorded status',
- observed: 'Observed',
- threshold: 'Threshold',
- unit: 'Unit',
- timing:
- 'Delivery latency is descriptive and includes polling and download. These cross-hardware results are not a calibrated performance regression or serving-capacity claim.',
- sources: 'Original GPU runs and evidence',
- originalResult: 'Original serving result and runtime log',
- runtimeNote:
- 'Resolved attention backends and runtime settings can differ across sources. Consult the original runtime logs before attributing output differences to hardware.',
- producer: 'CPU comparison CI',
- artifact: 'Download CI artifact',
- digest: 'Comparison SHA256',
- raw: 'Raw comparison JSON',
- report: 'Original report',
- limitations: 'Backend policy and limitations',
- },
- zh: {
- title: '成对视频保真度',
- intro: '使用保留的 C1 视频在 CPU 上进行对比,未重新生成视频。',
- pairs: '匹配的有效视频对',
- outside: '超出保真度阈值的视频对',
- inconclusive: '无法判定的视频对',
- calibration: '阈值校准状态',
- qualification: '是否通过发布验收',
- unavailable: '无数据',
- uncalibrated: '未校准',
- yes: '是',
- no: '否',
- note: '技术有效性涵盖解码、画面尺寸与连续性。像素与音频配对比较采用探索性阈值,衡量的是输出偏差,不能证明感知质量或 prompt 遵循程度,也不能据此判定哪种硬件的视频质量更好。',
- loading: '正在加载并校验配对证据…',
- error: '无法加载配对证据',
- slot: '配对视频',
- baseline: '基线',
- candidate: '候选',
- prompt: 'Prompt',
- seed: 'Seed',
- audio: '每次只播放一侧,以便对比原始音频。',
- download: '下载原始 MP4',
- noMedia: '此侧暂无可用媒体',
- mediaError: '浏览器无法播放此媒体,请下载原始 MP4 检查。',
- latency: '提交到视频下载完成(秒)',
- integrity: '视频与音频技术有效性',
- details: '生成设置与版本',
- runtime: '运行时版本',
- model: '模型版本',
- metrics: '实测保真度',
- psnr: '视频 PSNR(dB)',
- mae: '视频 MAE(归一化 0–1)',
- identical: '帧完全一致,PSNR 无有限值',
- spectral: '音频频谱余弦相似度',
- rms: '音频 RMS 比值(候选 / 基线)',
- waveform: '音频波形 MAE(PCM 幅度)',
- frames: '已比较 / 总视频帧数',
- videoCoverage: '视频采样覆盖比例',
- audioCoverage: '音频采样覆盖比例',
- audioSamples: '每声道已比较音频采样数',
- checks: '已记录的检查与阈值',
- check: '检查项',
- status: '已记录状态',
- observed: '观测值',
- threshold: '阈值',
- unit: '单位',
- timing:
- '交付延迟仅作描述,包含轮询与下载时间。这些跨硬件数据不构成已校准的性能回归或持续服务容量结论。',
- sources: '原始 GPU 运行与证据',
- originalResult: '原始服务测试结果与运行时日志',
- runtimeNote:
- '各来源实际使用的 attention backend 与运行时设置可能不同。判断输出差异的原因时,请核对原始运行时日志,不要直接归因于硬件。',
- producer: 'CPU 对比 CI',
- artifact: '下载 CI 产物',
- digest: '对比结果 SHA256',
- raw: '原始对比 JSON',
- report: '原始报告',
- limitations: '后端策略与局限',
- },
-};
-
-export default function FidelityResults({
- reader,
- published,
- runId,
-}: {
- reader?: (path: string) => Promise;
- published?: StoredSource;
- runId: string;
-}) {
- const locale = useLocale();
- const s = STRINGS[locale];
- const [loaded, setLoaded] = useState<{
- bundle: FidelityBundle;
- urls: Map;
- downloads: Map;
- html: string;
- } | null>(null);
- const [loadError, setError] = useState('');
- const [slotId, setSlotId] = useState('');
- const [mediaError, setMediaError] = useState(false);
- const [reportOpen, setReportOpen] = useState(false);
- useEffect(() => {
- let cancelled = false;
- const created: string[] = [];
- setLoaded(null);
- setError('');
- setSlotId('');
- setMediaError(false);
- void (async () => {
- try {
- const bundle = published
- ? storedFidelityBundle(published)
- : await loadFidelityBundle(reader!, runId);
- if (cancelled) return;
- const urls = new Map(published?.assets.map(([path, asset]) => [path, asset.url]));
- if (!published)
- for (const [path, blob] of bundle.files) {
- const url = URL.createObjectURL(
- new Blob([blob], {
- type: path.endsWith('.mp4') ? 'video/mp4' : 'application/octet-stream',
- }),
- );
- created.push(url);
- urls.set(path, url);
- }
- const raw = await bundle.files.get('report/index.html')?.text();
- if (cancelled) return;
- setLoaded({
- bundle,
- urls,
- downloads: published
- ? new Map(published.assets.map(([path, asset]) => [path, asset.downloadUrl]))
- : urls,
- html: raw ? renderReportHtml(raw, urls) : '',
- });
- } catch (error) {
- if (!cancelled) setError(error instanceof Error ? error.message : String(error));
- }
- })();
- return () => {
- cancelled = true;
- created.forEach(URL.revokeObjectURL);
- };
- }, [reader, published, runId]);
- const fmt = (value: Json | undefined) =>
- typeof value === 'number'
- ? value.toLocaleString('en-US', { maximumFractionDigits: 4 })
- : value === true
- ? s.yes
- : value === false
- ? s.no
- : value === null || value === undefined || value === ''
- ? s.unavailable
- : typeof value === 'string'
- ? value
- : JSON.stringify(value);
- if (loadError)
- return (
-
- {s.error}
- {loadError}
-
- );
- if (!loaded) return {s.loading} ;
- const { bundle, urls, downloads } = loaded;
- const comparison = bundle.comparison;
- const slots = rows(at(bundle.portable, 'slots'));
- const slot = slots.find((item) => at(item, 'slot_id') === slotId) ?? slots[0];
- const metrics = at(slot, 'metrics');
- const table = (values: [string, Json | undefined][]) => (
-
- {values.map(([label, value]) => (
-
-
{label}
- {fmt(value)}
-
- ))}
-
- );
- return (
-
-
-
-
{s.title}
-
{s.intro}
-
-
- {[
- [s.pairs, at(comparison, 'summary', 'matched_valid_pairs')],
- [
- s.outside,
- slots.filter((item) =>
- rows(at(item, 'checks')).some(
- (check) =>
- text(at(check, 'name')).startsWith('fidelity.') &&
- at(check, 'status') === 'fail',
- ),
- ).length,
- ],
- [s.inconclusive, at(comparison, 'summary', 'inconclusive_slots')],
- ].map(([label, value]) => (
-
-
{String(label)}
-
{fmt(value)}
-
- ))}
-
- {table([
- [
- s.calibration,
- at(comparison, 'policy', 'calibration_status') === 'uncalibrated'
- ? s.uncalibrated
- : at(comparison, 'policy', 'calibration_status'),
- ],
- [s.qualification, at(comparison, 'release_qualified')],
- ])}
- {s.note}
- {s.runtimeNote}
-
-
-
- {
- setSlotId(value);
- setMediaError(false);
- track('video_fidelity_clip_selected', { slot: value });
- }}
- options={slots.map((item) => ({
- value: text(at(item, 'slot_id')),
- label: `${text(at(item, 'slot_id'))} · ${text(at(item, 'case_id'))}`,
- }))}
- />
-
-
- {s.prompt}:
- {text(at(slot, 'prompt'))}
-
-
- {s.seed}: {fmt(at(slot, 'seed'))} · {s.audio}
-
-
- {ROLES.map((role) => {
- const observation = at(slot, role);
- const path = text(at(observation, 'artifact_path'));
- const source = fidelitySource(bundle, role);
- const sourceId = at(source, 'ci', 'databaseId');
- const ci = bundle.documents.get(`sources/${sourceId}/ci.json`);
- return (
-
-
- {s[role]} · {fmt(at(ci, 'site', 'gpu_model'))}
-
- {urls.get(`report/${path}`) ? (
-
setMediaError(true)}
- />
- ) : (
- {s.noMedia}
- )}
- {downloads.get(`report/${path}`) && (
-
- {s.download}
-
- )}
- {table([
- [s.latency, at(observation, 'latency_seconds')],
- [s.integrity, at(observation, 'media', 'valid')],
- [s.runtime, at(comparison, role, 'configuration', 'runtime_revision')],
- [s.model, at(comparison, role, 'configuration', 'model_revision')],
- ])}
-
- );
- })}
-
- {mediaError && {s.mediaError}
}
- {s.timing}
-
- {s.details}
-
- {JSON.stringify(
- {
- generation: at(comparison, 'plan', 'generation'),
- baseline: at(comparison, 'baseline', 'configuration'),
- candidate: at(comparison, 'candidate', 'configuration'),
- },
- null,
- 2,
- )}
-
-
-
-
- {s.metrics}
- {table([
- [
- s.psnr,
- at(metrics, 'video_identical') === true ? s.identical : at(metrics, 'video_psnr_db'),
- ],
- [s.mae, at(metrics, 'video_mae')],
- [s.spectral, at(metrics, 'audio_spectral_cosine')],
- [s.rms, at(metrics, 'audio_rms_ratio')],
- [s.waveform, at(metrics, 'audio_waveform_mae')],
- [
- s.frames,
- `${fmt(at(metrics, 'video_compared_frames'))} / ${fmt(at(metrics, 'video_total_frames'))}`,
- ],
- [s.videoCoverage, at(metrics, 'video_sample_coverage_fraction')],
- [s.audioCoverage, at(metrics, 'audio_sample_coverage_fraction')],
- [s.audioSamples, at(metrics, 'audio_compared_samples_per_channel')],
- ])}
-
- {s.checks}
-
-
-
-
- {[s.check, s.status, s.observed, s.threshold, s.unit].map((label) => (
-
- {label}
-
- ))}
-
-
-
- {rows(at(slot, 'checks')).map((check, index) => (
-
- {['name', 'status', 'observed', 'threshold', 'unit'].map((key) => (
-
- {fmt(at(check, key))}
-
- ))}
-
- ))}
-
-
-
-
-
-
- {s.sources}
-
- {ROLES.map((role) => {
- const source = fidelitySource(bundle, role);
- const id = at(source, 'ci', 'databaseId');
- const artifact = at(source, 'artifact', 'id');
- return (
-
- );
- })}
-
-
- {s.producer} #{runId}
-
- {table([[s.digest, bundle.comparisonSha256]])}
- {downloads.get('comparison.json') && (
-
- {s.raw}
-
- )}
- {loaded.html && (
- setReportOpen(event.currentTarget.open)}>
- {s.report}
- {reportOpen && (
-
- )}
-
- )}
-
- {s.limitations}
-
- {JSON.stringify(
- {
- policy: at(comparison, 'policy'),
- measurement: at(comparison, 'measurement'),
- limitations: at(comparison, 'limitations'),
- release_qualification_reason: at(comparison, 'release_qualification_reason'),
- },
- null,
- 2,
- )}
-
-
-
-
- );
-}
diff --git a/packages/app/src/components/video-benchmark/ResultPower.tsx b/packages/app/src/components/video-benchmark/ResultPower.tsx
deleted file mode 100644
index 4dc6aa5d9..000000000
--- a/packages/app/src/components/video-benchmark/ResultPower.tsx
+++ /dev/null
@@ -1,236 +0,0 @@
-'use client';
-
-import { useState } from 'react';
-import VideoSelect from './VideoSelect';
-import { Card } from '@/components/ui/card';
-import { Heading } from '@/components/ui/heading';
-import { useLocale } from '@/lib/i18n/use-locale';
-import { at, entries, number, ROLES, rows, text, type Json } from './bundle';
-
-const STRINGS = {
- en: {
- title: 'Measured GPU power & energy',
- phase: 'Power window',
- startup: 'Startup',
- warmup: 'Warmup',
- measurement: 'Generation',
- baseline: 'Baseline',
- candidate: 'Candidate',
- unavailable: 'Unavailable',
- note: 'Generation power covers submission → observed provider completion, excluding download and local decoding. Startup and warmup are separate. Averages and energy are backend-validated, time-weighted board measurements; sampled peaks are not instantaneous peaks or whole-node power.',
- mean: 'Mean aggregate power (W)',
- peak: 'Observed aggregate peak (W)',
- energy: 'Integrated energy (kJ)',
- perClip: 'Energy / valid clip (kJ/clip)',
- duration: 'Window duration (s)',
- gpu: 'GPU UUID',
- memory: 'Client memory peak, including warmup (MiB)',
- meanGpu: 'Mean (W)',
- peakGpu: 'Observed peak (W)',
- ratio: 'Mean / specification TDP (%)',
- windows: 'Window coverage and validity',
- full: 'Full recorded result',
- fullNote:
- 'Original contract fields, including configurations, timing sources, power limits, metric definitions and validity reasons. Missing values remain null. Reprocessing does not create a new GPU measurement.',
- producer: 'Export CI run',
- execution: 'Original execution CI run',
- limits:
- 'Board power excludes CPU and facility energy. Specification TDP is separate from configured limits; later inventory does not establish historical settings.',
- },
- zh: {
- title: '实测 GPU 功率与能耗',
- phase: '功率统计时段',
- startup: '启动',
- warmup: 'Warmup',
- measurement: '生成',
- baseline: '基线',
- candidate: '候选',
- unavailable: '无数据',
- note: '生成阶段功率覆盖从请求提交到观测到服务端完成为止,不含下载和本地解码。启动与 warmup 单独统计。平均功率与能耗由后端校验,基于板卡功率按时间加权计算;观测峰值取自离散采样,不是瞬时峰值,也不代表整机功率。',
- mean: '合计平均功率(W)',
- peak: '合计观测峰值(W)',
- energy: '积分能耗(kJ)',
- perClip: '每有效视频能耗(kJ/clip)',
- duration: '时段时长(s)',
- gpu: 'GPU UUID',
- memory: '客户端显存采样峰值(含 warmup,MiB)',
- meanGpu: '平均功率(W)',
- peakGpu: '观测峰值(W)',
- ratio: '平均功率 / 规格 TDP(%)',
- windows: '时段覆盖与有效性',
- full: '完整结果记录',
- fullNote:
- '原始契约字段全文,包括配置、计时来源、功率上限、指标定义和有效性判定原因。缺失值保持 null。重新处理不会产生新的 GPU 测量数据。',
- producer: '导出产物的 CI 运行',
- execution: '原始执行的 CI 运行',
- limits:
- '板卡功率不含 CPU 与设施能耗。规格 TDP 不等于运行时配置的功率上限;事后采集的硬件信息不能证明当时的实际设置。',
- },
-};
-const kilo = (value: Json) => {
- const n = number(value);
- return n === null ? null : n / 1000;
-};
-
-export default function ResultPower({ result }: { result: Json }) {
- const s = STRINGS[useLocale()];
- const [phase, setPhase] = useState<'startup' | 'warmup' | 'measurement'>('measurement');
- const fmt = (value: Json) => {
- const n = number(value);
- return n === null ? s.unavailable : n.toLocaleString('en-US', { maximumFractionDigits: 3 });
- };
- return (
- <>
-
- {s.title}
- {s.note}
-
- setPhase(value as typeof phase)}
- options={(['startup', 'warmup', 'measurement'] as const).map((value) => ({
- value,
- label: s[value],
- }))}
- />
-
-
- {ROLES.map((role) => {
- const power = at(result, 'roles', role, 'power');
- const data = at(power, 'phases', phase);
- const valid = at(data, 'valid') === true;
- const value = (...keys: string[]) => (valid ? at(data, ...keys) : null);
- const fraction = number(value('tdp_comparison', 'aggregate_average_fraction_of_tdp'));
- return (
-
-
- {s[role]} · {text(at(data, 'status')) || s.unavailable}
-
-
- {[
- [s.mean, value('aggregate', 'avg_power_w')],
- [s.peak, value('aggregate', 'observed_peak_power_w')],
- [s.energy, kilo(value('aggregate', 'energy_j'))],
- [s.perClip, kilo(value('aggregate', 'joules_per_valid_clip'))],
- [s.duration, value('duration_seconds')],
- [s.ratio, fraction === null ? null : fraction * 100],
- ].map(([label, n]) => (
-
-
{String(label)}
- {fmt(n as Json)}
-
- ))}
-
- {!valid && (
-
- {rows(at(data, 'invalid_reasons')).map(text).join(', ') || s.unavailable}
-
- )}
- {valid && (
-
-
-
-
- {s.gpu}
- {s.meanGpu}
- {s.peakGpu}
- {s.memory}
-
-
-
- {entries(at(data, 'per_gpu')).map(([uuid, gpu]) => (
-
- {uuid}
- {fmt(at(gpu, 'avg_power_w'))}
- {fmt(at(gpu, 'observed_peak_power_w'))}
-
- {fmt(
- at(
- result,
- 'roles',
- role,
- 'metrics',
- 'gpu_memory',
- 'client_including_warmup_observed_peak_mib_by_gpu',
- uuid,
- ),
- )}
-
-
- ))}
-
-
-
- )}
-
- {s.memory}
-
- {entries(
- at(
- result,
- 'roles',
- role,
- 'metrics',
- 'gpu_memory',
- 'client_including_warmup_observed_peak_mib_by_gpu',
- ),
- ).map(([uuid, mib]) => (
-
-
{uuid}
- {fmt(mib)}
-
- ))}
-
-
-
- {s.windows}
-
- {JSON.stringify(
- rows(at(power, 'windows')).filter((w) => at(w, 'phase') === phase),
- null,
- 2,
- )}
-
-
-
- );
- })}
-
- {s.limits}
-
-
- {s.full}
- {s.fullNote}
- {[
- [s.execution, at(result, 'execution', 'ci', 'run_id')],
- [s.producer, at(result, 'producer', 'ci', 'run_id')],
- ].map(([label, id]) =>
- /^[1-9]\d*$/u.test(text(id)) ? (
-
- {String(label)} · #{text(id)}
-
- ) : (
-
- {String(label)} · {s.unavailable}
-
- ),
- )}
- {entries(result).map(([key, value]) => (
-
- {key}
-
- {JSON.stringify(value, null, 2)}
-
-
- ))}
-
- >
- );
-}
diff --git a/packages/app/src/components/video-benchmark/ResultSummary.tsx b/packages/app/src/components/video-benchmark/ResultSummary.tsx
deleted file mode 100644
index 0eadb5500..000000000
--- a/packages/app/src/components/video-benchmark/ResultSummary.tsx
+++ /dev/null
@@ -1,246 +0,0 @@
-'use client';
-
-import { Card } from '@/components/ui/card';
-import { Heading } from '@/components/ui/heading';
-import { useLocale } from '@/lib/i18n/use-locale';
-import { at, entries, number, ROLES, rows, text, type Bundle } from './bundle';
-
-const STRINGS = {
- en: {
- title: 'Benchmark result',
- baseline: 'Baseline',
- candidate: 'Candidate',
- change: 'Observed change',
- metric: 'Metric',
- latency: 'Latency',
- throughput: 'Valid clips',
- completion: 'Completed / scheduled',
- memory: 'Peak GPU memory',
- power: 'Mean GPU power',
- energy: 'Energy / valid clip',
- missing: 'Unavailable',
- lower: 'Lower is better',
- higher: 'Higher is better',
- noClaim:
- 'Descriptive comparison. Calibration and release qualification are separate; small differences do not establish a performance improvement.',
- aa: 'Same-runtime A/A check',
- comparison: 'Comparison',
- execution: 'Execution',
- calibration: 'Calibration',
- qualified: 'Release qualified',
- yes: 'Yes',
- no: 'No',
- chips: 'participating GPUs',
- verified: 'CI checksums verified',
- stored: 'Media stored for direct playback',
- memoryNote:
- 'Maximum sampled memory across participating GPUs, including warmup. Power is the participating-GPU average during generation; energy excludes CPU and facility power.',
- counts: 'Counts are for the measured block; warmup is excluded.',
- },
- zh: {
- title: '基准测试结果',
- baseline: '基线',
- candidate: '候选',
- change: '观测变化',
- metric: '指标',
- latency: '延迟',
- throughput: '有效视频数',
- completion: '已完成 / 计划',
- memory: 'GPU 显存峰值',
- power: 'GPU 平均功率',
- energy: '每有效视频能耗',
- missing: '无数据',
- lower: '越低越好',
- higher: '越高越好',
- noClaim: '此处仅描述观测差异。校准与发布资格单独判定,微小差异不能证明性能提升。',
- aa: '同运行时 A/A 检查',
- comparison: '对比状态',
- execution: '执行状态',
- calibration: '校准状态',
- qualified: '具备发布资格',
- yes: '是',
- no: '否',
- chips: '个 GPU 参与计算',
- verified: 'CI 校验和已验证',
- stored: '媒体已存储,可直接播放',
- memoryNote:
- '显存为参与计算的 GPU 中最高的采样值,包含 warmup。功率取生成阶段各参与计算 GPU 的平均值;能耗不含 CPU 与设施用电。',
- counts: '计数仅涵盖正式测量时段,不含 warmup。',
- },
-};
-const fmt = (v: number | null, digits = 2) =>
- v === null ? '—' : v.toLocaleString('en-US', { maximumFractionDigits: digits });
-
-export default function ResultSummary({ bundle: b, stored }: { bundle: Bundle; stored: boolean }) {
- const s = STRINGS[useLocale()];
- const roleMetric = (role: string, metric: string): number | null => {
- const summary = at(b.report, 'roles', role, 'summary');
- const phase = at(b.result, 'roles', role, 'power', 'phases', 'measurement');
- if (metric === 'latency') return number(at(summary, 'latency_median_seconds'));
- if (metric === 'throughput') {
- const rate = number(at(summary, 'valid_clips_per_second'));
- return rate === null ? null : rate * 3600;
- }
- if (metric === 'memory') {
- const values = entries(
- at(
- b.result,
- 'roles',
- role,
- 'metrics',
- 'gpu_memory',
- 'client_including_warmup_observed_peak_mib_by_gpu',
- ),
- )
- .map(([, v]) => number(v))
- .filter((v): v is number => v !== null);
- return values.length > 0 ? Math.max(...values) / 1024 : null;
- }
- if (at(phase, 'valid') !== true) return null;
- if (metric === 'energy') {
- const joules = number(at(phase, 'aggregate', 'joules_per_valid_clip'));
- return joules === null ? null : joules / 1000;
- }
- const values = entries(at(phase, 'per_gpu')).map(([, gpu]) => number(at(gpu, 'avg_power_w')));
- return values.length > 0 && values.every((v): v is number => v !== null)
- ? values.reduce((sum, v) => sum + v, 0) / values.length
- : null;
- };
- const runtime = ROLES.map((r) => at(b.report, 'roles', r, 'source_identity', 'source_sha256'));
- const configs = ROLES.map((r) =>
- at(b.documents.get(`gpu/${r}/run.json`), 'configuration', 'configuration_sha256'),
- );
- const sameRuntime =
- configs[0] !== null &&
- configs[0] === configs[1] &&
- runtime[0] !== null &&
- runtime[0] === runtime[1] &&
- at(b.report, 'same_workload') === true &&
- at(b.report, 'same_gpu_uuid_set') === true;
- const gpus = rows(at(b.job, 'roles', 'baseline', 'telemetry_summary', 'gpu_identity'));
- const gpuNames = [...new Set(gpus.map((gpu) => text(at(gpu, 'name'))).filter(Boolean))].join(
- ', ',
- );
- const runId = text(at(b.manifest, 'run_id'));
- const completion = (role: string) => {
- const summary = at(b.documents.get(`gpu/${role}/run.json`), 'summary');
- const scheduled = number(at(b.report, 'roles', role, 'summary', 'scheduled'));
- return `${fmt(number(at(summary, 'completed')), 0)} / ${fmt(scheduled, 0)}`;
- };
- return (
-
-
-
-
{s.title}
-
-
- CI #{runId}
-
- {' · '}
- {gpus.length > 0 ? gpus.length : '—'} {s.chips}
- {gpuNames ? ` (${gpuNames})` : ''}
- {sameRuntime ? ` · ${s.aa}` : ''}
-
-
-
- {stored ? s.stored : s.verified}
-
-
-
-
- {s.execution}: {text(at(b.ci, 'phase')) || s.missing}
-
-
- {s.comparison}: {text(at(b.ci, 'regression_status')) || s.missing}
-
-
-
- {s.calibration}: {text(at(b.report, 'policy', 'calibration_status')) || s.missing}
- {' · '}
- {s.qualified}:{' '}
- {at(b.ci, 'release_qualified') === true
- ? s.yes
- : at(b.ci, 'release_qualified') === false
- ? s.no
- : s.missing}
-
-
-
-
-
- {s.metric}
- {s.baseline}
- {s.candidate}
- {s.change}
-
-
-
- {(
- [
- ['latency', s.latency, 's', s.lower],
- ['throughput', s.throughput, 'clips/h', s.higher],
- ['memory', s.memory, 'GiB/GPU', s.lower],
- ['power', s.power, 'W/GPU', ''],
- ['energy', s.energy, 'kJ/clip', s.lower],
- ] as const
- ).map(([metric, label, unit, hint]) => {
- const baseline = roleMetric('baseline', metric),
- candidate = roleMetric('candidate', metric);
- const change =
- baseline !== null && baseline > 0 && candidate !== null
- ? (candidate / baseline - 1) * 100
- : null;
- return (
-
-
- {label}
- {unit}
-
-
- {baseline === null ? '—' : fmt(baseline)}
-
-
- {candidate === null ? '—' : fmt(candidate)}
-
-
- {change === null ? '—' : `${change > 0 ? '+' : ''}${fmt(change)}%`}
-
-
- );
- })}
-
- {s.completion}
- {completion('baseline')}
- {completion('candidate')}
-
-
-
-
-
-
- — = {s.missing}
-
- {s.counts}
-
- {s.noClaim}
-
-
-
- {s.memory} / {s.power}
-
- {s.memoryNote}
-
-
- );
-}
diff --git a/packages/app/src/components/video-benchmark/ServingResults.tsx b/packages/app/src/components/video-benchmark/ServingResults.tsx
deleted file mode 100644
index ee5f81f15..000000000
--- a/packages/app/src/components/video-benchmark/ServingResults.tsx
+++ /dev/null
@@ -1,883 +0,0 @@
-'use client';
-
-import { useEffect, useState } from 'react';
-import { Card } from '@/components/ui/card';
-import { Button } from '@/components/ui/button';
-import { Heading } from '@/components/ui/heading';
-import { useLocale } from '@/lib/i18n/use-locale';
-import { track } from '@/lib/analytics/analytics';
-import VideoSelect from './VideoSelect';
-import { at, number, rows, safePath, text, type Bundle, type Json } from './bundle';
-import {
- participatingGpuCount,
- perGpuHour,
- selectServingRecord,
- type ServingCell,
-} from './serving';
-import { allocatedGpus } from './allocation';
-import { powerLimitComparison } from './power-limit';
-import { requestServerTiming, serverTimingSummary, SERVER_TIMING_COPY } from './server-timing';
-
-const STRINGS = {
- en: {
- title: 'Serving results',
- smoke: 'Exploratory serving smoke test',
- intro:
- 'Compare client concurrency on the same deployment. Select a configuration to inspect its requests and generated media.',
- concurrency: 'Client concurrency',
- valid: 'Valid / scheduled',
- median: 'Median delivery latency',
- hour: 'Valid clips / deployment-hour',
- gpuHour: 'Valid clips / participating GPU-hour',
- allocatedGpuHour: 'Valid clips / allocated GPU-hour',
- gpuBasis: 'GPU normalization',
- allocatedBasis: 'All allocated GPUs',
- participatingBasis: 'Participating GPUs',
- secondsHour: 'Video seconds / participating GPU-hour',
- allocatedSecondsHour: 'Video seconds / allocated GPU-hour',
- wall: 'Delivery measurement window',
- rate: 'Valid clips / second',
- samples: 'Valid latency samples',
- p90: 'P90 delivery latency',
- p90Note:
- 'P90 is unavailable below 10 valid latency samples per configuration. That display threshold does not establish statistical confidence or sustainable capacity.',
- timing:
- 'Latency runs from submission to the complete downloaded video, including polling and transfer. Throughput uses the closed-loop delivery window; startup, warmup and subsequent local validation are excluded. Hourly rates extrapolate that measured window.',
- closedLoop: 'Closed-loop client load',
- status: 'Execution status',
- verified: 'Measurement verified',
- yes: 'Yes',
- no: 'No',
- unavailable: 'Unavailable',
- complete: 'Complete',
- incomplete: 'Incomplete',
- measured: 'Measured',
- warmup: 'Warmup · excluded from measured metrics',
- slot: 'Clip / request',
- prompt: 'Prompt',
- seed: 'Seed',
- requestLatency: 'This request: submission → downloaded media',
- validation: 'Subsequent local validation',
- settings: 'Generation settings',
- requestedDuration: 'Requested duration (s)',
- decodedDuration: 'Decoded video duration (s)',
- resolution: 'Decoded resolution',
- frames: 'Decoded frames / FPS',
- audio: 'Audio sample rate / channels',
- listen: 'Play to hear the original audio. Playback starts only when you press play.',
- download: 'Download original MP4',
- noMedia: 'No media available for this request.',
- mediaError:
- 'The video could not be loaded or decoded. Download the original MP4 to inspect it.',
- noRequests: 'No request records are available for this configuration.',
- integrity: 'Video & audio integrity',
- passed: 'Passed',
- failed: 'Failed',
- integrityNote:
- 'Technical validity checks decoding, geometry, timing and audio continuity. It does not establish prompt adherence, perceptual quality or lip sync. This smoke test has no paired fidelity or calibrated regression result.',
- checks: 'All recorded integrity checks',
- request: 'Full request record',
- power: 'Measured GPU power & energy',
- phase: 'Power window',
- measurement: 'Generation',
- startup: 'Startup',
- warmupPhase: 'Warmup',
- mean: 'Aggregate mean (W)',
- peak: 'Observed aggregate peak (W)',
- energy: 'Integrated energy (kJ)',
- perClip: 'Energy / valid clip (kJ/clip)',
- powerWindow: 'Power window duration (s)',
- limitRatio: 'Mean / enforced limit (%)',
- limitWatts: 'Total enforced power limit (W)',
- limitNote:
- 'Power-limit ratios require matching participating GPU UUIDs and unchanged prelaunch/postcleanup enforced limits. These snapshots do not prove continuous stability; TDP and later inventories are never substituted.',
- gpuNote:
- 'Participating GPUs measure hardware efficiency. The allocated view includes idle allocations; full deployment costs must include all billed resources.',
- powerNote:
- 'Generation power covers first submission → last observed provider completion. Intervening idle time, downloads and validation are included; overlapping requests are integrated once. Startup and warmup are separate. Time-weighted board measurements exclude the host and facility; sampled peaks are not instantaneous electrical peaks.',
- gpu: 'GPU',
- meanGpu: 'Mean power (W)',
- peakGpu: 'Observed peak (W)',
- memory: 'Sampled memory peak (MiB)',
- memoryNote:
- 'Device-used VRAM during the client workload, including warmup. MiB = 2²⁰ bytes; sampling may miss peaks. These are not framework allocator peaks.',
- hardware: 'Hardware & execution',
- allocated: 'Allocated GPUs',
- participating: 'Participating GPUs',
- model: 'Model',
- modelRevision: 'Model revision',
- runtimeRevision: 'Runtime revision',
- sourceHash: 'Runtime source SHA256',
- server: 'Server configuration',
- observed: 'Observed submission rate (requests/s)',
- inFlight: 'Peak client requests in flight',
- missing: 'Serving measurement scope',
- missingNote:
- 'Closed-loop tests do not fix the offered arrival rate. Missing server measurements are shown as unavailable. Costs and prices require separate, dated assumptions.',
- outcome: 'Completion accounting',
- completed: 'Completed',
- failedCount: 'Failed / invalid',
- notStarted: 'Not started',
- unfinished: 'Unfinished',
- provenance: 'Provenance & downloads',
- ci: 'Exact CI run',
- manifest: 'Manifest SHA256',
- source: 'Backend commit',
- raw: 'Raw result files',
- report: 'Original report',
- reportNote: 'Original report in a sandbox. Scripts and external requests are disabled.',
- limits:
- 'Exploratory measurements only. This result is not release qualified or a sustained-capacity comparison.',
- noCells: 'No verified serving configurations are available.',
- },
- zh: {
- title: '并发服务测试结果',
- smoke: '探索性服务冒烟测试',
- intro: '在同一部署上比较客户端并发数。选择配置,查看逐请求数据与生成的视频。',
- concurrency: '客户端并发数',
- valid: '有效 / 计划请求',
- median: '交付延迟中位数',
- hour: '有效视频 / 部署小时',
- gpuHour: '有效视频 / 参与计算 GPU 小时',
- allocatedGpuHour: '有效视频 / 已分配 GPU 小时',
- gpuBasis: 'GPU 归一化口径',
- allocatedBasis: '所有已分配 GPU',
- participatingBasis: '参与计算的 GPU',
- secondsHour: '视频秒数 / 参与计算 GPU 小时',
- allocatedSecondsHour: '视频秒数 / 已分配 GPU 小时',
- wall: '交付测量时段',
- rate: '有效视频 / 秒',
- samples: '有效延迟样本数',
- p90: 'P90 交付延迟',
- p90Note:
- '每个配置不足 10 个有效延迟样本时不显示 P90。达到显示门槛也不代表具备统计置信度或已验证持续服务容量。',
- timing:
- '延迟从提交请求计时,到完整视频下载完成为止,包含轮询与传输。吞吐量按闭环交付测量时段计算,不含启动、warmup 和随后进行的本地校验。每小时指标由该测量时段外推得出。',
- closedLoop: '闭环客户端负载',
- status: '执行状态',
- verified: '测量结果已验证',
- yes: '是',
- no: '否',
- unavailable: '无数据',
- complete: '已完成',
- incomplete: '未完成',
- measured: '正式测量',
- warmup: 'Warmup · 不计入正式测量指标',
- slot: '视频 / 请求',
- prompt: 'Prompt',
- seed: 'Seed',
- requestLatency: '当前请求:提交 → 视频下载完成',
- validation: '随后进行的本地校验',
- settings: '生成配置',
- requestedDuration: '请求的视频时长(s)',
- decodedDuration: '解码后视频时长(s)',
- resolution: '解码后分辨率',
- frames: '解码帧数 / FPS',
- audio: '音频采样率 / 声道数',
- listen: '点击播放可听到原始音频;视频不会自动播放。',
- download: '下载原始 MP4',
- noMedia: '此请求暂无可用媒体。',
- mediaError: '视频加载或解码失败。请下载原始 MP4 查看。',
- noRequests: '此配置暂无逐请求记录。',
- integrity: '视频与音频完整性',
- passed: '通过',
- failed: '未通过',
- integrityNote:
- '技术有效性检查涵盖解码、画面尺寸、时间戳与音频连续性,不代表符合 prompt、感知质量良好或音画同步。此冒烟测试未提供成对保真度或经过校准的回归结论。',
- checks: '全部完整性检查记录',
- request: '完整请求记录',
- power: '实测 GPU 功率与能耗',
- phase: '功率统计时段',
- measurement: '生成',
- startup: '启动',
- warmupPhase: 'Warmup',
- mean: '合计平均功率(W)',
- peak: '合计观测峰值(W)',
- energy: '积分能耗(kJ)',
- perClip: '每有效视频能耗(kJ/clip)',
- powerWindow: '功率统计时段时长(s)',
- limitRatio: '平均功率 / 实际生效上限(%)',
- limitWatts: '实际生效功率上限合计(W)',
- limitNote:
- '功率占比要求参与计算 GPU 的 UUID 匹配,且启动前与清理后记录的实际生效上限一致。这不能证明期间上限始终不变;不以规格 TDP 或事后硬件信息替代。',
- gpuNote:
- '按参与计算 GPU 数衡量硬件效率;按已分配 GPU 数统计时包含空闲分配。完整部署成本须包含所有计费资源。',
- powerNote:
- '生成阶段功率覆盖首次提交到最后一次观测到服务端完成为止,包含期间的空闲、下载与校验时间;并发请求重叠时段只积分一次。启动与 warmup 单独统计。板卡功率按时间加权,不含主机与设施能耗;采样峰值不是瞬时电气峰值。',
- gpu: 'GPU',
- meanGpu: '平均功率(W)',
- peakGpu: '观测峰值(W)',
- memory: '显存采样峰值(MiB)',
- memoryNote:
- '客户端工作负载期间的设备已用显存,包含 warmup。MiB = 2²⁰ 字节;采样可能遗漏峰值,也不等同于框架分配器统计的峰值。',
- hardware: '硬件与执行配置',
- allocated: '已分配 GPU 数',
- participating: '参与计算 GPU 数',
- model: '模型',
- modelRevision: '模型版本',
- runtimeRevision: '运行时版本',
- sourceHash: '运行时源码 SHA256',
- server: '服务端配置',
- observed: '观测提交速率(requests/s)',
- inFlight: '客户端在途请求峰值',
- missing: '服务测量范围',
- missingNote:
- '闭环测试不固定请求到达速率。缺失的服务端指标显示为无数据。成本与价格需要另行提供注明日期的假设。',
- outcome: '请求完成情况',
- completed: '已完成',
- failedCount: '失败 / 无效',
- notStarted: '未开始',
- unfinished: '未结束',
- provenance: '来源与下载',
- ci: '对应 CI 运行',
- manifest: 'Manifest SHA256',
- source: '后端提交',
- raw: '原始结果文件',
- report: '原始报告',
- reportNote: '原始报告在沙盒中显示,已禁用脚本与外部请求。',
- limits: '仅供探索性分析,不属于发布验收结果,也不构成持续服务容量比较。',
- noCells: '暂无已验证的服务测试配置。',
- },
-};
-
-function multiply(value: Json, by: number) {
- const n = number(value);
- return n === null ? null : n * by;
-}
-
-function Data({ values }: { values: [string, string][] }) {
- return (
-
- {values.map(([label, value]) => (
-
-
{label}
- {value}
-
- ))}
-
- );
-}
-
-export default function ServingResults({
- bundle,
- cells,
- urls,
- downloads,
- html,
- initialCell,
- onCellChange,
-}: {
- bundle: Bundle;
- cells: ServingCell[];
- urls: Map;
- downloads: Map;
- html: string;
- initialCell?: string;
- onCellChange?: (id: string) => void;
-}) {
- const locale = useLocale();
- const s = STRINGS[locale];
- const t = SERVER_TIMING_COPY[locale];
- const [selected, setSelected] = useState(initialCell ?? '');
- const [slot, setSlot] = useState('');
- const [gpuBasis, setGpuBasis] = useState<'participating' | 'allocated'>('participating');
- const [phase, setPhase] = useState<'measurement' | 'startup' | 'warmup'>('measurement');
- const [failedMedia, setFailedMedia] = useState('');
- const [reportOpen, setReportOpen] = useState(false);
- const selectedId = onCellChange ? (initialCell ?? selected) : selected;
- const current = cells.find((cell) => cell.id === selectedId) ?? cells[0];
- useEffect(() => {
- setSlot('');
- }, [current?.id]);
- const fmt = (value: Json, digits = 2): string => {
- const n = number(value);
- return n === null
- ? s.unavailable
- : n.toLocaleString('en-US', { maximumFractionDigits: digits });
- };
- const scalar = (value: Json) =>
- text(value) || (number(value) === null ? s.unavailable : fmt(value));
- if (!current) return {s.noCells} ;
- const { cell, run, job, spec, power } = current;
- const verified = at(cell, 'verified') === true;
- const metrics = verified ? at(cell, 'metrics') : null;
- const serving = at(metrics, 'serving');
- const completion = at(cell, 'completion');
- const records = rows(at(run, 'records'));
- const record = selectServingRecord(run, slot);
- const serverTiming = serverTimingSummary(run, verified);
- const requestTiming = requestServerTiming(record, verified);
- const media = at(record, 'media');
- const warmup = at(record, 'phase') === 'warmup';
- const telemetry = at(job, 'roles', 'baseline', 'telemetry_summary');
- const devices = rows(at(telemetry, 'gpu_identity'));
- const allocated = allocatedGpus(bundle);
- const participating = participatingGpuCount(spec);
- const gpuCount = gpuBasis === 'participating' ? participating : allocated;
- const gpuRate = (value: Json) => perGpuHour(value, gpuCount);
- const powerData = at(power, 'phases', phase);
- const limitComparison = verified
- ? powerLimitComparison(
- powerData,
- at(job, 'roles', 'baseline', 'power_configuration_before'),
- at(job, 'roles', 'baseline', 'power_configuration_after'),
- at(spec, 'gpu_uuids'),
- at(power, 'semantics', 'power_unit'),
- )
- : null;
- const powerValue = (...keys: string[]) =>
- verified && at(powerData, 'valid') === true ? at(powerData, ...keys) : null;
- let mediaPath = '';
- try {
- const path = text(at(record, 'artifact_path'));
- if (path)
- mediaPath = safePath(
- `${current.runPath.slice(0, current.runPath.lastIndexOf('/') + 1)}${safePath(path)}`,
- );
- } catch {
- // Invalid manifest paths never become media URLs.
- }
- const mediaUrl = urls.get(mediaPath);
- const chooseCell = (id: string) => {
- setSelected(id);
- setSlot('');
- onCellChange?.(id);
- track('video_serving_configuration_selected', { configuration: id });
- };
- const p90 = number(at(serving, 'client_ready_latency_seconds', 'sample_count'));
- const ciId = text(at(bundle.manifest, 'run_id'));
- const rawPaths = [
- 'serving-smoke.json',
- current.runPath,
- current.jobPath,
- current.powerPath,
- current.specPath,
- `gpu/${current.id}/supervisor/baseline/runtime.stdout.log`,
- 'manifest.json',
- 'SHA256SUMS',
- ];
-
- return (
-
-
-
-
-
{s.title}
-
{s.intro}
-
-
- {s.smoke}
-
-
-
-
-
-
- {[
- s.concurrency,
- s.valid,
- `${s.median} (s)`,
- s.hour,
- s.mean,
- s.perClip,
- s.limitRatio,
- ].map((label) => (
-
- {label}
-
- ))}
-
-
-
- {cells.map((item) => {
- const measuredPower =
- at(item.cell, 'verified') === true &&
- at(item.power, 'phases', 'measurement', 'valid') === true
- ? at(item.power, 'phases', 'measurement')
- : null;
- const limits = powerLimitComparison(
- measuredPower,
- at(item.job, 'roles', 'baseline', 'power_configuration_before'),
- at(item.job, 'roles', 'baseline', 'power_configuration_after'),
- at(item.spec, 'gpu_uuids'),
- at(item.power, 'semantics', 'power_unit'),
- );
- return (
-
-
- chooseCell(item.id)}
- >
- C{item.concurrency}
-
-
-
- {fmt(at(item.cell, 'completion', 'valid'))} /{' '}
- {fmt(at(item.cell, 'completion', 'scheduled'))}
-
-
- {fmt(
- at(item.cell, 'verified') === true
- ? at(item.cell, 'metrics', 'client_ready_p50_seconds')
- : null,
- )}
-
-
- {fmt(
- multiply(
- at(item.cell, 'verified') === true
- ? at(item.cell, 'metrics', 'valid_clips_per_second')
- : null,
- 3600,
- ),
- )}
-
-
- {fmt(at(measuredPower, 'aggregate', 'avg_power_w'))}
-
-
- {fmt(
- multiply(at(measuredPower, 'aggregate', 'joules_per_valid_clip'), 0.001),
- )}
-
- {fmt(limits?.percent ?? null)}
-
- );
- })}
-
-
-
- {s.timing}
-
-
-
- {record ? (
- <>
-
- ({
- value: text(at(item, 'slot_id')),
- label: `${at(item, 'phase') === 'warmup' ? s.warmup : s.measured} · ${text(at(item, 'slot_id'))}`,
- }))}
- />
-
-
-
- {mediaUrl ? (
-
setFailedMedia(mediaUrl)}
- />
- ) : (
-
- {s.noMedia}
-
- )}
- {failedMedia === mediaUrl && (
-
- {s.mediaError}
-
- )}
- {s.listen}
- {mediaUrl && (
-
- {s.download}
-
- )}
-
-
- {t.title}
-
-
[
- label,
- `${fmt(requestTiming?.stages[index] ?? null)} s`,
- ]),
- [t.batch, fmt(requestTiming?.batchSize ?? null)],
- [t.replicas, fmt(requestTiming?.replicaId ?? null)],
- [t.identity, requestTiming?.identity ?? t.unavailable],
- ]}
- />
- {t.clock}
-
-
- {warmup && (
-
- {s.warmup}
-
- )}
-
-
-
-
{s.prompt}
-
- {text(at(record, 'prompt')) || s.unavailable}
-
-
-
-
- {s.settings}
-
- {JSON.stringify(at(run, 'plan', 'generation'), null, 2)}
-
-
-
-
- {s.integrityNote}
-
- {s.checks}
-
- {JSON.stringify(at(media, 'checks'), null, 2)}
-
-
-
- {s.request}
-
- {JSON.stringify(record, null, 2)}
-
-
- >
- ) : (
- {s.noRequests}
- )}
-
-
-
-
- setGpuBasis(value as typeof gpuBasis)}
- options={[
- { value: 'participating', label: s.participatingBasis },
- { value: 'allocated', label: s.allocatedBasis },
- ]}
- />
-
-
- C{current.concurrency} · {s.closedLoop}
-
-
- {[
- [s.median, `${fmt(at(metrics, 'client_ready_p50_seconds'))} s`],
- [
- gpuBasis === 'participating' ? s.gpuHour : s.allocatedGpuHour,
- fmt(gpuRate(at(metrics, 'valid_clips_per_second'))),
- ],
- [s.valid, `${fmt(at(completion, 'valid'))} / ${fmt(at(completion, 'scheduled'))}`],
- [s.wall, `${fmt(at(metrics, 'measurement', 'wall_seconds'))} s`],
- ].map(([label, value]) => (
-
- ))}
-
- = 10
- ? fmt(at(serving, 'client_ready_latency_seconds', 'p90'))
- : s.unavailable,
- ],
- [s.samples, fmt(at(serving, 'client_ready_latency_seconds', 'sample_count'))],
- [s.inFlight, fmt(at(serving, 'peak_client_in_flight'))],
- ]}
- />
- {s.p90Note}
- {s.gpuNote}
-
-
-
- {t.title}
- {serverTiming.stages.some(Boolean) || serverTiming.batchSizes || serverTiming.replicaIds ? (
- <>
-
-
-
-
- {[t.title, 'P50 (s)', 'P90 (s)', 'P95 (s)', t.coverage].map((label) => (
-
- {label}
-
- ))}
-
-
-
- {t.stages.map((label, index) => {
- const timing = serverTiming.stages[index];
- return (
-
- {label}
- {[timing?.p50, timing?.p90, timing?.p95].map((value, i) => (
-
- {fmt(value ?? null)}
-
- ))}
-
- {timing
- ? `${timing.samples} / ${timing.valid} / ${timing.missing}`
- : t.unavailable}
-
-
- );
- })}
-
-
-
-
- >
- ) : (
- {t.unavailable}
- )}
- {t.note}
- {t.layoutNote}
-
-
-
-
-
{s.power}
-
- setPhase(value as typeof phase)}
- options={[
- { value: 'measurement', label: s.measurement },
- { value: 'startup', label: s.startup },
- { value: 'warmup', label: s.warmupPhase },
- ]}
- />
-
-
-
- {at(powerData, 'valid') !== true && (
-
- {rows(at(powerData, 'invalid_reasons')).map(text).join(', ') || s.unavailable}
-
- )}
- {s.powerNote}
- {s.limitNote}
-
-
-
-
- {[s.gpu, s.meanGpu, s.peakGpu, s.memory].map((label) => (
-
- {label}
-
- ))}
-
-
-
- {devices.map((device) => {
- const uuid = text(at(device, 'uuid'));
- return (
-
-
- {text(at(device, 'name'))}
- {uuid}
-
-
- {fmt(powerValue('per_gpu', uuid, 'avg_power_w'))}
-
-
- {fmt(powerValue('per_gpu', uuid, 'observed_peak_power_w'))}
-
-
- {fmt(at(telemetry, 'measurement_observed_memory_peak_mib_by_gpu', uuid))}
-
-
- );
- })}
-
-
-
- {s.memoryNote}
-
-
-
- {s.hardware}
-
-
- {s.server}
-
- {JSON.stringify(at(spec, 'server'), null, 2)}
-
-
-
- {s.outcome}
-
-
-
-
- {JSON.stringify(at(serving, 'outcomes'), null, 2)}
-
-
-
- {s.missing}:
- {s.missingNote}
-
- {s.limits}
-
-
-
- {s.provenance}
- {/^[1-9]\d*$/u.test(ciId) && (
-
- {s.ci} · #{ciId}
-
- )}
-
-
- {s.raw}
-
- {rawPaths
- .filter((path) => urls.has(path))
- .map((path) => (
-
- {path}
-
- ))}
-
-
- {html && (
- setReportOpen(event.currentTarget.open)}>
- {s.report}
- {s.reportNote}
- {reportOpen && (
-
- )}
-
- )}
-
- {s.hardware} · JSON
-
- {JSON.stringify(job, null, 2)}
-
-
-
-
- );
-}
diff --git a/packages/app/src/components/video-benchmark/VideoBenchmark.tsx b/packages/app/src/components/video-benchmark/VideoBenchmark.tsx
deleted file mode 100644
index a36837eac..000000000
--- a/packages/app/src/components/video-benchmark/VideoBenchmark.tsx
+++ /dev/null
@@ -1,965 +0,0 @@
-'use client';
-
-import { useEffect, useRef, useState } from 'react';
-import { Card } from '@/components/ui/card';
-import { Button } from '@/components/ui/button';
-import { Input } from '@/components/ui/input';
-import { Heading } from '@/components/ui/heading';
-import { useLocale } from '@/lib/i18n/use-locale';
-import { track } from '@/lib/analytics/analytics';
-import ResultPower from './ResultPower';
-import VideoSelect from './VideoSelect';
-import ServingResults from './ServingResults';
-import { servingCells, type ServingCell } from './serving';
-import { renderReportHtml } from './report';
-import { storedBundle, type StoredSource } from './stored';
-import ResultSummary from './ResultSummary';
-import { allocatedGpus } from './allocation';
-import {
- at,
- entries,
- estimateEconomics,
- folderReader,
- httpReader,
- loadBundle,
- number,
- ROLES,
- rows,
- sampledPower,
- text,
- type Bundle,
- type Json,
-} from './bundle';
-
-const STRINGS = {
- en: {
- title: 'H3 Video Benchmark',
- subtitle: 'Original media. Measured execution. Traceable comparisons.',
- aa: 'Same-build A/A',
- sameWorkload: 'Same workload',
- statsNote:
- 'The metrics below summarize the measured block. Selected warmup clips are excluded.',
- open: 'Open artifact folder',
- load: 'Load manifest',
- source: 'Manifest URL',
- clear: 'Clear results',
- loading: 'Loading and verifying checksums…',
- empty: 'Open a real CI result to begin',
- instructions:
- 'Download the H3 artifact from GitHub Actions, extract it, then choose the folder containing manifest.json. Files stay in this browser; nothing is uploaded. Reloading clears imported files.',
- sample: 'Download reference CI artifact',
- remote:
- 'Alternatively, load an HTTPS artifact directory with CORS enabled. Private bundles should use the local folder option; hidden navigation is not access control.',
- error: 'Could not load this bundle',
- retry:
- 'Choose a complete artifact folder or correct the manifest URL and retry. Existing results have been cleared.',
- verified: 'File checksums verified',
- trust:
- 'Checksums establish bundle consistency, not independent source or hardware attestation. Confirm the CI run and manifest hash before sharing conclusions.',
- execution: 'Execution',
- comparison: 'Regression',
- calibration: 'Calibration',
- qualification: 'Release qualified',
- unavailable: 'Unavailable',
- yes: 'Yes',
- no: 'No',
- baseline: 'Baseline',
- candidate: 'Candidate',
- slot: 'Clip / request',
- prompt: 'Prompt',
- settings: 'Generation settings',
- seed: 'Seed',
- warmup: 'Warmup',
- measured: 'Measured',
- noMedia: 'No generated media for this request',
- mediaError:
- 'This browser could not decode the video/audio. Download the original media to inspect it.',
- download: 'Download original MP4',
- audio: 'Audio is enabled. Play one side at a time to compare the sound.',
- latency: 'Median end-to-end latency',
- throughput: 'Valid clips / second',
- counts: 'Completion accounting',
- memory: 'Sampled GPU memory',
- timing:
- 'Latency: submission through downloaded and validated media, including polling, transfer and analysis. Throughput: valid measured clips ÷ serial measured-block seconds; warmup excluded. These are point estimates, not saturated serving capacity.',
- window: 'Measured block',
- completed: 'Completed',
- valid: 'Valid',
- scheduled: 'Scheduled',
- failed: 'Failed / invalid',
- power: 'Measured power & sampled energy',
- powerNote:
- 'Board power summed across participating GPUs. Time-weighted power and trapezoidal energy cover only the first-to-last complete telemetry samples tagged measurement, including warmup. No endpoint extrapolation; gaps over 3× the requested interval invalidate the estimate. This is not facility energy or energy per measured clip.',
- meanPower: 'Time-weighted mean',
- energy: 'Integrated sampled energy (estimate)',
- coverage: 'Covered telemetry window',
- samples: 'Samples',
- memoryNote:
- 'Maximum observed device-used VRAM per GPU during the client workload, including warmup. MiB = 2²⁰ bytes. Sampling can miss peaks; these are not allocator peaks.',
- integrity: 'Video & audio integrity',
- fidelity: 'Paired fidelity',
- fidelityNote:
- 'Pixel and waveform similarity detect implementation drift. They do not establish prompt adherence, perceptual quality, lip sync or human preference. Thresholds remain uncalibrated unless the backend says otherwise.',
- identical: 'Identical frames; finite PSNR undefined',
- checks: 'Recorded checks',
- hardware: 'Hardware & revisions',
- videoPsnr: 'Video PSNR (dB)',
- videoMae: 'Video MAE (normalized 0–1)',
- audioSpectral: 'Audio spectral cosine',
- audioRms: 'Audio RMS ratio (candidate / baseline)',
- audioMae: 'Audio waveform MAE (PCM amplitude)',
- videoCoverage: 'Video coverage (fraction)',
- audioCoverage: 'Audio coverage (fraction)',
- node: 'Node',
- model: 'Model',
- modelRevision: 'Model revision',
- runtimeRevision: 'Runtime revision',
- sourceHash: 'Source SHA256',
- participating: 'Participating GPUs',
- allocated: 'Allocated GPUs',
- provenance: 'Provenance & downloads',
- ciRun: 'Exact CI run',
- commit: 'Backend commit',
- manifest: 'Manifest SHA256',
- report: 'Open original report',
- reportNote:
- 'Original report rendered in a sandbox, with verified local media. Scripts and external requests are disabled.',
- raw: 'Raw artifacts',
- economics: 'Revenue & profit scenario',
- economicsNote:
- 'User-entered USD assumptions. Revenue extrapolates measured serial throughput to one hour at 100% demand; it excludes startup/warmup and is not demonstrated capacity. Profit requires all-in cost per billed GPU-hour, including rental or amortization, electricity, cooling, host/network, storage, labor, licensing and other overhead. Allocation count defaults from Slurm; change billed count only if your contract differs.',
- price: 'Selling price (USD / generated clip)',
- cost: 'All-in cost (USD / billed GPU-hour)',
- billed: 'Billed GPUs',
- assumption: 'Price and cost source / assumptions',
- date: 'Assumptions as of',
- revenueParticipant: 'Revenue / participating GPU-hour',
- revenueBilled: 'Revenue / billed GPU-hour',
- profitParticipant: 'Profit / participating GPU-hour',
- profitBilled: 'Profit / billed GPU-hour',
- currency: 'USD',
- estimate: 'Estimate',
- needAssumptions:
- 'Enter a price, source, date and billed GPU count. Leave cost blank to keep profit unavailable.',
- missing: 'Backend fields & limits',
- missingNote:
- 'Missing values stay unavailable. This contract has no measured-only per-request power boundaries, facility energy, pricing or full cost model. Sensor calibration and independent hardware attestation are not supplied. No private object-storage access is configured by this viewer.',
- },
- zh: {
- title: 'H3 视频基准测试',
- subtitle: '查看原始媒体、实测执行数据与可追溯的比较结果。',
- aa: '同构建 A/A',
- sameWorkload: '相同工作负载',
- statsNote: '以下指标汇总正式测量时段;所选 warmup 视频不计入其中。',
- open: '打开产物文件夹',
- load: '加载 manifest',
- source: 'Manifest URL',
- clear: '清除结果',
- loading: '正在加载并校验文件…',
- empty: '打开真实 CI 结果开始查看',
- instructions:
- '从 GitHub Actions 下载 H3 产物并解压,选择包含 manifest.json 的文件夹。文件仅在当前浏览器中读取,不会上传;刷新页面后需要重新导入。',
- sample: '下载参考 CI 产物',
- remote:
- '也可加载启用 CORS 的 HTTPS 产物目录。私有产物包请通过本地文件夹打开;隐藏导航不等于访问控制。',
- error: '无法加载此产物包',
- retry: '请选择完整的产物文件夹,或修正 manifest URL 后重试。此前的结果已清除。',
- verified: '文件校验和通过',
- trust:
- '校验和仅确认产物包内部一致,不构成独立的来源或硬件认证。分享结论前请核对 CI run 与 manifest 哈希。',
- execution: '执行状态',
- comparison: '回归结论',
- calibration: '校准状态',
- qualification: '发布验收通过',
- unavailable: '无数据',
- yes: '是',
- no: '否',
- baseline: '基线',
- candidate: '候选',
- slot: '视频 / 请求',
- prompt: 'Prompt',
- settings: '生成配置',
- seed: 'Seed',
- warmup: 'Warmup',
- measured: '正式测量',
- noMedia: '此请求没有生成媒体',
- mediaError: '浏览器无法解码此视频或音频,请下载原始媒体检查。',
- download: '下载原始 MP4',
- audio: '音频已启用。建议逐个播放,对比两侧声音。',
- latency: '端到端延迟中位数',
- throughput: '每秒有效视频数',
- counts: '完成情况',
- memory: 'GPU 显存采样峰值',
- timing:
- '延迟从提交请求计时,直到媒体下载并验证完成,包含轮询、传输与分析。吞吐量 = 有效测量视频数 ÷ 串行测量时段秒数,不含 warmup。这些是点估计,不代表饱和服务容量。',
- window: '正式测量时段',
- completed: '已完成',
- valid: '有效',
- scheduled: '计划请求',
- failed: '失败 / 无效',
- power: '实测功耗与采样能耗',
- powerNote:
- '功率为参与计算的 GPU 板卡功率之和。时间加权平均功率和梯形积分能耗仅覆盖 measurement 阶段首末完整采样之间的时段,包含 warmup。端点不外推;间隔超过请求采样周期的 3 倍时不提供估算。这不是设施能耗,也不是每个正式测量视频的能耗。',
- meanPower: '时间加权平均功率',
- energy: '采样积分能耗(估算)',
- coverage: '遥测覆盖时段',
- samples: '采样数',
- memoryNote:
- '各 GPU 在客户端工作负载期间采样到的显存占用最大值,包含 warmup。MiB = 2²⁰ 字节。采样可能漏掉峰值,不等同于分配器峰值。',
- integrity: '视频与音频完整性',
- fidelity: '配对保真度',
- fidelityNote:
- '像素与波形相似度用于发现实现变化造成的输出漂移,不能证明 prompt 遵循度、感知质量、口型同步或人类偏好。除非后端明确标注,否则阈值仍未经校准。',
- identical: '帧完全一致,有限 PSNR 无定义',
- checks: '已记录的检查',
- hardware: '硬件与版本',
- videoPsnr: '视频 PSNR(dB)',
- videoMae: '视频 MAE(归一化至 0–1)',
- audioSpectral: '音频频谱余弦相似度',
- audioRms: '音频 RMS 比值(候选 / 基线)',
- audioMae: '音频波形 MAE(PCM 振幅)',
- videoCoverage: '视频覆盖比例',
- audioCoverage: '音频覆盖比例',
- node: '节点',
- model: '模型',
- modelRevision: '模型版本',
- runtimeRevision: '运行时版本',
- sourceHash: '源码 SHA256',
- participating: '参与计算的 GPU',
- allocated: '分配的 GPU',
- provenance: '来源记录与下载',
- ciRun: '对应 CI run',
- commit: '后端 commit',
- manifest: 'Manifest SHA256',
- report: '打开原始报告',
- reportNote: '报告在沙盒中显示并引用已校验的本地媒体,脚本与外部请求均禁用。',
- raw: '原始产物',
- economics: '收入与利润情景估算',
- economicsNote:
- '金额采用用户输入的美元假设。收入按实测串行吞吐量外推至满需求的一小时,不含启动与 warmup,不代表已验证的服务容量。利润需要每个计费 GPU 小时的完整成本,涵盖租赁或折旧、电力、冷却、主机与网络、存储、人力、许可费及其他开销。分配数量默认来自 Slurm;仅在合同计费方式不同时修改计费数量。',
- price: '售价(USD / 生成视频)',
- cost: '完整成本(USD / 计费 GPU 小时)',
- billed: '计费 GPU 数',
- assumption: '价格与成本来源 / 假设',
- date: '假设基准日期',
- revenueParticipant: '每 GPU 小时收入(参与计算)',
- revenueBilled: '每 GPU 小时收入(计费)',
- profitParticipant: '每 GPU 小时利润(参与计算)',
- profitBilled: '每 GPU 小时利润(计费)',
- currency: 'USD',
- estimate: '估算',
- needAssumptions: '请填写售价、来源、日期与计费 GPU 数。成本留空时,利润显示为无数据。',
- missing: '后端字段与局限',
- missingNote:
- '缺失值显示为无数据。当前后端数据契约不提供逐请求且排除 warmup 的功耗边界、设施能耗、售价或完整成本模型,也未提供传感器校准与独立硬件认证。此查看器未配置私有对象存储访问。',
- },
-};
-
-interface Loaded {
- bundle: Bundle;
- urls: Map;
- downloads: Map;
- power: Record>;
- html: string;
- cells: ServingCell[];
-}
-const REF_RUN = 'https://github.com/SemiAnalysisAI/InferenceX/actions/runs/34293342829';
-const REF_ARTIFACT = `${REF_RUN}/artifacts/10082823150`;
-const parseInput = (value: string) => (value.trim() === '' ? null : Number(value));
-
-const field = (label: string, value: string, change: (value: string) => void, type = 'number') => (
-
- {label}
- change(e.target.value)}
- />
-
-);
-
-export default function VideoBenchmark({
- reader,
- published,
- onLoaded,
- onError,
- initialCell,
- onCellChange,
-}: {
- reader?: (path: string) => Promise;
- published?: StoredSource;
- onLoaded?: (bundle: Bundle) => void;
- onError?: () => void;
- initialCell?: string;
- onCellChange?: (id: string) => void;
-}) {
- const s = STRINGS[useLocale()];
- const [loaded, setLoaded] = useState(null);
- const [loading, setLoading] = useState(false);
- const [loadError, setError] = useState('');
- const [source, setSource] = useState('');
- const [slot, setSlot] = useState('');
- const [price, setPrice] = useState('');
- const [cost, setCost] = useState('');
- const [billed, setBilled] = useState('');
- const [assumption, setAssumption] = useState('');
- const [date, setDate] = useState('');
- const [reportOpen, setReportOpen] = useState(false);
- const generation = useRef(0);
- const input = useRef(null);
- const activeUrls = useRef([]);
- const fmt = (value: Json | undefined, digits = 2): string => {
- if (typeof value === 'number')
- return Number.isFinite(value)
- ? value.toLocaleString('en-US', { maximumFractionDigits: digits })
- : s.unavailable;
- if (value === null || value === undefined || value === '') return s.unavailable;
- if (typeof value === 'boolean') return value ? s.yes : s.no;
- return typeof value === 'string' ? value : JSON.stringify(value);
- };
- function clear() {
- generation.current++;
- activeUrls.current.forEach(URL.revokeObjectURL);
- activeUrls.current = [];
- setLoaded(null);
- setError('');
- setLoading(false);
- setSlot('');
- setReportOpen(false);
- }
- async function open(read?: () => (path: string) => Promise, saved?: StoredSource) {
- clear();
- const current = generation.current;
- setLoading(true);
- const urls = new Map();
- try {
- const bundle = saved ? storedBundle(saved) : await loadBundle(read!());
- const cells = servingCells(bundle);
- const power: Loaded['power'] = {};
- for (const role of ROLES) {
- const file = bundle.files.get(`gpu/supervisor/${role}/telemetry.jsonl`);
- const telemetry = at(bundle.job, 'roles', role, 'telemetry_summary');
- const uuids = rows(at(telemetry, 'gpu_identity')).map((g) => text(at(g, 'uuid')));
- const interval = number(at(telemetry, 'requested_interval_seconds'));
- const telemetryText = file ? await file.text() : '';
- power[role] =
- file && interval !== null && at(telemetry, 'qualified') === true
- ? sampledPower(
- telemetryText
- .trim()
- .split('\n')
- .filter(Boolean)
- .map((line) => JSON.parse(line)),
- uuids,
- interval * 3,
- )
- : null;
- }
- if (current !== generation.current) return;
- for (const [path, asset] of saved?.assets ?? []) urls.set(path, asset.url);
- for (const [path, file] of saved ? [] : bundle.files) {
- urls.set(
- path,
- URL.createObjectURL(
- new Blob([file], {
- type: path.endsWith('.mp4') ? 'video/mp4' : 'application/octet-stream',
- }),
- ),
- );
- }
- const rawHtml = await bundle.files.get('report/index.html')?.text();
- const html = rawHtml ? renderReportHtml(rawHtml, urls) : '';
- if (current !== generation.current) {
- urls.forEach(URL.revokeObjectURL);
- return;
- }
- activeUrls.current = [...urls.values()].filter((url) => url.startsWith('blob:'));
- setLoaded({
- bundle,
- cells,
- urls,
- power,
- html,
- downloads: saved
- ? new Map(saved.assets.map(([path, asset]) => [path, asset.downloadUrl]))
- : urls,
- });
- const first =
- rows(at(bundle.report, 'roles', 'baseline', 'observations'))[0] ??
- rows(at(bundle.report, 'roles', 'candidate', 'observations'))[0];
- setSlot(text(at(first, 'slot_id')));
- const allocated = allocatedGpus(bundle);
- setBilled(allocated === null ? '' : String(allocated));
- track('video_bundle_loaded');
- } catch (error) {
- urls.forEach(URL.revokeObjectURL);
- if (current === generation.current) {
- setError(error instanceof Error ? error.message : String(error));
- onError?.();
- }
- } finally {
- if (current === generation.current) setLoading(false);
- }
- }
- useEffect(() => {
- // A shared preview link must not trigger requests to a URL supplied by its sender.
- if (['127.0.0.1', 'localhost'].includes(location.hostname)) {
- const initial = new URLSearchParams(location.search).get('manifest');
- if (initial) {
- setSource(initial);
- void open(() => httpReader(initial));
- }
- }
- return () => {
- generation.current++;
- activeUrls.current.forEach(URL.revokeObjectURL);
- };
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
-
- useEffect(() => {
- if (published) void open(undefined, published);
- else if (reader) void open(() => reader);
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [reader, published]);
-
- const b = loaded?.bundle;
- useEffect(() => {
- if (b) onLoaded?.(b);
- }, [b, onLoaded]);
- const participating = rows(
- at(b?.job, 'roles', 'baseline', 'telemetry_summary', 'gpu_identity'),
- ).length;
- const observations = (role: string) => [
- ...rows(at(b?.report, 'roles', role, 'observations')),
- ...rows(at(b?.report, 'roles', role, 'warmups')),
- ];
- const selected = (role: string) => observations(role).find((o) => at(o, 'slot_id') === slot);
- const clip = selected('baseline') ?? selected('candidate');
- const slots = [
- ...new Map(
- ROLES.flatMap((role) => observations(role)).map((o) => [text(at(o, 'slot_id')), o]),
- ).values(),
- ];
- const ciUrl = /^\d+$/u.test(text(at(b?.manifest, 'run_id')))
- ? `https://github.com/SemiAnalysisAI/InferenceX/actions/runs/${text(at(b?.manifest, 'run_id'))}`
- : null;
- const pair = at(b?.report, 'slot_comparisons', slot);
- const rawPair = rows(at(b?.comparison, 'slots')).find((o) => at(o, 'slot_id') === slot);
- const table = (data: [string, Json | undefined][]) => (
-
- {data.map(([label, value]) => (
-
-
{label}
- {fmt(value, 4)}
-
- ))}
-
- );
-
- return (
-
- {!reader && !published && (
-
- )}
- {!reader && !published && (
- <>
- {
- const files = [...(e.target.files ?? [])];
- e.target.value = '';
- if (files.length > 0) void open(() => folderReader(files));
- }}
- />
-
- {s.source}
-
- {s.remote}
-
- >
- )}
- {loading && {s.loading} }
- {loadError && (
-
- {s.error}
- {loadError}
- {s.retry}
-
- )}
- {!b && !loading && !loadError && (
-
- {s.empty}
- {s.instructions}
-
- {s.sample} · #34293342829
-
-
- )}
- {b && loaded && loaded.cells.length > 0 && (
-
- )}
- {b && loaded && loaded.cells.length === 0 && (
- <>
-
-
-
-
- {ROLES.map((role) => {
- const o = selected(role);
- const r = at(b.report, 'roles', role);
- const summary = at(r, 'summary');
- const mediaUrl = loaded.urls.get(`report/${text(at(o, 'artifact_path'))}`);
- const run = b.documents.get(`gpu/${role}/run.json`);
- const rawSummary = at(run, 'summary');
- return (
-
-
- {s[role]}
-
- {fmt(at(o, 'status'))}
-
-
- {mediaUrl ? (
- <>
- {
- document
- .querySelectorAll('[data-role]')
- .forEach((v) => {
- if (v !== e.currentTarget) v.pause();
- });
- }}
- onError={(e) => {
- const node = e.currentTarget.nextElementSibling;
- if (node) node.textContent = s.mediaError;
- }}
- />
-
-
- {s.download}
-
- >
- ) : (
-
- {s.noMedia}
-
- )}
-
-
- {s.settings} · {s.integrity}
-
- {s.statsNote}
-
-
-
{s.latency}
-
- {fmt(at(summary, 'latency_median_seconds'))}{' '}
- s
-
-
-
-
{s.throughput}
-
- {fmt(at(summary, 'valid_clips_per_second'), 5)}
-
-
-
- {table([
- [s.scheduled, at(summary, 'scheduled')],
- [s.completed, at(rawSummary, 'completed')],
- [s.valid, at(summary, 'valid')],
- [s.failed, at(rawSummary, 'failed')],
- [`${s.window} (s)`, at(summary, 'wall_seconds')],
- [
- s.warmup,
- `${fmt(at(summary, 'warmups_valid'))} / ${fmt(at(summary, 'warmups_scheduled'))}`,
- ],
- ])}
-
- {s.integrity}
-
- {table([
- ...entries(at(o, 'media', 'video')).map(([k, v]): [string, Json] => [
- `video.${k}`,
- v,
- ]),
- ...entries(at(o, 'media', 'audio')).map(([k, v]): [string, Json] => [
- `audio.${k}`,
- v,
- ]),
- ])}
- {rows(
- at(
- rows(at(run, 'records')).find(
- (record) => at(record, 'slot_id') === slot,
- ),
- 'media',
- 'checks',
- ),
- ).map((check, i) => (
-
- {text(at(check, 'name'))}:{' '}
- {fmt(at(check, 'status'))} —{' '}
- {text(at(check, 'detail'))}
-
- ))}
-
-
-
-
- );
- })}
-
-
{s.audio}
- {slots.length > 0 && (
-
- ({
- value: text(at(o, 'slot_id')),
- label: `${at(o, 'phase') === 'warmup' ? s.warmup : s.measured} · ${text(at(o, 'slot_id'))}`,
- }))}
- />
-
-
- {text(at(clip, 'case_id'))}
-
-
- {s.prompt} · {s.seed} {fmt(at(clip, 'seed'))}
-
-
-
- {text(at(clip, 'prompt')).slice(0, 150)}
- {text(at(clip, 'prompt')).length > 150 ? '…' : ''}
-
- {fmt(at(clip, 'prompt'))}
-
-
-
- {s.settings}
-
- {table(entries(at(b.manifest, 'workload_plan', 'generation')))}
-
-
-
- )}
-
-
-
-
- {s.power} · {s.fidelity} · {s.hardware}
-
- {s.timing}
- {b.result ? (
-
- ) : (
-
- {s.power}
- {s.powerNote}
-
- {ROLES.map((role) => {
- const power = loaded.power[role];
- return (
-
-
{s[role]}
- {table([
- [`${s.meanPower} (W)`, power?.watts],
- [`${s.energy} (kJ)`, power ? power.joules / 1000 : null],
- [`${s.coverage} (s)`, power?.seconds],
- [s.samples, power?.sampleCount],
- ])}
- {power && (
-
- {power.start} → {power.end}
-
- )}
-
- );
- })}
-
- {s.memory}
- {s.memoryNote}
-
- {ROLES.map((role) => (
-
- {s[role]}
- {entries(
- at(
- b.job,
- 'roles',
- role,
- 'telemetry_summary',
- 'measurement_observed_memory_peak_mib_by_gpu',
- ),
- ).length > 0
- ? table(
- entries(
- at(
- b.job,
- 'roles',
- role,
- 'telemetry_summary',
- 'measurement_observed_memory_peak_mib_by_gpu',
- ),
- ).map(([gpu, value]) => [gpu, `${fmt(value)} MiB`]),
- )
- : s.unavailable}
-
- ))}
-
-
- )}
-
- {s.fidelity}
- {s.fidelityNote}
- {table([
- [
- s.videoPsnr,
- at(pair, 'metrics', 'video_identical') === true
- ? s.identical
- : at(pair, 'metrics', 'video_psnr_db'),
- ],
- [s.videoMae, at(pair, 'metrics', 'video_mae')],
- [s.audioSpectral, at(pair, 'metrics', 'audio_spectral_cosine')],
- [s.audioRms, at(pair, 'metrics', 'audio_rms_ratio')],
- [s.audioMae, at(rawPair, 'metrics', 'audio_waveform_mae')],
- [s.videoCoverage, at(rawPair, 'metrics', 'video_sample_coverage_fraction')],
- [s.audioCoverage, at(rawPair, 'metrics', 'audio_sample_coverage_fraction')],
- ])}
-
- {s.checks}
- {rows(at(pair, 'checks')).map((c, i) => (
-
- {text(at(c, 'name'))} · {fmt(at(c, 'status'))} · {text(at(c, 'reason'))}
-
- ))}
-
-
-
- {s.hardware}
- {table([
- [s.participating, participating > 0 ? participating : null],
- [s.allocated, allocatedGpus(b)],
- ['Slurm', at(b.manifest, 'slurm_allocation', 'identity', 'JobId')],
- [s.node, at(b.ci, 'slurm_job', 'NodeList')],
- [s.model, at(b.manifest, 'workload_plan', 'model_id')],
- [s.modelRevision, at(b.manifest, 'workload_plan', 'model_revision')],
- ])}
-
- {ROLES.map((role) => (
-
-
{s[role]}
- {table([
- [
- s.runtimeRevision,
- at(b.report, 'roles', role, 'configuration', 'runtime_revision'),
- ],
- [
- s.sourceHash,
- at(b.report, 'roles', role, 'source_identity', 'source_sha256'),
- ],
- [
- 'GPU',
- rows(at(b.job, 'roles', role, 'telemetry_summary', 'gpu_identity'))
- .map((g) => text(at(g, 'name')))
- .join(', '),
- ],
- ])}
-
- {s.settings}
-
- {JSON.stringify(at(b.job, 'roles', role, 'launch_argv'), null, 2)}
-
-
-
- ))}
-
-
-
-
- {s.economics}
-
- {s.economics}
- {s.economicsNote}
-
- {field(s.price, price, setPrice)}
- {field(s.cost, cost, setCost)}
- {field(s.billed, billed, setBilled)}
- {field(s.assumption, assumption, setAssumption, 'text')}
- {field(s.date, date, setDate, 'date')}
-
- {s.needAssumptions}
-
- {ROLES.map((role) => {
- const summary = at(b.report, 'roles', role, 'summary');
- const count = rows(
- at(b.job, 'roles', role, 'telemetry_summary', 'gpu_identity'),
- ).length;
- const e =
- assumption.trim() && date
- ? estimateEconomics(
- number(at(summary, 'valid_clips_per_second')),
- count || null,
- parseInput(billed),
- parseInput(price),
- parseInput(cost),
- )
- : null;
- return (
-
-
- {s[role]} · {s.estimate} (USD)
-
- {table([
- [s.revenueParticipant, e?.revenuePerParticipating],
- [s.revenueBilled, e?.revenuePerBilled],
- [s.profitParticipant, e?.profitPerParticipating],
- [s.profitBilled, e?.profitPerBilled],
- ])}
-
- );
- })}
-
-
-
-
- {s.provenance}
- {ciUrl && (
-
- {s.ciRun} · #{text(at(b.manifest, 'run_id'))}
-
- )}
-
- {s.commit} · {text(at(b.manifest, 'git_commit'))}
-
- {table([[s.manifest, b.manifestSha256]])}
- {loaded.html && (
- setReportOpen(event.currentTarget.open)}>
- {s.report}
- {s.reportNote}
- {reportOpen && (
-
- )}
-
- )}
-
- {s.raw}
-
- {[...loaded.urls].map(([path, url]) => (
-
- {path}
-
- ))}
-
-
-
-
- {s.missing}
-
- {rows(at(b.result, 'limitations')).map(text).join('; ') || s.missingNote}
-
- {rows(at(b.report, 'acceptance_reasons')).map((reason, i) => (
-
- {text(reason)}
-
- ))}
-
- >
- )}
-
- );
-}
diff --git a/packages/app/src/components/video-benchmark/VideoCIRuns.tsx b/packages/app/src/components/video-benchmark/VideoCIRuns.tsx
deleted file mode 100644
index 90f3480d1..000000000
--- a/packages/app/src/components/video-benchmark/VideoCIRuns.tsx
+++ /dev/null
@@ -1,730 +0,0 @@
-'use client';
-
-import { useCallback, useEffect, useRef, useState } from 'react';
-import { Card } from '@/components/ui/card';
-import { Button } from '@/components/ui/button';
-import { Heading } from '@/components/ui/heading';
-import { Skeleton } from '@/components/ui/skeleton';
-import { Input } from '@/components/ui/input';
-import { useLocale } from '@/lib/i18n/use-locale';
-import VideoBenchmark from './VideoBenchmark';
-import VideoHistory from './VideoHistory';
-import type { VideoHistoryPage } from './history';
-import FidelityResults from './FidelityResults';
-import VideoSelect from './VideoSelect';
-import { servingCells } from './serving';
-import VideoTradeoff from './VideoTradeoff';
-import type { TradeoffRun } from './tradeoff';
-import { storedBundle, type StoredArtifact, type StoredSource } from './stored';
-import type { Bundle } from './bundle';
-import { archiveSources, type CIArtifact, type CIRun } from './archive';
-import { comparisonRefs, rememberComparison } from './comparison';
-
-const STRINGS = {
- en: {
- title: 'H3 video benchmark',
- results: 'Videos & result',
- tradeoffs: 'Hardware tradeoffs',
- history: 'Performance history',
- view: 'Benchmark view',
- preparing: 'Loading results and preparing media. The first publication of a run takes longer.',
- downloading: 'Downloading CI archive',
- advanced: 'Run details and artifact selection',
- error: 'Could not load results',
- publishedLoading: 'Loading the newest published result…',
- publishedEmpty:
- 'No readable result in the newest published page. Open Performance history for more published results, or browse CI runs.',
- publishedError: 'Could not load published results. Retry or browse CI runs.',
- details: 'Technical details',
- select: 'CI run',
- refresh: 'Refresh',
- older: 'Older runs',
- browse: 'Browse CI runs',
- loading: 'Loading CI results…',
- source: 'Original GPU execution',
- artifact: 'Result artifact',
- none: 'No result artifact for this run yet. Failed runs may have only CI logs.',
- empty: 'No H3 runs in this page of GitHub history. Load older runs or enter a run ID.',
- retry: 'Retry',
- direct: 'GitHub run ID',
- open: 'Open run',
- local: 'Local artifact tools',
- note: 'Results preserve their original GitHub CI identities. Stored media loads separately from the benchmark data; unpublished artifacts use the CI archive fallback.',
- expired: 'Expired',
- noMedia: 'Artifact unavailable',
- comparisonLoading: 'Loading the other CI results in this comparison…',
- comparisonError:
- 'Some comparison results could not be loaded. Check the run IDs or retry. A shared comparison supports up to 8 CI artifacts.',
- },
- zh: {
- title: 'H3 视频基准测试',
- results: '视频与结果',
- tradeoffs: '硬件延迟与效率权衡',
- history: '性能历史',
- view: '基准测试视图',
- preparing: '正在加载结果并准备媒体。首次发布该运行的产物需要更多时间。',
- downloading: '正在下载 CI 产物',
- advanced: '运行详情与产物选择',
- error: '无法加载结果',
- publishedLoading: '正在加载最新的已发布结果…',
- publishedEmpty:
- '最新发布页面中没有可读取的结果。可在性能历史中查看其他已发布结果,或浏览 CI 运行。',
- publishedError: '无法加载已发布结果。请重试,或浏览 CI 运行。',
- details: '技术详情',
- select: 'CI 运行',
- refresh: '刷新',
- older: '更早的运行',
- browse: '浏览 CI 运行',
- loading: '正在加载 CI 结果…',
- source: '原始 GPU 运行',
- artifact: '结果产物',
- none: '此次运行尚无结果产物。失败的运行可能仅保留 CI 日志。',
- empty: '本页 GitHub 历史中没有 H3 运行。可加载更早的运行或输入运行 ID。',
- retry: '重试',
- direct: 'GitHub 运行 ID',
- open: '查看运行',
- local: '本地产物工具',
- note: '结果保留原始 GitHub CI 运行标识。已存储的媒体与基准测试数据分别加载;尚未发布的产物则回退为下载 CI 产物压缩包。',
- expired: '已过期',
- noMedia: '产物不可用',
- comparisonLoading: '正在加载对比中的其他 CI 结果…',
- comparisonError:
- '部分对比结果未能加载,请检查运行 ID 或重试。一个分享链接最多可包含 8 份 CI 产物。',
- },
-};
-
-async function json(url: string, signal?: AbortSignal) {
- const response = await fetch(url, { signal, cache: 'no-store' });
- const data = await response.json();
- if (!response.ok) throw new Error(data.error ?? `HTTP ${response.status}`);
- return data;
-}
-
-function share(runId: number, artifactId?: number, source?: string, cell?: string) {
- const url = new URL(location.href);
- const view = url.searchParams.get('view');
- const comparison = url.searchParams.get('compare');
- const historyFilters = [...url.searchParams].filter(([key]) => key.startsWith('history-'));
- url.search = '';
- if (view === 'tradeoff' || view === 'history' || view === 'results')
- url.searchParams.set('view', view);
- if (comparison) url.searchParams.set('compare', comparison);
- for (const [key, value] of historyFilters) url.searchParams.set(key, value);
- url.searchParams.set('run', String(runId));
- if (artifactId) url.searchParams.set('artifact', String(artifactId));
- if (source) url.searchParams.set('source', source);
- if (cell) url.searchParams.set('cell', cell);
- history.replaceState(null, '', url);
-}
-
-export default function VideoCIRuns() {
- const s = STRINGS[useLocale()];
- const [runs, setRuns] = useState([]);
- const [run, setRun] = useState(null);
- const [artifacts, setArtifacts] = useState([]);
- const [artifact, setArtifact] = useState(null);
- const [sources, setSources] = useState<
- {
- id: string;
- kind?: 'fidelity';
- read?: (path: string) => Promise;
- stored?: StoredSource;
- }[]
- >([]);
- const [sourceId, setSourceId] = useState('');
- const [nextPage, setNextPage] = useState(1);
- const [loadError, setError] = useState('');
- const [loading, setLoading] = useState(false);
- const [progress, setProgress] = useState('');
- const [direct, setDirect] = useState('');
- const [manual, setManual] = useState(false);
- const [cellId, setCellId] = useState('');
- const [view, setView] = useState('');
- const [browsing, setBrowsing] = useState(false);
- const [compared, setCompared] = useState([]);
- const [comparisonLoading, setComparisonLoading] = useState(false);
- const [comparisonError, setComparisonError] = useState(false);
- const comparisonDownload = useRef(null);
- const changeView = (value: string) => {
- if (value === 'history') {
- request.current++;
- download.current?.abort();
- setLoading(false);
- setProgress('');
- }
- setView(value);
- const url = new URL(location.href);
- url.searchParams.set('view', value);
- history.replaceState(null, '', url);
- };
- const collect = useCallback((bundle: Bundle, exportRun: string, artifactId: string) => {
- servingCells(bundle);
- try {
- history.replaceState(
- null,
- '',
- rememberComparison(new URL(location.href), exportRun, artifactId),
- );
- } catch {
- setComparisonError(true);
- }
- setCompared((old) =>
- old.some((item) => item.bundle.manifestSha256 === bundle.manifestSha256)
- ? old
- : [
- ...old,
- {
- bundle: {
- manifest: bundle.manifest,
- result: bundle.result,
- manifestSha256: bundle.manifestSha256,
- documents: bundle.documents,
- checksums: bundle.checksums,
- ci: bundle.ci,
- },
- exportRun,
- artifact: artifactId,
- },
- ],
- );
- }, []);
- const collectLoaded = useCallback(
- (bundle: Bundle) => {
- if (run && artifact) collect(bundle, String(run.id), String(artifact.id));
- },
- [run, artifact, collect],
- );
- const request = useRef(0);
- const download = useRef(null);
-
- async function restoreComparison() {
- comparisonDownload.current?.abort();
- const controller = new AbortController();
- comparisonDownload.current = controller;
- const params = new URLSearchParams(location.search);
- setComparisonError(false);
- setComparisonLoading(true);
- try {
- const selected = `${params.get('run')}.${params.get('artifact')}`;
- const refs = comparisonRefs(params.get('compare')).filter((ref) => ref !== selected);
- const results = await Promise.allSettled(
- refs.map(async (ref) => {
- const [runId, artifactId] = ref.split('.');
- const saved: StoredArtifact = await json(
- `/api/video-runs?run=${runId}&artifact=${artifactId}&format=media`,
- controller.signal,
- );
- if (
- saved.storageVersion !== 1 ||
- saved.runId !== runId ||
- String(saved.artifact.id) !== artifactId ||
- saved.sources.length === 0
- )
- throw new Error('Stored comparison identity mismatch');
- const bundles = saved.sources.filter((source) => !source.kind).map(storedBundle);
- for (const bundle of bundles) servingCells(bundle);
- if (!controller.signal.aborted)
- for (const bundle of bundles) collect(bundle, runId, artifactId);
- }),
- );
- if (!controller.signal.aborted && results.some((result) => result.status === 'rejected'))
- setComparisonError(true);
- } catch {
- if (!controller.signal.aborted) setComparisonError(true);
- } finally {
- if (!controller.signal.aborted) setComparisonLoading(false);
- }
- }
-
- async function loadArtifact(
- selectedRun: CIRun,
- selected: CIArtifact,
- current: number,
- controller: AbortController,
- source?: string,
- prepared?: Promise,
- preferredCell?: string,
- ) {
- setArtifact(selected);
- setSources([]);
- setProgress(s.preparing);
- const endpoint = `/api/video-runs?run=${selectedRun.id}&artifact=${selected.id}`;
- let found:
- | {
- id: string;
- kind?: 'fidelity';
- read?: (path: string) => Promise;
- stored?: StoredSource;
- }[]
- | null = null;
- try {
- const response = prepared
- ? await prepared
- : await fetch(`${endpoint}&format=media`, { signal: controller.signal });
- if (response?.ok && response.status !== 204) {
- const saved: StoredArtifact = await response.json();
- if (
- saved.storageVersion !== 1 ||
- saved.runId !== String(selectedRun.id) ||
- saved.artifact.id !== selected.id
- )
- throw new Error('Stored artifact identity mismatch');
- found = saved.sources.map((item) => ({ id: item.id, kind: item.kind, stored: item }));
- }
- } catch (error) {
- if (controller.signal.aborted) throw error;
- }
- if (!found) {
- if (selected.expired) throw new Error(s.expired);
- const response = await fetch(endpoint, { signal: controller.signal });
- if (!response.ok) {
- const failure = await response.json();
- throw new Error(failure.error ?? s.noMedia);
- }
- const stream = response.body?.getReader();
- if (!stream) throw new Error(s.noMedia);
- const chunks: Uint8Array[] = [];
- let bytes = 0;
- for (;;) {
- const chunk = await stream.read();
- if (chunk.done) break;
- bytes += chunk.value.byteLength;
- if (bytes > 256 * 1024 ** 2) {
- await stream.cancel();
- throw new Error('Archive exceeds 256 MiB');
- }
- chunks.push(new Uint8Array(chunk.value));
- if (current === request.current)
- setProgress(`${s.downloading} · ${(bytes / 1024 ** 2).toFixed(1)} MiB`);
- }
- found = await archiveSources(new Blob(chunks), selected);
- }
- if (current !== request.current) return;
- for (const item of found) {
- if (item.stored && !item.kind)
- collect(storedBundle(item.stored), String(selectedRun.id), String(selected.id));
- }
- const chosen =
- found.find((item) => item.id === source) ??
- found.toSorted((a, b) => Number(b.id) - Number(a.id))[0];
- if (!chosen) throw new Error(s.none);
- setSources(found);
- setSourceId(chosen.id);
- if (chosen.kind === 'fidelity') changeView('results');
- share(selectedRun.id, selected.id, chosen.id, preferredCell);
- }
- async function selectRun(
- runId: string,
- artifactId?: string | null,
- source?: string | null,
- selectedCell?: string | null,
- ) {
- const current = ++request.current;
- download.current?.abort();
- setLoading(true);
- setProgress('');
- setError('');
- setRun(null);
- setCellId(selectedCell ?? '');
- setSourceId(source ?? '');
- setSources([]);
- setArtifact(null);
- setArtifacts([]);
- const controller = new AbortController();
- download.current = controller;
- const prepared = artifactId
- ? fetch(
- `/api/video-runs?run=${encodeURIComponent(runId)}&artifact=${encodeURIComponent(artifactId)}&format=media`,
- { signal: controller.signal },
- ).catch(() => null)
- : undefined;
- try {
- const data: { run: CIRun; artifacts: CIArtifact[] } = await json(
- `/api/video-runs?run=${encodeURIComponent(runId)}`,
- controller.signal,
- );
- if (current !== request.current) return;
- setRun(data.run);
- setArtifacts(data.artifacts);
- setRuns((old) => (old.some((r) => r.id === data.run.id) ? old : [data.run, ...old]));
- const selected =
- data.artifacts.find((a) => String(a.id) === artifactId) ??
- data.artifacts
- .filter((a) => a.name.endsWith(`-${data.run.run_attempt}`))
- .toSorted(
- (a, b) =>
- Number(b.name.startsWith('h3-results-')) - Number(a.name.startsWith('h3-results-')) ||
- b.id - a.id,
- )[0];
- share(data.run.id);
- if (selected)
- await loadArtifact(
- data.run,
- selected,
- current,
- controller,
- source ?? undefined,
- String(selected.id) === artifactId ? prepared : undefined,
- selectedCell ?? undefined,
- );
- } catch (error) {
- if (current === request.current)
- setError(error instanceof Error ? error.message : String(error));
- } finally {
- if (current === request.current) setLoading(false);
- }
- }
- async function openPublished() {
- const current = ++request.current;
- download.current?.abort();
- const controller = new AbortController();
- download.current = controller;
- setBrowsing(false);
- setNextPage(1);
- setRun(null);
- setRuns([]);
- setArtifact(null);
- setArtifacts([]);
- setSources([]);
- setLoading(true);
- setProgress(s.publishedLoading);
- setError('');
- try {
- const data: VideoHistoryPage = await json(
- '/api/video-runs?format=history&page=1',
- controller.signal,
- );
- if (current !== request.current) return;
- if (data.schemaVersion !== 1 || !Array.isArray(data.entries))
- throw new Error('Invalid published history');
- const entry = data.entries.find(
- (item) => !item.error && item.sources.some((source) => !source.error),
- );
- const source = entry?.sources.find((item) => !item.error);
- if (entry && source)
- await selectRun(
- entry.runId,
- String(entry.artifact.id),
- source.id,
- source.observations[0]?.cell,
- );
- } catch {
- if (current === request.current) setError(s.publishedError);
- } finally {
- if (current === request.current) setLoading(false);
- }
- }
- function openResults() {
- if (run)
- return selectRun(String(run.id), artifact ? String(artifact.id) : null, sourceId, cellId);
- const params = new URLSearchParams(location.search);
- const selected = params.get('run');
- return selected
- ? selectRun(selected, params.get('artifact'), params.get('source'), params.get('cell'))
- : openPublished();
- }
- async function list(page: number, auto = false) {
- const current = ++request.current;
- download.current?.abort();
- const controller = new AbortController();
- download.current = controller;
- setLoading(true);
- setProgress('');
- setError('');
- setBrowsing(true);
- try {
- const data: { runs: CIRun[]; nextPage: number | null } = await json(
- `/api/video-runs?page=${page}`,
- controller.signal,
- );
- if (current !== request.current) return;
- setRuns((old) =>
- page === 1
- ? [...(run && !data.runs.some((r) => r.id === run.id) ? [run] : []), ...data.runs]
- : [...old, ...data.runs.filter((r) => !old.some((o) => o.id === r.id))],
- );
- setNextPage(data.nextPage);
- if (
- auto &&
- data.runs.length === 0 &&
- data.nextPage &&
- page < 10 &&
- !new URLSearchParams(location.search).has('run')
- ) {
- await list(data.nextPage, true);
- return;
- }
- if (auto) {
- const params = new URLSearchParams(location.search);
- const selected = params.get('run') ?? (data.runs[0] ? String(data.runs[0].id) : null);
- if (selected)
- await selectRun(
- selected,
- params.get('artifact'),
- params.get('source'),
- params.get('cell'),
- );
- }
- } catch (error) {
- if (current === request.current)
- setError(error instanceof Error ? error.message : String(error));
- } finally {
- if (current === request.current) setLoading(false);
- }
- }
- useEffect(() => {
- const params = new URLSearchParams(location.search);
- const initialView = params.get('view') ?? (params.has('run') ? 'results' : 'history');
- setView(['history', 'tradeoff'].includes(initialView) ? initialView : 'results');
- if (params.has('compare')) void restoreComparison();
- const directRun = params.get('run');
- if (directRun)
- void selectRun(directRun, params.get('artifact'), params.get('source'), params.get('cell'));
- else if (initialView === 'results') void openPublished();
-
- return () => {
- request.current++;
- download.current?.abort();
- comparisonDownload.current?.abort();
- };
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
- const selectedSource = sources.find((item) => item.id === sourceId);
- return (
-
-
-
-
- {s.title}
-
-
- void openResults()}
- >
- {s.refresh}
-
- {nextPage && (
- void list(nextPage, !run)}
- >
- {nextPage === 1 ? s.browse : s.older}
-
- )}
-
-
-
-
- void selectRun(value)}
- options={runs.map((r) => ({
- value: String(r.id),
- label: `#${r.id} · ${r.conclusion ?? r.status}`,
- }))}
- />
- {sources.length > 1 && (
- {
- setSourceId(value);
- setCellId('');
- if (run && artifact) share(run.id, artifact.id, value);
- }}
- options={sources.map((item) => ({ value: item.id, label: `#${item.id}` }))}
- />
- )}
-
- {run && (
-
- {run.name}
-
- )}
- {runs.length === 0 && !loading && !loadError && (
- {browsing ? s.empty : s.publishedEmpty}
- )}
-
- {s.advanced}
- {s.note}
-
- {run && (
-
- #{run.id} · {run.status} / {run.conclusion ?? '—'} · {run.created_at} ·{' '}
- {run.head_sha.slice(0, 10)}
-
- )}
- {artifacts.length > 0 && (
- {
- if (run) void selectRun(String(run.id), value);
- }}
- options={artifacts.map((a) => ({
- value: String(a.id),
- label: `${a.name}${a.expired ? ` · ${s.expired}` : ''}`,
- }))}
- />
- )}
-
- {loading && (
-
-
{progress || s.loading}
-
-
- )}
- {loadError && (
-
-
{s.error}
-
- {s.details}
- {loadError}
-
-
void openResults()}>
- {s.retry}
-
-
- )}
- {run && !loading && !loadError && artifacts.length === 0 && {s.none}
}
-
- {loading && !selectedSource && (
-
-
-
-
-
- )}
-
- {
- changeView('results');
- if (!run || sources.length === 0) void openResults();
- }}
- >
- {s.results}
-
- changeView('history')}
- >
- {s.history}
-
- changeView('tradeoff')}
- >
- {s.tradeoffs}
-
-
- {view === 'history' && (
-
{
- changeView('results');
- void selectRun(runId, artifactId, source, cell);
- }}
- />
- )}
-
- {comparisonLoading && (
-
- {s.comparisonLoading}
-
- )}
- {comparisonError && (
-
-
{s.comparisonError}
-
void restoreComparison()}>
- {s.retry}
-
-
- )}
-
{
- changeView('results');
- if (
- String(run?.id) === point.run.exportRun &&
- String(artifact?.id) === point.run.artifact &&
- sourceId === point.sourceId
- ) {
- setCellId(point.cellId ?? '');
- share(run!.id, artifact!.id, sourceId, point.cellId);
- } else
- void selectRun(point.run.exportRun, point.run.artifact, point.sourceId, point.cellId);
- }}
- />
-
- {selectedSource && (
-
- {selectedSource.kind === 'fidelity' ? (
-
- ) : (
- {
- setCellId(id);
- if (run && artifact) share(run.id, artifact.id, sourceId, id);
- }}
- onLoaded={collectLoaded}
- onError={() => {
- if (new URLSearchParams(location.search).get('view') !== 'history')
- changeView('results');
- }}
- />
- )}
-
- )}
- setManual(event.currentTarget.open)}>
- {s.local}
- {manual && }
-
-
- );
-}
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index bdfea7350..fc6e6744a 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -26,7 +26,7 @@ import {
import { latestVideoCells } from './points';
import { formatApiPrice, H3_API_REFERENCE } from './api-reference';
import { useVideoPoints } from './use-video-points';
-import VideoCIRuns from './VideoCIRuns';
+import VideoHistory from './VideoHistory';
import VideoCompare from './VideoCompare';
import VideoConfigBar from './VideoConfigBar';
import VideoEvidence from './VideoEvidence';
@@ -41,18 +41,8 @@ import {
type VideoDashboardState,
} from './video-url-state';
-/** URL params owned by the run/results/history views; any of them opens that section on load. */
-const RUNS_SECTION_PARAMS = [
- 'run',
- 'artifact',
- 'source',
- 'cell',
- 'view',
- 'compare',
- 'history-hardware',
- 'history-concurrency',
- 'history-query',
-];
+/** History filter params; a deep link carrying one opens the history section on load. */
+const HISTORY_SECTION_PARAMS = ['history-hardware', 'history-concurrency', 'history-query'];
const CSV_METRICS: readonly MetricId[] = [
'p50Latency',
'p90Latency',
@@ -81,8 +71,8 @@ const STRINGS = {
idleItem: (hardware: string, used: number, reserved: number) =>
`${hardware} (${used} of ${reserved})`,
deployments: (n: number) => `${n} deployments`,
- runs: 'Runs, videos & evidence',
- runsHint: 'Per-run results, generated clips, fidelity checks and the performance history list.',
+ history: 'Performance history',
+ historyHint: 'Every published H3 result, including older runs.',
loading: 'Loading published results…',
error: 'Could not load published results',
retry: 'Retry',
@@ -108,8 +98,8 @@ const STRINGS = {
idleItem: (hardware: string, used: number, reserved: number) =>
`${hardware}(${used} / ${reserved} 张)`,
deployments: (n: number) => `${n} 种部署`,
- runs: '运行、视频与证据',
- runsHint: '按运行查看结果、生成的视频、保真度检查以及性能历史列表。',
+ history: '性能历史',
+ historyHint: '所有已发布的 H3 结果,包括较早的运行。',
loading: '正在加载已发布结果…',
error: '无法加载已发布结果',
retry: '重试',
@@ -136,11 +126,11 @@ export default function VideoDashboard() {
const [state, setState] = useState(DEFAULT_VIDEO_DASHBOARD_STATE);
const [hidden, setHidden] = useState>(() => new Set());
const [legendExpanded, setLegendExpanded] = useState(true);
- const [runsOpen, setRunsOpen] = useState(false);
+ const [historyOpen, setHistoryOpen] = useState(false);
useEffect(() => {
setState(readVideoDashboardState(location.search));
const params = new URLSearchParams(location.search);
- setRunsOpen(RUNS_SECTION_PARAMS.some((key) => params.has(key)));
+ setHistoryOpen(HISTORY_SECTION_PARAMS.some((key) => params.has(key)));
}, []);
const update = useCallback((patch: Partial) => {
setState((old) => {
@@ -170,7 +160,6 @@ export default function VideoDashboard() {
const options = metricOptions(state);
const cells = useMemo(() => latestVideoCells(points), [points]);
- // Each hardware is represented by its most efficient measured deployment.
const measured = useMemo(
() =>
new Map(
@@ -422,20 +411,20 @@ export default function VideoDashboard() {
)}
{
const open = event.currentTarget.open;
- if (open === runsOpen) return;
- setRunsOpen(open);
- track('video_runs_section_toggled', { open });
+ if (open === historyOpen) return;
+ setHistoryOpen(open);
+ track('video_history_section_toggled', { open });
}}
>
- {s.runs}
- {s.runsHint}
+ {s.history}
+ {s.historyHint}
- {runsOpen && }
+ {historyOpen && }
);
diff --git a/packages/app/src/components/video-benchmark/VideoHistory.tsx b/packages/app/src/components/video-benchmark/VideoHistory.tsx
index f61eb103a..b23eb05a5 100644
--- a/packages/app/src/components/video-benchmark/VideoHistory.tsx
+++ b/packages/app/src/components/video-benchmark/VideoHistory.tsx
@@ -49,7 +49,6 @@ const STRINGS = {
throughput: 'Valid clips / GPU-hour',
energy: 'GPU-board kJ / valid clip',
status: 'Execution',
- open: 'Open result',
missing:
'— means unavailable, invalid or insufficient samples. P90 requires at least 10 valid samples per cell.',
metricNote:
@@ -93,7 +92,6 @@ const STRINGS = {
throughput: '有效视频数 / GPU 小时',
energy: '每有效视频 GPU 板卡能耗(kJ)',
status: '执行状态',
- open: '打开结果',
missing: '— 表示无数据、数据无效或样本不足。每个配置至少有 10 个有效样本才显示 P90。',
metricNote:
'延迟与吞吐量涵盖提交到媒体下载完成。能耗使用记录的生成时间窗口,按参与计算的 GPU 板卡统计,越低越好;失败尝试的耗时仍计入对应测量窗口。',
@@ -128,11 +126,7 @@ const filter = (key: string, value: string, setter: (value: string) => void) =>
track('video_history_filter_changed', { filter: key });
};
-export default function VideoHistory({
- onOpen,
-}: {
- onOpen: (run: string, artifact: string, source?: string, cell?: string) => void;
-}) {
+export default function VideoHistory() {
const locale = useLocale();
const s = STRINGS[locale];
const status = (value: string | null) =>
@@ -281,13 +275,6 @@ export default function VideoHistory({
{s.execution}: {date(source.observedAt)}
- onOpen(entry.runId, String(entry.artifact.id), source.id)}
- >
- {s.open}
-
{s.status}: {status(source.execution)} · {s.fidelity}: {status(source.fidelity)} ·{' '}
@@ -328,19 +315,9 @@ export default function VideoHistory({
data-testid="video-history-observation"
>
-
- onOpen(
- entry.runId,
- String(entry.artifact.id),
- source.id,
- point.cell ?? undefined,
- )
- }
- >
+
{point.hardware || s.unavailable} · C{point.concurrency ?? '—'}
-
+
{point.runtime.slice(0, 12) || '—'}
diff --git a/packages/app/src/components/video-benchmark/VideoTradeoff.tsx b/packages/app/src/components/video-benchmark/VideoTradeoff.tsx
deleted file mode 100644
index 55ad13a95..000000000
--- a/packages/app/src/components/video-benchmark/VideoTradeoff.tsx
+++ /dev/null
@@ -1,605 +0,0 @@
-'use client';
-
-import { useMemo, useState } from 'react';
-import { curveLinear, schemeTableau10, type Selection } from 'd3';
-import { Card } from '@/components/ui/card';
-import { Button } from '@/components/ui/button';
-import { Input } from '@/components/ui/input';
-import { Heading } from '@/components/ui/heading';
-import { D3Chart } from '@/lib/d3-chart/D3Chart';
-import type { ContinuousScale } from '@/lib/d3-chart/types';
-import { CHART_TYPE, px } from '@/lib/d3-chart/typography';
-import { useLocale } from '@/lib/i18n/use-locale';
-import { escapeHtml } from '@/lib/shared/utils';
-import { track } from '@/lib/analytics/analytics';
-import VideoSelect from './VideoSelect';
-import { SERVER_TIMING_COPY } from './server-timing';
-import {
- tradeoffPoints,
- tradeoffCurves,
- latencyValue,
- efficiencyValue,
- type TradeoffRun,
- type TradeoffPoint,
- type LatencyAxis,
- type EfficiencyAxis,
- type DeploymentCost,
-} from './tradeoff';
-
-const STRINGS = {
- en: {
- title: 'Video serving tradeoffs',
- subtitle: 'Compare identical workloads across hardware and runtime configurations.',
- scope:
- 'Share this page’s link to reopen the same CI results. Cost assumptions stay in this browser session and reset on reload.',
- workload: 'Matched workload',
- x: 'Latency axis · lower is better',
- y: 'Efficiency axis · higher is better',
- p90: 'P90 client-ready latency (s)',
- median: 'Median client-ready latency (s)',
- dollar: 'Valid clips / USD',
- clipsGpu: 'Valid clips / participating GPU-hour',
- clipsAllocatedGpu: 'Valid clips / allocated GPU-hour',
- secondsGpu: 'Video seconds / participating GPU-hour',
- secondsAllocatedGpu: 'Video seconds / allocated GPU-hour',
- energy: 'Valid clips / GPU-board kWh',
- latencyNote:
- 'Client-ready = submission to fully downloaded media, including polling; local validation is excluded from latency. P90 uses nearest rank and requires at least 10 complete valid-request samples here. This display floor does not establish tail-latency reliability. Failed requests stay visible in the counts.',
- throughputNote:
- 'Throughput uses the recorded measurement wall window, including failed attempts and client overhead. Serial runs are diagnostics, not demonstrated serving capacity.',
- qualityNote:
- 'Matching fixes the model revision, generation settings and prompt/seed/input workload. Precision, caching and runtime changes still require fidelity review. Technical validity does not establish perceptual quality; uncalibrated points are not qualified winners.',
- energyNote:
- 'Energy efficiency uses the backend measurement-phase joules per valid clip. It covers participating GPU boards only, excluding other allocated GPUs, CPUs, cooling and storage. It is not facility efficiency.',
- noPoints: 'No points qualify for these axes yet.',
- diagnose: 'Inspect available serial results',
- empty: 'Open a CI result to add its baseline and candidate.',
- requirements:
- 'Choose median latency for single-request diagnostics. Cost plots also need a full deployment cost, source and date for each point.',
- point: 'Point',
- baseline: 'Baseline',
- candidate: 'Candidate',
- samples: 'Valid latency samples',
- counts: 'Valid / completed / scheduled',
- failed: 'Failed or invalid',
- status: 'Plot status',
- missing: 'Missing workload, latency samples, GPU count, energy or cost assumptions',
- plotted: 'Shown',
- details: 'Selected point',
- hardware: 'Hardware',
- runtime: 'Runtime revision',
- model: 'Model revision',
- concurrency: 'Client concurrency',
- allocated: 'Allocated / participating GPUs',
- window: 'Measurement window (s)',
- power: 'Mean total participating-board power (W)',
- energyClip: 'GPU-board energy / valid clip (kJ)',
- meanPower: 'Total mean board power (W)',
- gpuNote:
- 'Participating-GPU views measure hardware efficiency; allocated-GPU views include idle allocations. Deployment costs include all billed resources.',
- limitRatio: 'Mean / enforced limit (%)',
- limitWatts: 'Total enforced power limit (W)',
- limitNote:
- 'Power-limit ratios use matching prelaunch/postcleanup enforced limits for the participating GPU UUIDs. Snapshots must agree; they do not prove continuous stability. TDP and later inventories are never substituted.',
- powerWindow: 'Measured power window (s)',
- offered: 'Offered arrival rate / deadline attainment',
- unavailable: 'Unavailable in this result contract',
- server: 'Recorded server settings',
- fidelity: 'Recorded fidelity and policy',
- open: 'Open videos and full result',
- ci: 'Exact CI run',
- costTitle: 'Cost assumptions for this point',
- hourly: 'Whole deployment cost (USD/hour)',
- source: 'Cost source and included items',
- date: 'Cost as of',
- costNote:
- 'Enter the total hourly cost of the complete deployment, including all billed GPUs and host, power, cooling, network, storage and operating costs. Clips/USD = valid clips/hour ÷ deployment USD/hour. User-entered estimates; no selling price or profit is implied.',
- methods: 'Measurement definitions and comparison limits',
- diagnostic: 'Serial diagnostics · serving capacity not measured',
- servingSmoke: 'Closed-loop smoke · serving capacity not qualified',
- servingNote:
- 'Each point is one concurrency cell. Latency samples are never pooled across cells; P90 needs at least 10 valid samples in that cell. Throughput covers submission to fully downloaded media, including failures and transfer; local validation runs afterwards. GPU-board energy integrates the shared measurement envelope once, without summing overlapping request windows.',
- servingMedian: 'Show cell medians',
- boundary: 'Throughput measurement boundary',
- deliveryBoundary: 'Submission to downloaded media; local validation excluded',
- load: 'Load pattern',
- closedLoop: 'Closed loop',
- observed:
- 'Lines connect measured concurrency settings for each hardware/runtime configuration. Select any dot for its videos, metrics and exact CI run.',
- controls:
- 'Shift+scroll to zoom; drag to pan; double-click to reset. Select a point or table row for details.',
- },
- zh: {
- title: '视频服务延迟与效率权衡',
- subtitle: '在相同工作负载下比较硬件与运行时配置。',
- scope:
- '分享当前页面链接即可重新打开同一组 CI 结果。成本假设仅保留在当前浏览器会话中,刷新后重置。',
- workload: '匹配的工作负载',
- x: '延迟轴 · 越低越好',
- y: '效率轴 · 越高越好',
- p90: 'P90 客户端就绪延迟(秒)',
- median: '客户端就绪延迟中位数(秒)',
- dollar: '有效视频数 / USD',
- clipsGpu: '有效视频数 / 参与计算 GPU 小时',
- clipsAllocatedGpu: '有效视频数 / 已分配 GPU 小时',
- secondsGpu: '生成视频秒数 / 参与计算 GPU 小时',
- secondsAllocatedGpu: '生成视频秒数 / 已分配 GPU 小时',
- energy: '有效视频数 / GPU 板卡 kWh',
- latencyNote:
- '客户端就绪指从提交到媒体完整下载完成,包含轮询等待,不包含本地验证。P90 使用最近秩法,此处至少需要 10 个完整的有效请求样本;这只是显示门槛,不代表尾延迟估计具有统计可靠性。失败请求仍保留在计数中。',
- throughputNote:
- '吞吐量使用记录的测量墙钟时间窗口,包含失败尝试与客户端开销。串行运行仅用于诊断,不能证明服务容量。',
- qualityNote:
- '工作负载匹配固定了模型版本、生成设置以及 prompt、seed 和输入工作负载。精度、缓存和运行时变更仍需审查保真度。技术有效性不代表感知质量;未校准的点不能作为合格的性能优胜结果。',
- energyNote:
- '能效使用后端测量阶段每个有效视频的 GPU 板卡能耗(焦耳),仅涵盖参与计算的 GPU 板卡,不含其他已分配 GPU、CPU、散热或存储,也不代表设施能效。',
- noPoints: '当前坐标轴下尚无满足条件的数据点。',
- diagnose: '查看已有串行诊断结果',
- empty: '打开 CI 结果即可加入基线与候选数据。',
- requirements:
- '单请求诊断请选择延迟中位数。成本视图还需要为每个点填写完整部署成本、来源与日期。',
- point: '数据点',
- baseline: '基线',
- candidate: '候选',
- samples: '有效延迟样本数',
- counts: '有效 / 已完成 / 计划',
- failed: '失败或无效',
- status: '绘图状态',
- missing: '缺少工作负载、延迟样本、GPU 数量、能耗或成本假设',
- plotted: '已显示',
- details: '所选数据点',
- hardware: '硬件',
- runtime: '运行时版本',
- model: '模型版本',
- concurrency: '客户端并发数',
- allocated: '已分配 / 参与计算的 GPU 数',
- window: '测量时段(秒)',
- power: '参与计算板卡总功率均值(W)',
- energyClip: '每有效视频 GPU 板卡能耗(kJ)',
- meanPower: '板卡总功率均值(W)',
- gpuNote:
- '按参与计算 GPU 数衡量硬件效率;按已分配 GPU 数统计时包含空闲分配。完整部署成本须包含所有计费资源。',
- limitRatio: '平均功率 / 实际生效上限(%)',
- limitWatts: '实际生效功率上限合计(W)',
- limitNote:
- '功率占比使用参与计算 GPU 启动前与清理后记录的实际生效功率上限,并按 UUID 匹配。两次记录必须一致,但不能证明期间上限始终不变;不以规格 TDP 或事后硬件信息替代。',
- powerWindow: '功率测量窗口(秒)',
- offered: '施加的请求到达率 / 时限达标情况',
- unavailable: '此结果格式未提供',
- server: '已记录的服务端设置',
- fidelity: '已记录的保真度与判定策略',
- open: '打开视频与完整结果',
- ci: '对应的 CI 运行',
- costTitle: '此数据点的成本假设',
- hourly: '完整部署成本(USD/小时)',
- source: '成本来源及涵盖项目',
- date: '成本基准日期',
- costNote:
- '填写完整部署每小时总成本,涵盖所有计费 GPU、主机、电力、散热、网络、存储和运营成本。有效视频数/USD = 每小时有效视频数 ÷ 部署每小时 USD 成本。数值为用户填写的估算,不代表售价或利润。',
- methods: '测量定义与比较限制',
- diagnostic: '串行诊断 · 尚未测量服务容量',
- servingSmoke: '闭环冒烟测试 · 服务容量未经验证',
- servingNote:
- '每个点对应一个并发配置,延迟样本按配置独立统计;P90 要求该配置至少有 10 个有效样本。吞吐量窗口从提交到媒体完整下载,涵盖失败请求和传输,本地验证在此后执行。GPU 板卡能耗仅对共享测量窗口积分一次,不累加相互重叠的请求窗口。',
- servingMedian: '显示各配置的延迟中位数',
- boundary: '吞吐量测量边界',
- deliveryBoundary: '从提交到媒体下载完成;不含本地验证',
- load: '负载模式',
- closedLoop: '闭环',
- observed:
- '线条连接同一硬件与运行时配置下各并发数的实测结果。点击任意数据点,即可查看视频、指标及对应的 CI 运行。',
- controls: 'Shift+滚轮缩放,拖动平移,双击重置。选择数据点或表格行查看详情。',
- },
-};
-const fmt = (n: number | null) =>
- n === null ? '—' : n.toLocaleString('en-US', { maximumFractionDigits: 3 });
-const blankCost: DeploymentCost = { hourly: '', source: '', date: '' };
-
-export default function VideoTradeoff({
- runs,
- onOpen,
- sourceId,
-}: {
- runs: TradeoffRun[];
- onOpen: (point: TradeoffPoint) => void;
- sourceId?: string;
-}) {
- const locale = useLocale();
- const s = STRINGS[locale];
- const t = SERVER_TIMING_COPY[locale];
- const all = useMemo(() => runs.flatMap(tradeoffPoints), [runs]);
- const [workload, setWorkload] = useState('');
- const [latencyAxis, setX] = useState(null);
- const [yAxis, setY] = useState('clipsGpu');
- const [selected, setSelected] = useState('');
- const [costs, setCosts] = useState>({});
- const groups = [...new Map(all.map((p) => [p.group, p.workloadLabel])).entries()];
- const group = groups.some(([key]) => key === workload)
- ? workload
- : (all.find((p) => p.sourceId === sourceId)?.group ?? groups[0]?.[0]);
- const points = all.filter((p) => p.group === group);
- const active =
- points.find((p) => p.id === selected) ??
- points.find((p) => p.sourceId === sourceId) ??
- points[0];
- const isServing = points.some((p) => p.role === 'serving');
- const xAxis =
- latencyAxis ??
- (isServing && !points.some((p) => latencyValue(p, 'p90') !== null) ? 'median' : 'p90');
- const plotted = points.flatMap((p) => {
- const x = latencyValue(p, xAxis),
- y = efficiencyValue(p, yAxis, costs[p.id]);
- return p.completeWorkload && x !== null && y !== null ? [{ ...p, x, y }] : [];
- });
- const curves = tradeoffCurves(plotted);
- const drawPointLabels = (
- labelGroup: Selection,
- x: ContinuousScale,
- y: ContinuousScale,
- ) => {
- labelGroup
- .selectAll('text.serving-point-label')
- .data(
- plotted.filter((p) => p.role === 'serving'),
- (p) => p.id,
- )
- .join('text')
- .attr('class', 'serving-point-label')
- .attr('x', (p) => x(p.x) + 10)
- .attr('y', (p) => y(p.y) - 10)
- .attr('font-size', px(CHART_TYPE.axisLabel))
- .attr('font-weight', 600)
- .attr('fill', 'var(--foreground)')
- .attr('pointer-events', 'none')
- .text((p) => `C${p.concurrency}`);
- };
- const hardware = [...new Set(all.map((p) => p.hardware))].sort();
- const color = (p: TradeoffPoint) =>
- schemeTableau10[hardware.indexOf(p.hardware) % schemeTableau10.length];
- const label = (p: TradeoffPoint) =>
- `${p.hardware || '—'} · ${p.role === 'serving' ? `${s.concurrency} ${p.concurrency}` : s[p.role]} · #${p.sourceId}`;
- const choose = (p: TradeoffPoint) => {
- setSelected(p.id);
- track('video_tradeoff_point_selected', { role: p.role, source: p.sourceId });
- };
- const cost = active ? (costs[active.id] ?? blankCost) : blankCost;
- const costInput = (key: keyof DeploymentCost, value: string) => {
- if (active)
- setCosts((old) => ({
- ...old,
- [active.id]: { ...(old[active.id] ?? blankCost), [key]: value },
- }));
- };
- return (
-
-
-
{s.title}
-
{s.subtitle}
-
- {s.scope}
- {all.length === 0 ? (
- {s.empty}
- ) : (
- <>
- ({
- value,
- label: `#${index + 1} · ${name}`,
- }))}
- />
-
- setX(value as LatencyAxis)}
- options={(['p90', 'median'] as const).map((value) => ({ value, label: s[value] }))}
- />
- setY(value as EfficiencyAxis)}
- options={(
- [
- 'clipsGpu',
- 'secondsGpu',
- 'clipsAllocatedGpu',
- 'secondsAllocatedGpu',
- 'energy',
- 'dollar',
- ] as const
- ).map((value) => ({
- value,
- label: s[value],
- }))}
- />
-
-
- {[...new Set(points.map((p) => p.hardware))].filter(Boolean).map((name) => (
-
-
- {name}
-
- ))}
- {(isServing || points.every((p) => p.concurrency === 1)) && (
-
- {isServing ? s.servingSmoke : s.diagnostic}
-
- )}
-
- {plotted.length > 0 ? (
- p.x)) * 1.12 || 1],
- nice: true,
- }}
- yScale={{
- type: 'linear',
- domain: [0, Math.max(...plotted.map((p) => p.y)) * 1.15 || 1],
- nice: true,
- }}
- xAxis={{ label: s[xAxis], tickCount: 5 }}
- yAxis={{ label: s[yAxis], tickCount: 5 }}
- layers={[
- {
- type: 'line',
- key: 'measured-curves',
- lines: curves,
- config: {
- getColor: (key) => color(curves[key][0]),
- strokeWidth: 2.5,
- curve: curveLinear,
- },
- },
- {
- type: 'point',
- data: plotted,
- config: {
- getCx: () => 0,
- getCy: () => 0,
- getX: (p) => p.x,
- getY: (p) => p.y,
- getColor: color,
- getRadius: () => 6,
- stroke: 'var(--foreground)',
- strokeWidth: 1,
- keyFn: (p) => p.id,
- },
- },
- {
- type: 'custom',
- key: 'serving-point-labels',
- render: (labelGroup, ctx) =>
- drawPointLabels(
- labelGroup,
- (ctx.renderedXScale ?? ctx.xScale) as ContinuousScale,
- (ctx.renderedYScale ?? ctx.yScale) as ContinuousScale,
- ),
- onZoom: (labelGroup, ctx) =>
- drawPointLabels(
- labelGroup,
- ctx.newXScale as ContinuousScale,
- ctx.newYScale as ContinuousScale,
- ),
- },
- ]}
- tooltip={{
- rulerType: 'none',
- content: (p) =>
- `${escapeHtml(label(p))} ${escapeHtml(s[xAxis])}: ${fmt(p.x)} ${escapeHtml(s[yAxis])}: ${fmt(p.y)} n=${p.latencies.length}
`,
- onPointClick: choose,
- }}
- zoom={{ enabled: true, axes: 'both', scaleExtent: [1, 20] }}
- instructions={s.controls}
- caption={{s.observed}
}
- />
- ) : (
-
-
{s.noPoints}
-
{s.requirements}
-
{
- setX('median');
- setY('clipsGpu');
- }}
- >
- {isServing ? s.servingMedian : s.diagnose}
-
-
- )}
-
- {s.methods}
- {s.latencyNote}
- {isServing ? s.servingNote : s.throughputNote}
- {s.gpuNote}
- {s.qualityNote}
- {yAxis === 'energy' && {s.energyNote}
}
-
-
-
-
-
- {s.point}
- {s.samples}
- {s.counts}
- {s.failed}
- {s[xAxis]}
- {s[yAxis]}
- {s.meanPower}
- {s.energyClip}
- {s.limitRatio}
- {s.status}
-
-
-
- {points.map((p) => (
-
-
- choose(p)}
- >
- {label(p)}
-
-
- {p.latencies.length}
-
- {fmt(p.valid)} / {fmt(p.completed)} / {fmt(p.scheduled)}
-
- {fmt(p.failed)}
- {fmt(latencyValue(p, xAxis))}
- {fmt(efficiencyValue(p, yAxis, costs[p.id]))}
- {fmt(p.power)}
- {fmt(p.energy === null ? null : p.energy / 1000)}
- {fmt(p.powerLimit?.percent ?? null)}
-
- {plotted.some((q) => q.id === p.id) ? s.plotted : s.missing}
-
-
- ))}
-
-
-
- {active && (
-
-
-
{s.details}
-
{label(active)}
-
- {[
- [s.runtime, active.revision || '—'],
- [s.model, active.modelRevision || '—'],
- [s.allocated, `${fmt(active.allocated)} / ${fmt(active.participating)}`],
- [s.concurrency, fmt(active.concurrency)],
- ...(active.role === 'serving'
- ? [
- [s.load, s.closedLoop],
- [s.boundary, s.deliveryBoundary],
- ]
- : []),
- [s.window, fmt(active.wall)],
- [s.power, fmt(active.power)],
- [s.energyClip, fmt(active.energy === null ? null : active.energy / 1000)],
- [s.limitRatio, fmt(active.powerLimit?.percent ?? null)],
- [s.limitWatts, fmt(active.powerLimit?.watts ?? null)],
- [s.powerWindow, fmt(active.powerWindow)],
- [t.batch, active.timing.batchSizes?.join(', ') ?? s.unavailable],
- [t.replicas, active.timing.replicaIds?.join(', ') ?? s.unavailable],
- [s.offered, s.unavailable],
- ].map(([name, value]) => (
-
-
{name}
- {value}
-
- ))}
-
-
-
{s.limitNote}
-
- {t.title}
-
- {t.stages.map((name, index) => {
- const timing = active.timing.stages[index];
- return (
-
-
{name} · P50 / P90 / P95 (s)
-
- {fmt(timing?.p50 ?? null)} / {fmt(timing?.p90 ?? null)} /{' '}
- {fmt(timing?.p95 ?? null)}
-
-
- {t.coverage}:{' '}
- {timing
- ? `${timing.samples} / ${timing.valid} / ${timing.missing}`
- : s.unavailable}
-
-
-
- );
- })}
-
- {t.note}
- {t.layoutNote}
-
-
- {s.workload}
-
- {JSON.stringify(active.workload, null, 2)}
-
-
-
- {s.server}
-
- {JSON.stringify(active.server, null, 2)}
-
-
-
- {s.fidelity}
-
- {JSON.stringify({ fidelity: active.fidelity, policy: active.policy }, null, 2)}
-
-
-
-
-
{s.costTitle}
-
{s.costNote}
- {(
- [
- ['hourly', s.hourly, 'number'],
- ['source', s.source, 'text'],
- ['date', s.date, 'date'],
- ] as const
- ).map(([key, name, type]) => (
-
- {name}
- costInput(key, event.target.value)}
- />
-
- ))}
-
-
- )}
- >
- )}
-
- );
-}
diff --git a/packages/app/src/components/video-benchmark/chart-domain.ts b/packages/app/src/components/video-benchmark/chart-domain.ts
index cc75aa311..179b82f2f 100644
--- a/packages/app/src/components/video-benchmark/chart-domain.ts
+++ b/packages/app/src/components/video-benchmark/chart-domain.ts
@@ -1,9 +1,8 @@
/**
* Linear axis domain for the hardware chart, anchored at zero and padded past
* the data by the `pad` multiplier so point labels clear the plot edges.
- * Positive-only data spans [0, pad·max]; all-negative data — profit per
- * GPU-hour when the API price misses every tier cost — spans [pad·min, 0], so
- * break-even is the top edge rather than a synthetic ceiling above the data;
+ * Positive-only data spans [0, pad·max]; all-negative data spans [pad·min, 0],
+ * so break-even is the top edge rather than a synthetic ceiling above the data;
* mixed data pads both ends. Only empty data gets the unit domain that keeps
* the axes drawn, and all-zero data keeps that unit height instead of
* collapsing the scale to a single tick.
diff --git a/packages/app/src/components/video-benchmark/comparison.test.ts b/packages/app/src/components/video-benchmark/comparison.test.ts
deleted file mode 100644
index cfbf9ce28..000000000
--- a/packages/app/src/components/video-benchmark/comparison.test.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { describe, expect, it } from 'vitest';
-import { comparisonRefs, rememberComparison } from './comparison';
-
-describe('shared CI comparison identities', () => {
- it('retains the previous artifact when another run is opened', () => {
- const url = rememberComparison(
- new URL('https://example.test/video?view=tradeoff&run=123&artifact=40&cell=c2'),
- '456',
- '41',
- );
- expect(url.searchParams.get('compare')).toBe('123.40,456.41');
- expect(url.searchParams.get('view')).toBe('tradeoff');
- expect(url.searchParams.get('cell')).toBe('c2');
- expect(rememberComparison(url, '456', '41').searchParams.get('compare')).toBe('123.40,456.41');
- });
-
- it('saves the first loaded artifact before navigation replaces its run identity', () => {
- const url = rememberComparison(
- new URL('https://example.test/video?run=123&artifact=40'),
- '123',
- '40',
- );
- expect(url.searchParams.get('compare')).toBe('123.40');
- expect(comparisonRefs(null)).toEqual([]);
- });
-
- it.each([
- '123',
- '123.40,',
- '0.40',
- '123.40&run=999',
- Array.from({ length: 9 }, (_, i) => `${i + 1}.40`).join(','),
- ])('rejects malformed or oversized requests: %s', (value) => {
- expect(() => comparisonRefs(value)).toThrow();
- });
-});
diff --git a/packages/app/src/components/video-benchmark/comparison.ts b/packages/app/src/components/video-benchmark/comparison.ts
deleted file mode 100644
index 694322af7..000000000
--- a/packages/app/src/components/video-benchmark/comparison.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-const REF = /^[1-9]\d{0,19}\.[1-9]\d{0,19}$/;
-
-export function comparisonRefs(value: string | null): string[] {
- const refs = [...new Set(value ? value.split(',') : [])];
- if (refs.length > 8 || refs.some((ref) => !REF.test(ref)))
- throw new Error('A comparison needs at most 8 valid CI run/artifact pairs');
- return refs;
-}
-
-export function rememberComparison(url: URL, run: string, artifact: string): URL {
- const previous = [url.searchParams.get('run'), url.searchParams.get('artifact')].join('.');
- const refs = comparisonRefs(
- [
- ...comparisonRefs(url.searchParams.get('compare')),
- ...(REF.test(previous) ? [previous] : []),
- `${run}.${artifact}`,
- ].join(','),
- );
- url.searchParams.set('compare', refs.join(','));
- return url;
-}
diff --git a/packages/app/src/components/video-benchmark/deployment.ts b/packages/app/src/components/video-benchmark/deployment.ts
index 6183d91d0..0e02e0a5d 100644
--- a/packages/app/src/components/video-benchmark/deployment.ts
+++ b/packages/app/src/components/video-benchmark/deployment.ts
@@ -64,7 +64,7 @@ export function sharedLayoutCells(cells: T[]): T[] {
/**
* The cell that stands for a hardware in cards and comparisons: its most
- * efficient deployment under the current GPU basis (highest videos per
+ * efficient deployment (highest videos per participating
* GPU-hour), lowest P50 on ties. Queued cells never lead; a hardware whose
* cells all lack the rate falls back to its first deployment cell.
*/
diff --git a/packages/app/src/components/video-benchmark/frontier.ts b/packages/app/src/components/video-benchmark/frontier.ts
index 102adf9cd..6682b38a2 100644
--- a/packages/app/src/components/video-benchmark/frontier.ts
+++ b/packages/app/src/components/video-benchmark/frontier.ts
@@ -6,7 +6,7 @@ type Better = 'lower' | 'higher';
* Non-dominated set for two axes with declared directions. `paretoFrontUpperLeft`
* keeps the points no other point beats on both a larger x and a larger y, so a
* lower-is-better axis is fed negated. The same hull code therefore serves
- * time-to-video vs efficiency, generation speed vs efficiency and time-to-video
+ * time-to-video vs efficiency and time-to-video
* vs cost. Result is sorted by ascending x.
*/
export function paretoFrontier(
diff --git a/packages/app/src/components/video-benchmark/report.test.ts b/packages/app/src/components/video-benchmark/report.test.ts
deleted file mode 100644
index b28fcd594..000000000
--- a/packages/app/src/components/video-benchmark/report.test.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-// @vitest-environment jsdom
-import { describe, expect, it } from 'vitest';
-import { reportPath, renderReportHtml } from './report';
-
-describe('verified artifact report links', () => {
- it('resolves both paired-export and serving-matrix media within the artifact', () => {
- expect(reportPath('media/baseline.mp4')).toBe('report/media/baseline.mp4');
- expect(reportPath('../gpu/c2/baseline/artifacts/measurement-r001-c001.mp4')).toBe(
- 'gpu/c2/baseline/artifacts/measurement-r001-c001.mp4',
- );
- expect(reportPath('../serving-smoke.json')).toBe('serving-smoke.json');
- });
- it.each([
- '../../outside.mp4',
- '/gpu/clip.mp4',
- '//remote.test/clip.mp4',
- 'https://remote.test/clip.mp4',
- '%2e%2e/media.mp4',
- String.raw`..\media.mp4`,
- 'clip.mp4?token=x',
- ])('rejects unsafe report reference %s', (path) => {
- expect(reportPath(path)).toBeNull();
- });
- it('rewrites only known assets and removes active content and unknown external references', () => {
- const html = renderReportHtml(
- 'Data Outside ',
- new Map([
- ['gpu/c1/clip.mp4', 'https://storage.test/verified.mp4'],
- ['serving-smoke.json', 'blob:verified-json'],
- ]),
- );
- const doc = new DOMParser().parseFromString(html, 'text/html');
- expect(doc.querySelector('video')?.getAttribute('src')).toBe(
- 'https://storage.test/verified.mp4',
- );
- expect(doc.querySelector('a')?.getAttribute('href')).toBe('blob:verified-json');
- expect(doc.querySelector('img')?.hasAttribute('src')).toBe(false);
- expect(doc.querySelectorAll('a')[1].hasAttribute('href')).toBe(false);
- expect(doc.querySelector('script,base')).toBeNull();
- expect(doc.querySelector('meta')?.content).toContain("default-src 'none'");
- });
-});
diff --git a/packages/app/src/components/video-benchmark/report.ts b/packages/app/src/components/video-benchmark/report.ts
deleted file mode 100644
index df7b07905..000000000
--- a/packages/app/src/components/video-benchmark/report.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { safePath } from './bundle';
-
-// Report links are relative to report/index.html and may traverse within the bundle.
-export function reportPath(value: string): string | null {
- if (value.startsWith('/') || /[\\:%?#]/u.test(value)) return null;
- const parts = ['report'];
- for (const part of value.split('/')) {
- if (part === '.') continue;
- if (part === '..') {
- if (parts.length === 0) return null;
- parts.pop();
- } else parts.push(part);
- }
- try {
- return safePath(parts.join('/'));
- } catch {
- return null;
- }
-}
-
-export function renderReportHtml(rawHtml: string, urls: Map): string {
- const doc = new DOMParser().parseFromString(rawHtml, 'text/html');
- doc
- .querySelectorAll('script,base,iframe,object,embed,link,meta[http-equiv],form')
- .forEach((node) => node.remove());
- doc.querySelectorAll('[src], [href]').forEach((node) => {
- for (const attr of ['src', 'href']) {
- const value = node.getAttribute(attr);
- if (value !== null) {
- const path = reportPath(value);
- const url = path ? urls.get(path) : undefined;
- if (url) node.setAttribute(attr, url);
- else node.removeAttribute(attr);
- }
- }
- });
- const csp = doc.createElement('meta');
- csp.httpEquiv = 'Content-Security-Policy';
- csp.content =
- "default-src 'none'; media-src blob: https:; img-src blob: data:; style-src 'unsafe-inline'; form-action 'none'; base-uri 'none'";
- doc.head.prepend(csp);
- return doc.documentElement.outerHTML;
-}
From cf9b02c3657c6d728935d6ebb58a1053c8325178 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sun, 20 Sep 2026 13:17:08 -0700
Subject: [PATCH 087/104] test: drop the retired GPU-basis option from the
video deployment tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The dashboard now measures on the participating-GPU basis only, so
MetricOptions no longer has a basis field; the test fixture kept passing one.
中文:仪表板现在只按参与 GPU 口径计量,MetricOptions 已无 basis 字段;测试夹具里残留的该选项一并去掉。
---
packages/app/src/components/video-benchmark/deployment.test.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/app/src/components/video-benchmark/deployment.test.ts b/packages/app/src/components/video-benchmark/deployment.test.ts
index 726f41fb7..762de47c8 100644
--- a/packages/app/src/components/video-benchmark/deployment.test.ts
+++ b/packages/app/src/components/video-benchmark/deployment.test.ts
@@ -33,7 +33,7 @@ const base: VideoPoint = {
status: 'complete',
observedAt: null,
};
-const options = { tier: 'h', basis: 'participating' } as const;
+const options = { tier: 'h' } as const;
describe('deployment', () => {
it('keys a deployment by boards and model split, not by concurrency', () => {
From f1dcade65b11d8813a0f97e929ccf32a6958b70c Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sun, 20 Sep 2026 18:52:24 -0700
Subject: [PATCH 088/104] fix: read one frozen workload and skip under-sampled
cells on the video dashboard
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Published history also holds smoke runs of a shorter plan with a handful of
clips. One of them, an H200 2-GPU TP1 x Ulysses 2 cell with four 4-second
clips, had the best videos per GPU-hour, so it became the H200 KPI lead and
the Compare candidate against 8-second H100 clips. The dashboard now keeps the
workload measured on the most hardware, drops cells under the ten-clip P90
floor, and feeds the chart, table, CSV, cards, Compare and Evidence the same
cells; the history list still shows everything.
中文:已发布历史里还有较短 plan 的 smoke 运行,只有几条视频。其中一条 H200 2 GPU TP1×Ulysses 2、4 条 4 秒视频的 cell 因为每 GPU-小时视频数最高,成了 H200 的 KPI 领先部署和 Compare 候选,与 8 秒的 H100 视频对比。现在仪表板只取硬件覆盖最广的工作负载,剔除低于 10 条 P90 门槛的 cell,并让图表、表格、CSV、卡片、Compare 与证据面板读同一份 cells;历史列表仍显示全部。
---
docs/videogenx-dashboard.md | 3 +-
.../video-benchmark/VideoDashboard.tsx | 30 ++++----
.../components/video-benchmark/points.test.ts | 74 ++++++++++++++++++-
.../src/components/video-benchmark/points.ts | 60 +++++++++++++++
4 files changed, 151 insertions(+), 16 deletions(-)
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
index 90a11a807..f9c195bfa 100644
--- a/docs/videogenx-dashboard.md
+++ b/docs/videogenx-dashboard.md
@@ -36,12 +36,13 @@ Today every hardware has exactly one measured deployment (4 GPUs per video, TP2
- **Unavailable hardware** stays visible. `VIDEO_HARDWARE_ROSTER` in `hardware.ts` lists the campaign targets; MI355X has no valid run and renders as a muted legend row, a "Not measured" KPI card with the failed-run link, and no table row. A missing point is never a zero.
- **Nulls**: every formula returns `null` when an input is missing or invalid — power phase invalid, fewer than ten samples for P90, unknown hardware key, missing GPU count. `formatMetric` prints `—`.
- **Newest observation wins**: `latestVideoCells` keeps the first (newest publication) observation per hardware × deployment × concurrency, so a re-run replaces, never duplicates, a point, while a new server layout adds one.
+- **One workload, real samples**: `dashboardCells` keeps only the workload measured on the most hardware and drops cells with fewer than ten valid clips (the P90 floor), so a smoke run of a shorter plan never becomes a point, a KPI lead or a Compare side; the Performance history list still shows it, and the Workload fact counts the hidden workloads.
- **Strings**: component-local `STRINGS = { en, zh }` via `useLocale()`; SKUs, units and identifiers stay English.
- **Fixture**: `cypress/fixtures/api/video-history.json` is rebuilt from retained `StoredArtifact` exports with `bun run fixtures:video-history ` (`scripts/build-video-history-fixture.ts`); it is metadata only and registered in `_manifest.json`.
## 中文说明
-`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;已发布结果的“性能历史”列表收进可展开区块,`history-*` 深链接会自动展开;原有的按运行查看、trade-off 图表与 CI 运行浏览已移除。`video-url-state.ts` 管理 `v_x`、`v_y`、`v_tier`、`v_view`、`v_api` 五个 URL 参数,默认值不写入 URL。X 轴可选 P90(默认)或 P50 出片时间;Y 轴可选每 1 美元 TCO 视频数(默认,Hyperscaler 自有设备档位,单价与 `/inference` 同源)、每条视频 TCO 成本、每 GPU 小时视频数和每条视频 GPU 板卡能耗(kJ)。所有按 GPU 计的指标都以参与计算的 GPU 为分母(每条视频 4 张,TP2 × Ulysses 2),而不是任务预留的板卡数;保留数据中 H100 与 B200 的运行预留了 8 张却只用 4 张,图表标题下方的说明会点名这些硬件,对应 KPI 卡标题显示“4 / 8 张 GPU”。空闲板卡只作说明、不计成本,没有 GPU 口径切换。两条坐标轴都从 0 起,便于按长度比较。
+`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;已发布结果的“性能历史”列表收进可展开区块,`history-*` 深链接会自动展开;原有的按运行查看、trade-off 图表与 CI 运行浏览已移除。仪表板只取硬件覆盖最广的那个工作负载,并剔除有效视频不足 10 条的 cell(与 P90 门槛一致),因此较短 plan 的 smoke 运行不会成为图上的点、KPI 领先部署或 Compare 的一方,但仍会出现在性能历史列表中;工作负载一栏会注明隐藏的其他工作负载数量。`video-url-state.ts` 管理 `v_x`、`v_y`、`v_tier`、`v_view`、`v_api` 五个 URL 参数,默认值不写入 URL。X 轴可选 P90(默认)或 P50 出片时间;Y 轴可选每 1 美元 TCO 视频数(默认,Hyperscaler 自有设备档位,单价与 `/inference` 同源)、每条视频 TCO 成本、每 GPU 小时视频数和每条视频 GPU 板卡能耗(kJ)。所有按 GPU 计的指标都以参与计算的 GPU 为分母(每条视频 4 张,TP2 × Ulysses 2),而不是任务预留的板卡数;保留数据中 H100 与 B200 的运行预留了 8 张却只用 4 张,图表标题下方的说明会点名这些硬件,对应 KPI 卡标题显示“4 / 8 张 GPU”。空闲板卡只作说明、不计成本,没有 GPU 口径切换。两条坐标轴都从 0 起,便于按长度比较。
曲线来自部署而不是并发:pinned H3 服务是 batch-one、单副本,客户端并发只会排队(保留数据中 C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 线性增长),把这些点连起来画出的只是队列,因此图表绝不连接它们。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表(KPI 卡、Compare 面板和图例都用它);`plot.ts` 只用未排队的 cell 绘图——排队 cell 不会进入图表、表格和 CSV,只出现在证据面板——再按硬件对剩余部署点求 Pareto 前沿:某硬件有两个及以上前沿部署时自动画出实线,被支配的部署以淡色显示。这些行为都没有开关,没有“显示排队请求”,没有“仅最优”,也没有跨硬件前沿,所有读者看到的是同一张图。目前每种硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的三点散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index fc6e6744a..8c96dd6a6 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -23,7 +23,7 @@ import {
type MetricId,
type VideoPoint,
} from './metrics';
-import { latestVideoCells } from './points';
+import { dashboardCells } from './points';
import { formatApiPrice, H3_API_REFERENCE } from './api-reference';
import { useVideoPoints } from './use-video-points';
import VideoHistory from './VideoHistory';
@@ -80,7 +80,7 @@ const STRINGS = {
vs: 'vs.',
notMeasured: 'not measured',
runtime: 'runtime',
- workloads: (n: number) => ` (+${n} more)`,
+ workloads: (n: number) => ` (${n} other workloads hidden)`,
},
zh: {
title: 'VideoGenX · MiniMax-H3 跨硬件对比',
@@ -107,7 +107,7 @@ const STRINGS = {
vs: 'vs.',
notMeasured: '未测得',
runtime: 'runtime',
- workloads: (n: number) => `(另有 ${n} 个)`,
+ workloads: (n: number) => `(另有 ${n} 个工作负载未显示)`,
},
};
@@ -159,7 +159,11 @@ export default function VideoDashboard() {
);
const options = metricOptions(state);
- const cells = useMemo(() => latestVideoCells(points), [points]);
+ const {
+ cells,
+ workload: primaryWorkload,
+ otherWorkloads,
+ } = useMemo(() => dashboardCells(points), [points]);
const measured = useMemo(
() =>
new Map(
@@ -177,12 +181,10 @@ export default function VideoDashboard() {
const deploymentLabel =
layouts.length > 2 ? s.deployments(layouts.length) : layouts.join(' | ') || '—';
// "1344 × 768 · 8 s · 24 fps · 50 steps · model @ rev · seeds · prompt" → shape, then model @ rev.
- const workloadParts = lead?.workload.split(' · ') ?? [];
+ const workloadParts = primaryWorkload?.split(' · ') ?? [];
const workloadLabel = workloadParts.slice(0, 4).join(' · ') || '—';
const modelLabel = workloadParts[4] ?? lead?.model ?? '—';
- const otherWorkloads = new Set(cells.map((p) => p.workload.split(' · ').slice(0, 5).join(' · ')))
- .size;
- const workloadSuffix = otherWorkloads > 1 ? s.workloads(otherWorkloads - 1) : '';
+ const workloadSuffix = otherWorkloads > 0 ? s.workloads(otherWorkloads) : '';
// Jobs that reserved a whole node but generated on part of it: say so beside the per-GPU numbers.
const idle = [...measured.values()]
.filter(
@@ -216,7 +218,7 @@ export default function VideoDashboard() {
});
const exportCsv = () => {
- const rows = videoTableRows(points, hidden);
+ const rows = videoTableRows(cells, hidden);
const header = [
'hardware',
'concurrency',
@@ -377,7 +379,7 @@ export default function VideoDashboard() {
{state.view === 'chart' ? (
) : (
-
+
)}
@@ -402,11 +404,11 @@ export default function VideoDashboard() {
)}
-
+
{!loading && !error && (
<>
-
-
+
+
>
)}
{
]);
});
});
+
+describe('dashboardCells', () => {
+ const FORMAL =
+ '1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 29 · A single continuous shot';
+ const SHORT =
+ '1344 × 768 · 4 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11 · A single continuous shot';
+ const cell = (over: Partial): VideoHistoryObservation => ({
+ ...observation,
+ workload: FORMAL,
+ ...over,
+ });
+ const pageOf = (
+ runId: string,
+ hardware: string,
+ observations: VideoHistoryObservation[],
+ ): VideoHistoryPage => ({
+ schemaVersion: 1,
+ nextPage: null,
+ entries: [
+ {
+ ...page.entries[0],
+ id: `${runId}.1`,
+ runId,
+ artifact: { ...artifact, id: Number(runId) },
+ sources: [{ ...source, id: runId, hardware, observations }],
+ },
+ ],
+ });
+
+ it('drops cells under the sample floor even when they are the most efficient', () => {
+ // A two-GPU smoke with four clips: the best videos per GPU-hour, no P90, not a benchmark point.
+ const smoke = cell({
+ id: 'sha:smoke',
+ cell: 'smoke',
+ samples: 4,
+ valid: 4,
+ scheduled: 4,
+ p90: null,
+ clipsGpuHour: 15.06,
+ participating: 2,
+ allocated: 2,
+ server: { tp: 1, ulysses: 2, attention: 'auto' },
+ });
+ const { cells, workload, otherWorkloads } = dashboardCells(
+ videoPoints([pageOf('1', 'NVIDIA H200', [cell({}), smoke])]),
+ );
+ expect(cells.map((p) => p.id)).toEqual(['sha:c1']);
+ expect(workload).toBe(FORMAL.split(' · ').slice(0, 5).join(' · '));
+ expect(otherWorkloads).toBe(0);
+ });
+
+ it('keeps the workload measured on the most hardware and counts the hidden ones', () => {
+ const pages = [
+ pageOf('1', 'NVIDIA H200', [
+ cell({}),
+ cell({ id: 'sha:short', cell: 'c1s', workload: SHORT }),
+ ]),
+ pageOf('2', 'NVIDIA B200', [cell({ id: 'sha:b1', hardware: 'NVIDIA B200' })]),
+ ];
+ const result = dashboardCells(videoPoints(pages));
+ expect(result.workload).toBe(FORMAL.split(' · ').slice(0, 5).join(' · '));
+ expect(result.cells.map((p) => p.id).toSorted()).toEqual(['sha:b1', 'sha:c1']);
+ expect(result.otherWorkloads).toBe(1);
+ });
+
+ it('returns no cells and no workload when nothing reaches the floor', () => {
+ const result = dashboardCells(
+ videoPoints([pageOf('1', 'NVIDIA H200', [cell({ samples: 3 })])]),
+ );
+ expect(result).toEqual({ cells: [], workload: null, otherWorkloads: 1 });
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/points.ts b/packages/app/src/components/video-benchmark/points.ts
index ec3d73208..f0cc1f0fa 100644
--- a/packages/app/src/components/video-benchmark/points.ts
+++ b/packages/app/src/components/video-benchmark/points.ts
@@ -96,3 +96,63 @@ export function latestVideoCells(points: VideoPoint[]): VideoPoint[] {
return true;
});
}
+
+/** Valid clips a cell needs before the dashboard counts it: the same floor as the P90 display. */
+export const DASHBOARD_SAMPLE_FLOOR = 10;
+
+/** Generation settings plus model: the first five label parts, before seeds and prompt text. */
+export function workloadGroup(point: Pick): string {
+ return point.workload.split(' · ').slice(0, 5).join(' · ');
+}
+
+/**
+ * Cells the dashboard reads. Published history also carries smoke runs (a few
+ * clips of a shorter plan) and superseded exports, while the chart, cards,
+ * Compare and Evidence must all describe one frozen workload: drop cells under
+ * the sample floor, keep the workload measured on the most hardware (ties: more
+ * cells, then the newer publication), then the newest cell per deployment and
+ * concurrency. Everything else stays visible in the Performance history list.
+ */
+export function dashboardCells(points: VideoPoint[]): {
+ cells: VideoPoint[];
+ workload: string | null;
+ otherWorkloads: number;
+} {
+ const qualified = points.filter((p) => p.samples >= DASHBOARD_SAMPLE_FLOOR);
+ const hardware = new Map>();
+ const cellKeys = new Map>();
+ for (const p of qualified) {
+ const group = workloadGroup(p);
+ const hardwareId = p.hardwareKey ?? p.hardwareName;
+ hardware.set(group, (hardware.get(group) ?? new Set()).add(hardwareId));
+ cellKeys.set(
+ group,
+ (cellKeys.get(group) ?? new Set()).add(
+ `${hardwareId}:${deploymentKey(p)}:${p.concurrency ?? 'na'}`,
+ ),
+ );
+ }
+ let workload: string | null = null;
+ for (const group of hardware.keys()) {
+ if (workload === null) {
+ workload = group;
+ continue;
+ }
+ const byHardware = hardware.get(group)!.size - hardware.get(workload)!.size;
+ if (
+ byHardware > 0 ||
+ (byHardware === 0 && cellKeys.get(group)!.size > cellKeys.get(workload)!.size)
+ )
+ workload = group;
+ }
+ const others = new Set(points.map(workloadGroup));
+ if (workload !== null) others.delete(workload);
+ return {
+ cells:
+ workload === null
+ ? []
+ : latestVideoCells(qualified.filter((p) => workloadGroup(p) === workload)),
+ workload,
+ otherWorkloads: others.size,
+ };
+}
From 50700f7722bf09541e0676baae476fe280362dcc Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Thu, 24 Sep 2026 16:19:20 -0700
Subject: [PATCH 089/104] fix: keep the video dashboard URL write out of the
state updater
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Next.js patches history.replaceState to update its router, and React may run a setState updater during render, so writing the URL inside the updater updated the Router while VideoDashboard rendered. Move the state and URL sync into useVideoDashboardState, which writes the URL from the event handler, and add a regression test that replays the updater under Strict Mode and mounts a router-like subscriber.
中文:Next.js 会拦截 history.replaceState 以更新路由,而 React 可能在渲染期执行 setState 的 updater,因此在 updater 内写 URL 会在 VideoDashboard 渲染时更新 Router。将状态与 URL 同步移入 useVideoDashboardState,在事件处理器中写 URL,并增加回归测试:在 Strict Mode 下重放 updater,并挂载一个模拟路由的订阅组件。
---
.../video-benchmark/VideoDashboard.tsx | 19 +---
.../use-video-dashboard-state.test.tsx | 99 +++++++++++++++++++
.../use-video-dashboard-state.ts | 27 +++++
3 files changed, 129 insertions(+), 16 deletions(-)
create mode 100644 packages/app/src/components/video-benchmark/use-video-dashboard-state.test.tsx
create mode 100644 packages/app/src/components/video-benchmark/use-video-dashboard-state.ts
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index 8c96dd6a6..95b5684be 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -33,13 +33,8 @@ import VideoEvidence from './VideoEvidence';
import VideoHardwareChart, { VIDEO_CHART_ID } from './VideoHardwareChart';
import VideoKpiCards from './VideoKpiCards';
import VideoPointsTable, { videoTableRows } from './VideoPointsTable';
-import {
- DEFAULT_VIDEO_DASHBOARD_STATE,
- metricOptions,
- readVideoDashboardState,
- writeVideoDashboardState,
- type VideoDashboardState,
-} from './video-url-state';
+import { useVideoDashboardState } from './use-video-dashboard-state';
+import { metricOptions } from './video-url-state';
/** History filter params; a deep link carrying one opens the history section on load. */
const HISTORY_SECTION_PARAMS = ['history-hardware', 'history-concurrency', 'history-query'];
@@ -123,22 +118,14 @@ export default function VideoDashboard() {
const locale = useLocale();
const s = STRINGS[locale];
const { points, loading, error, replay, retry } = useVideoPoints();
- const [state, setState] = useState(DEFAULT_VIDEO_DASHBOARD_STATE);
+ const { state, update } = useVideoDashboardState();
const [hidden, setHidden] = useState>(() => new Set());
const [legendExpanded, setLegendExpanded] = useState(true);
const [historyOpen, setHistoryOpen] = useState(false);
useEffect(() => {
- setState(readVideoDashboardState(location.search));
const params = new URLSearchParams(location.search);
setHistoryOpen(HISTORY_SECTION_PARAMS.some((key) => params.has(key)));
}, []);
- const update = useCallback((patch: Partial) => {
- setState((old) => {
- const next = { ...old, ...patch };
- history.replaceState(null, '', writeVideoDashboardState(new URL(location.href), next));
- return next;
- });
- }, []);
const hardwareKeys = useMemo(() => VIDEO_HARDWARE_ROSTER.map((item) => item.key), []);
const { resolveColor, getCssColor } = useThemeColors({
diff --git a/packages/app/src/components/video-benchmark/use-video-dashboard-state.test.tsx b/packages/app/src/components/video-benchmark/use-video-dashboard-state.test.tsx
new file mode 100644
index 000000000..a7c5c7cff
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/use-video-dashboard-state.test.tsx
@@ -0,0 +1,99 @@
+// @vitest-environment jsdom
+import React, { act, StrictMode, useEffect, useState } from 'react';
+import { createRoot, type Root } from 'react-dom/client';
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { useVideoDashboardState } from './use-video-dashboard-state';
+
+type Api = ReturnType;
+
+function Harness({ expose }: { expose: (api: Api) => void }) {
+ const api = useVideoDashboardState();
+ expose(api);
+ return {`${api.state.x}|${api.state.y}`} ;
+}
+
+/**
+ * Stands in for the Next.js app router, which patches history.replaceState
+ * and sets its own state from inside the patch.
+ */
+function RouterLike() {
+ const [, setSynced] = useState(0);
+ useEffect(() => {
+ const original = history.replaceState;
+ history.replaceState = (...args: Parameters) => {
+ original.apply(history, args);
+ setSynced((n) => n + 1);
+ };
+ return () => {
+ history.replaceState = original;
+ };
+ }, []);
+ return null;
+}
+
+let container: HTMLDivElement;
+let root: Root;
+let api: Api;
+
+beforeEach(() => {
+ (globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;
+ history.replaceState(null, '', '/video');
+ container = document.createElement('div');
+ document.body.append(container);
+ root = createRoot(container);
+});
+
+afterEach(() => {
+ act(() => root.unmount());
+ container.remove();
+ vi.restoreAllMocks();
+});
+
+function mount(children: React.ReactNode) {
+ act(() => {
+ root.render({children} );
+ });
+}
+
+describe('useVideoDashboardState', () => {
+ it('reads the URL on load and writes each change back once', () => {
+ history.replaceState(null, '', '/video?v_y=kjPerVideo');
+ const replaceState = vi.spyOn(history, 'replaceState');
+ mount( (api = value)} />);
+ expect(container.textContent).toBe('p90Latency|kjPerVideo');
+
+ replaceState.mockClear();
+ // Two patches in one event: React cannot compute the second one eagerly,
+ // so it runs while rendering, where Strict Mode replays it.
+ act(() => {
+ api.update({ x: 'p50Latency' });
+ api.update({ y: 'dollarsPerVideo' });
+ });
+
+ expect(container.textContent).toBe('p50Latency|dollarsPerVideo');
+ expect(location.search).toBe('?v_y=dollarsPerVideo&v_x=p50Latency');
+ expect(replaceState).toHaveBeenCalledTimes(2);
+ });
+
+ it('never updates the router while the dashboard renders', () => {
+ const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {});
+ mount(
+ <>
+
+ (api = value)} />
+ >,
+ );
+
+ act(() => {
+ api.update({ tier: 'r' });
+ api.update({ view: 'table' });
+ });
+
+ const renderPhaseUpdates = consoleError.mock.calls
+ .map((call) => call.map(String).join(' '))
+ .filter((text) => text.includes('while rendering a different component'));
+ expect(renderPhaseUpdates).toEqual([]);
+ expect(location.search).toBe('?v_tier=r&v_view=table');
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/use-video-dashboard-state.ts b/packages/app/src/components/video-benchmark/use-video-dashboard-state.ts
new file mode 100644
index 000000000..a072e8fb2
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/use-video-dashboard-state.ts
@@ -0,0 +1,27 @@
+import { useCallback, useEffect, useRef, useState } from 'react';
+import {
+ DEFAULT_VIDEO_DASHBOARD_STATE,
+ readVideoDashboardState,
+ writeVideoDashboardState,
+ type VideoDashboardState,
+} from './video-url-state';
+
+/** Chart/table state read from the URL on load and written back on every change. */
+export function useVideoDashboardState() {
+ const [state, setState] = useState(DEFAULT_VIDEO_DASHBOARD_STATE);
+ // Next.js patches history.replaceState to update its router, so the URL write
+ // must stay out of the setState updater, which React may run during render.
+ const latest = useRef(DEFAULT_VIDEO_DASHBOARD_STATE);
+ useEffect(() => {
+ const initial = readVideoDashboardState(location.search);
+ latest.current = initial;
+ setState(initial);
+ }, []);
+ const update = useCallback((patch: Partial) => {
+ const next = { ...latest.current, ...patch };
+ latest.current = next;
+ history.replaceState(null, '', writeVideoDashboardState(new URL(location.href), next));
+ setState(next);
+ }, []);
+ return { state, update };
+}
From 50dae1654d7b695fa387face6bfccb9337bdc5ed Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Thu, 24 Sep 2026 16:57:06 -0700
Subject: [PATCH 090/104] feat: align the video dashboard chrome with the
inference tab
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Wrap the title, description and a Share button in the same Card and DashboardSectionHeader the inference tab uses, and let Share carry the live v_ params through a new v_ share scope. Move the cost tier from Chart config into the chart caption as an inline selector with an export-only text twin. Add an Optimal Only legend switch (v_optimal, on by default like i_optimal) that limits the chart, table and CSV to each hardware's frontier deployments; off, dominated deployments render faded. Fold the Compare and compute-bound evidence sections behind chevrons, opening Compare for v_base/v_cand/v_case deep links.
中文:标题、说明和分享按钮放入与 inference 页相同的 Card 和 DashboardSectionHeader,并通过新增的 v_ 分享范围让分享链接带上当前 v_ 参数。成本档位从图表配置移到图表说明行内选择,附带导出用的纯文本副本。新增图例开关“仅最优”(v_optimal,默认开启,与 i_optimal 一致),开启时图表、表格和 CSV 只包含各硬件的前沿部署,关闭后被支配的部署以淡色显示。Compare 与算力受限证据两个区块默认折叠,携带 v_base/v_cand/v_case 的深链接会自动展开 Compare。
---
docs/videogenx-dashboard.md | 9 +-
.../cypress/component/video-dashboard.cy.tsx | 60 +++++++-
.../app/cypress/e2e/video-dashboard.cy.ts | 23 ++-
.../video-benchmark/VideoConfigBar.tsx | 23 +--
.../video-benchmark/VideoDashboard.tsx | 132 +++++++++++++++---
.../video-benchmark/VideoHardwareChart.tsx | 6 +-
.../video-benchmark/VideoPointsTable.tsx | 18 +--
.../components/video-benchmark/plot.test.ts | 47 ++++++-
.../src/components/video-benchmark/plot.ts | 28 +++-
.../video-benchmark/video-url-state.test.ts | 25 +++-
.../video-benchmark/video-url-state.ts | 6 +
.../app/src/lib/routing/dashboard-routes.ts | 4 +-
.../app/src/lib/routing/url-state.test.ts | 29 ++++
packages/app/src/lib/routing/url-state.ts | 10 +-
14 files changed, 343 insertions(+), 77 deletions(-)
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
index f9c195bfa..ec10a2007 100644
--- a/docs/videogenx-dashboard.md
+++ b/docs/videogenx-dashboard.md
@@ -8,12 +8,13 @@ Published blob indexes → `GET /api/video-runs?format=history` (the per-cell pr
## Axes and defaults
-`video-url-state.ts` owns the `v_*` URL params (`v_x`, `v_y`, `v_tier`, `v_view`, `v_api`); defaults are omitted from the URL and every other param is left alone.
+`video-url-state.ts` owns the `v_*` URL params (`v_x`, `v_y`, `v_tier`, `v_view`, `v_optimal`, `v_api`); defaults are omitted from the URL and every other param is left alone.
- **X = P90 time to video (s)**, lower is better; `p50Latency` is the alternative.
- **Y = videos per $1 TCO** at the _Owning at Large Hyperscaler Volume_ tier; TCO cost per video, videos per GPU-hour and GPU-board energy per video (kJ) are the alternatives. Cost per GPU-hour comes from `HW_REGISTRY` (`costh`/`costr`), the same SemiAnalysis TCO source `/inference` uses; the badge row and source link sit above the chart.
- **Per participating GPU**: every per-GPU metric divides by the boards that generated the clip (4 per video with TP2 × Ulysses 2), never by the boards a job reserved. The retained H100 and B200 jobs reserved eight and used four, so a note under the chart header names them ("B200 (4 of 8), H100 (4 of 8) … the idle boards are not counted") and their KPI card headers read "4 of 8 GPUs". Idle boards are stated, not billed; there is no GPU-basis toggle.
- **Both axes start at zero** (`chart-domain.ts`), so per-dollar and per-video readings compare by length, not by offset.
+- **Chrome mirrors `/inference`**: a `Card` with `DashboardSectionHeader` (title, description, Share) sits above the two config panels; the cost tier is picked inline in the chart caption (`video-cost-tier`, a `SearchableSelect` with an `export-only` text twin) like the inference caption's Cost Tier selector; the Compare and compute-bound evidence sections fold behind a chevron (`CollapsibleSection`), and Compare opens on load for `v_base`/`v_cand`/`v_case` deep links. The video route declares `shareParamScopes: ['v_']`, and `collectTabParams` reads that scope live from the address bar, so Share links carry the current `v_` params.
## Deployments, not concurrency, make the curve
@@ -21,7 +22,7 @@ Published blob indexes → `GET /api/video-runs?format=history` (the per-cell pr
The knob that does trade latency for efficiency is the **deployment**: how many GPU boards serve one request and how they split the model (`tp_size` × `ulysses_degree`). `deployment.ts` keys cells by it (`deploymentKey`), classifies `concurrency > replicas` as queueing (`isQueueing`; bundles that predate `execution.deployment.replica_count` ran one endpoint, so null reads as one), and picks each hardware's most efficient deployment as its representative (`leadCell`, used by the KPI cards, the Compare panel and the legend).
-`plot.ts` (`plotVideoPoints`) then builds the chart from the non-queued cells only: a queued cell never reaches the chart (or the table and CSV) and lives in the evidence panel instead. Per hardware it takes the Pareto frontier over the remaining deployment cells (`frontier.ts` flips lower-is-better axes and reuses `paretoFrontUpperLeft` from the calculator); a solid line appears automatically once a hardware has two or more frontier deployments, and dominated deployments render faded. None of this has a switch — no "show queued requests", no "optimal only", no cross-hardware frontier — so every reader sees the same chart.
+`plot.ts` (`plotVideoPoints`) then builds the chart from the non-queued cells only: a queued cell never reaches the chart (or the table and CSV) and lives in the evidence panel instead. Per hardware it takes the Pareto frontier over the remaining deployment cells (`frontier.ts` flips lower-is-better axes and reuses `paretoFrontUpperLeft` from the calculator); a solid line appears automatically once a hardware has two or more frontier deployments, and dominated deployments render faded. The one switch is **Optimal Only** in the legend (`v_optimal`, on by default, mirroring the inference tab's `i_optimal`): on, the chart, the table and the CSV (`listedVideoCells`) carry only the frontier deployments; off, dominated deployments join, faded on the chart. There is no "show queued requests" switch and no cross-hardware frontier.
Today every hardware has exactly one measured deployment (4 GPUs per video, TP2 × Ulysses 2), so the chart is an honest three-point scatter and the caption says a per-hardware curve needs the GPUs-per-video sweep. That sweep (design plan P6) is backend work in InferenceX `experimental/video-generation` — the serving matrix currently varies only concurrency — and needs GPU authorisation; the frontend needs no change when its cells arrive, because they differ in `deploymentKey` and therefore add points rather than replace them.
@@ -42,8 +43,8 @@ Today every hardware has exactly one measured deployment (4 GPUs per video, TP2
## 中文说明
-`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;已发布结果的“性能历史”列表收进可展开区块,`history-*` 深链接会自动展开;原有的按运行查看、trade-off 图表与 CI 运行浏览已移除。仪表板只取硬件覆盖最广的那个工作负载,并剔除有效视频不足 10 条的 cell(与 P90 门槛一致),因此较短 plan 的 smoke 运行不会成为图上的点、KPI 领先部署或 Compare 的一方,但仍会出现在性能历史列表中;工作负载一栏会注明隐藏的其他工作负载数量。`video-url-state.ts` 管理 `v_x`、`v_y`、`v_tier`、`v_view`、`v_api` 五个 URL 参数,默认值不写入 URL。X 轴可选 P90(默认)或 P50 出片时间;Y 轴可选每 1 美元 TCO 视频数(默认,Hyperscaler 自有设备档位,单价与 `/inference` 同源)、每条视频 TCO 成本、每 GPU 小时视频数和每条视频 GPU 板卡能耗(kJ)。所有按 GPU 计的指标都以参与计算的 GPU 为分母(每条视频 4 张,TP2 × Ulysses 2),而不是任务预留的板卡数;保留数据中 H100 与 B200 的运行预留了 8 张却只用 4 张,图表标题下方的说明会点名这些硬件,对应 KPI 卡标题显示“4 / 8 张 GPU”。空闲板卡只作说明、不计成本,没有 GPU 口径切换。两条坐标轴都从 0 起,便于按长度比较。
+`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;已发布结果的“性能历史”列表收进可展开区块,`history-*` 深链接会自动展开;原有的按运行查看、trade-off 图表与 CI 运行浏览已移除。仪表板只取硬件覆盖最广的那个工作负载,并剔除有效视频不足 10 条的 cell(与 P90 门槛一致),因此较短 plan 的 smoke 运行不会成为图上的点、KPI 领先部署或 Compare 的一方,但仍会出现在性能历史列表中;工作负载一栏会注明隐藏的其他工作负载数量。`video-url-state.ts` 管理 `v_x`、`v_y`、`v_tier`、`v_view`、`v_optimal`、`v_api` 六个 URL 参数,默认值不写入 URL。页面外观与 `/inference` 对齐:标题、说明和分享按钮放在同一张 Card 的 DashboardSectionHeader 中,两组配置面板位于其下;成本档位改为在图表说明行内选择;Compare 与算力受限证据两个区块默认折叠,携带 `v_base`/`v_cand`/`v_case` 的深链接会自动展开 Compare;分享按钮会带上当前的 `v_` 参数。X 轴可选 P90(默认)或 P50 出片时间;Y 轴可选每 1 美元 TCO 视频数(默认,Hyperscaler 自有设备档位,单价与 `/inference` 同源)、每条视频 TCO 成本、每 GPU 小时视频数和每条视频 GPU 板卡能耗(kJ)。所有按 GPU 计的指标都以参与计算的 GPU 为分母(每条视频 4 张,TP2 × Ulysses 2),而不是任务预留的板卡数;保留数据中 H100 与 B200 的运行预留了 8 张却只用 4 张,图表标题下方的说明会点名这些硬件,对应 KPI 卡标题显示“4 / 8 张 GPU”。空闲板卡只作说明、不计成本,没有 GPU 口径切换。两条坐标轴都从 0 起,便于按长度比较。
-曲线来自部署而不是并发:pinned H3 服务是 batch-one、单副本,客户端并发只会排队(保留数据中 C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 线性增长),把这些点连起来画出的只是队列,因此图表绝不连接它们。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表(KPI 卡、Compare 面板和图例都用它);`plot.ts` 只用未排队的 cell 绘图——排队 cell 不会进入图表、表格和 CSV,只出现在证据面板——再按硬件对剩余部署点求 Pareto 前沿:某硬件有两个及以上前沿部署时自动画出实线,被支配的部署以淡色显示。这些行为都没有开关,没有“显示排队请求”,没有“仅最优”,也没有跨硬件前沿,所有读者看到的是同一张图。目前每种硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的三点散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
+曲线来自部署而不是并发:pinned H3 服务是 batch-one、单副本,客户端并发只会排队(保留数据中 C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 线性增长),把这些点连起来画出的只是队列,因此图表绝不连接它们。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表(KPI 卡、Compare 面板和图例都用它);`plot.ts` 只用未排队的 cell 绘图——排队 cell 不会进入图表、表格和 CSV,只出现在证据面板——再按硬件对剩余部署点求 Pareto 前沿:某硬件有两个及以上前沿部署时自动画出实线,被支配的部署以淡色显示。唯一的开关是图例中的“仅最优”(`v_optimal`,默认开启,与 inference 页的 `i_optimal` 一致):开启时图表、表格和 CSV 只包含前沿部署,关闭后被支配的部署以淡色加入图表;没有“显示排队请求”开关,也没有跨硬件前沿。目前每种硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的三点散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
图表下方还有三个区块。带日期、可编辑的 API 参考价(`v_api`,来自网页搜索,标注采集日期与区间,不是官方报价)只推导一个数字——每条视频 API 标价(单价 × 视频秒数),显示在 KPI 卡每条视频 TCO 成本旁边,并作为表格和 CSV 的一列;它不进入图表,也不再推导收入、利润或价格倍数。价格缺失或不为正时该值为 null,`parseApiPrice` 会回退到参考价,而不是按 0 计价。Arena 式 Compare 以视频为主:同一 prompt 与 seed 在两种硬件上的视频并排播放,支持同步播放/暂停/重播和上一个/下一个用例箭头,没有盲测模式,也没有用例下拉框;下方的差值行固定为出片时间(P50)、每条视频 TCO 成本和每条视频能耗,并以脚注注明成本档位。每种硬件只有一个可选 cell(其代表部署),默认以最慢的硬件为基线、最快的为候选,选择记录在 `v_base`、`v_cand`、`v_case` 中;面板滚入视口时才加载两个已发布产物,HTTP 204 读作“未发布视频”而不是错误。compute-bound 证据面板展示板卡功率相对生效上限、并发排队平台(排队 cell 唯一出现的地方)以及相对带宽/FLOPS 规格比的实测加速比,所有硬件都读取它们共有的部署布局,比值无法区分时措辞保持保守。
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index 7e7da209e..7f653410e 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -81,7 +81,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
.and('contain', '431.1');
kpi('h100').should('not.contain', 'Profit').and('not.contain', 'Board power');
});
- it('states model, workload and deployment as facts and offers no GPU basis or legend switches', () => {
+ it('states model, workload and deployment as facts; the legend offers only Optimal Only', () => {
mount();
cy.get('[data-testid="video-config-fact"]').should(($facts) => {
expect([...$facts].map((el) => el.textContent)).to.deep.equal([
@@ -94,20 +94,38 @@ describe('Video hardware dashboard (retained fixture)', () => {
expect([...$boxes].map((el) => el.getAttribute('aria-label'))).to.deep.equal([
'X-axis metric',
'Y-axis metric',
- 'Cost tier',
]);
});
cy.get('[role="combobox"][aria-label="GPU basis"]').should('not.exist');
+ // Same chrome as /inference: title, description and Share in one card above the panels,
+ // the cost tier picked in the chart caption, Compare and the evidence folded away.
+ cy.get('[data-testid="video-dashboard"] h1').should(
+ 'contain',
+ 'VideoGenX · MiniMax-H3 across hardware',
+ );
+ cy.get('[data-testid="share-button"]').should('exist');
+ cy.get('[data-testid="video-config-bar"]').should('not.contain', 'Cost tier');
+ cy.get('[data-testid="video-cost-tier"]').should(
+ 'contain',
+ 'Owning at Large Hyperscaler Volume',
+ );
+ cy.get('[data-testid="video-compare"]').should('not.exist');
+ cy.get('[data-testid="video-compare-toggle"]').should('have.attr', 'aria-expanded', 'false');
+ cy.get('[data-testid="video-evidence-toggle"]').should('have.attr', 'aria-expanded', 'false');
+ cy.contains('[data-testid="video-dashboard"] h2', 'Compare');
+ cy.contains('[data-testid="video-dashboard"] h2', 'Compute-bound evidence');
cy.get('[data-testid="video-legend"]').should('contain', 'H100').and('contain', 'MI355X');
- cy.get('[data-testid="video-legend"] [role="switch"]').should('not.exist');
+ cy.get('[data-testid="video-legend"] [role="switch"]').should('have.length', 1);
+ cy.get('[data-testid="video-optimal-only"]').should('have.attr', 'aria-checked', 'true');
+ cy.get('[data-testid="video-legend"]').should('contain', 'Optimal Only');
for (const id of ['video-queue', 'video-optimal', 'video-frontier'])
cy.get(`[data-testid="${id}"]`).should('not.exist');
cy.get('[data-testid="video-idle-note"]').should('have.text', IDLE_NOTE);
});
it('switches the cost tier, repricing the cards, the badges and the URL', () => {
mount();
- cy.get('[role="combobox"][aria-label="Cost tier"]').click();
- cy.contains('[role="option"]', 'Rent - 3 Year Commit').click();
+ cy.get('[data-testid="video-cost-tier"]').click();
+ cy.get('[data-testid="video-cost-tier-r"]').click();
// $2.90/GPU-hr ÷ 5.9732 videos/GPU-hr = 0.48550 → three decimals.
kpi('h200').should('contain', '$0.485');
kpi('h100').should('contain', '$0.372');
@@ -229,6 +247,32 @@ describe('Video hardware dashboard (retained fixture)', () => {
kpi('h200').should('contain', 'API list $0.272');
cy.location('search').should('not.contain', 'v_api');
});
+ it('toggles Optimal Only from the legend and restores it from v_optimal', () => {
+ mount('/video', '?v_optimal=0');
+ cy.get('[data-testid="video-optimal-only"]').should('have.attr', 'aria-checked', 'false');
+ // Every fixture deployment is on its hardware's frontier, so the switch changes no point here.
+ points().should('have.length', 3);
+ cy.get('[data-testid="video-optimal-only"]').click();
+ cy.get('[data-testid="video-optimal-only"]').should('have.attr', 'aria-checked', 'true');
+ cy.location('search').should('not.contain', 'v_optimal');
+ cy.get('[data-testid="video-optimal-only"]').click();
+ cy.location('search').should('contain', 'v_optimal=0');
+ points().should('have.length', 3);
+ });
+ it('folds Compare and the evidence by default and opens Compare for compare deep links', () => {
+ mount();
+ cy.get('[data-testid="video-compare"]').should('not.exist');
+ cy.get('[data-testid="video-compare-toggle"]').click();
+ cy.get('[data-testid="video-compare"]').should('exist');
+ cy.get('[data-testid="video-compare-toggle"]').should('have.attr', 'aria-expanded', 'true');
+ cy.get('[data-testid="video-evidence-toggle"]').click();
+ cy.get('[data-testid="video-evidence-toggle"]').should('have.attr', 'aria-expanded', 'true');
+ cy.contains('h2', 'Compute-bound evidence').should('have.length', 1);
+ mount('/video', '?v_cand=h200');
+ cy.get('[data-testid="video-compare"]').should('exist');
+ cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H200');
+ cy.get('[data-testid="video-evidence-toggle"]').should('have.attr', 'aria-expanded', 'false');
+ });
it('shows placeholders while loading instead of a false "Not measured"', () => {
cy.intercept('GET', '/api/video-runs?format=history&page=1', (req) => {
req.reply({ fixture: 'api/video-history.json', delay: 800 });
@@ -276,10 +320,14 @@ describe('Video hardware dashboard (retained fixture)', () => {
'部署4 张 GPU · TP2 × Ulysses 2',
]);
});
+ cy.get('[data-testid="video-cost-tier"]').should('contain', 'Hyperscaler 自有设备');
+ cy.get('[data-testid="video-legend"]').should('contain', '仅最优');
+ cy.contains('[data-testid="video-dashboard"] h2', '对比');
+ cy.contains('[data-testid="video-dashboard"] h2', '算力受限(compute-bound)的证据');
cy.get('[data-testid="video-config-bar"]')
.should('contain', 'X 轴指标')
.and('contain', 'Y 轴指标')
- .and('contain', '成本档位')
+ .and('not.contain', '成本档位')
.and('contain', 'API 参考价($/video-s)')
.and('contain', '采集于 2026-09-19');
cy.contains('button', '表格').click();
diff --git a/packages/app/cypress/e2e/video-dashboard.cy.ts b/packages/app/cypress/e2e/video-dashboard.cy.ts
index 5fc3cba80..0bf15ff1c 100644
--- a/packages/app/cypress/e2e/video-dashboard.cy.ts
+++ b/packages/app/cypress/e2e/video-dashboard.cy.ts
@@ -41,19 +41,26 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
.eq(2)
.should('contain', 'Deployment')
.and('contain', '4 GPU · TP2 × Ulysses 2');
- cy.get('[data-testid="video-config-bar"] [role="combobox"]').should('have.length', 3);
+ cy.get('[data-testid="video-config-bar"] [role="combobox"]').should('have.length', 2);
cy.get('[data-testid="video-config-bar"] [role="combobox"]')
.eq(0)
.should('contain', 'P90 time to video (s)');
cy.get('[data-testid="video-config-bar"] [role="combobox"]')
.eq(1)
.should('contain', 'GPU-board energy per video (kJ)');
- cy.get('[data-testid="video-config-bar"] [role="combobox"]')
- .eq(2)
- .should('contain', 'Rent - 3 Year Commit');
+ // The cost tier is picked in the chart caption, as on /inference.
+ cy.get('[data-testid="video-cost-tier"]').should('contain', 'Rent - 3 Year Commit');
cy.get('[data-testid="video-config-bar"]').should('not.contain', 'GPU basis');
cy.get('[data-testid="video-legend"]').should('contain', 'MI355X · not measured');
- cy.get('[data-testid="video-legend"] [role="switch"]').should('not.exist');
+ cy.get('[data-testid="video-legend"] [role="switch"]').should('have.length', 1);
+ cy.get('[data-testid="video-optimal-only"]').should('have.attr', 'aria-checked', 'true');
+ cy.get('[data-testid="video-dashboard"] h1').should(
+ 'contain',
+ 'VideoGenX · MiniMax-H3 across hardware',
+ );
+ cy.get('[data-testid="share-button"]').should('be.visible');
+ cy.get('[data-testid="video-compare-toggle"]').should('have.attr', 'aria-expanded', 'false');
+ cy.get('[data-testid="video-evidence-toggle"]').should('have.attr', 'aria-expanded', 'false');
// KPI cards read each hardware's lead deployment at the selected tier (Rent - 3 Year Commit:
// $2 / $2.9 / $3.7 per GPU-hour); the API list price sits beside the TCO cost.
cy.get('[data-testid="video-kpi-card"]').should('have.length', 4);
@@ -166,6 +173,7 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
});
it('compares the slowest lead deployment against the fastest with time, cost and energy deltas', () => {
cy.visit('/video');
+ cy.get('[data-testid="video-compare-toggle"]').click();
cy.get('[data-testid="video-compare"]').scrollIntoView();
cy.wait('@media');
// Default pair: slowest C1 P50 (H100) as baseline, fastest (B200) as candidate. Two hardware
@@ -234,8 +242,9 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
.should('contain', '模型')
.and('contain', '工作负载')
.and('contain', '4 张 GPU · TP2 × Ulysses 2')
- .and('contain', 'X 轴指标')
- .and('contain', '成本档位');
+ .and('contain', 'X 轴指标');
+ cy.get('[data-testid="video-cost-tier"]').should('contain', 'Hyperscaler 自有设备');
+ cy.get('[data-testid="video-legend"]').should('contain', '仅最优');
cy.get('[data-testid="video-kpi-card"][data-hardware="b200"]')
.should('contain', 'TCO / 条视频')
.and('contain', '$0.150')
diff --git a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
index 2eea0b2fa..b20aa8ebb 100644
--- a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
+++ b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
@@ -3,16 +3,7 @@
import { ControlPanel } from '@/components/ui/control-panel';
import { track } from '@/lib/analytics';
import { useLocale } from '@/lib/use-locale';
-import type { CostTier } from './hardware';
-import {
- COST_TIERS,
- metricLabel,
- TIER_LABELS,
- X_METRICS,
- Y_METRICS,
- type XMetricId,
- type YMetricId,
-} from './metrics';
+import { metricLabel, X_METRICS, Y_METRICS, type XMetricId, type YMetricId } from './metrics';
import VideoApiReference from './VideoApiReference';
import VideoSelect from './VideoSelect';
import { metricOptions, type VideoDashboardState } from './video-url-state';
@@ -26,7 +17,6 @@ const STRINGS = {
deployment: 'Deployment',
x: 'X-axis metric',
y: 'Y-axis metric',
- tier: 'Cost tier',
},
zh: {
benchmark: '基准测试配置',
@@ -36,7 +26,6 @@ const STRINGS = {
deployment: '部署',
x: 'X 轴指标',
y: 'Y 轴指标',
- tier: '成本档位',
},
};
@@ -54,7 +43,7 @@ function Fact({ label, value }: { label: string; value: string }) {
* Two control panels mirroring the inference tab: what is being compared
* (frozen for this campaign, so model, workload and deployment are stated,
* not selectable, beside the one editable input, the API list price) and
- * how it is plotted (axes and cost tier).
+ * how it is plotted (the axes; the cost tier sits in the chart caption).
*/
export default function VideoConfigBar({
state,
@@ -85,7 +74,7 @@ export default function VideoConfigBar({
onChange({ apiPrice })} />
-
+
change('y', value as YMetricId)}
options={Y_METRICS.map((id) => ({ value: id, label: metricLabel(id, locale, options) }))}
/>
- change('tier', value as CostTier)}
- options={COST_TIERS.map((tier) => ({ value: tier, label: TIER_LABELS[tier][locale] }))}
- />
);
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index 95b5684be..5ec4c666d 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -7,15 +7,22 @@ import {
TCO_SOURCE_URL,
} from '@semianalysisai/inferencex-constants';
import { Button } from '@/components/ui/button';
+import { Card } from '@/components/ui/card';
import ChartLegend from '@/components/ui/chart-legend';
import { ChartSection } from '@/components/ui/chart-section';
+import { CollapsibleSection } from '@/components/ui/collapsible-section';
+import { DashboardSectionHeader } from '@/components/ui/dashboard-section-header';
import { Heading } from '@/components/ui/heading';
+import { captionControlTriggerClassName } from '@/components/ui/result-context';
+import { SearchableSelect } from '@/components/ui/searchable-select';
+import { ShareButton } from '@/components/ui/share-button';
import { useThemeColors } from '@/hooks/useThemeColors';
import { track } from '@/lib/analytics';
import { useLocale } from '@/lib/use-locale';
import { isQueueing, layoutLabel, leadCell } from './deployment';
-import { costPerGpuHour, hardwareLabel, VIDEO_HARDWARE_ROSTER } from './hardware';
+import { costPerGpuHour, hardwareLabel, VIDEO_HARDWARE_ROSTER, type CostTier } from './hardware';
import {
+ COST_TIERS,
metricLabel,
metricValue,
TIER_LABELS,
@@ -38,6 +45,8 @@ import { metricOptions } from './video-url-state';
/** History filter params; a deep link carrying one opens the history section on load. */
const HISTORY_SECTION_PARAMS = ['history-hardware', 'history-concurrency', 'history-query'];
+/** Compare choices; a deep link carrying one opens the Compare section on load. */
+const COMPARE_SECTION_PARAMS = ['v_base', 'v_cand', 'v_case'];
const CSV_METRICS: readonly MetricId[] = [
'p50Latency',
'p90Latency',
@@ -57,6 +66,13 @@ const STRINGS = {
chart: 'Chart',
table: 'Table',
viewToggle: 'Chart or table view',
+ optimalOnly: 'Optimal Only',
+ optimalInfo:
+ "Show only each hardware's Pareto-optimal deployments for the selected axes; turn off to see the dominated deployments faded.",
+ compare: 'Compare',
+ evidence: 'Compute-bound evidence',
+ toggleCompare: 'Show or hide the Compare section',
+ toggleEvidence: 'Show or hide the compute-bound evidence',
tier: 'Cost tier',
badges: 'TCO $/chip/hr',
source: 'Source',
@@ -84,6 +100,12 @@ const STRINGS = {
chart: '图表',
table: '表格',
viewToggle: '图表或表格视图',
+ optimalOnly: '仅最优',
+ optimalInfo: '只显示各硬件在当前坐标轴下的 Pareto 最优部署;关闭后以淡色显示被支配的部署。',
+ compare: '对比',
+ evidence: '算力受限(compute-bound)的证据',
+ toggleCompare: '展开或收起“对比”区块',
+ toggleEvidence: '展开或收起算力受限证据',
tier: '成本档位',
badges: 'TCO $/chip/hr',
source: '来源',
@@ -122,9 +144,11 @@ export default function VideoDashboard() {
const [hidden, setHidden] = useState>(() => new Set());
const [legendExpanded, setLegendExpanded] = useState(true);
const [historyOpen, setHistoryOpen] = useState(false);
+ const [compareOpen, setCompareOpen] = useState(false);
useEffect(() => {
const params = new URLSearchParams(location.search);
setHistoryOpen(HISTORY_SECTION_PARAMS.some((key) => params.has(key)));
+ setCompareOpen(COMPARE_SECTION_PARAMS.some((key) => params.has(key)));
}, []);
const hardwareKeys = useMemo(() => VIDEO_HARDWARE_ROSTER.map((item) => item.key), []);
@@ -205,7 +229,7 @@ export default function VideoDashboard() {
});
const exportCsv = () => {
- const rows = videoTableRows(cells, hidden);
+ const rows = videoTableRows(cells, hidden, state);
const header = [
'hardware',
'concurrency',
@@ -257,19 +281,25 @@ export default function VideoDashboard() {
return (
-
-
- {s.title}
-
-
{s.subtitle}
-
-
+
-
-
- {s.tier}: {TIER_LABELS[state.tier][locale]}
+
+
+ {s.tier}: {' '}
+
+ {
+ update({ tier: value as CostTier });
+ track('video_tier_changed', { value });
+ }}
+ placeholder={s.tier}
+ initialLabel={TIER_LABELS[state.tier][locale]}
+ searchable={false}
+ trackPrefix="video_cost_tier"
+ size="sm"
+ className={captionControlTriggerClassName}
+ contentClassName="w-72"
+ groups={[
+ {
+ label: '',
+ options: COST_TIERS.map((tier) => ({
+ value: tier,
+ label: TIER_LABELS[tier][locale],
+ testId: `video-cost-tier-${tier}`,
+ })),
+ },
+ ]}
+ />
+
+ {TIER_LABELS[state.tier][locale]}
{s.badges}:
@@ -334,7 +393,7 @@ export default function VideoDashboard() {
{TCO_SOURCE_TITLE}
-
+
{idle.length > 0 && (
{s.idle(idle.join(locale === 'zh' ? '、' : ', '))}
@@ -385,6 +444,18 @@ export default function VideoDashboard() {
isLegendExpanded={legendExpanded}
onExpandedChange={setLegendExpanded}
disableActiveSort
+ switches={[
+ {
+ id: 'video-optimal-only',
+ label: s.optimalOnly,
+ checked: state.optimal,
+ infoTooltip: s.optimalInfo,
+ onCheckedChange: (checked) => {
+ update({ optimal: checked });
+ track('video_optimal_toggled', { enabled: checked });
+ },
+ },
+ ]}
/>
@@ -392,10 +463,29 @@ export default function VideoDashboard() {
+ {/* These mount after the first fetch resolves, so the deep-link flag read on mount is settled. */}
{!loading && !error && (
<>
-
-
+ track('video_compare_section_toggled', { open })}
+ >
+
+
+ track('video_evidence_section_toggled', { open })}
+ >
+
+
>
)}
- {multiLayout ? s.multi : s.single(layouts || '—')}
+ {multiLayout ? (state.optimal ? s.multiOptimal : s.multi) : s.single(layouts || '—')}
}
/>
diff --git a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
index c9ccc77cf..aecdf75aa 100644
--- a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
+++ b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
@@ -2,10 +2,10 @@
import { DataTable, type DataTableColumn } from '@/components/ui/data-table';
import { useLocale } from '@/lib/use-locale';
-import { isQueueing, layoutLabel } from './deployment';
+import { layoutLabel } from './deployment';
import { hardwareLabel } from './hardware';
import { formatMetric, metricLabel, metricValue, type MetricId, type VideoPoint } from './metrics';
-import { latestVideoCells } from './points';
+import { listedVideoCells } from './plot';
import { metricOptions, type VideoDashboardState } from './video-url-state';
const STRINGS = {
@@ -35,11 +35,13 @@ const METRIC_COLUMNS: readonly MetricId[] = [
'powerPctCap',
];
-/** Rows for the plotted cells: every measured deployment, plus provenance. Queued cells stay in the evidence panel. */
-export function videoTableRows(points: VideoPoint[], hidden: ReadonlySet): VideoPoint[] {
- return latestVideoCells(points).filter(
- (p) => p.hardwareKey && !hidden.has(p.hardwareKey) && !isQueueing(p),
- );
+/** Rows for the plotted cells, plus provenance. Queued cells stay in the evidence panel. */
+export function videoTableRows(
+ points: VideoPoint[],
+ hidden: ReadonlySet,
+ state: VideoDashboardState,
+): VideoPoint[] {
+ return listedVideoCells(points, state, hidden);
}
export default function VideoPointsTable({
@@ -54,7 +56,7 @@ export default function VideoPointsTable({
const locale = useLocale();
const s = STRINGS[locale];
const options = metricOptions(state);
- const rows = videoTableRows(points, hidden);
+ const rows = videoTableRows(points, hidden, state);
const columns: DataTableColumn[] = [
{
header: s.hardware,
diff --git a/packages/app/src/components/video-benchmark/plot.test.ts b/packages/app/src/components/video-benchmark/plot.test.ts
index 72730b6cd..d1799efdd 100644
--- a/packages/app/src/components/video-benchmark/plot.test.ts
+++ b/packages/app/src/components/video-benchmark/plot.test.ts
@@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest';
import history from '../../../cypress/fixtures/api/video-history.json';
import type { VideoHistoryPage } from './history';
import { X_METRICS, Y_METRICS, type VideoPoint } from './metrics';
-import { plotVideoPoints } from './plot';
+import { listedVideoCells, plotVideoPoints } from './plot';
import { videoPoints } from './points';
import { DEFAULT_VIDEO_DASHBOARD_STATE, type VideoDashboardState } from './video-url-state';
@@ -90,8 +90,8 @@ const plot = (
const ids = (points: { id: string }[]) => points.map((p) => p.id);
describe('plotVideoPoints', () => {
- it('builds a per-hardware frontier over deployments and marks the points on it', () => {
- const out = plot([...h200, b200]);
+ it('builds a per-hardware frontier over deployments and, with Optimal Only off, draws the dominated ones faded', () => {
+ const out = plot([...h200, b200], { ...state, optimal: false });
expect(Object.keys(out).toSorted()).toEqual(['frontiers', 'multiLayout', 'plotted']);
expect(ids(out.frontiers.h200)).toEqual(['h200-8g', 'h200-4g-c1', 'h200-2g']);
expect(ids(out.frontiers.b200)).toEqual(['b200-4g']);
@@ -171,3 +171,44 @@ describe('plotVideoPoints', () => {
expect(out.frontiers).not.toHaveProperty('b200');
});
});
+
+describe('Optimal Only', () => {
+ it('hides dominated deployments by default without moving the frontiers', () => {
+ const on = plot([...h200, b200]);
+ const off = plot([...h200, b200], { ...state, optimal: false });
+ expect(ids(on.plotted)).toEqual(['h200-4g-c1', 'h200-8g', 'h200-2g', 'b200-4g']);
+ expect(on.plotted.every((p) => p.optimal)).toBe(true);
+ expect(ids(on.frontiers.h200)).toEqual(ids(off.frontiers.h200));
+ expect(ids(on.frontiers.b200)).toEqual(ids(off.frontiers.b200));
+ expect(on.multiLayout).toBe(true);
+ });
+ it('lists the same cells in the table: frontier only when on, every non-queued deployment when off', () => {
+ const points = [...h200, queued, b200];
+ expect(ids(listedVideoCells(points, state, new Set()))).toEqual([
+ 'h200-4g-c1',
+ 'h200-8g',
+ 'h200-2g',
+ 'b200-4g',
+ ]);
+ expect(ids(listedVideoCells(points, { ...state, optimal: false }, new Set()))).toEqual([
+ 'h200-4g-c1',
+ 'h200-8g',
+ 'h200-2g',
+ 'h200-4g-tp4',
+ 'b200-4g',
+ ]);
+ expect(ids(listedVideoCells(points, state, new Set(['h200'])))).toEqual(['b200-4g']);
+ });
+ it('lists a cell without a value on the selected axis only when Optimal Only is off', () => {
+ const unmetered = cell({
+ id: 'h200-4g-nopower',
+ energyKj: null,
+ server: { tp: 1, ulysses: 4, attention: null },
+ });
+ const energy: VideoDashboardState = { ...state, y: 'kjPerVideo' };
+ expect(ids(listedVideoCells([base, unmetered], energy, new Set()))).toEqual(['h200-4g-c1']);
+ expect(
+ ids(listedVideoCells([base, unmetered], { ...energy, optimal: false }, new Set())),
+ ).toEqual(['h200-4g-c1', 'h200-4g-nopower']);
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/plot.ts b/packages/app/src/components/video-benchmark/plot.ts
index c0f1b3b8a..a3dca3cb7 100644
--- a/packages/app/src/components/video-benchmark/plot.ts
+++ b/packages/app/src/components/video-benchmark/plot.ts
@@ -15,7 +15,7 @@ export interface PlottedVideoPoint extends VideoPoint {
}
export interface VideoPlot {
- /** Deployment cells to draw, one per hardware until a GPUs-per-video sweep lands. */
+ /** Deployment cells to draw: the frontier cells, plus the dominated ones when Optimal Only is off. */
plotted: PlottedVideoPoint[];
/** Per-hardware Pareto frontier over its deployment cells, ascending x; lines need two or more. */
frontiers: Record;
@@ -67,5 +67,29 @@ export function plotVideoPoints(
for (const p of frontiers[key]) p.optimal = true;
if (new Set(list.map(deploymentKey)).size > 1) multiLayout = true;
}
- return { plotted, frontiers, multiLayout };
+ return {
+ plotted: state.optimal ? plotted.filter((p) => p.optimal) : plotted,
+ frontiers,
+ multiLayout,
+ };
+}
+
+/**
+ * Cells the table and CSV list: what the chart draws. With Optimal Only on,
+ * each hardware's frontier deployments for the selected axes; off, every
+ * non-queued deployment, including cells without a value on an axis.
+ */
+export function listedVideoCells(
+ points: VideoPoint[],
+ state: VideoDashboardState,
+ hidden: ReadonlySet,
+): VideoPoint[] {
+ const rows = latestVideoCells(points).filter(
+ (p) => p.hardwareKey && !hidden.has(p.hardwareKey) && !isQueueing(p),
+ );
+ if (!state.optimal) return rows;
+ const optimal = new Set(
+ plotVideoPoints(points, state, () => '', hidden).plotted.map((p) => p.id),
+ );
+ return rows.filter((p) => optimal.has(p.id));
}
diff --git a/packages/app/src/components/video-benchmark/video-url-state.test.ts b/packages/app/src/components/video-benchmark/video-url-state.test.ts
index 48c12a888..db56a12d6 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.test.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.test.ts
@@ -31,8 +31,17 @@ describe('video dashboard URL state', () => {
});
it('reads every supported param', () => {
expect(
- readVideoDashboardState('?v_x=p50Latency&v_y=kjPerVideo&v_tier=r&v_view=table&v_api=0.047'),
- ).toEqual({ x: 'p50Latency', y: 'kjPerVideo', tier: 'r', view: 'table', apiPrice: 0.047 });
+ readVideoDashboardState(
+ '?v_x=p50Latency&v_y=kjPerVideo&v_tier=r&v_view=table&v_optimal=0&v_api=0.047',
+ ),
+ ).toEqual({
+ x: 'p50Latency',
+ y: 'kjPerVideo',
+ tier: 'r',
+ view: 'table',
+ optimal: false,
+ apiPrice: 0.047,
+ });
expect([...X_METRICS]).toEqual(['p90Latency', 'p50Latency']);
expect([...Y_METRICS]).toEqual([
'videosPerDollar',
@@ -58,6 +67,18 @@ describe('video dashboard URL state', () => {
expect(parseApiPrice(0.0001)).toBe(0.0001);
expect(readVideoDashboardState('?v_api=1e-2').apiPrice).toBe(0.01);
});
+ it('mirrors the inference tab: Optimal Only is on unless v_optimal is exactly 0', () => {
+ expect(DEFAULT_VIDEO_DASHBOARD_STATE.optimal).toBe(true);
+ expect(readVideoDashboardState('?v_optimal=0').optimal).toBe(false);
+ for (const on of ['1', 'true', 'off', '']) {
+ expect(readVideoDashboardState(`?v_optimal=${on}`).optimal).toBe(true);
+ }
+ const url = new URL('https://x.test/video');
+ const off = writeVideoDashboardState(url, { ...DEFAULT_VIDEO_DASHBOARD_STATE, optimal: false });
+ expect(off.search).toBe('?v_optimal=0');
+ expect(readVideoDashboardState(off.search).optimal).toBe(false);
+ expect(writeVideoDashboardState(off, DEFAULT_VIDEO_DASHBOARD_STATE).search).toBe('');
+ });
it('writes only non-default params and keeps unrelated params', () => {
const url = new URL('https://x.test/video?run=1&view=results');
const out = writeVideoDashboardState(url, {
diff --git a/packages/app/src/components/video-benchmark/video-url-state.ts b/packages/app/src/components/video-benchmark/video-url-state.ts
index 9b4e22b99..f1d024942 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.ts
@@ -14,6 +14,8 @@ export interface VideoDashboardState {
y: YMetricId;
tier: CostTier;
view: 'chart' | 'table';
+ /** Only each hardware's Pareto-optimal deployments; off, dominated deployments join, faded. */
+ optimal: boolean;
/** USD per video-second the API list price assumes; the dated reference unless the reader overrides it. */
apiPrice: number;
}
@@ -23,6 +25,7 @@ export const DEFAULT_VIDEO_DASHBOARD_STATE: VideoDashboardState = {
y: 'videosPerDollar',
tier: 'h',
view: 'chart',
+ optimal: true,
apiPrice: H3_API_REFERENCE.pricePerVideoSecondUsd,
};
@@ -59,6 +62,8 @@ export function readVideoDashboardState(search: string): VideoDashboardState {
y: pick(Y_METRICS, p.get('v_y'), d.y),
tier: pick(COST_TIERS, p.get('v_tier'), d.tier),
view: pick(VIEWS, p.get('v_view'), d.view),
+ // Same shape as the inference tab's `i_optimal`: on unless the URL says `0`.
+ optimal: p.get('v_optimal') !== '0',
apiPrice: parseApiPrice(p.get('v_api')) ?? d.apiPrice,
};
}
@@ -73,6 +78,7 @@ export function writeVideoDashboardState(url: URL, state: VideoDashboardState):
set('v_y', state.y === d.y ? null : state.y);
set('v_tier', state.tier === d.tier ? null : state.tier);
set('v_view', state.view === d.view ? null : state.view);
+ set('v_optimal', state.optimal ? null : '0');
const apiPrice = parseApiPrice(state.apiPrice);
set('v_api', apiPrice === null || apiPrice === d.apiPrice ? null : String(apiPrice));
return out;
diff --git a/packages/app/src/lib/routing/dashboard-routes.ts b/packages/app/src/lib/routing/dashboard-routes.ts
index 69ca37208..76e6e27f3 100644
--- a/packages/app/src/lib/routing/dashboard-routes.ts
+++ b/packages/app/src/lib/routing/dashboard-routes.ts
@@ -1,5 +1,5 @@
export type DashboardNavGroup = 'primary' | 'feature-gated' | 'footer-only';
-export type DashboardShareParamScope = 'g_' | 'i_' | 'e_' | 'r_' | 'c_';
+export type DashboardShareParamScope = 'g_' | 'i_' | 'e_' | 'r_' | 'c_' | 'v_';
export interface DashboardProviderCapabilities {
readonly globalFilters: boolean;
@@ -100,7 +100,7 @@ export const DASHBOARD_ROUTES = [
indexable: false,
localeMirrored: true,
providers: STANDALONE_DASHBOARD_PROVIDERS,
- shareParamScopes: [],
+ shareParamScopes: ['v_'],
},
{
key: 'inference',
diff --git a/packages/app/src/lib/routing/url-state.test.ts b/packages/app/src/lib/routing/url-state.test.ts
index 965d2abdc..bea8f1673 100644
--- a/packages/app/src/lib/routing/url-state.test.ts
+++ b/packages/app/src/lib/routing/url-state.test.ts
@@ -1088,3 +1088,32 @@ describe('rememberChartStateInUrl — params this module does not own', () => {
expect(params.has('unofficialrun')).toBe(false);
});
});
+
+describe('buildShareUrl on the video dashboard', () => {
+ beforeEach(() => {
+ // Fake timers keep the module's deferred URL clean-up from firing after the window stub is gone.
+ vi.useFakeTimers();
+ vi.resetModules();
+ });
+ afterEach(() => {
+ vi.useRealTimers();
+ vi.unstubAllGlobals();
+ });
+
+ it('shares the live v_ params and nothing else', async () => {
+ setupWindow('?v_y=kjPerVideo&v_optimal=0&history-hardware=H200&i_metric=y_x', '/video');
+ const { buildShareUrl } = await import('@/lib/url-state');
+ const url = new URL(buildShareUrl());
+ expect(url.pathname).toBe('/video');
+ expect(url.searchParams.get('v_y')).toBe('kjPerVideo');
+ expect(url.searchParams.get('v_optimal')).toBe('0');
+ expect(url.searchParams.has('history-hardware')).toBe(false);
+ expect(url.searchParams.has('i_metric')).toBe(false);
+ });
+
+ it('keeps live v_ params out of inference share links', async () => {
+ setupWindow('?v_y=kjPerVideo', '/inference');
+ const { buildShareUrl } = await import('@/lib/url-state');
+ expect(buildShareUrl()).not.toContain('v_y');
+ });
+});
diff --git a/packages/app/src/lib/routing/url-state.ts b/packages/app/src/lib/routing/url-state.ts
index 91baf1792..0b0176511 100644
--- a/packages/app/src/lib/routing/url-state.ts
+++ b/packages/app/src/lib/routing/url-state.ts
@@ -507,11 +507,19 @@ function collectTabParams(): URLSearchParams {
filtered.delete('g_model');
}
+ const liveParams = profitRouteSearch(window.location.pathname, window.location.search);
+ // The video dashboard keeps its `v_` state in the address bar, not in
+ // currentState, so routes that share that scope read it live.
+ if (prefixes.some((prefix) => prefix === 'v_')) {
+ for (const [key, value] of liveParams) {
+ if (key.startsWith('v_') && !filtered.has(key)) filtered.set(key, value);
+ }
+ }
+
// Carry over any unofficial-run IDs currently reflected in the address bar.
// Only the first match is forwarded and it's always emitted under the plural
// `unofficialruns` key — the canonical form the app writes on dismiss/load
// and the one we want shared links to use going forward.
- const liveParams = profitRouteSearch(window.location.pathname, window.location.search);
for (const [key, value] of liveParams) {
if (UNOFFICIAL_RUN_PARAM_RE.test(key) && value) {
filtered.set('unofficialruns', value);
From f81ab20fffa61eb9be91dfca6adb929d5b24693f Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Thu, 24 Sep 2026 03:19:32 -0700
Subject: [PATCH 091/104] fix: source the H3 API reference price from the
official pay-as-you-go page
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The dashboard's API list price was a $0.034/video-s subscription-tier figure
from a web search, labelled as unverified. Replace it with the pay-as-you-go
price on MiniMax's platform pricing page: H3 768P output $0.08/s (2K output
$0.13/s), captured 2026-09-24; the page states no effective date. Unit,
component and e2e expectations follow the new default ($0.640 per 8 s clip).
中文:仪表板原先的 API 标价 $0.034/video-s 来自网页搜索的订阅档价格,且标注为
未核实。改为 MiniMax 开放平台按量付费价格页的价格:H3 768P 输出 $0.08/s(2K
输出 $0.13/s),采集于 2026-09-24,页面未标注生效日期。单元、组件与 e2e 测试
的预期同步更新为新默认值(8 s 视频 $0.640)。
---
.../component/video-api-reference.cy.tsx | 38 +++++++++----------
.../cypress/component/video-dashboard.cy.tsx | 30 +++++++--------
.../app/cypress/e2e/video-dashboard.cy.ts | 20 +++++-----
.../video-benchmark/api-reference.test.ts | 18 ++++-----
.../video-benchmark/api-reference.ts | 14 +++----
.../video-benchmark/video-url-state.test.ts | 4 +-
6 files changed, 62 insertions(+), 62 deletions(-)
diff --git a/packages/app/cypress/component/video-api-reference.cy.tsx b/packages/app/cypress/component/video-api-reference.cy.tsx
index dac99d7a3..68e924e25 100644
--- a/packages/app/cypress/component/video-api-reference.cy.tsx
+++ b/packages/app/cypress/component/video-api-reference.cy.tsx
@@ -24,25 +24,25 @@ const caption = () => cy.get('[data-testid="video-api-reference-caption"]');
describe('VideoApiReference', () => {
it('shows the dated reference with its source and applies valid prices as typed', () => {
- cy.mount( );
- input().should('have.value', '0.034').and('have.attr', 'step', '0.001');
+ cy.mount( );
+ input().should('have.value', '0.08').and('have.attr', 'step', '0.001');
caption()
- .should('contain', 'Reference $0.034/video-s')
- .and('contain', 'listed range $0.034–$0.047')
- .and('contain', 'captured 2026-09-19')
- .and('contain', 'Source: MiniMax Design · H3 768p subscription tier')
- .and('contain', 'not verified on the pay-as-you-go page')
+ .should('contain', 'Reference $0.080/video-s')
+ .and('contain', 'listed range $0.080–$0.130')
+ .and('contain', 'captured 2026-09-24')
+ .and('contain', 'Source: MiniMax platform pay-as-you-go pricing page')
+ .and('contain', 'page shows no effective date')
.and('contain', 'List price, not realized revenue');
input().clear().type('0.05');
value().should('have.text', '0.05');
});
it('keeps the last valid price while the box is empty or zero and snaps back on blur', () => {
- cy.mount( );
+ cy.mount( );
input().clear();
- value().should('have.text', '0.034');
+ value().should('have.text', '0.08');
input().type('0');
- value().should('have.text', '0.034');
- input().blur().should('have.value', '0.034');
+ value().should('have.text', '0.08');
+ input().blur().should('have.value', '0.08');
});
it('resets to the reference, adopts external values and tracks committed changes', () => {
const capture = cy.stub().as('capture');
@@ -50,10 +50,10 @@ describe('VideoApiReference', () => {
cy.mount( );
input().should('have.value', '0.05');
cy.get('[data-testid="video-api-price-reset"]').click();
- value().should('have.text', '0.034');
- input().should('have.value', '0.034');
+ value().should('have.text', '0.08');
+ input().should('have.value', '0.08');
cy.get('@capture').should('have.been.calledWith', 'video_api_price_changed', {
- value: '0.034',
+ value: '0.08',
reset: true,
});
cy.get('[data-testid="api-price-external"]').click();
@@ -65,14 +65,14 @@ describe('VideoApiReference', () => {
});
});
it('renders Chinese copy under /zh', () => {
- cy.mount( );
+ cy.mount( );
cy.contains('label', 'API 参考价($/video-s)').should('exist');
cy.contains('button', '重置').should('exist');
caption()
- .should('contain', '参考值 $0.034/video-s')
- .and('contain', '标价区间 $0.034–$0.047')
- .and('contain', '采集于 2026-09-19')
- .and('contain', '来源:MiniMax Design · H3 768p 订阅档')
+ .should('contain', '参考值 $0.080/video-s')
+ .and('contain', '标价区间 $0.080–$0.130')
+ .and('contain', '采集于 2026-09-24')
+ .and('contain', '来源:MiniMax 开放平台按量付费价格页')
.and('contain', '此处为 API 标价,而非实际收入');
});
});
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index 7f653410e..f124c249d 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -181,7 +181,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
'11.53',
'6.66',
'$0.150',
- '$0.272',
+ '$0.640',
'301.1',
'96.4',
'3,856',
@@ -214,23 +214,23 @@ describe('Video hardware dashboard (retained fixture)', () => {
});
it('reprices the API list price beside the TCO cost, in the cards, the table and the URL', () => {
mount();
- // 0.034 $/video-s × 8 s clip = $0.272, read beside each hardware's TCO cost per video.
- kpi('h200').should('contain', 'API list $0.272').and('contain', '$0.204');
- kpi('h100').should('contain', 'API list $0.272');
- kpi('b200').should('contain', 'API list $0.272');
+ // 0.08 $/video-s × 8 s clip = $0.640, read beside each hardware's TCO cost per video.
+ kpi('h200').should('contain', 'API list $0.640').and('contain', '$0.204');
+ kpi('h100').should('contain', 'API list $0.640');
+ kpi('b200').should('contain', 'API list $0.640');
cy.get('[data-testid="video-chart-card"]').should(
'contain',
- 'API reference: $0.034/video-s (2026-09-19)',
+ 'API reference: $0.080/video-s (2026-09-24)',
);
cy.get('[data-testid="video-api-reference-caption"]')
- .should('contain', 'Reference $0.034/video-s')
- .and('contain', '$0.034–$0.047')
- .and('contain', 'captured 2026-09-19')
- .and('contain', 'MiniMax Design');
+ .should('contain', 'Reference $0.080/video-s')
+ .and('contain', '$0.080–$0.130')
+ .and('contain', 'captured 2026-09-24')
+ .and('contain', 'MiniMax platform');
cy.get('[data-testid="video-api-price"]').clear().type('0.05');
// $0.400 per 8 s clip; the TCO cost itself does not move.
kpi('h200').should('contain', 'API list $0.400').and('contain', '$0.204');
- kpi('h200').should('not.contain', '$0.272');
+ kpi('h200').should('not.contain', '$0.640');
cy.location('search').should('contain', 'v_api=0.05');
cy.contains('button', 'Table').click();
cy.get('[data-testid="data-table-preset-all"]').click();
@@ -243,8 +243,8 @@ describe('Video hardware dashboard (retained fixture)', () => {
.should('contain', '$0.400')
.and('contain', '$0.204');
cy.get('[data-testid="video-api-price-reset"]').click();
- cy.contains('[data-testid="video-points-table"] tbody tr', 'H200').should('contain', '$0.272');
- kpi('h200').should('contain', 'API list $0.272');
+ cy.contains('[data-testid="video-points-table"] tbody tr', 'H200').should('contain', '$0.640');
+ kpi('h200').should('contain', 'API list $0.640');
cy.location('search').should('not.contain', 'v_api');
});
it('toggles Optimal Only from the legend and restores it from v_optimal', () => {
@@ -311,7 +311,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
.and('contain', 'P50 出片时间(s)')
.and('contain', '视频数 / GPU 小时')
.and('contain', 'TCO / 条视频')
- .and('contain', 'API 标价 $0.272')
+ .and('contain', 'API 标价 $0.640')
.and('contain', 'kJ / 条视频');
cy.get('[data-testid="video-config-fact"]').should(($facts) => {
expect([...$facts].map((el) => el.textContent)).to.deep.equal([
@@ -329,7 +329,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
.and('contain', 'Y 轴指标')
.and('not.contain', '成本档位')
.and('contain', 'API 参考价($/video-s)')
- .and('contain', '采集于 2026-09-19');
+ .and('contain', '采集于 2026-09-24');
cy.contains('button', '表格').click();
headers().should(($ths) => {
expect([...$ths].map((el) => el.textContent?.trim())).to.deep.equal([
diff --git a/packages/app/cypress/e2e/video-dashboard.cy.ts b/packages/app/cypress/e2e/video-dashboard.cy.ts
index 0bf15ff1c..0d67ff643 100644
--- a/packages/app/cypress/e2e/video-dashboard.cy.ts
+++ b/packages/app/cypress/e2e/video-dashboard.cy.ts
@@ -1,8 +1,8 @@
// Runs against the E2E_FIXTURES=1 server, which serves the retained
// H100/H200/B200 C1/C2/C4 observations from cypress/fixtures/api/video-history.json.
// Lead (C1) cells, per participating GPU: H100 5.37 videos/GPU-hr at $1.17/GPU-hr,
-// H200 5.97 at $1.22, B200 11.53 at $1.73. Every clip is 8 s, so the $0.034/video-s
-// API reference lists at $0.272 per video.
+// H200 5.97 at $1.22, B200 11.53 at $1.73. Every clip is 8 s, so the $0.080/video-s
+// API reference lists at $0.640 per video.
describe('Video hardware dashboard (E2E fixtures)', () => {
beforeEach(() => {
// The Compare panel fetches two published artifacts once in view; keep the spec offline.
@@ -73,7 +73,7 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
.and('contain', '11.53')
.and('contain', 'TCO / video')
.and('contain', '$0.321')
- .and('contain', 'API list $0.272')
+ .and('contain', 'API list $0.640')
.and('contain', 'kJ / video')
.and('contain', '301.1')
.and('not.contain', 'Profit');
@@ -118,7 +118,7 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
.and('contain', '11.53')
.and('contain', '6.66')
.and('contain', '$0.150')
- .and('contain', '$0.272')
+ .and('contain', '$0.640')
.and('contain', '301.1')
.and('contain', '96.4')
.and('contain', '3,856')
@@ -156,20 +156,20 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
'API list $0.400',
);
cy.get('[data-testid="video-api-price-reset"]').click();
- cy.get('[data-testid="video-api-price"]').should('have.value', '0.034');
+ cy.get('[data-testid="video-api-price"]').should('have.value', '0.08');
cy.get('[data-testid="video-kpi-card"][data-hardware="b200"]').should(
'contain',
- 'API list $0.272',
+ 'API list $0.640',
);
cy.location('search').should('not.contain', 'v_api');
// A non-positive price never prices at 0: the dated reference stays in force.
cy.visit('/video?v_api=0');
- cy.get('[data-testid="video-api-price"]').should('have.value', '0.034');
+ cy.get('[data-testid="video-api-price"]').should('have.value', '0.08');
cy.get('[data-testid="video-kpi-card"][data-hardware="h200"]').should(
'contain',
- 'API list $0.272',
+ 'API list $0.640',
);
- cy.get('[data-testid="video-api-reference-caption"]').should('contain', 'captured 2026-09-19');
+ cy.get('[data-testid="video-api-reference-caption"]').should('contain', 'captured 2026-09-24');
});
it('compares the slowest lead deployment against the fastest with time, cost and energy deltas', () => {
cy.visit('/video');
@@ -248,7 +248,7 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
cy.get('[data-testid="video-kpi-card"][data-hardware="b200"]')
.should('contain', 'TCO / 条视频')
.and('contain', '$0.150')
- .and('contain', 'API 标价 $0.272');
+ .and('contain', 'API 标价 $0.640');
cy.get('[data-testid="video-kpi-card"][data-hardware="mi355x"]').should('contain', '未测得');
});
it('fits a phone viewport without horizontal page scroll in both locales', () => {
diff --git a/packages/app/src/components/video-benchmark/api-reference.test.ts b/packages/app/src/components/video-benchmark/api-reference.test.ts
index f032eaf20..c0f5a6eef 100644
--- a/packages/app/src/components/video-benchmark/api-reference.test.ts
+++ b/packages/app/src/components/video-benchmark/api-reference.test.ts
@@ -4,20 +4,20 @@ import { formatApiPrice, H3_API_REFERENCE } from './api-reference';
describe('H3 API price reference', () => {
it('is a dated, sourced list price inside its own listed range', () => {
const { pricePerVideoSecondUsd, rangeUsd, capturedOn, label } = H3_API_REFERENCE;
- expect(pricePerVideoSecondUsd).toBe(0.034);
- expect(rangeUsd).toEqual([0.034, 0.047]);
+ expect(pricePerVideoSecondUsd).toBe(0.08);
+ expect(rangeUsd).toEqual([0.08, 0.13]);
expect(pricePerVideoSecondUsd).toBeGreaterThanOrEqual(rangeUsd[0]);
expect(pricePerVideoSecondUsd).toBeLessThanOrEqual(rangeUsd[1]);
- expect(capturedOn).toBe('2026-09-19');
+ expect(capturedOn).toBe('2026-09-24');
expect(Number.isNaN(Date.parse(capturedOn))).toBe(false);
- // The source text must keep saying what was not verified, in both locales.
- expect(label.en).toContain('MiniMax Design');
- expect(label.en).toContain('not verified');
- expect(label.zh).toContain('MiniMax Design');
- expect(label.zh).toContain('未在按量付费页面核实');
+ // The source text must name the official price page and what it leaves unstated, in both locales.
+ expect(label.en).toContain('pay-as-you-go pricing page');
+ expect(label.en).toContain('no effective date');
+ expect(label.zh).toContain('按量付费价格页');
+ expect(label.zh).toContain('未标注生效日期');
});
it('formats USD per video-second to the input step, keeping a fourth decimal when typed', () => {
- expect(formatApiPrice(0.034)).toBe('$0.034');
+ expect(formatApiPrice(0.08)).toBe('$0.080');
expect(formatApiPrice(0.05)).toBe('$0.050');
expect(formatApiPrice(0.0345)).toBe('$0.0345');
});
diff --git a/packages/app/src/components/video-benchmark/api-reference.ts b/packages/app/src/components/video-benchmark/api-reference.ts
index 87636495f..16f27cbe4 100644
--- a/packages/app/src/components/video-benchmark/api-reference.ts
+++ b/packages/app/src/components/video-benchmark/api-reference.ts
@@ -5,7 +5,7 @@ export interface ApiPriceReference {
rangeUsd: readonly [number, number];
/** ISO date the price was captured. */
capturedOn: string;
- /** Where the price was seen, including what was not verified. */
+ /** Where the price was seen, including what the page leaves unstated. */
label: { en: string; zh: string };
}
@@ -16,16 +16,16 @@ export interface ApiPriceReference {
* numbers only together with a new capture date and source text.
*/
export const H3_API_REFERENCE: ApiPriceReference = {
- pricePerVideoSecondUsd: 0.034,
- rangeUsd: [0.034, 0.047],
- capturedOn: '2026-09-19',
+ pricePerVideoSecondUsd: 0.08,
+ rangeUsd: [0.08, 0.13],
+ capturedOn: '2026-09-24',
label: {
- en: 'MiniMax Design · H3 768p subscription tier (web search, not verified on the pay-as-you-go page; H3 was listed as not yet supported on the API packages page)',
- zh: 'MiniMax Design · H3 768p 订阅档(价格来自网页搜索,未在按量付费页面核实;API 套餐页当时标注 H3 尚未支持)',
+ en: 'MiniMax platform pay-as-you-go pricing page · H3 768P output $0.08/s, 2K output $0.13/s (page shows no effective date)',
+ zh: 'MiniMax 开放平台按量付费价格页 · H3 768P 输出 $0.08/s,2K 输出 $0.13/s(页面未标注生效日期)',
},
};
-/** `$0.034` style USD per video-second: at least the three decimals the input steps by. */
+/** `$0.080` style USD per video-second: at least the three decimals the input steps by. */
export function formatApiPrice(value: number): string {
return `$${value.toLocaleString('en-US', { minimumFractionDigits: 3, maximumFractionDigits: 4 })}`;
}
diff --git a/packages/app/src/components/video-benchmark/video-url-state.test.ts b/packages/app/src/components/video-benchmark/video-url-state.test.ts
index db56a12d6..bafb1ca8b 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.test.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.test.ts
@@ -55,7 +55,7 @@ describe('video dashboard URL state', () => {
it('defaults the API price to the dated reference and rejects non-positive or malformed prices', () => {
expect(DEFAULT_VIDEO_DASHBOARD_STATE.apiPrice).toBe(H3_API_REFERENCE.pricePerVideoSecondUsd);
for (const bad of ['0', '-0.034', 'NaN', 'Infinity', '', ' ', 'abc', '0.00004']) {
- expect(readVideoDashboardState(`?v_api=${bad}`).apiPrice).toBe(0.034);
+ expect(readVideoDashboardState(`?v_api=${bad}`).apiPrice).toBe(0.08);
expect(parseApiPrice(bad)).toBeNull();
}
expect(parseApiPrice(null)).toBeNull();
@@ -136,7 +136,7 @@ describe('video dashboard URL state', () => {
it('maps state to metric options: the cost tier and the API price, nothing else', () => {
expect(metricOptions(DEFAULT_VIDEO_DASHBOARD_STATE)).toEqual({
tier: 'h',
- apiPricePerVideoSecond: 0.034,
+ apiPricePerVideoSecond: 0.08,
});
expect(metricOptions({ ...DEFAULT_VIDEO_DASHBOARD_STATE, tier: 'r', apiPrice: 0.05 })).toEqual({
tier: 'r',
From d01b7e6aa1fe2cd83eb5c1518a1f354b3e384501 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 26 Sep 2026 01:18:02 -0700
Subject: [PATCH 092/104] fix: preserve VideoGenX comparison and API contracts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
保留完整工作负载身份,限制证据比较使用匹配布局,并同步只读 API 与可恢复的硬件筛选。
---
docs/dashboard-readonly-views.md | 52 ++-
docs/index.md | 2 +-
docs/video-history.md | 4 +-
docs/videogenx-dashboard.md | 24 +-
.../cypress/component/video-dashboard.cy.tsx | 15 +-
.../cypress/component/video-evidence.cy.tsx | 79 +++--
.../app/cypress/e2e/video-dashboard.cy.ts | 15 +
.../app/cypress/fixtures/api/_manifest.json | 8 +-
.../cypress/fixtures/api/video-history.json | 9 +
.../scripts/build-video-history-fixture.ts | 2 +-
.../src/app/api/v1/views/video/route.test.ts | 330 ++++++++++++++++++
.../app/src/app/api/v1/views/video/route.ts | 116 +++++-
.../video-benchmark/VideoDashboard.tsx | 24 +-
.../video-benchmark/VideoEvidence.tsx | 117 +++----
.../video-benchmark/deployment.test.ts | 56 ++-
.../components/video-benchmark/deployment.ts | 33 +-
.../video-benchmark/evidence.test.ts | 61 ++--
.../components/video-benchmark/evidence.ts | 70 ++--
.../video-benchmark/history.test.ts | 50 ++-
.../src/components/video-benchmark/history.ts | 6 +
.../src/components/video-benchmark/metrics.ts | 2 +
.../components/video-benchmark/points.test.ts | 37 +-
.../src/components/video-benchmark/points.ts | 33 +-
.../video-benchmark/use-video-points.ts | 7 +-
.../video-benchmark/video-url-state.test.ts | 12 +
.../video-benchmark/video-url-state.ts | 10 +-
packages/app/src/lib/api/api-route-catalog.ts | 85 ++++-
.../app/src/lib/views-api/docs/extensions.ts | 82 ++++-
packages/app/src/lib/views-api/registry.ts | 10 +
.../src/lib/views-api/video-dashboard.test.ts | 19 +
.../app/src/lib/views-api/video-dashboard.ts | 101 ++++++
.../skills/inferencex-api/integrity.json | 2 +-
.../references/dashboard-views.md | 70 +++-
packages/skills/test/dashboard-views.test.mjs | 60 ++++
34 files changed, 1335 insertions(+), 268 deletions(-)
create mode 100644 packages/app/src/app/api/v1/views/video/route.test.ts
create mode 100644 packages/app/src/lib/views-api/video-dashboard.test.ts
create mode 100644 packages/app/src/lib/views-api/video-dashboard.ts
create mode 100644 packages/skills/test/dashboard-views.test.mjs
diff --git a/docs/dashboard-readonly-views.md b/docs/dashboard-readonly-views.md
index b8a2a82a7..1025a8fe3 100644
--- a/docs/dashboard-readonly-views.md
+++ b/docs/dashboard-readonly-views.md
@@ -75,7 +75,7 @@ combinations, not the full Cartesian product of all possible filter values.
| `reliability` | `asOf`, `format`, `gpus`, `range` |
| `submissions` | `direction`, `limit`, `lines`, `mode`, `offset`, `onChangeOnly`, `search`, `sort` |
| `ubenchx` | `gpu`, `test` |
-| `video` | `artifact`, `cell`, `compare`, `costs`, `gpuBasis`, `page`, `phase`, `run`, `selected`, `slot`, `source`, `view`, `workload`, `xAxis`, `yAxis` |
+| `video` | `artifact`, `cell`, `compare`, `costs`, `gpuBasis`, `page`, `phase`, `run`, `selected`, `slot`, `source`, `v_x`, `v_y`, `v_tier`, `v_view`, `v_optimal`, `v_api`, `v_hidden`, `v_base`, `v_cand`, `v_case`, `view`, `workload`, `xAxis`, `yAxis` |
Cache reuse returns `data.recipes` and the resolved `params.recipe`. Pass a returned key as `recipe` (the UI uses `c_recipe`) to select the same TP/EP/DP-attention, worker, GPU, speculation, offload and fingerprint combination. Omitted or stale keys use the shared dashboard default. Runs use that recipe if available, otherwise their own best-covered recipe; inspect each bar's source row for its identity. Overlay-only configurations expose their own recipe choices. Layout orientation and label placement are presentation-only controls.
@@ -120,9 +120,57 @@ alignment changes no API parameters, response schemas, or stored model identitie
- GPU metrics: shared line/correlation transforms and full-record per-GPU statistics
computed from the stored samples, or from the samples of live artifacts. File/host
identity and missing-versus-zero semantics persist.
-- Video: checksum-verified stored bundles, serving/fidelity selectors and tradeoffs.
+- Video: published history pages → videoPoints → dashboardCells → shared metrics,
+ deployment Pareto plot/table, lead-cell KPIs, Compare and measured evidence.
+ Legacy checksum-verified bundle serving/fidelity and tradeoff reads remain available.
- Overview/rankings/compare: existing discovery-page assembly and scenario helpers.
+## VideoGenX dashboard contract
+
+`GET /api/v1/views/video` defaults to the current `/video` dashboard. The shared
+`VIDEO_HISTORY_MAX_PAGES` bounds both UI and API to the first five published
+history pages; responses report `coverage` with `pagesRead`, `maxPages`,
+`nextPage` and `truncated`. This is a publication-ordered window, not an execution
+date range or a promise to enumerate the entire catalog. Failures remain failures;
+missing fields remain null. Source run/artifact IDs, seals and distinct execution
+and publication times remain in `provenance`; raw documents, private asset URLs
+and credentials are excluded from the dashboard projection.
+
+| UI control or surface | Public projection / scope |
+| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| X/Y, cost tier, optimal | `v_x`, `v_y`, `v_tier`, `v_optimal`; same metric registry, participating-GPU cost basis and per-hardware frontier helpers. Queueing cells never enter `plot`/`rows`. |
+| Hardware visibility | `v_hidden`, sorted/deduplicated known roster keys; affects plot/table only, matching UI. KPI, Compare and Evidence retain all selected-workload cells. |
+| API reference price | `v_api`, positive USD/video-second rounded to four decimals; only `apiPricePerVideo`, never TCO or revenue. Invalid values use the UI reference. |
+| Chart/table | `v_view`; echoed as `params.displayView`, no numerical difference. Color, zoom and playback remain presentation state. |
+| Workload/newest cell | `videoPoints` → `dashboardCells`; same canonical identity, sample floor and publication precedence. Return `workload`, `otherWorkloads`, cells and source provenance. |
+| KPI cards | `kpis`: roster entries, shared lead cell and all metric values; missing hardware keeps null point/metrics. |
+| Compare selectors/deltas | `v_base`, `v_cand`, `v_case`; shared selection defaults and `compareMetrics`. Default mode returns deltas without loading media. |
+| Case media metadata | `view=compare` adds at most two published-only `format=published` reads (deduplicated by run/artifact), `compareSide`/`pairCases`, bounded `resolvedCaseIndex`, matched/unmatched counts and selected records. Only bundle-relative media paths are exposed. Missing media, missing baseline/candidate and read errors have separate statuses; `ready` means readable artifacts and can still have zero pairs. |
+| Evidence | Shared power/plateau/scaling/facts functions. Descriptive measurements; no quality qualification or causal bottleneck inference. |
+| Legacy run browser | Explicit `view=discovery&page=…`; supplying `run`/`artifact` retains results and optional tradeoff selectors. Mixing legacy selectors and `v_*` returns 400. |
+
+Dashboard state values use the UI parser and its fallback defaults; unknown or
+repeated parameter names return 400. Legacy source status handling and 204 behavior
+remain unchanged. Chart history read failures preserve the sanitized upstream status;
+optional Compare media failure returns `comparison.cases.status=unavailable` without
+erasing independently available chart data. The route and generated OpenAPI remain
+no-store.
+
+Regression coverage exercises numerical API/UI parity across default and changed
+axes/tier/optimal/price/visibility, the shared five-page bound, legacy reads,
+case-index clamping, absent/failed media and private-URL exclusion. This does not
+claim live production API/UI equivalence or full-history completeness.
+
+### 中文说明
+
+视频公开接口默认复现当前仪表板:最多读取前五页已发布历史,复用相同的 workload、
+样本门槛、部署和数值计算,明确返回覆盖范围与截断状态。`v_hidden` 只隐藏图表和表格
+中的硬件,KPI、Compare 和 Evidence 保持原范围;`v_api` 只是视频秒参考价,不是
+TCO 或收益。默认不加载媒体;`view=compare` 才读取最多两份已发布媒体产物并返回
+匹配用例、实际索引和未配对数量,不暴露 asset URL 或原始数据包。`view=discovery`
+及原有 run/artifact 查询仍可使用;不能与 `v_*` 混用。未发布、无可比较双方和读取失败
+分别标记,不能解释为成功的空测量。该接口不承诺完整历史、质量验收或瓶颈因果结论。
+
## Other public surfaces
Model, chip and pair discovery pages reuse overview/rankings/compare calculations.
diff --git a/docs/index.md b/docs/index.md
index a7c0aa712..c902033a9 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -35,7 +35,7 @@ Design rationale and non-obvious conventions. See [CLAUDE.md](../CLAUDE.md) for
- [State Ownership](./state-ownership.md) — Which context owns which state, availability filtering cascade, comparison date mechanics, URL param sync
- [Blog](./blog.md) — MDX content system, SEO features (OG images, RSS, llms.txt, JSON-LD), TOC sidebar, reading progress, heading links, analytics events
- [CollectiveX](./collectivex.md) — lazy ingest-on-read pipeline (separate Neon DB as a durable GitHub-artifact cache), tombstoned deletes, raw-docs storage + shared reader
-- [VideoGenX dashboard](./videogenx-dashboard.md) — `/video` cross-hardware chart: published-history projection → points → metrics, TCO tiers per participating GPU vs. the API list price, deployment cells (queued cells never plotted), arena Compare, compute-bound evidence, unavailable-hardware roster, null rules
+- [VideoGenX dashboard](./videogenx-dashboard.md) — `/video` cross-hardware chart: published-history projection → points → metrics, TCO tiers per participating GPU vs. the API list price, deployment cells (queued cells never plotted), arena Compare, performance evidence, unavailable-hardware roster, null rules
- [Chinese Pages (/zh)](./i18n.md) — Why hand-authored /zh pages instead of an i18n framework, hreflang pairing, blog translation pairing, html lang workaround, CJK reading time/slugs
- [Chinese Copy Editorial Guide](./chinese-copy.md) — Audience, surface-specific register, context-aware terminology, rewrite workflow, manual-review process, and PR checklist
diff --git a/docs/video-history.md b/docs/video-history.md
index 13de6f18d..0cc7762a7 100644
--- a/docs/video-history.md
+++ b/docs/video-history.md
@@ -8,7 +8,7 @@
The projection groups all cells under the original source inside one artifact entry. It reuses `storedBundle`, `servingCells`, `storedFidelityBundle`, and the existing tradeoff calculations. Invalid or unavailable indexes remain explicit error entries. Original execution time comes from `ci.started_at`; index publication time is separate and must never be substituted for execution time. Original run IDs and export run IDs remain distinct.
-Each observation also carries the cell's participating and allocated GPU counts, measurement wall seconds, clip duration and frame count, summed mean board watts, summed recorded enforced limits (null when no limit snapshot exists), the configured `tp_size` / `ulysses_degree` / `attention_backend` and the endpoint's replica count (`execution.deployment.replica_count`, null for bundles that predate it). These are additive, nullable fields under the same `schemaVersion: 1`; the hardware dashboard derives every displayed metric from them, so the browser never parses an artifact bundle for the chart.
+Each observation also carries the cell's participating and allocated GPU counts, measurement wall seconds, clip duration and frame count, summed mean board watts, summed recorded enforced limits (null when no limit snapshot exists), the configured `tp_size` / `ulysses_degree` / `attention_backend` and the endpoint's replica count (`execution.deployment.replica_count`, null for bundles that predate it). The nullable `workloadKey` carries the full canonical workload identity when complete; prompts and seeds cannot be replaced by the shortened display label. These are additive, nullable fields under the same `schemaVersion: 1`; the hardware dashboard reads at most five pages and derives every displayed metric from them, so the browser never parses an artifact bundle for the chart.
## Evidence boundaries
@@ -26,7 +26,7 @@ Each observation also carries the cell's participating and allocated GPU counts,
`/video` 与 `/zh/video` 首屏为跨硬件仪表板(见 [VideoGenX 仪表板](./videogenx-dashboard.md));本文描述的“性能历史”列表位于其下方可展开的区块,URL 带有 `history-*` 筛选参数(`history-hardware`、`history-concurrency`、`history-query`)时自动展开。每条记录链接到原始 GitHub Actions 运行。原有的按运行查看结果、trade-off 图表与 CI 运行浏览已随仪表板重建移除;视频对比由仪表板的 Compare 面板提供。
-历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。每个 cell 另附参与/已分配 GPU 数、测量窗口秒数、视频时长与帧数、板卡平均功率之和、记录的生效功率上限之和(无快照时为 null)、配置的 `tp_size` / `ulysses_degree` / `attention_backend`,以及端点的副本数(`execution.deployment.replica_count`,早于该记录的产物包为 null);这些都是同一 `schemaVersion: 1` 下可为空的附加字段,硬件仪表板据此推导全部指标,浏览器不再解析产物包。
+历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。每个 cell 另附参与/已分配 GPU 数、测量窗口秒数、视频时长与帧数、板卡平均功率之和、记录的生效功率上限之和(无快照时为 null)、配置的 `tp_size` / `ulysses_degree` / `attention_backend`,以及端点的副本数(`execution.deployment.replica_count`,早于该记录的产物包为 null);`workloadKey` 在信息完整时保留完整工作负载身份,prompts 与 seeds 不能由缩写显示标签替代。这些都是同一 `schemaVersion: 1` 下可为空的附加字段,硬件仪表板最多读取五页,并据此推导全部指标,浏览器不再解析产物包。
当前展示观测值,未选择匹配基线,也不计算 before/after。延迟、吞吐量使用提交到下载完成的窗口;板卡能耗使用记录的生成窗口。保真度、阈值校准、发布验收单独展示。筛选仅作用于已加载的页面,可继续加载较早结果。
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
index ec10a2007..197a17502 100644
--- a/docs/videogenx-dashboard.md
+++ b/docs/videogenx-dashboard.md
@@ -4,47 +4,49 @@ Why `/video` leads with a cross-hardware chart instead of a CI-run browser, and
## Data path
-Published blob indexes → `GET /api/video-runs?format=history` (the per-cell projection described in [Video performance history](./video-history.md), with additive nullable fields for GPU counts, wall time, clip shape, board power, enforced limit and server layout) → `points.ts` (`videoPoints`, `latestVideoCells`) → `metrics.ts` (`metricValue`). The browser never parses an artifact bundle for the dashboard; media loads only inside the collapsed "Runs, videos & evidence" section, which mounts the previous `VideoCIRuns` views unchanged so `?run=`, `?view=`, `?compare=` and `history-*` deep links keep working and open that section automatically.
+Published blob indexes → `GET /api/video-runs?format=history` (the per-cell projection described in [Video performance history](./video-history.md), with additive nullable fields for GPU counts, wall time, clip shape, board power, enforced limit and server layout) → `points.ts` (`videoPoints`, `latestVideoCells`) → `metrics.ts` (`metricValue`). The browser reads at most five history pages and never parses an artifact bundle for the chart. The previous CI-run viewer has been removed: `history-*` links open Performance history; Compare loads published media on demand. The public `/api/v1/views/video` dashboard projection reuses these selectors and formulas; explicit legacy views remain available through the API.
## Axes and defaults
-`video-url-state.ts` owns the `v_*` URL params (`v_x`, `v_y`, `v_tier`, `v_view`, `v_optimal`, `v_api`); defaults are omitted from the URL and every other param is left alone.
+`video-url-state.ts` owns the `v_*` URL params (`v_x`, `v_y`, `v_tier`, `v_view`, `v_optimal`, `v_api`, `v_hidden`); defaults are omitted from the URL and every other param is left alone.
- **X = P90 time to video (s)**, lower is better; `p50Latency` is the alternative.
- **Y = videos per $1 TCO** at the _Owning at Large Hyperscaler Volume_ tier; TCO cost per video, videos per GPU-hour and GPU-board energy per video (kJ) are the alternatives. Cost per GPU-hour comes from `HW_REGISTRY` (`costh`/`costr`), the same SemiAnalysis TCO source `/inference` uses; the badge row and source link sit above the chart.
- **Per participating GPU**: every per-GPU metric divides by the boards that generated the clip (4 per video with TP2 × Ulysses 2), never by the boards a job reserved. The retained H100 and B200 jobs reserved eight and used four, so a note under the chart header names them ("B200 (4 of 8), H100 (4 of 8) … the idle boards are not counted") and their KPI card headers read "4 of 8 GPUs". Idle boards are stated, not billed; there is no GPU-basis toggle.
- **Both axes start at zero** (`chart-domain.ts`), so per-dollar and per-video readings compare by length, not by offset.
-- **Chrome mirrors `/inference`**: a `Card` with `DashboardSectionHeader` (title, description, Share) sits above the two config panels; the cost tier is picked inline in the chart caption (`video-cost-tier`, a `SearchableSelect` with an `export-only` text twin) like the inference caption's Cost Tier selector; the Compare and compute-bound evidence sections fold behind a chevron (`CollapsibleSection`), and Compare opens on load for `v_base`/`v_cand`/`v_case` deep links. The video route declares `shareParamScopes: ['v_']`, and `collectTabParams` reads that scope live from the address bar, so Share links carry the current `v_` params.
+- **Chrome mirrors `/inference`**: a `Card` with `DashboardSectionHeader` (title, description, Share) sits above the two config panels; the cost tier is picked inline in the chart caption (`video-cost-tier`, a `SearchableSelect` with an `export-only` text twin) like the inference caption's Cost Tier selector; the Compare and performance evidence sections fold behind a chevron (`CollapsibleSection`), and Compare opens on load for `v_base`/`v_cand`/`v_case` deep links. The video route declares `shareParamScopes: ['v_']`, and `collectTabParams` reads that scope live from the address bar, so Share links carry the current `v_` params. Hidden hardware is canonicalized in `v_hidden`; it filters the chart, table and CSV while KPI cards, Compare and evidence retain the selected workload.
## Deployments, not concurrency, make the curve
-`/inference` sweeps batch size to trace each hardware's latency-vs-throughput frontier. A diffusion video server has no batching lever: the pinned H3 SGLang server is batch-one and single-replica, so client concurrency only queues requests — the retained C1/C2/C4 cells show throughput flat within ±1.5 % while latency scales with C. Joining those cells would draw a flat "curve" that measures the queue, not the hardware, so the chart never does.
+`/inference` sweeps batch size to trace each hardware's latency-vs-throughput frontier. The retained fixture uses a batch-one, single-replica H3 server: its C1/C2/C4 cells show throughput within ±1.5 % while latency grows with C. This describes that recorded configuration; it is not a claim about every diffusion server or future runtime. Joining those cells would draw a flat "curve" that measures the queue, not the hardware, so the chart never does.
The knob that does trade latency for efficiency is the **deployment**: how many GPU boards serve one request and how they split the model (`tp_size` × `ulysses_degree`). `deployment.ts` keys cells by it (`deploymentKey`), classifies `concurrency > replicas` as queueing (`isQueueing`; bundles that predate `execution.deployment.replica_count` ran one endpoint, so null reads as one), and picks each hardware's most efficient deployment as its representative (`leadCell`, used by the KPI cards, the Compare panel and the legend).
`plot.ts` (`plotVideoPoints`) then builds the chart from the non-queued cells only: a queued cell never reaches the chart (or the table and CSV) and lives in the evidence panel instead. Per hardware it takes the Pareto frontier over the remaining deployment cells (`frontier.ts` flips lower-is-better axes and reuses `paretoFrontUpperLeft` from the calculator); a solid line appears automatically once a hardware has two or more frontier deployments, and dominated deployments render faded. The one switch is **Optimal Only** in the legend (`v_optimal`, on by default, mirroring the inference tab's `i_optimal`): on, the chart, the table and the CSV (`listedVideoCells`) carry only the frontier deployments; off, dominated deployments join, faded on the chart. There is no "show queued requests" switch and no cross-hardware frontier.
-Today every hardware has exactly one measured deployment (4 GPUs per video, TP2 × Ulysses 2), so the chart is an honest three-point scatter and the caption says a per-hardware curve needs the GPUs-per-video sweep. That sweep (design plan P6) is backend work in InferenceX `experimental/video-generation` — the serving matrix currently varies only concurrency — and needs GPU authorisation; the frontend needs no change when its cells arrive, because they differ in `deploymentKey` and therefore add points rather than replace them.
+The retained dashboard fixture has exactly one measured deployment per measured hardware (4 GPUs per video, TP2 × Ulysses 2), so the chart is an honest three-point scatter and the caption says a per-hardware curve needs the GPUs-per-video sweep. That sweep (design plan P6) is backend work in InferenceX `experimental/video-generation` — the serving matrix currently varies only concurrency — and needs GPU authorisation; the frontend needs no change when its cells arrive, because they differ in `deploymentKey` and therefore add points rather than replace them.
## Sections below the chart
-- **API price reference** (`api-reference.ts`, `VideoApiReference.tsx`): a dated, editable USD per video-second list price (`v_api`, default `H3_API_REFERENCE`) feeds exactly one derived number, the API list price per video (`apiPricePerVideo` = price × clip seconds). It is shown beside the TCO cost per video on the KPI cards and as a table and CSV column; the chart never plots it, and no revenue, profit or price multiple is derived from it. The price is a web-search reference, labelled with its capture date and range, never presented as an official quote; a null or non-positive price nulls the list price, and `parseApiPrice` falls back to the reference rather than pricing at 0.
+- **API price reference** (`api-reference.ts`, `VideoApiReference.tsx`): a dated, editable USD per video-second list price (`v_api`, default `H3_API_REFERENCE`) feeds exactly one derived number, the API list price per video (`apiPricePerVideo` = price × clip seconds). It is shown beside the TCO cost per video on the KPI cards and as a table and CSV column; the chart never plots it, and no revenue, profit or price multiple is derived from it. The default records the MiniMax platform pay-as-you-go page captured on 2026-09-24 (the source has no effective date); it is a dated list-price input, not a current price guarantee; a null or non-positive price nulls the list price, and `parseApiPrice` falls back to the reference rather than pricing at 0.
- **Compare** (`compare.ts`, `compare-url-state.ts`, `VideoCompare.tsx`): arena-style baseline vs. candidate, video first — the same prompt + seed clips from both CI runs play side by side with shared play/pause/restart and previous/next case arrows (no blind mode, no case dropdown); the deltas below are fixed to time to video (P50), TCO cost per video and energy per video (`COMPARE_METRICS`, registry polarity), with the cost tier stated in a footnote. One selectable cell per hardware (its lead deployment), defaulting to the slowest hardware as baseline and the fastest as candidate; `v_base`, `v_cand`, `v_case` in the URL. The two stored artifacts (several MB each) load once the panel scrolls into view; an HTTP 204 side reads as "clips not published", never as an error.
-- **Compute-bound evidence** (`evidence.ts`, `VideoEvidence.tsx`): board power against the recorded enforced limit, the concurrency plateau (throughput flat, latency × C — the only place the queued cells appear), and observed speed-ups against memory-bandwidth and FLOPS spec ratios. Every hardware is read on the deployment layout most of them share (`sharedLayoutCells`) so the exhibits compare like with like; sentences stay conditional when ratios do not separate.
+- **Performance evidence** (`evidence.ts`, `VideoEvidence.tsx`): recorded board-power ratios, concurrency throughput/latency ratios and observed speed-ups beside memory-bandwidth/FLOPS specifications. Cross-hardware rows require a known canonical workload, a complete matching deployment layout and C1 (`sharedLayoutCells`); unmatched hardware is omitted, never replaced with its lead cell. Concurrency ratios require a matching workload, layout and replica count. The copy reports numbers without inferring power saturation, a throughput plateau or a compute/memory bottleneck. These mechanisms need separate experiments and telemetry.
## Rules
- **Unavailable hardware** stays visible. `VIDEO_HARDWARE_ROSTER` in `hardware.ts` lists the campaign targets; MI355X has no valid run and renders as a muted legend row, a "Not measured" KPI card with the failed-run link, and no table row. A missing point is never a zero.
- **Nulls**: every formula returns `null` when an input is missing or invalid — power phase invalid, fewer than ten samples for P90, unknown hardware key, missing GPU count. `formatMetric` prints `—`.
- **Newest observation wins**: `latestVideoCells` keeps the first (newest publication) observation per hardware × deployment × concurrency, so a re-run replaces, never duplicates, a point, while a new server layout adds one.
-- **One workload, real samples**: `dashboardCells` keeps only the workload measured on the most hardware and drops cells with fewer than ten valid clips (the P90 floor), so a smoke run of a shorter plan never becomes a point, a KPI lead or a Compare side; the Performance history list still shows it, and the Workload fact counts the hidden workloads.
+- **One workload, real samples**: the additive `workloadKey` preserves the full canonical workload identity from the source, including prompts and seeds; the shortened workload label is display text only. Missing identity stays null and is isolated by original source manifest. Runtime revision remains a disclosed comparison variable. `dashboardCells` keeps only the workload measured on the most hardware and drops cells with fewer than ten valid clips (the P90 floor), so a smoke run of a shorter plan never becomes a point, a KPI lead or a Compare side; the Performance history list still shows it, and the Workload fact counts the hidden workloads.
- **Strings**: component-local `STRINGS = { en, zh }` via `useLocale()`; SKUs, units and identifiers stay English.
- **Fixture**: `cypress/fixtures/api/video-history.json` is rebuilt from retained `StoredArtifact` exports with `bun run fixtures:video-history ` (`scripts/build-video-history-fixture.ts`); it is metadata only and registered in `_manifest.json`.
## 中文说明
-`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;已发布结果的“性能历史”列表收进可展开区块,`history-*` 深链接会自动展开;原有的按运行查看、trade-off 图表与 CI 运行浏览已移除。仪表板只取硬件覆盖最广的那个工作负载,并剔除有效视频不足 10 条的 cell(与 P90 门槛一致),因此较短 plan 的 smoke 运行不会成为图上的点、KPI 领先部署或 Compare 的一方,但仍会出现在性能历史列表中;工作负载一栏会注明隐藏的其他工作负载数量。`video-url-state.ts` 管理 `v_x`、`v_y`、`v_tier`、`v_view`、`v_optimal`、`v_api` 六个 URL 参数,默认值不写入 URL。页面外观与 `/inference` 对齐:标题、说明和分享按钮放在同一张 Card 的 DashboardSectionHeader 中,两组配置面板位于其下;成本档位改为在图表说明行内选择;Compare 与算力受限证据两个区块默认折叠,携带 `v_base`/`v_cand`/`v_case` 的深链接会自动展开 Compare;分享按钮会带上当前的 `v_` 参数。X 轴可选 P90(默认)或 P50 出片时间;Y 轴可选每 1 美元 TCO 视频数(默认,Hyperscaler 自有设备档位,单价与 `/inference` 同源)、每条视频 TCO 成本、每 GPU 小时视频数和每条视频 GPU 板卡能耗(kJ)。所有按 GPU 计的指标都以参与计算的 GPU 为分母(每条视频 4 张,TP2 × Ulysses 2),而不是任务预留的板卡数;保留数据中 H100 与 B200 的运行预留了 8 张却只用 4 张,图表标题下方的说明会点名这些硬件,对应 KPI 卡标题显示“4 / 8 张 GPU”。空闲板卡只作说明、不计成本,没有 GPU 口径切换。两条坐标轴都从 0 起,便于按长度比较。
+`/video` 以跨硬件图表为首屏:数据来自已发布 blob 索引的 per-cell 投影,浏览器不再为图表解析产物包;已发布结果的“性能历史”列表收进可展开区块,`history-*` 深链接会自动展开;原有的按运行查看、trade-off 图表与 CI 运行浏览已移除。仪表板只取硬件覆盖最广的那个工作负载,并剔除有效视频不足 10 条的 cell(与 P90 门槛一致),因此较短 plan 的 smoke 运行不会成为图上的点、KPI 领先部署或 Compare 的一方,但仍会出现在性能历史列表中;工作负载一栏会注明隐藏的其他工作负载数量。`video-url-state.ts` 管理 `v_x`、`v_y`、`v_tier`、`v_view`、`v_optimal`、`v_api`、`v_hidden` 等 URL 参数,默认值不写入 URL。页面外观与 `/inference` 对齐:标题、说明和分享按钮放在同一张 Card 的 DashboardSectionHeader 中,两组配置面板位于其下;成本档位改为在图表说明行内选择;Compare 与性能测量证据两个区块默认折叠,携带 `v_base`/`v_cand`/`v_case` 的深链接会自动展开 Compare;分享按钮会带上当前的 `v_` 参数。`v_hidden` 保存隐藏的硬件,作用于图表、表格和 CSV;KPI 卡、Compare 和证据面板仍展示所选工作负载。X 轴可选 P90(默认)或 P50 出片时间;Y 轴可选每 1 美元 TCO 视频数(默认,Hyperscaler 自有设备档位,单价与 `/inference` 同源)、每条视频 TCO 成本、每 GPU 小时视频数和每条视频 GPU 板卡能耗(kJ)。所有按 GPU 计的指标都以参与计算的 GPU 为分母(每条视频 4 张,TP2 × Ulysses 2),而不是任务预留的板卡数;保留数据中 H100 与 B200 的运行预留了 8 张却只用 4 张,图表标题下方的说明会点名这些硬件,对应 KPI 卡标题显示“4 / 8 张 GPU”。空闲板卡只作说明、不计成本,没有 GPU 口径切换。两条坐标轴都从 0 起,便于按长度比较。
-曲线来自部署而不是并发:pinned H3 服务是 batch-one、单副本,客户端并发只会排队(保留数据中 C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 线性增长),把这些点连起来画出的只是队列,因此图表绝不连接它们。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表(KPI 卡、Compare 面板和图例都用它);`plot.ts` 只用未排队的 cell 绘图——排队 cell 不会进入图表、表格和 CSV,只出现在证据面板——再按硬件对剩余部署点求 Pareto 前沿:某硬件有两个及以上前沿部署时自动画出实线,被支配的部署以淡色显示。唯一的开关是图例中的“仅最优”(`v_optimal`,默认开启,与 inference 页的 `i_optimal` 一致):开启时图表、表格和 CSV 只包含前沿部署,关闭后被支配的部署以淡色加入图表;没有“显示排队请求”开关,也没有跨硬件前沿。目前每种硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的三点散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
+曲线来自部署而不是并发:保留的 fixture 使用 batch-one、单副本 H3 服务,C1/C2/C4 的吞吐量相差不到 1.5%,延迟随 C 增长;这只描述该次配置,不代表所有 diffusion 服务或未来 runtime。仪表板将超过副本数的并发视为同一部署的排队观测,不把这些点连成部署曲线。真正在延迟与效率之间取舍的是部署方式:每条视频占用多少张 GPU 以及模型如何切分(`tp_size` × `ulysses_degree`)。`deployment.ts` 以此为 cell 键,把 `concurrency > replicas` 判定为排队,并为每种硬件选出最高效的部署作为代表(KPI 卡、Compare 面板和图例都用它);`plot.ts` 只用未排队的 cell 绘图——排队 cell 不会进入图表、表格和 CSV,只出现在证据面板——再按硬件对剩余部署点求 Pareto 前沿:某硬件有两个及以上前沿部署时自动画出实线,被支配的部署以淡色显示。唯一的开关是图例中的“仅最优”(`v_optimal`,默认开启,与 inference 页的 `i_optimal` 一致):开启时图表、表格和 CSV 只包含前沿部署,关闭后被支配的部署以淡色加入图表;没有“显示排队请求”开关,也没有跨硬件前沿。保留的仪表板 fixture 中,每种已测硬件只有一种实测部署(每条视频 4 张 GPU,TP2 × Ulysses 2),所以图表是诚实的三点散点图,说明文字会指出每硬件曲线还需扫描每条视频占用的 GPU 数;该扫描属于 InferenceX 后端工作并需要 GPU 授权,前端无需改动即可接收新 cell。MI355X 以“未测得”形式保留在图例与 KPI 卡中;缺失指标一律为 null,绝不写成 0。
-图表下方还有三个区块。带日期、可编辑的 API 参考价(`v_api`,来自网页搜索,标注采集日期与区间,不是官方报价)只推导一个数字——每条视频 API 标价(单价 × 视频秒数),显示在 KPI 卡每条视频 TCO 成本旁边,并作为表格和 CSV 的一列;它不进入图表,也不再推导收入、利润或价格倍数。价格缺失或不为正时该值为 null,`parseApiPrice` 会回退到参考价,而不是按 0 计价。Arena 式 Compare 以视频为主:同一 prompt 与 seed 在两种硬件上的视频并排播放,支持同步播放/暂停/重播和上一个/下一个用例箭头,没有盲测模式,也没有用例下拉框;下方的差值行固定为出片时间(P50)、每条视频 TCO 成本和每条视频能耗,并以脚注注明成本档位。每种硬件只有一个可选 cell(其代表部署),默认以最慢的硬件为基线、最快的为候选,选择记录在 `v_base`、`v_cand`、`v_case` 中;面板滚入视口时才加载两个已发布产物,HTTP 204 读作“未发布视频”而不是错误。compute-bound 证据面板展示板卡功率相对生效上限、并发排队平台(排队 cell 唯一出现的地方)以及相对带宽/FLOPS 规格比的实测加速比,所有硬件都读取它们共有的部署布局,比值无法区分时措辞保持保守。
+图表下方还有三个区块。带日期、可编辑的 API 参考价(`v_api`,记录 MiniMax 开放平台按量付费页在 2026-09-24 的价格,页面未标注生效日期;不保证当前仍适用)只推导一个数字——每条视频 API 标价(单价 × 视频秒数),显示在 KPI 卡每条视频 TCO 成本旁边,并作为表格和 CSV 的一列;它不进入图表,也不再推导收入、利润或价格倍数。价格缺失或不为正时该值为 null,`parseApiPrice` 会回退到参考价,而不是按 0 计价。Arena 式 Compare 以视频为主:同一 prompt 与 seed 在两种硬件上的视频并排播放,支持同步播放/暂停/重播和上一个/下一个用例箭头,没有盲测模式,也没有用例下拉框;下方的差值行固定为出片时间(P50)、每条视频 TCO 成本和每条视频能耗,并以脚注注明成本档位。每种硬件只有一个可选 cell(其代表部署),默认以最慢的硬件为基线、最快的为候选,选择记录在 `v_base`、`v_cand`、`v_case` 中;面板滚入视口时才加载两个已发布产物,HTTP 204 读作“未发布视频”而不是错误。性能测量证据面板展示板卡功率相对生效上限的比值、并发下的吞吐量和延迟比值,以及带宽/FLOPS 规格比与实测加速比。跨硬件比较要求完整且相同的工作负载身份、完整部署布局和 C1;缺少匹配布局的硬件直接省略,不回退到其代表部署。并发比较还要求相同副本数。文案只描述数值,不据此断言功率饱和、吞吐量平台或计算/内存瓶颈。
+
+完整工作负载身份由附加字段 `workloadKey` 保存,包含 prompts 与 seeds;缩写标签只用于显示。身份缺失时保持 null,按原始 source manifest 隔离,不跨来源合并。runtime revision 作为比较变量单独披露。仪表板最多读取五页历史;公开 `/api/v1/views/video` 默认复用相同选择与计算逻辑,旧 API 视图仍可显式指定。
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index f124c249d..de79bed48 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -113,7 +113,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
cy.get('[data-testid="video-compare-toggle"]').should('have.attr', 'aria-expanded', 'false');
cy.get('[data-testid="video-evidence-toggle"]').should('have.attr', 'aria-expanded', 'false');
cy.contains('[data-testid="video-dashboard"] h2', 'Compare');
- cy.contains('[data-testid="video-dashboard"] h2', 'Compute-bound evidence');
+ cy.contains('[data-testid="video-dashboard"] h2', 'Performance evidence');
cy.get('[data-testid="video-legend"]').should('contain', 'H100').and('contain', 'MI355X');
cy.get('[data-testid="video-legend"] [role="switch"]').should('have.length', 1);
cy.get('[data-testid="video-optimal-only"]').should('have.attr', 'aria-checked', 'true');
@@ -193,6 +193,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
mount();
cy.contains('[data-testid="video-legend"] li', 'H100').click();
points().should('have.length', 2);
+ cy.location('search').should('contain', 'v_hidden=h100');
cy.contains('button', 'Table').click();
tableRows().should('have.length', 2);
cy.get('[data-testid="video-points-table"]')
@@ -202,6 +203,14 @@ describe('Video hardware dashboard (retained fixture)', () => {
cy.location('search').should('contain', 'v_view=table');
cy.get('[data-testid="video-history-section"]').should('not.have.attr', 'open');
});
+ it('restores hidden hardware from a shared table URL', () => {
+ mount('/video', '?v_hidden=h100&v_view=table');
+ tableRows().should('have.length', 2);
+ cy.get('[data-testid="video-points-table"]').should('not.contain', 'H100');
+ cy.contains('[data-testid="video-legend"] li', 'H100').click();
+ tableRows().should('have.length', 3);
+ cy.location('search').should('not.contain', 'v_hidden=');
+ });
it('restores v_ params from the URL and opens the history section for history deep links', () => {
mount('/video', '?v_y=kjPerVideo&v_x=p50Latency&v_tier=r&history-hardware=H200');
points().should('have.length', 3);
@@ -267,7 +276,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
cy.get('[data-testid="video-compare-toggle"]').should('have.attr', 'aria-expanded', 'true');
cy.get('[data-testid="video-evidence-toggle"]').click();
cy.get('[data-testid="video-evidence-toggle"]').should('have.attr', 'aria-expanded', 'true');
- cy.contains('h2', 'Compute-bound evidence').should('have.length', 1);
+ cy.contains('h2', 'Performance evidence').should('have.length', 1);
mount('/video', '?v_cand=h200');
cy.get('[data-testid="video-compare"]').should('exist');
cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H200');
@@ -323,7 +332,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
cy.get('[data-testid="video-cost-tier"]').should('contain', 'Hyperscaler 自有设备');
cy.get('[data-testid="video-legend"]').should('contain', '仅最优');
cy.contains('[data-testid="video-dashboard"] h2', '对比');
- cy.contains('[data-testid="video-dashboard"] h2', '算力受限(compute-bound)的证据');
+ cy.contains('[data-testid="video-dashboard"] h2', '性能测量证据');
cy.get('[data-testid="video-config-bar"]')
.should('contain', 'X 轴指标')
.and('contain', 'Y 轴指标')
diff --git a/packages/app/cypress/component/video-evidence.cy.tsx b/packages/app/cypress/component/video-evidence.cy.tsx
index 129287cfb..3b38526a0 100644
--- a/packages/app/cypress/component/video-evidence.cy.tsx
+++ b/packages/app/cypress/component/video-evidence.cy.tsx
@@ -21,7 +21,40 @@ function mount(pathname = '/video', select = (points: VideoPoint[]) => points) {
}
const exhibit = (name: string) => cy.get(`[data-testid="video-evidence-${name}"]`);
-describe('Video compute-bound evidence (retained fixture)', () => {
+describe('Video performance evidence (retained fixture)', () => {
+ it('does not call low board power compute saturation', () => {
+ mount('/video', (points) =>
+ points
+ .filter((p) => p.hardwareKey === 'h200' && p.concurrency === 1)
+ .map((p) => ({ ...p, avgPowerW: 280 })),
+ );
+ exhibit('power-reading')
+ .should('contain', '10%')
+ .and('not.contain', 'near the cap')
+ .and('not.contain', 'compute-saturated');
+ cy.get('[data-testid="video-evidence"]').should('not.contain', 'Compute-bound evidence');
+ });
+ it('does not call higher throughput and lower latency a queueing plateau', () => {
+ mount('/video', (points) => {
+ const base = points.find((p) => p.hardwareKey === 'h200' && p.concurrency === 1)!;
+ return [
+ base,
+ {
+ ...base,
+ id: 'synthetic-c2',
+ concurrency: 2,
+ wallSeconds: base.wallSeconds! / 2,
+ p50: base.p50! / 2,
+ },
+ ];
+ });
+ exhibit('plateau-reading')
+ .should('contain', '100.0%')
+ .and('contain', '0.50× at C2')
+ .and('not.contain', 'rises')
+ .and('not.contain', 'queues requests');
+ exhibit('plateau').should('not.contain', 'Client concurrency plateau');
+ });
it('reads board power against the recorded enforced limit per measured hardware', () => {
mount();
exhibit('power').find('[data-testid="video-evidence-power-row"]').should('have.length', 3);
@@ -66,7 +99,7 @@ describe('Video compute-bound evidence (retained fixture)', () => {
.should('match', /width:\s*100%/u);
exhibit('power-reading').should('contain', 'H200 ran at 102% of its enforced power limit');
});
- it('tabulates the concurrency plateau with ratios against each hardware C1 cell', () => {
+ it('tabulates concurrency measurements with ratios against each hardware C1 cell', () => {
mount();
exhibit('plateau').find('tbody tr').should('have.length', 9);
exhibit('plateau').find('tbody th[scope="rowgroup"]').should('have.length', 3);
@@ -93,12 +126,12 @@ describe('Video compute-bound evidence (retained fixture)', () => {
.should('contain', '5.97')
.and('contain', '150.6');
exhibit('plateau-reading')
- .should('contain', 'Across 6 queued cells')
- .and('contain', 'within 1.4% of C1')
+ .should('contain', 'Across 6 cells above C1')
+ .and('contain', 'largest deviation in throughput per GPU-hour from C1 is 1.4%')
.and('contain', '1.97–2.00× at C2 and 3.94–4.00× at C4')
- .and('contain', 'queues requests instead of batching them');
+ .and('contain', 'These ratios alone do not establish queueing or batching');
});
- it('compares observed speedups with spec-sheet ratios and hedges when they do not separate', () => {
+ it('compares observed speedups with spec-sheet ratios without attributing a bottleneck', () => {
mount();
exhibit('scaling').find('[data-testid="video-evidence-scaling-row"]').should('have.length', 2);
exhibit('scaling')
@@ -107,50 +140,54 @@ describe('Video compute-bound evidence (retained fixture)', () => {
.and('contain', 'H200')
.and('contain', '1.11×')
.and('contain', '1.43×')
- .and('contain', '1.00×')
- .and('contain', 'closer to the FLOPS ratio');
+ .and('contain', '1.00×');
exhibit('scaling')
.find('[data-pair="h200-b200"]')
.should('contain', '1.93×')
.and('contain', '1.67×')
.and('contain', '2.28×')
- .and('contain', '2.27×')
- .and('contain', 'between the two, not clearly closer to either');
+ .and('contain', '2.27×');
exhibit('scaling-reading')
.should('contain', 'H100 → H200: 1.11× observed vs. 1.43× bandwidth and 1.00× FLOPS')
.and(
'contain',
'H200 → B200: 1.93× observed vs. 1.67× bandwidth and 2.28× (BF16) / 2.27× (FP8) FLOPS',
)
- .and('contain', 'A bandwidth-bound workload would track the bandwidth ratio');
+ .and('contain', 'Spec-sheet ratios provide context, not bottleneck attribution');
exhibit('caveats')
- .should('contain', 'Batch-one, single-replica server')
+ .should('contain', 'Client concurrency is not observed batch size or replica count')
.and('contain', '4 participating GPUs per video (TP2 × Ulysses 2)')
- .and('contain', 'allocated boards beyond those sit idle')
+ .and('contain', 'the allocated GPU count may differ')
.and('contain', 'not node, rack or facility power')
.and('contain', 'n = 20 clips per cell')
- .and('contain', 'Frozen workload 1344 × 768 · 8 s · 24 fps · 50 steps');
+ .and('contain', 'Matched workload: 1344 × 768 · 8 s · 24 fps · 50 steps');
});
- it('renders Chinese copy on /zh/video', () => {
+ it('renders Chinese copy on /zh/video at mobile width', () => {
+ cy.viewport(390, 844);
mount('/zh/video');
cy.get('[data-testid="video-evidence"]')
- .should('contain', '算力受限(compute-bound)的证据')
+ .should('contain', '性能测量证据')
.and('contain', '板卡功率 vs. 生效功率上限')
- .and('contain', '客户端并发平台期')
+ .and('contain', '客户端并发测量')
.and('contain', '实测加速比 vs. 规格表比值');
exhibit('power-reading').should(
'contain',
'全部 3 种实测硬件生成期间均运行在生效功率上限的 92%–97%',
);
exhibit('plateau-reading')
- .should('contain', '偏差不超过 1.4%')
+ .should('contain', '最大偏差为 1.4%')
.and('contain', 'C2 时 1.97–2.00×、C4 时 3.94–4.00×');
- exhibit('scaling')
- .should('contain', '更接近 FLOPS 比值')
- .and('contain', '介于两者之间,不明显偏向任一方');
+ exhibit('scaling-reading').should('contain', '规格表比值仅供参考,不能用于判定瓶颈');
+ cy.get('[data-testid="video-evidence"]')
+ .should('not.contain', '算力饱和')
+ .and('not.contain', '出片时间升至')
+ .should(($section) => {
+ expect($section[0].scrollWidth).to.be.at.most($section[0].clientWidth);
+ });
exhibit('caveats')
.should('contain', '每条视频由 4 张 GPU 参与计算(TP2 × Ulysses 2)')
.and('contain', '每个 cell n = 20 条视频');
+ cy.screenshot('video-evidence-zh-mobile', { capture: 'viewport' });
});
it('hides the plateau and scaling exhibits when only one hardware at C1 is measured', () => {
mount('/video', (points) =>
diff --git a/packages/app/cypress/e2e/video-dashboard.cy.ts b/packages/app/cypress/e2e/video-dashboard.cy.ts
index 0d67ff643..9ebbed9b7 100644
--- a/packages/app/cypress/e2e/video-dashboard.cy.ts
+++ b/packages/app/cypress/e2e/video-dashboard.cy.ts
@@ -8,6 +8,21 @@ describe('Video hardware dashboard (E2E fixtures)', () => {
// The Compare panel fetches two published artifacts once in view; keep the spec offline.
cy.intercept('GET', '/api/video-runs?run=*', { statusCode: 204 }).as('media');
});
+ it('keeps hardware visibility after reload and on a shared Chinese URL', () => {
+ cy.visit('/video');
+ cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 3);
+ cy.contains('[data-testid="video-legend"] li', 'H100').click();
+ cy.location('search').should('contain', 'v_hidden=h100');
+ cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 2);
+ cy.reload();
+ cy.get('[data-testid="video-hardware-chart"] circle.point').should('have.length', 2);
+ cy.location('search').then((search) => cy.visit(`/zh/video${search}&v_view=table`));
+ cy.get('[data-testid="video-points-table"] tbody tr').should('have.length', 2);
+ cy.get('[data-testid="video-points-table"]').should('not.contain', 'H100');
+ cy.contains('[data-testid="video-legend"] li', 'H100').click();
+ cy.get('[data-testid="video-points-table"] tbody tr').should('have.length', 3);
+ cy.location('search').should('not.contain', 'v_hidden=');
+ });
it('leads with the cross-hardware chart and restores v_ params from the URL', () => {
cy.visit('/video?v_y=kjPerVideo&v_tier=r');
// One measured deployment per hardware: three points, no frontier line, and the
diff --git a/packages/app/cypress/fixtures/api/_manifest.json b/packages/app/cypress/fixtures/api/_manifest.json
index 104ef24bf..b7c1705bb 100644
--- a/packages/app/cypress/fixtures/api/_manifest.json
+++ b/packages/app/cypress/fixtures/api/_manifest.json
@@ -101,10 +101,10 @@
"topLevel": "object"
},
"video-history": {
- "bytes": 18371,
- "capturedAt": "2026-09-20T03:49:19.738Z",
- "sha256": "16c1b9c97824fc68160454c14aeb79f2c3404595a5bd97b9bb8f286de42539f9",
- "source": "Retained public H3 metadata replay from original runs via videoHistoryEntry (per-cell GPU counts, board power and server layout); publication time unavailable. No new benchmark or publication.",
+ "bytes": 100442,
+ "capturedAt": "2026-09-26T08:01:00.397Z",
+ "sha256": "59dd1be0246da1f4702385399995ee9b2ea61fe40130e40fc751200a82a8a50a",
+ "source": "Retained public H3 metadata replay from original runs via videoHistoryEntry (canonical workload identity, per-cell GPU counts, board power and server layout); publication time unavailable. No new benchmark or publication.",
"topLevel": "object"
}
}
diff --git a/packages/app/cypress/fixtures/api/video-history.json b/packages/app/cypress/fixtures/api/video-history.json
index 5d8443a7b..84dfaa020 100644
--- a/packages/app/cypress/fixtures/api/video-history.json
+++ b/packages/app/cypress/fixtures/api/video-history.json
@@ -30,6 +30,7 @@
"concurrency": 1,
"runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
"workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"spoken-greeting-s11\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"bicycle-pass-s11\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s29\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s47\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"piano-notes-s29\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"drum-taps-s29\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"bicycle-pass-s29\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"water-pour-s47\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s83\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"piano-notes-s11\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s47\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"bicycle-pass-s83\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"bicycle-pass-s47\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s11\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"drum-taps-s11\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s83\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s83\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"water-pour-s29\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s83\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s47\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":8,\"flow_shift\":12,\"fps\":24,\"frame_count\":192,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
"model": "MiniMaxAI/MiniMax-H3",
"status": "complete",
"valid": 20,
@@ -62,6 +63,7 @@
"concurrency": 2,
"runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
"workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"spoken-greeting-s11\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"bicycle-pass-s11\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s29\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s47\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"piano-notes-s29\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"drum-taps-s29\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"bicycle-pass-s29\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"water-pour-s47\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s83\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"piano-notes-s11\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s47\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"bicycle-pass-s83\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"bicycle-pass-s47\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s11\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"drum-taps-s11\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s83\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s83\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"water-pour-s29\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s83\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s47\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":8,\"flow_shift\":12,\"fps\":24,\"frame_count\":192,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
"model": "MiniMaxAI/MiniMax-H3",
"status": "complete",
"valid": 20,
@@ -125,6 +127,7 @@
"concurrency": 4,
"runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
"workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"spoken-greeting-s11\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"bicycle-pass-s11\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s29\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s47\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"piano-notes-s29\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"drum-taps-s29\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"bicycle-pass-s29\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"water-pour-s47\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s83\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"piano-notes-s11\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s47\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"bicycle-pass-s83\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"bicycle-pass-s47\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s11\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"drum-taps-s11\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s83\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s83\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"water-pour-s29\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s83\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s47\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":8,\"flow_shift\":12,\"fps\":24,\"frame_count\":192,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
"model": "MiniMaxAI/MiniMax-H3",
"status": "complete",
"valid": 20,
@@ -188,6 +191,7 @@
"concurrency": 1,
"runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
"workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"spoken-greeting-s11\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"bicycle-pass-s11\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s29\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s47\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"piano-notes-s29\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"drum-taps-s29\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"bicycle-pass-s29\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"water-pour-s47\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s83\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"piano-notes-s11\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s47\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"bicycle-pass-s83\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"bicycle-pass-s47\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s11\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"drum-taps-s11\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s83\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s83\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"water-pour-s29\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s83\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s47\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":8,\"flow_shift\":12,\"fps\":24,\"frame_count\":192,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
"model": "MiniMaxAI/MiniMax-H3",
"status": "complete",
"valid": 20,
@@ -220,6 +224,7 @@
"concurrency": 2,
"runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
"workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"spoken-greeting-s11\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"bicycle-pass-s11\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s29\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s47\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"piano-notes-s29\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"drum-taps-s29\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"bicycle-pass-s29\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"water-pour-s47\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s83\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"piano-notes-s11\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s47\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"bicycle-pass-s83\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"bicycle-pass-s47\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s11\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"drum-taps-s11\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s83\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s83\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"water-pour-s29\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s83\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s47\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":8,\"flow_shift\":12,\"fps\":24,\"frame_count\":192,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
"model": "MiniMaxAI/MiniMax-H3",
"status": "complete",
"valid": 20,
@@ -252,6 +257,7 @@
"concurrency": 4,
"runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
"workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"spoken-greeting-s11\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"bicycle-pass-s11\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s29\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s47\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"piano-notes-s29\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"drum-taps-s29\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"bicycle-pass-s29\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"water-pour-s47\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s83\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"piano-notes-s11\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s47\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"bicycle-pass-s83\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"bicycle-pass-s47\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s11\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"drum-taps-s11\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s83\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s83\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"water-pour-s29\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s83\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s47\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":8,\"flow_shift\":12,\"fps\":24,\"frame_count\":192,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
"model": "MiniMaxAI/MiniMax-H3",
"status": "complete",
"valid": 20,
@@ -315,6 +321,7 @@
"concurrency": 1,
"runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
"workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"spoken-greeting-s11\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"bicycle-pass-s11\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s29\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s47\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"piano-notes-s29\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"drum-taps-s29\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"bicycle-pass-s29\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"water-pour-s47\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s83\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"piano-notes-s11\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s47\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"bicycle-pass-s83\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"bicycle-pass-s47\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s11\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"drum-taps-s11\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s83\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s83\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"water-pour-s29\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s83\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s47\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":8,\"flow_shift\":12,\"fps\":24,\"frame_count\":192,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
"model": "MiniMaxAI/MiniMax-H3",
"status": "complete",
"valid": 20,
@@ -347,6 +354,7 @@
"concurrency": 2,
"runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
"workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"spoken-greeting-s11\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"bicycle-pass-s11\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s29\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s47\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"piano-notes-s29\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"drum-taps-s29\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"bicycle-pass-s29\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"water-pour-s47\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s83\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"piano-notes-s11\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s47\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"bicycle-pass-s83\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"bicycle-pass-s47\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s11\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"drum-taps-s11\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s83\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s83\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"water-pour-s29\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s83\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s47\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":8,\"flow_shift\":12,\"fps\":24,\"frame_count\":192,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
"model": "MiniMaxAI/MiniMax-H3",
"status": "complete",
"valid": 20,
@@ -379,6 +387,7 @@
"concurrency": 4,
"runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
"workload": "1344 × 768 · 8 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11, 11, 29, 47, 29, 29, 29, 47, 83, 11, 47, 83, 47, 11, 11, 83, 83, 29, 83, 47 · A single continuous medium close-up of an adult presenter facing the camera in a",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"spoken-greeting-s11\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"bicycle-pass-s11\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s29\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s47\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"piano-notes-s29\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"drum-taps-s29\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"bicycle-pass-s29\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"water-pour-s47\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s83\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"piano-notes-s11\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s47\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"bicycle-pass-s83\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"bicycle-pass-s47\",\"prompt\":\"A single continuous eye-level shot of a cyclist riding from left to right across a paved park path, passing the camera and continuing into the distance. The bicycle wheels keep turning and the leaves move gently in the breeze. Tire sounds, wind, and distant birds are audible. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47},{\"case_id\":\"water-pour-s11\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"drum-taps-s11\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11},{\"case_id\":\"spoken-greeting-s83\",\"prompt\":\"A single continuous medium close-up of an adult presenter facing the camera in a quiet studio. The presenter smiles naturally and says clearly, \\\"Good morning. It is a beautiful day to try something new.\\\" Mouth movements follow the spoken sentence. The camera remains still. No background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s83\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"water-pour-s29\",\"prompt\":\"A single continuous close-up of a person slowly pouring water from a clear glass pitcher into a ceramic cup on a wooden table. The water stream, rising water level, and small ripples are visible. The pouring and gentle splashing are audible in a quiet kitchen. The camera remains still. No speech, music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":29},{\"case_id\":\"piano-notes-s83\",\"prompt\":\"A single continuous close-up of two human hands playing a short, slow melody on an acoustic piano. The fingers visibly press and release the keys, with each note ringing naturally in the room. The camera remains still. The piano is the only prominent sound. No speech, background music, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":83},{\"case_id\":\"drum-taps-s47\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":47}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":8,\"flow_shift\":12,\"fps\":24,\"frame_count\":192,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
"model": "MiniMaxAI/MiniMax-H3",
"status": "complete",
"valid": 20,
diff --git a/packages/app/scripts/build-video-history-fixture.ts b/packages/app/scripts/build-video-history-fixture.ts
index 550811491..3f5402da8 100644
--- a/packages/app/scripts/build-video-history-fixture.ts
+++ b/packages/app/scripts/build-video-history-fixture.ts
@@ -63,7 +63,7 @@ manifest.fixtures[FIXTURE_NAME] = {
capturedAt,
sha256: fixtureSha256(body),
source:
- 'Retained public H3 metadata replay from original runs via videoHistoryEntry (per-cell GPU counts, board power and server layout); publication time unavailable. No new benchmark or publication.',
+ 'Retained public H3 metadata replay from original runs via videoHistoryEntry (canonical workload identity, per-cell GPU counts, board power and server layout); publication time unavailable. No new benchmark or publication.',
topLevel: fixtureTopLevel(page),
};
manifest.generatedAt = capturedAt;
diff --git a/packages/app/src/app/api/v1/views/video/route.test.ts b/packages/app/src/app/api/v1/views/video/route.test.ts
new file mode 100644
index 000000000..a20b39f8a
--- /dev/null
+++ b/packages/app/src/app/api/v1/views/video/route.test.ts
@@ -0,0 +1,330 @@
+import { compareMetrics } from '@/components/video-benchmark/compare';
+import { resolveCompareSelection } from '@/components/video-benchmark/compare-url-state';
+import { concurrencyPlateau, powerUtilization } from '@/components/video-benchmark/evidence';
+import type {
+ VideoHistoryObservation,
+ VideoHistoryPage,
+} from '@/components/video-benchmark/history';
+import { metricValue } from '@/components/video-benchmark/metrics';
+import { listedVideoCells, plotVideoPoints } from '@/components/video-benchmark/plot';
+import { dashboardCells, videoPoints } from '@/components/video-benchmark/points';
+import { servingFixture } from '@/components/video-benchmark/serving.fixture';
+import type { StoredArtifact } from '@/components/video-benchmark/stored';
+import {
+ metricOptions,
+ readVideoDashboardState,
+} from '@/components/video-benchmark/video-url-state';
+import { NextRequest } from 'next/server';
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { GET } from './route';
+
+const source = vi.hoisted(() => vi.fn());
+vi.mock('@/app/api/video-runs/route', () => ({ GET: source }));
+
+const observation: VideoHistoryObservation = {
+ id: 'h200:c1',
+ cell: 'c1',
+ hardware: 'NVIDIA H200',
+ concurrency: 1,
+ runtime: 'frozen-runtime',
+ workload: '1344x768 · 8s · 24fps · 50 steps · MiniMax-H3',
+ workloadKey: 'frozen-workload',
+ model: 'MiniMaxAI/MiniMax-H3',
+ status: 'complete',
+ valid: 20,
+ completed: 20,
+ scheduled: 20,
+ failed: 0,
+ samples: 20,
+ p50: 100,
+ p90: 110,
+ clipsGpuHour: 5,
+ energyKj: 400,
+ participating: 4,
+ allocated: 8,
+ replicas: 1,
+ wallSeconds: 3600,
+ durationSeconds: 8,
+ frameCount: 192,
+ avgPowerW: 2000,
+ enforcedLimitW: 2800,
+ server: { tp: 2, ulysses: 2, attention: 'auto' },
+};
+
+function page(observations: VideoHistoryObservation[], nextPage: number | null): VideoHistoryPage {
+ return {
+ schemaVersion: 1,
+ nextPage,
+ entries: [
+ {
+ id: '123.456',
+ runId: '123',
+ publishedAt: '2026-09-20T00:00:00Z',
+ error: null,
+ artifact: {
+ id: 456,
+ name: 'h3-video-123-1',
+ expired: false,
+ stored: true,
+ size_in_bytes: 1,
+ },
+ sources: [
+ {
+ id: '123',
+ sha256: 'a'.repeat(64),
+ sourceSha: 'b'.repeat(40),
+ hardware: 'NVIDIA H200',
+ execution: 'complete',
+ observedAt: '2026-09-19T00:00:00Z',
+ kind: 'observation',
+ observations,
+ fidelity: null,
+ calibration: null,
+ releaseQualified: false,
+ error: null,
+ },
+ ],
+ },
+ ],
+ };
+}
+
+const pages = [
+ page(
+ [
+ observation,
+ {
+ ...observation,
+ id: 'h200:8g',
+ participating: 8,
+ p50: 130,
+ p90: 140,
+ server: { tp: 2, ulysses: 4, attention: 'auto' },
+ },
+ { ...observation, id: 'h200:c2', cell: 'c2', concurrency: 2, p50: 200, p90: 210 },
+ {
+ ...observation,
+ id: 'smoke:c1',
+ hardware: 'NVIDIA B200',
+ samples: 3,
+ workload: 'short smoke',
+ workloadKey: 'short-smoke',
+ p90: null,
+ },
+ ],
+ 2,
+ ),
+ page(
+ [
+ {
+ ...observation,
+ id: 'h100:c1',
+ hardware: 'NVIDIA H100 80GB HBM3',
+ p50: 120,
+ p90: 130,
+ wallSeconds: 4000,
+ },
+ { ...observation, p50: 999, p90: 999 }, // older re-export must not replace the first
+ ],
+ null,
+ ),
+];
+const request = (query = '') => new NextRequest(`https://example.test/api/v1/views/video?${query}`);
+
+beforeEach(() => {
+ source.mockReset();
+ source.mockImplementation((req: NextRequest) => {
+ if (req.nextUrl.searchParams.get('format') === 'history')
+ return Response.json(pages[Number(req.nextUrl.searchParams.get('page')) - 1]);
+ return new Response(null, { status: 204 });
+ });
+});
+
+describe('published VideoGenX dashboard projection', () => {
+ it('defaults to the current dashboard, reads history pages and preserves numerical parity', async () => {
+ const response = await GET(request());
+ expect(response.status).toBe(200);
+ expect(response.headers.get('cache-control')).toContain('no-store');
+ const body = await response.json();
+ const state = readVideoDashboardState('');
+ const { cells } = dashboardCells(videoPoints(pages));
+ const options = metricOptions(state);
+ expect(body.params.view).toBe('dashboard');
+ expect(body.coverage).toEqual({ pagesRead: 2, maxPages: 5, nextPage: null, truncated: false });
+ expect(body.plot).toEqual(plotVideoPoints(cells, state, () => '', new Set()));
+ expect(body.rows.map((row: { point: { id: string } }) => row.point.id)).toEqual(
+ listedVideoCells(cells, state, new Set()).map((p) => p.id),
+ );
+ expect(
+ body.rows.find((row: { point: { id: string } }) => row.point.id === 'h200:c1').metrics,
+ ).toMatchObject({
+ p50Latency: 100,
+ p90Latency: 110,
+ videosPerGpuHour: 5,
+ dollarsPerVideo: metricValue(
+ cells.find((p) => p.id === 'h200:c1')!,
+ 'dollarsPerVideo',
+ options,
+ ),
+ });
+ expect(body.evidence.power).toEqual(powerUtilization(cells));
+ expect(body.evidence.plateau).toEqual(concurrencyPlateau(cells));
+ expect(body.comparison.cases.status).toBe('not-requested');
+ expect(source).toHaveBeenCalledTimes(2);
+ expect(
+ source.mock.calls.every(([req]) => req.nextUrl.searchParams.get('format') === 'history'),
+ ).toBe(true);
+ });
+
+ it('shares axis, tier, optimal, API price, compare and hardware-filter semantics with the UI', async () => {
+ const query =
+ 'v_x=p50Latency&v_y=dollarsPerVideo&v_tier=r&v_optimal=0&v_api=0.08&v_hidden=h100&v_base=h200&v_cand=h100&v_case=3';
+ const response = await GET(request(query));
+ expect(response.status).toBe(200);
+ const body = await response.json();
+ const state = readVideoDashboardState(query);
+ const { cells } = dashboardCells(videoPoints(pages));
+ const options = metricOptions(state);
+ expect(body.plot).toEqual(plotVideoPoints(cells, state, () => '', new Set(['h100'])));
+ expect(body.rows.map((row: { point: { id: string } }) => row.point.id)).toEqual([
+ 'h200:c1',
+ 'h200:8g',
+ ]);
+ expect(
+ body.rows.every(
+ (row: { metrics: { apiPricePerVideo: number } }) => row.metrics.apiPricePerVideo === 0.64,
+ ),
+ ).toBe(true);
+ const pair = resolveCompareSelection(
+ { baseline: 'h200', candidate: 'h100', caseIndex: 3 },
+ cells,
+ );
+ expect(body.comparison.metrics).toEqual(
+ compareMetrics(pair.baseline!, pair.candidate!, options),
+ );
+ expect(body.params).toMatchObject({
+ hidden: ['h100'],
+ baseline: 'h200',
+ candidate: 'h100',
+ caseIndex: 3,
+ });
+ expect(
+ body.kpis.find((row: { hardwareKey: string }) => row.hardwareKey === 'h100').point,
+ ).not.toBeNull();
+ expect(body.evidence.power).toEqual(powerUtilization(cells));
+ });
+
+ it('reports the same five-page bound and never silently presents truncated history as complete', async () => {
+ source.mockImplementation((req: NextRequest) =>
+ Response.json(page([], Number(req.nextUrl.searchParams.get('page')) + 1)),
+ );
+ const response = await GET(request());
+ const body = await response.json();
+ expect(source).toHaveBeenCalledTimes(5);
+ expect(body.coverage).toEqual({ pagesRead: 5, maxPages: 5, nextPage: 6, truncated: true });
+ expect(body.rows).toEqual([]);
+ });
+
+ it('keeps missing published comparison media distinct from an empty successful matched case list', async () => {
+ const response = await GET(request('view=compare&v_base=h200&v_cand=h100&v_case=8'));
+ expect(response.status).toBe(200);
+ const body = await response.json();
+ expect(body.comparison.cases).toMatchObject({
+ status: 'not-published',
+ selected: null,
+ resolvedCaseIndex: 0,
+ });
+ expect(
+ source.mock.calls.filter(([req]) => req.nextUrl.searchParams.get('format') === 'published'),
+ ).toHaveLength(1);
+ });
+
+ it('pairs published cases, clamps the requested index and excludes asset URLs and raw documents', async () => {
+ const fixture = servingFixture();
+ fixture.documents.set('manifest.json', fixture.manifest);
+ fixture.documents.set('ci.json', fixture.ci);
+ fixture.checksums.set('manifest.json', 'a'.repeat(64));
+ const saved: StoredArtifact = {
+ storageVersion: 1,
+ runId: '123',
+ artifact: { id: 456, name: 'published', expired: false, size_in_bytes: 1 },
+ sources: [
+ {
+ id: '123',
+ documents: [...fixture.documents],
+ checksums: [...fixture.checksums],
+ texts: [],
+ assets: [
+ [
+ 'gpu/c1/baseline/artifacts/measurement-r001-c001.mp4',
+ {
+ url: 'https://private.test/secret-token',
+ downloadUrl: 'https://private.test/download',
+ },
+ ],
+ ],
+ },
+ ],
+ };
+ source.mockImplementation((req: NextRequest) =>
+ Response.json(
+ req.nextUrl.searchParams.get('format') === 'published'
+ ? saved
+ : pages[Number(req.nextUrl.searchParams.get('page')) - 1],
+ ),
+ );
+ const response = await GET(request('view=compare&v_case=9999'));
+ const body = await response.json();
+ expect(body.comparison.cases).toMatchObject({
+ status: 'ready',
+ count: 4,
+ resolvedCaseIndex: 3,
+ unmatched: { baseline: 0, candidate: 0 },
+ selected: {
+ repetition: 3,
+ baseline: { slotId: 'measurement-r004-c001', seconds: 120 },
+ candidate: { slotId: 'measurement-r004-c001', seconds: 120 },
+ },
+ });
+ expect(JSON.stringify(body)).not.toMatch(/private\.test|secret-token|\/runtime\/sglang/);
+ expect(body.comparison.cases.selected.baseline.mediaPath).toBe(
+ 'gpu/c1/baseline/artifacts/measurement-r004-c001.mp4',
+ );
+ });
+
+ it('retains explicit discovery and treats media read failure as unavailable, not zero pairs', async () => {
+ source.mockImplementation(() => Response.json({ runs: [] }));
+ const discoveryResponse = await GET(request('view=discovery&page=2'));
+ const discovery = await discoveryResponse.json();
+ expect(discovery.discovery).toEqual({ runs: [] });
+ expect(source.mock.calls[0][0].nextUrl.searchParams.get('page')).toBe('2');
+ source.mockImplementation((req: NextRequest) =>
+ req.nextUrl.searchParams.get('format') === 'published'
+ ? Response.json({ error: 'secret-token' }, { status: 503 })
+ : Response.json(pages[Number(req.nextUrl.searchParams.get('page')) - 1]),
+ );
+ const compareResponse = await GET(request('view=compare'));
+ const body = await compareResponse.json();
+ expect(body.comparison.cases.status).toBe('unavailable');
+ expect(body.rows.length).toBeGreaterThan(0);
+ expect(JSON.stringify(body)).not.toContain('secret-token');
+ });
+
+ it('rejects mixed modes and strips source errors instead of leaking private details', async () => {
+ for (const query of [
+ 'view=dashboard&run=123',
+ 'run=123&v_x=p50Latency',
+ 'page=2',
+ 'v_hidden=h100&v_hidden=h200',
+ ]) {
+ const response = await GET(request(query));
+ expect(response.status).toBe(400);
+ }
+ source.mockImplementation(() =>
+ Response.json({ error: 'secret-token https://private.test' }, { status: 503 }),
+ );
+ const response = await GET(request());
+ expect(response.status).toBe(503);
+ expect(await response.json()).toEqual({ error: 'Source data unavailable' });
+ });
+});
diff --git a/packages/app/src/app/api/v1/views/video/route.ts b/packages/app/src/app/api/v1/views/video/route.ts
index c83eecec4..631816c43 100644
--- a/packages/app/src/app/api/v1/views/video/route.ts
+++ b/packages/app/src/app/api/v1/views/video/route.ts
@@ -1,4 +1,9 @@
import { GET as videoRuns } from '@/app/api/video-runs/route';
+import { compareSide, pairCases } from '@/components/video-benchmark/compare';
+import {
+ VIDEO_HISTORY_MAX_PAGES,
+ type VideoHistoryPage,
+} from '@/components/video-benchmark/history';
import { servingCells } from '@/components/video-benchmark/serving';
import { storedBundle, type StoredArtifact } from '@/components/video-benchmark/stored';
import {
@@ -18,11 +23,102 @@ import {
} from '@/lib/views-api/params';
import { VIEW_QUERY_PARAMS } from '@/lib/views-api/registry';
import { readResponse, sourceRequest } from '@/lib/views-api/source';
+import { videoDashboardProjection } from '@/lib/views-api/video-dashboard';
import { type NextRequest, NextResponse } from 'next/server';
export const dynamic = 'force-dynamic';
export const maxDuration = 300;
const headers = { 'Cache-Control': 'private, no-store' };
+
+async function dashboardResponse(request: NextRequest, view: 'dashboard' | 'compare') {
+ const pages: VideoHistoryPage[] = [];
+ let nextPage: number | null = 1;
+ for (let page = 1; page <= VIDEO_HISTORY_MAX_PAGES; page++) {
+ const payload = await readResponse(
+ await videoRuns(
+ sourceRequest(request, '/api/video-runs', { format: 'history', page: String(page) }),
+ ),
+ );
+ if (payload.schemaVersion !== 1 || !Array.isArray(payload.entries))
+ throw new Error('Unsupported published history projection');
+ pages.push(payload);
+ nextPage = payload.nextPage;
+ if (nextPage === null) break;
+ }
+ const projection = videoDashboardProjection(pages, request.nextUrl.search);
+ const { baseline, candidate } = projection.comparison;
+ let cases: {
+ status: 'not-requested' | 'no-pair' | 'not-published' | 'ready' | 'unavailable';
+ resolvedCaseIndex: number;
+ count: number;
+ selected: ReturnType['pairs'][number] | null;
+ unmatched: ReturnType['unmatched'] | null;
+ } = { status: 'not-requested', resolvedCaseIndex: 0, count: 0, selected: null, unmatched: null };
+ if (view === 'compare') {
+ cases.status = 'no-pair';
+ if (baseline && candidate) {
+ // Same artifact can contain both points. Read it once, through the published-only media path.
+ const artifacts = new Map();
+ try {
+ for (const point of [baseline, candidate]) {
+ const key = `${point.runId}:${point.artifactId}`;
+ if (artifacts.has(key)) continue;
+ const response = await videoRuns(
+ sourceRequest(request, '/api/video-runs', {
+ run: point.runId,
+ artifact: String(point.artifactId),
+ format: 'published',
+ }),
+ );
+ artifacts.set(
+ key,
+ response.status === 204 ? null : await readResponse(response),
+ );
+ }
+ const b = artifacts.get(`${baseline.runId}:${baseline.artifactId}`);
+ const c = artifacts.get(`${candidate.runId}:${candidate.artifactId}`);
+ cases.status = 'not-published';
+ if (b && c) {
+ const matched = pairCases(
+ compareSide(b, baseline).records,
+ compareSide(c, candidate).records,
+ );
+ const index = Math.min(
+ projection.params.caseIndex,
+ Math.max(matched.pairs.length - 1, 0),
+ );
+ cases = {
+ status: 'ready',
+ resolvedCaseIndex: index,
+ count: matched.pairs.length,
+ selected: matched.pairs[index] ?? null,
+ unmatched: matched.unmatched,
+ };
+ }
+ } catch {
+ // Like the collapsed UI panel, a media error does not erase published chart metrics.
+ cases.status = 'unavailable';
+ }
+ }
+ }
+ return NextResponse.json(
+ {
+ view: 'video',
+ apiVersion: 'v1',
+ ...projection,
+ params: { ...projection.params, view, displayView: projection.params.view },
+ coverage: {
+ pagesRead: pages.length,
+ maxPages: VIDEO_HISTORY_MAX_PAGES,
+ nextPage,
+ truncated: nextPage !== null,
+ },
+ comparison: { ...projection.comparison, cases },
+ },
+ { headers },
+ );
+}
+
function serializePoint({
run: evidenceRun,
...point
@@ -42,6 +138,24 @@ export function GET(request: NextRequest) {
return runViewsRoute('video', async () => {
validateViewParams(request.nextUrl.searchParams, VIEW_QUERY_PARAMS['video']);
const s = request.nextUrl.searchParams;
+ const mode = parseEnumParam(
+ s.get('view'),
+ 'view',
+ ['dashboard', 'compare', 'discovery', 'results', 'tradeoff'],
+ s.has('run') || s.has('artifact') ? 'results' : 'dashboard',
+ );
+ if (mode === 'dashboard' || mode === 'compare') {
+ for (const key of s.keys())
+ if (key !== 'view' && !key.startsWith('v_'))
+ throw new ViewsApiParamError(key, 'Use a legacy view for run/artifact selectors');
+ return dashboardResponse(request, mode);
+ }
+ for (const key of s.keys())
+ if (key.startsWith('v_'))
+ throw new ViewsApiParamError(
+ key,
+ 'Dashboard selectors require view=dashboard or view=compare',
+ );
// GitHub run id and artifact id share the positive-digits rule.
const run = parseRunIdParam(s.get('run'), 'run');
const artifact = parseRunIdParam(s.get('artifact'), 'artifact');
@@ -176,7 +290,7 @@ export function GET(request: NextRequest) {
['participating', 'allocated'],
'participating',
);
- const view = parseEnumParam(s.get('view'), 'view', ['results', 'tradeoff'], 'results');
+ const view = mode;
const cell = s.get('cell'),
slot = s.get('slot');
const evidence = selectedSource
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index 5ec4c666d..64c1bca5e 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -62,7 +62,7 @@ const STRINGS = {
en: {
title: 'VideoGenX · MiniMax-H3 across hardware',
subtitle:
- 'One frozen workload, one model and runtime, measured on each GPU: time to video, useful output per GPU-hour and per TCO dollar, and metered GPU-board energy.',
+ 'Measured GPU deployments on one workload: time to video, useful output per GPU-hour and per TCO dollar, and metered GPU-board energy. Runtime and layout details accompany each result.',
chart: 'Chart',
table: 'Table',
viewToggle: 'Chart or table view',
@@ -70,9 +70,9 @@ const STRINGS = {
optimalInfo:
"Show only each hardware's Pareto-optimal deployments for the selected axes; turn off to see the dominated deployments faded.",
compare: 'Compare',
- evidence: 'Compute-bound evidence',
+ evidence: 'Performance evidence',
toggleCompare: 'Show or hide the Compare section',
- toggleEvidence: 'Show or hide the compute-bound evidence',
+ toggleEvidence: 'Show or hide performance evidence',
tier: 'Cost tier',
badges: 'TCO $/chip/hr',
source: 'Source',
@@ -96,16 +96,16 @@ const STRINGS = {
zh: {
title: 'VideoGenX · MiniMax-H3 跨硬件对比',
subtitle:
- '固定的工作负载、模型与运行时,在每种 GPU 上实测:出片时间、每 GPU 小时和每美元 TCO 的有效产出,以及 GPU 板卡的实测能耗。',
+ '同一工作负载在不同 GPU 部署下的实测结果:出片时间、每 GPU 小时和每美元 TCO 的有效产出,以及 GPU 板卡能耗。各结果同时列出 runtime 与部署配置。',
chart: '图表',
table: '表格',
viewToggle: '图表或表格视图',
optimalOnly: '仅最优',
optimalInfo: '只显示各硬件在当前坐标轴下的 Pareto 最优部署;关闭后以淡色显示被支配的部署。',
compare: '对比',
- evidence: '算力受限(compute-bound)的证据',
+ evidence: '性能测量证据',
toggleCompare: '展开或收起“对比”区块',
- toggleEvidence: '展开或收起算力受限证据',
+ toggleEvidence: '展开或收起性能测量证据',
tier: '成本档位',
badges: 'TCO $/chip/hr',
source: '来源',
@@ -141,7 +141,7 @@ export default function VideoDashboard() {
const s = STRINGS[locale];
const { points, loading, error, replay, retry } = useVideoPoints();
const { state, update } = useVideoDashboardState();
- const [hidden, setHidden] = useState>(() => new Set());
+ const hidden = useMemo(() => new Set(state.hidden), [state.hidden]);
const [legendExpanded, setLegendExpanded] = useState(true);
const [historyOpen, setHistoryOpen] = useState(false);
const [compareOpen, setCompareOpen] = useState(false);
@@ -217,12 +217,10 @@ export default function VideoDashboard() {
title: unavailable?.[locale],
onClick: (name: string) => {
if (!measured.has(name)) return;
- setHidden((old) => {
- const next = new Set(old);
- if (next.has(name)) next.delete(name);
- else next.add(name);
- return next;
- });
+ const next = new Set(hidden);
+ if (next.has(name)) next.delete(name);
+ else next.add(name);
+ update({ hidden: [...next] });
track('video_legend_toggled', { hardware: name });
},
};
diff --git a/packages/app/src/components/video-benchmark/VideoEvidence.tsx b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
index 24f92819a..eb3929f6a 100644
--- a/packages/app/src/components/video-benchmark/VideoEvidence.tsx
+++ b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
@@ -11,7 +11,6 @@ import {
plateauSummary,
powerRange,
powerUtilization,
- readSpeedup,
scalingVsSpec,
type ConcurrencyPlateauRow,
type ScalingVsSpecRow,
@@ -21,23 +20,23 @@ import { formatMetric, type VideoPoint } from './metrics';
const STRINGS = {
en: {
- title: 'Compute-bound evidence',
+ title: 'Performance evidence',
subtitle:
- 'Three readings from the measured cells on why this workload behaves like a compute-bound diffusion model on the pinned runtime. Every number is computed from the published runs; the wording follows the numbers.',
+ 'Measurements from published cells with a known shared workload and layout. These observations do not establish the performance bottleneck.',
power: 'Board power vs. enforced limit',
powerHint:
'Mean GPU-board power of the participating boards while generating, against the power limit recorded around the run, not marketing TDP.',
powerOne: (hardware: string, share: string) =>
- `${hardware} ran at ${share} of its enforced power limit while generating: near the cap, as a compute-saturated workload would.`,
+ `${hardware} ran at ${share} of its enforced power limit while generating. Power share alone does not identify a bottleneck.`,
powerAll: (n: number, share: string) =>
- `All ${n} measured GPU types ran at ${share} of their enforced power limit while generating: near the cap, as a compute-saturated workload would.`,
+ `All ${n} measured GPU types ran at ${share} of their enforced power limit while generating. Power share alone does not identify a bottleneck.`,
notRecorded: 'power or limit not recorded',
meter: 'share of enforced power limit',
- plateau: 'Client concurrency plateau',
+ plateau: 'Client concurrency measurements',
plateauHint:
- "Newest cell per hardware and client concurrency; ratios are against the same hardware's C1 cell.",
+ 'Newest comparable cell per hardware and client concurrency; ratios use C1 on the same hardware, workload and layout.',
plateauSentence: (queued: number, deviation: string, latency: string) =>
- `Across ${queued} queued cells, throughput per GPU-hour stays within ${deviation} of C1 while P50 time to video rises to ${latency}: on the batch-one server, extra client concurrency queues requests instead of batching them.`,
+ `Across ${queued} cells above C1, the largest deviation in throughput per GPU-hour from C1 is ${deviation}; P50 time-to-video ratios are ${latency}. These ratios alone do not establish queueing or batching.`,
at: (concurrency: number, range: string) => `${range} at C${concurrency}`,
hardware: 'Hardware',
c: 'C',
@@ -47,68 +46,52 @@ const STRINGS = {
latency: '× C1 latency',
scaling: 'Observed speedup vs. spec-sheet ratios',
scalingHint:
- 'Consecutive hardware from slowest to fastest C1 P50. Observed = P50 ratio; spec ratios use per-GPU HBM bandwidth and dense tensor-core TFLOPS from the GPU specs page.',
+ 'Consecutive hardware from slowest to fastest C1 P50 on the same workload and layout. Observed = P50 ratio; spec ratios use per-GPU HBM bandwidth and dense tensor-core TFLOPS from the GPU specs page.',
pair: 'Pair',
observed: 'Observed (P50 ratio)',
bandwidth: 'Memory bandwidth',
bf16: 'BF16 dense',
fp8: 'FP8 dense',
- reading: 'Reading',
- readings: {
- missing: 'spec missing',
- compute: 'closer to the FLOPS ratio',
- bandwidth: 'closer to the bandwidth ratio',
- between: 'between the two, not clearly closer to either',
- above: 'above both spec ratios, not clearly closer to either',
- below: 'below both spec ratios, not clearly closer to either',
- },
- scalingStep: (
- from: string,
- to: string,
- observed: string,
- bandwidth: string,
- flops: string,
- reading: string,
- ) =>
- `${from} → ${to}: ${observed} observed vs. ${bandwidth} bandwidth and ${flops} FLOPS, ${reading}.`,
+ scalingStep: (from: string, to: string, observed: string, bandwidth: string, flops: string) =>
+ `${from} → ${to}: ${observed} observed vs. ${bandwidth} bandwidth and ${flops} FLOPS.`,
scalingTail:
- 'A bandwidth-bound workload would track the bandwidth ratio; a compute-bound one the FLOPS ratio.',
+ 'Spec-sheet ratios provide context, not bottleneck attribution. Identifying a compute or bandwidth bottleneck requires matched profiling or controlled experiments.',
caveats: 'Read with these caveats',
caveatServer:
- 'Batch-one, single-replica server: client concurrency queues requests rather than batching them.',
+ 'Client concurrency is not observed batch size or replica count; these measurements alone do not qualify serving capacity.',
caveatGpus: (n: number, recipe: string) =>
- `${n} participating GPUs per video${recipe}; allocated boards beyond those sit idle.`,
+ `${n} participating GPUs per video${recipe}; the allocated GPU count may differ.`,
caveatGpusUnknown: 'Participating GPUs per video differ between cells or were not recorded.',
recipe: (tp: number, ulysses: number) => ` (TP${tp} × Ulysses ${ulysses})`,
caveatPower:
'GPU-board power against the recorded enforced limit; not node, rack or facility power.',
caveatSamples: (n: string) =>
- `n = ${n} clips per cell, one cohort per hardware: no error bars, and P90 is a display floor rather than a tail SLO.`,
+ `n = ${n} clips per cell; no uncertainty interval is shown. P90 requires enough samples for display and does not establish a tail SLO.`,
caveatSamplesUnknown: 'Sample counts were not recorded.',
caveatWorkload: (workload: string) =>
- `Frozen workload ${workload}; every ratio compares the same clip across hardware.`,
- caveatWorkloadUnknown:
- 'Cells do not share one workload label; cross-hardware ratios only hold for the same clip.',
+ `Matched workload: ${workload}. Matching uses recorded inputs and measurement semantics; runtime and hardware configuration can still differ.`,
+ caveatWorkloadUnknown: 'Ratios require a known matching workload and layout.',
caveatAttention: (backends: string) =>
`Attention backend differs by hardware (${backends}); each point is hardware plus its measured recipe.`,
},
zh: {
- title: '算力受限(compute-bound)的证据',
+ title: '性能测量证据',
subtitle:
- '来自实测 cell 的三组读数,说明该工作负载在固定 runtime 上为何表现为算力受限的扩散模型。所有数字均由已发布运行计算得出,措辞以数字为准。',
+ '这些测量值来自已发布且工作负载、部署布局一致的 cell。仅凭这些读数,无法确定性能瓶颈。',
power: '板卡功率 vs. 生效功率上限',
powerHint:
'生成期间各参与计算 GPU 板卡的平均功率,对照运行前后记录到的功率上限,而非标称 TDP。',
powerOne: (hardware: string, share: string) =>
- `${hardware} 生成期间运行在生效功率上限的 ${share}:接近上限,符合算力饱和型负载的表现。`,
+ `${hardware} 生成期间运行在生效功率上限的 ${share}。仅凭功率占比,无法判断性能瓶颈。`,
powerAll: (n: number, share: string) =>
- `全部 ${n} 种实测硬件生成期间均运行在生效功率上限的 ${share}:接近上限,符合算力饱和型负载的表现。`,
+ `全部 ${n} 种实测硬件生成期间均运行在生效功率上限的 ${share}。仅凭功率占比,无法判断性能瓶颈。`,
notRecorded: '未记录功率或上限',
meter: '占生效功率上限的比例',
- plateau: '客户端并发平台期',
- plateauHint: '每种硬件、每个客户端并发下最新的 cell;比值均相对同一硬件的 C1 cell。',
+ plateau: '客户端并发测量',
+ plateauHint:
+ '每种硬件、每个客户端并发下最新的可比 cell;基线为同一硬件、工作负载和部署布局下的 C1。',
plateauSentence: (queued: number, deviation: string, latency: string) =>
- `在 ${queued} 个排队 cell 中,每 GPU 小时吞吐量与 C1 的偏差不超过 ${deviation},而 P50 出片时间升至 ${latency}:在 batch-one 服务器上,额外的客户端并发只是让请求排队,并没有形成 batching。`,
+ `在 ${queued} 个并发高于 C1 的 cell 中,每 GPU 小时吞吐量相对 C1 的最大偏差为 ${deviation};P50 出片时间比值为 ${latency}。仅凭这些比值,无法确认排队或 batching 机制。`,
at: (concurrency: number, range: string) => `C${concurrency} 时 ${range}`,
hardware: '硬件',
c: 'C',
@@ -118,51 +101,39 @@ const STRINGS = {
latency: '延迟(相对 C1)',
scaling: '实测加速比 vs. 规格表比值',
scalingHint:
- '按 C1 P50 从慢到快排列的相邻硬件。实测值为 P50 比值;规格比值取自 GPU 规格页的单卡 HBM 带宽与 dense tensor-core TFLOPS。',
+ '同一工作负载和部署布局下,按 C1 P50 从慢到快排列的相邻硬件。实测值为 P50 比值;规格比值取自 GPU 规格页的单卡 HBM 带宽与 dense tensor-core TFLOPS。',
pair: '硬件对',
observed: '实测(P50 比值)',
bandwidth: '显存带宽',
bf16: 'BF16 dense',
fp8: 'FP8 dense',
- reading: '判读',
- readings: {
- missing: '缺少规格',
- compute: '更接近 FLOPS 比值',
- bandwidth: '更接近带宽比值',
- between: '介于两者之间,不明显偏向任一方',
- above: '高于两个规格比值,不明显偏向任一方',
- below: '低于两个规格比值,不明显偏向任一方',
- },
- scalingStep: (
- from: string,
- to: string,
- observed: string,
- bandwidth: string,
- flops: string,
- reading: string,
- ) =>
- `${from} → ${to}:实测 ${observed},对比带宽比值 ${bandwidth}、FLOPS 比值 ${flops},${reading}。`,
- scalingTail: '带宽受限的负载会跟随带宽比值,算力受限的负载会跟随 FLOPS 比值。',
+ scalingStep: (from: string, to: string, observed: string, bandwidth: string, flops: string) =>
+ `${from} → ${to}:实测 ${observed},对比带宽比值 ${bandwidth}、FLOPS 比值 ${flops}。`,
+ scalingTail:
+ '规格表比值仅供参考,不能用于判定瓶颈。确认算力或带宽瓶颈,需要在条件一致时进行 profiling 或对照实验。',
caveats: '阅读时请注意',
- caveatServer: 'batch-one 单副本服务器:客户端并发只会让请求排队,不会形成 batching。',
+ caveatServer: '客户端并发不等于实测 batch size 或副本数;这些测量值本身不足以验证服务容量。',
caveatGpus: (n: number, recipe: string) =>
- `每条视频由 ${n} 张 GPU 参与计算${recipe};超出部分的已分配板卡处于空闲。`,
+ `每条视频由 ${n} 张 GPU 参与计算${recipe};已分配的 GPU 数可能不同。`,
caveatGpusUnknown: '各 cell 参与计算的 GPU 数不一致或未记录。',
recipe: (tp: number, ulysses: number) => `(TP${tp} × Ulysses ${ulysses})`,
caveatPower: 'GPU 板卡级功率,对照记录到的生效上限;不是节点、机柜或设施功率。',
caveatSamples: (n: string) =>
- `每个 cell n = ${n} 条视频、每种硬件一个批次:没有误差棒;P90 仅在样本数达到显示门槛时展示,不能当作尾延迟 SLO。`,
+ `每个 cell n = ${n} 条视频;未展示不确定性区间。P90 仅在样本数达到显示门槛时展示,不能据此确认尾延迟 SLO。`,
caveatSamplesUnknown: '未记录样本数。',
caveatWorkload: (workload: string) =>
- `冻结的工作负载 ${workload};所有比值都是同一条视频在不同硬件上的对比。`,
- caveatWorkloadUnknown: '各 cell 的工作负载标签不一致;跨硬件比值只在同一条视频下成立。',
+ `已匹配的工作负载:${workload}。匹配依据为记录的输入和测量口径;runtime 和硬件配置仍可能不同。`,
+ caveatWorkloadUnknown: '只有工作负载和部署布局已知且一致时,才计算比值。',
caveatAttention: (backends: string) =>
`各硬件的 attention 后端不同(${backends});每个数据点都是“硬件 + 实测配置”。`,
},
};
const number = (value: number, digits: number) =>
- value.toLocaleString('en-US', { minimumFractionDigits: digits, maximumFractionDigits: digits });
+ value.toLocaleString('en-US', {
+ minimumFractionDigits: digits,
+ maximumFractionDigits: digits,
+ });
const times = (value: number | null) => (value === null ? '—' : `${number(value, 2)}×`);
/** "92–97" or "97" when both ends print alike. */
function span(min: number, max: number, digits: number): string {
@@ -201,8 +172,8 @@ export interface VideoEvidenceProps {
}
/**
- * Compute-bound evidence panel: board power at the enforced limit, the
- * client-concurrency plateau and observed speedups against spec-sheet ratios.
+ * Descriptive evidence panel: measured board power, client-concurrency ratios
+ * and observed speedups against spec-sheet ratios.
* Each exhibit renders only when the measured cells support it, and every
* sentence is built from the computed numbers; the section disappears when
* nothing is measured.
@@ -253,11 +224,6 @@ export default function VideoEvidence({ points, colorFor }: VideoEvidenceProps)
const fp8 = times(row.fp8Ratio);
return bf16 === fp8 ? bf16 : `${bf16} (BF16) / ${fp8} (FP8)`;
};
- const readingText = (row: ScalingVsSpecRow) => {
- const reading = readSpeedup(row);
- if (reading === null) return s.readings.missing;
- return reading.decisive ? s.readings[reading.closest] : s.readings[reading.position];
- };
const scalingSentence =
scaling.length === 0
? null
@@ -269,7 +235,6 @@ export default function VideoEvidence({ points, colorFor }: VideoEvidenceProps)
times(row.observedSpeedup),
times(row.memoryBandwidthRatio),
flops(row),
- readingText(row),
),
)
.join(' ')} ${s.scalingTail}`;
@@ -443,7 +408,6 @@ export default function VideoEvidence({ points, colorFor }: VideoEvidenceProps)
{s.bandwidth}
{s.bf16}
{s.fp8}
- {s.reading}
@@ -466,7 +430,6 @@ export default function VideoEvidence({ points, colorFor }: VideoEvidenceProps)
{times(row.memoryBandwidthRatio)}
{times(row.bf16Ratio)}
{times(row.fp8Ratio)}
- {readingText(row)}
))}
diff --git a/packages/app/src/components/video-benchmark/deployment.test.ts b/packages/app/src/components/video-benchmark/deployment.test.ts
index 762de47c8..d8e18b560 100644
--- a/packages/app/src/components/video-benchmark/deployment.test.ts
+++ b/packages/app/src/components/video-benchmark/deployment.test.ts
@@ -12,6 +12,7 @@ const base: VideoPoint = {
runtime: 'r',
model: 'm',
workload: 'w',
+ workloadKey: 'synthetic-workload',
concurrency: 1,
participating: 4,
allocated: 8,
@@ -40,9 +41,12 @@ describe('deployment', () => {
const c4: VideoPoint = { ...base, concurrency: 4 };
expect(deploymentKey(base)).toBe('4g:tp2:u2');
expect(deploymentKey(c4)).toBe('4g:tp2:u2');
- expect(deploymentKey({ ...base, server: { tp: 1, ulysses: 4, attention: null } })).toBe(
- '4g:tp1:u4',
- );
+ expect(
+ deploymentKey({
+ ...base,
+ server: { tp: 1, ulysses: 4, attention: null },
+ }),
+ ).toBe('4g:tp1:u4');
expect(deploymentKey({ ...base, participating: null, server: null })).toBe('nag:tpna:una');
});
it('treats concurrency above the replica count as queueing, with one replica when unknown', () => {
@@ -60,7 +64,7 @@ describe('deployment', () => {
expect(layoutLabel({ ...base, server: null }, 'en')).toBe('4 GPU');
expect(layoutLabel({ ...base, participating: null, server: null }, 'en')).toBe('—');
});
- it('picks the layout most hardware share, falling back to the lead cell', () => {
+ it('picks the layout most hardware share without substituting an unmatched layout', () => {
const b200Eight = {
...base,
id: 'b8',
@@ -69,7 +73,12 @@ describe('deployment', () => {
server: { tp: 4, ulysses: 2, attention: null },
wallSeconds: 900,
};
- const b200Four = { ...base, id: 'b4', hardwareKey: 'b200', wallSeconds: 1500 };
+ const b200Four = {
+ ...base,
+ id: 'b4',
+ hardwareKey: 'b200',
+ wallSeconds: 1500,
+ };
const h100Two = {
...base,
id: 'h2',
@@ -78,10 +87,10 @@ describe('deployment', () => {
server: { tp: 2, ulysses: 1, attention: null },
};
const queued = { ...base, id: 'q', concurrency: 2 };
- // 4g:tp2:u2 is shared by h200 and b200; h100 only has a 2-GPU cell and keeps it.
+ // 4g:tp2:u2 is shared by h200 and b200; h100's 2-GPU cell cannot join this comparison.
expect(
sharedLayoutCells([base, queued, b200Eight, b200Four, h100Two]).map((p) => p.id),
- ).toEqual(['a', 'b4', 'h2']);
+ ).toEqual(['a', 'b4']);
expect(sharedLayoutCells([])).toEqual([]);
});
it('leads with the most efficient non-queued deployment of the hardware', () => {
@@ -97,9 +106,40 @@ describe('deployment', () => {
// base: 20 × 3600 / (3000 × 4) = 6.0 videos per GPU-hour
expect(leadCell([eightBoards, queued, base], 'h200', options)?.id).toBe('a');
expect(leadCell([eightBoards, queued, base], 'b200', options)).toBeUndefined();
- const tie = { ...eightBoards, id: 'd', participating: 4, wallSeconds: 3000, p50: 120 };
+ const tie = {
+ ...eightBoards,
+ id: 'd',
+ participating: 4,
+ wallSeconds: 3000,
+ p50: 120,
+ };
expect(leadCell([base, tie], 'h200', options)?.id).toBe('d');
const noRate = { ...base, id: 'e', wallSeconds: null };
expect(leadCell([noRate], 'h200', options)?.id).toBe('e');
});
+ it('requires a known shared workload and layout at C1 for evidence comparisons', () => {
+ const matching = { ...base, id: 'b', hardwareKey: 'b200' };
+ const variants: VideoPoint[] = [
+ {
+ ...base,
+ id: 'different-workload',
+ hardwareKey: 'h100',
+ workloadKey: 'other',
+ },
+ {
+ ...base,
+ id: 'missing-workload',
+ hardwareKey: 'h100',
+ workloadKey: null,
+ },
+ { ...base, id: 'missing-layout', hardwareKey: 'h100', server: null },
+ { ...base, id: 'different-replicas', hardwareKey: 'h100', replicas: 2 },
+ { ...base, id: 'c2', hardwareKey: 'h100', concurrency: 2, replicas: 2 },
+ ];
+ for (const variant of variants)
+ expect(sharedLayoutCells([base, matching, variant]).map((p) => p.id)).toEqual(['a', 'b']);
+ expect(sharedLayoutCells([{ ...base, workloadKey: null }])).toEqual([]);
+ expect(sharedLayoutCells([{ ...base, server: null }])).toEqual([]);
+ expect(sharedLayoutCells([{ ...base, concurrency: 2, replicas: 2 }])).toEqual([]);
+ });
});
diff --git a/packages/app/src/components/video-benchmark/deployment.ts b/packages/app/src/components/video-benchmark/deployment.ts
index 0e02e0a5d..d0ed6421e 100644
--- a/packages/app/src/components/video-benchmark/deployment.ts
+++ b/packages/app/src/components/video-benchmark/deployment.ts
@@ -36,29 +36,40 @@ export function layoutLabel(p: Layout, locale: 'en' | 'zh'): string {
return parts.length > 0 ? parts.join(' · ') : '—';
}
+/** Known workload and layout required for a measured evidence comparison. */
+export function evidenceComparisonKey(p: VideoPoint): string | null {
+ const layout = [p.participating, p.server?.tp, p.server?.ulysses, p.replicas ?? 1];
+ if (!p.workloadKey || layout.some((n) => typeof n !== 'number' || !Number.isFinite(n) || n <= 0))
+ return null;
+ return JSON.stringify([p.workloadKey, ...layout]);
+}
+
/**
- * One non-queued cell per hardware on the deployment layout that the most
- * hardware share (ties keep the first layout in cell order), so cross-hardware
- * evidence compares like with like. A hardware without that layout falls back
- * to its lead cell. Cells arrive in hardware order and stay in it.
+ * One C1 cell per hardware on the known workload and deployment layout that the
+ * most hardware share (ties keep the first in cell order). Hardware without
+ * that workload and layout is omitted.
+ * Cells arrive in hardware order and stay in it.
*/
export function sharedLayoutCells(cells: T[]): T[] {
- const deployments = cells.filter((p) => p.hardwareKey !== null && !isQueueing(p));
+ const deployments = cells.filter(
+ (p) => p.hardwareKey !== null && p.concurrency === 1 && evidenceComparisonKey(p) !== null,
+ );
const hardwareByLayout = new Map>();
for (const p of deployments) {
- const set = hardwareByLayout.get(deploymentKey(p)) ?? new Set();
+ const key = evidenceComparisonKey(p)!;
+ const set = hardwareByLayout.get(key) ?? new Set();
set.add(p.hardwareKey!);
- hardwareByLayout.set(deploymentKey(p), set);
+ hardwareByLayout.set(key, set);
}
let shared: string | null = null;
for (const [key, set] of hardwareByLayout)
if (shared === null || set.size > hardwareByLayout.get(shared)!.size) shared = key;
const keys = [...new Set(deployments.map((p) => p.hardwareKey!))];
return keys.flatMap((hardwareKey) => {
- const cell =
- deployments.find((p) => p.hardwareKey === hardwareKey && deploymentKey(p) === shared) ??
- leadCell(deployments, hardwareKey, { tier: 'h' });
- return cell ? [cell as T] : [];
+ const cell = deployments.find(
+ (p) => p.hardwareKey === hardwareKey && evidenceComparisonKey(p) === shared,
+ );
+ return cell ? [cell] : [];
});
}
diff --git a/packages/app/src/components/video-benchmark/evidence.test.ts b/packages/app/src/components/video-benchmark/evidence.test.ts
index e019763dd..87c2a1e06 100644
--- a/packages/app/src/components/video-benchmark/evidence.test.ts
+++ b/packages/app/src/components/video-benchmark/evidence.test.ts
@@ -8,7 +8,6 @@ import {
plateauSummary,
powerRange,
powerUtilization,
- readSpeedup,
scalingVsSpec,
specNumbers,
} from './evidence';
@@ -127,13 +126,32 @@ describe('concurrencyPlateau', () => {
queued: 6,
throughputDeviationPct: expect.closeTo(1.437, 2),
latency: [
- { concurrency: 2, min: expect.closeTo(1.9706, 3), max: expect.closeTo(2.0007, 3) },
- { concurrency: 4, min: expect.closeTo(3.9423, 3), max: expect.closeTo(3.9995, 3) },
+ {
+ concurrency: 2,
+ min: expect.closeTo(1.9706, 3),
+ max: expect.closeTo(2.0007, 3),
+ },
+ {
+ concurrency: 4,
+ min: expect.closeTo(3.9423, 3),
+ max: expect.closeTo(3.9995, 3),
+ },
],
});
expect(plateauSummary(concurrencyPlateau(c1))).toBeNull();
expect(plateauSummary([])).toBeNull();
});
+ it('does not use a different or unknown workload as a concurrency step', () => {
+ const baseline = cell('h200', 1);
+ const step = cell('h200', 2);
+ for (const workloadKey of ['different-workload', null]) {
+ const rows = concurrencyPlateau([baseline, { ...step, workloadKey }]);
+ expect(rows.map((row) => row.concurrency)).toEqual([1]);
+ expect(plateauSummary(rows)).toBeNull();
+ }
+ const rows = concurrencyPlateau([baseline, { ...step, replicas: 2 }]);
+ expect(rows.map((row) => row.concurrency)).toEqual([1]);
+ });
});
describe('scalingVsSpec', () => {
@@ -184,27 +202,6 @@ describe('scalingVsSpec', () => {
expect(rows[1].bf16Ratio).toBeCloseTo(2.275, 3);
expect(rows[1].fp8Ratio).toBeCloseTo(2.2739, 3);
});
- it('reads which spec ratio the observed speedup sits closer to, and says when it cannot tell', () => {
- const [h200, b200] = scalingVsSpec(points);
- expect(readSpeedup(h200)).toEqual({ closest: 'compute', position: 'between', decisive: true });
- expect(readSpeedup(b200)).toEqual({
- closest: 'bandwidth',
- position: 'between',
- decisive: false,
- });
- expect(readSpeedup({ ...b200, memoryBandwidthRatio: null })).toBeNull();
- expect(readSpeedup({ ...b200, bf16Ratio: null, fp8Ratio: null })).toBeNull();
- expect(readSpeedup({ ...b200, observedSpeedup: 2.5 })).toEqual({
- closest: 'compute',
- position: 'above',
- decisive: true,
- });
- expect(readSpeedup({ ...h200, observedSpeedup: 0.9 })).toEqual({
- closest: 'compute',
- position: 'below',
- decisive: true,
- });
- });
it('nulls every ratio for hardware missing from the specs page and needs two hardware', () => {
const rows = scalingVsSpec([
{ ...cell('h100', 1), hardwareKey: 'gb200', id: 'gb200:c1' },
@@ -220,7 +217,6 @@ describe('scalingVsSpec', () => {
fp8Ratio: null,
},
]);
- expect(readSpeedup(rows[0])).toBeNull();
expect(scalingVsSpec([cell('h100', 1)])).toEqual([]);
expect(scalingVsSpec([cell('h100', 1), { ...cell('h200', 1), p50: null }])).toEqual([]);
});
@@ -237,7 +233,7 @@ describe('evidenceFacts', () => {
attention: [],
});
});
- it('drops a fact the cells disagree on and lists attention backends only when they differ', () => {
+ it('reads facts only from the shared workload and layout and records different attention backends', () => {
const b200 = cell('b200', 1);
const h200 = cell('h200', 1);
const facts = evidenceFacts([
@@ -248,16 +244,19 @@ describe('evidenceFacts', () => {
server: { tp: 4, ulysses: 2, attention: 'dynamic_cudnn_sdpa' },
},
{ ...h200, server: { tp: 2, ulysses: 2, attention: 'fa' } },
- { ...cell('h100', 1), server: null, workload: '' },
+ {
+ ...cell('h100', 1),
+ server: { tp: 2, ulysses: 2, attention: 'dynamic_cudnn_sdpa' },
+ },
]);
expect(facts).toEqual({
- participating: null,
- tp: null,
+ participating: 4,
+ tp: 2,
ulysses: 2,
- samples: { min: 18, max: 20 },
+ samples: { min: 20, max: 20 },
workload: '1344 × 768 · 8 s · 24 fps · 50 steps',
attention: expect.arrayContaining([
- { hardwareKey: 'b200', attention: 'dynamic_cudnn_sdpa' },
+ { hardwareKey: 'h100', attention: 'dynamic_cudnn_sdpa' },
{ hardwareKey: 'h200', attention: 'fa' },
]),
});
diff --git a/packages/app/src/components/video-benchmark/evidence.ts b/packages/app/src/components/video-benchmark/evidence.ts
index 577efc262..ba0161b99 100644
--- a/packages/app/src/components/video-benchmark/evidence.ts
+++ b/packages/app/src/components/video-benchmark/evidence.ts
@@ -1,12 +1,12 @@
import { GPU_SPECS } from '@/lib/gpu-specs';
-import { deploymentKey, sharedLayoutCells } from './deployment';
+import { evidenceComparisonKey, sharedLayoutCells } from './deployment';
import { hardwareSort } from './hardware';
import { metricValue, type MetricOptions, type VideoPoint } from './metrics';
import { latestVideoCells } from './points';
/**
- * Compute-bound evidence read from the measured cells only: board power against
- * the recorded enforced limit, the client-concurrency plateau, and observed
+ * Descriptive evidence read from the measured cells only: board power against
+ * the recorded enforced limit, client-concurrency ratios, and observed
* cross-hardware speedups against spec-sheet ratios. Every number is derived
* from published observations or the GPU specs page; missing input reads as
* null, never 0, so a panel can hide what the data does not support.
@@ -65,7 +65,11 @@ export interface PowerRange {
export function powerRange(rows: PowerUtilizationRow[]): PowerRange | null {
const values = rows.map((row) => row.percentOfCap).filter(finite);
if (values.length === 0) return null;
- return { measured: values.length, min: Math.min(...values), max: Math.max(...values) };
+ return {
+ measured: values.length,
+ min: Math.min(...values),
+ max: Math.max(...values),
+ };
}
/**
@@ -90,19 +94,19 @@ export interface ConcurrencyPlateauRow {
}
/**
- * Every measured cell against its hardware's C1 cell. On a batch-one server a
- * flat throughput ratio with latency scaling by C says client concurrency only
- * queues requests. Throughput is per participating GPU, as everywhere else.
+ * Every comparable measured cell against its hardware's C1 cell. These ratios
+ * describe the observation; they do not establish a batching or queueing mechanism.
+ * Throughput is per participating GPU, as everywhere else.
*/
export function concurrencyPlateau(points: VideoPoint[]): ConcurrencyPlateauRow[] {
const baseline = new Map(
sharedLayoutCells(measuredCells(points)).map((p) => [p.hardwareKey, p] as const),
);
- // Only cells of the baseline's own layout are concurrency steps of that deployment;
- // a hardware with no non-queued cell keeps its rows with null ratios.
+ // A step must match the baseline's known workload and deployment. A hardware
+ // with no C1 cell keeps its raw observations with null ratios.
const cells = measuredCells(points).filter((p) => {
const base = baseline.get(p.hardwareKey);
- return base === undefined || deploymentKey(p) === deploymentKey(base);
+ return base === undefined || evidenceComparisonKey(p) === evidenceComparisonKey(base);
});
return cells.map((p) => {
const base = baseline.get(p.hardwareKey);
@@ -122,7 +126,10 @@ export function concurrencyPlateau(points: VideoPoint[]): ConcurrencyPlateauRow[
});
}
-type QueuedRow = ConcurrencyPlateauRow & { throughputRatioVsC1: number; latencyRatioVsC1: number };
+type QueuedRow = ConcurrencyPlateauRow & {
+ throughputRatioVsC1: number;
+ latencyRatioVsC1: number;
+};
const isQueued = (row: ConcurrencyPlateauRow): row is QueuedRow =>
row.concurrency > 1 && finite(row.throughputRatioVsC1) && finite(row.latencyRatioVsC1);
@@ -195,7 +202,7 @@ export function specNumbers(hardwareKey: string): SpecNumbers {
export interface ScalingVsSpecRow {
fromKey: string;
toKey: string;
- /** C1 P50 of `from` over `to`: how many times faster `to` finished the same clip. */
+ /** C1 P50 of `from` over `to` for the same workload and layout. */
observedSpeedup: number | null;
memoryBandwidthRatio: number | null;
bf16Ratio: number | null;
@@ -225,39 +232,6 @@ export function scalingVsSpec(points: VideoPoint[]): ScalingVsSpecRow[] {
});
}
-export interface SpeedupReading {
- /** Spec ratio the observed speedup sits nearer to, measured in log space because ratios multiply. */
- closest: 'bandwidth' | 'compute';
- /** Where the observed speedup falls relative to the smallest and largest spec ratio. */
- position: 'below' | 'between' | 'above';
- /** False when the two log-distances are within 25 % of each other: the data does not separate them. */
- decisive: boolean;
-}
-
-/** Ratio of near to far log-distance below which one spec ratio is called closer. */
-const DECISIVE_BELOW = 0.75;
-
-/** Null when the observed speedup or every spec ratio is missing. */
-export function readSpeedup(row: ScalingVsSpecRow): SpeedupReading | null {
- const compute = [row.bf16Ratio, row.fp8Ratio].filter(positive);
- if (!positive(row.observedSpeedup) || !positive(row.memoryBandwidthRatio) || compute.length === 0)
- return null;
- const observed = Math.log(row.observedSpeedup);
- const toBandwidth = Math.abs(observed - Math.log(row.memoryBandwidthRatio));
- const toCompute = Math.min(...compute.map((value) => Math.abs(observed - Math.log(value))));
- const near = Math.min(toBandwidth, toCompute);
- const far = Math.max(toBandwidth, toCompute);
- const specs = [row.memoryBandwidthRatio, ...compute];
- const lowest = Math.min(...specs);
- const highest = Math.max(...specs);
- return {
- closest: toBandwidth <= toCompute ? 'bandwidth' : 'compute',
- position:
- row.observedSpeedup < lowest ? 'below' : row.observedSpeedup > highest ? 'above' : 'between',
- decisive: far > 0 && near / far < DECISIVE_BELOW,
- };
-}
-
export interface EvidenceFacts {
/** Participating GPUs per request when every measured cell agrees. */
participating: number | null;
@@ -280,8 +254,10 @@ function uniform(values: (T | null)[]): T | null {
/** Caveat inputs read from the cells so the panel never states a number the data does not carry. */
export function evidenceFacts(points: VideoPoint[]): EvidenceFacts {
- const cells = measuredCells(points);
- const shared = sharedLayoutCells(cells);
+ const measured = measuredCells(points);
+ const shared = sharedLayoutCells(measured);
+ const key = shared.length > 0 ? evidenceComparisonKey(shared[0]) : null;
+ const cells = key === null ? [] : measured.filter((p) => evidenceComparisonKey(p) === key);
const samples = cells.map((p) => p.samples).filter(positive);
const attention = shared.flatMap((p) =>
p.server?.attention ? [{ hardwareKey: p.hardwareKey, attention: p.server.attention }] : [],
diff --git a/packages/app/src/components/video-benchmark/history.test.ts b/packages/app/src/components/video-benchmark/history.test.ts
index 337089f9a..6bacdb4bf 100644
--- a/packages/app/src/components/video-benchmark/history.test.ts
+++ b/packages/app/src/components/video-benchmark/history.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
import { servingFixture } from './serving.fixture';
-import { at, entries } from './bundle';
+import { at, entries, type Json } from './bundle';
import { videoHistoryEntry } from './history';
import type { StoredArtifact } from './stored';
@@ -28,7 +28,54 @@ function saved(): StoredArtifact {
],
};
}
+
+function changePlans(artifact: StoredArtifact, change: (plan: Json) => void) {
+ for (const [path, document] of artifact.sources[0].documents) {
+ const plan = at(document, path === 'manifest.json' ? 'workload_plan' : 'plan');
+ if (plan !== null) change(plan);
+ }
+}
+
describe('video history projection', () => {
+ it('preserves case and generation identity independently of the display label', () => {
+ const artifact = saved();
+ const prefix = 'A drummer taps a snare drum. '.repeat(4);
+ changePlans(artifact, (plan) => {
+ Object.assign(at(plan, 'cases', 0)!, { prompt: `${prefix}First ending.` });
+ });
+ const baseline = videoHistoryEntry(artifact, null).sources[0].observations[0];
+ expect(baseline.workloadKey).toEqual(expect.any(String));
+ for (const change of [
+ (plan: Json) => Object.assign(at(plan, 'cases', 0)!, { prompt: `${prefix}Other ending.` }),
+ (plan: Json) => Object.assign(at(plan, 'cases', 0)!, { seed: 999 }),
+ (plan: Json) => Object.assign(at(plan, 'generation')!, { flow_shift: 7 }),
+ ]) {
+ const changed = structuredClone(artifact);
+ changePlans(changed, change);
+ const source = videoHistoryEntry(changed, null).sources[0];
+ expect(source.error).toBeNull();
+ expect(source.observations[0].workloadKey).not.toBe(baseline.workloadKey);
+ }
+ const semantics = structuredClone(artifact);
+ for (const [path, document] of semantics.sources[0].documents)
+ if (path.endsWith('/spec.json'))
+ Object.assign(at(document, 'server')!, { performance_mode: 'quality' });
+ const changedSemantics = videoHistoryEntry(semantics, null).sources[0];
+ expect(changedSemantics.error).toBeNull();
+ expect(changedSemantics.observations[0].workload).toBe(baseline.workload);
+ expect(changedSemantics.observations[0].workloadKey).not.toBe(baseline.workloadKey);
+ // Repetition counts do not change the workload that was requested.
+ const repeated = structuredClone(artifact);
+ changePlans(repeated, (plan) => Object.assign(plan!, { repetitions: 8 }));
+ const repeats = videoHistoryEntry(repeated, null).sources[0];
+ expect(repeats.error).toBeNull();
+ expect(repeats.observations.map((p) => p.workloadKey)).toEqual([
+ baseline.workloadKey,
+ baseline.workloadKey,
+ baseline.workloadKey,
+ ]);
+ });
+
it('groups concurrency cells under their original source without promoting smoke to qualification', () => {
const entry = videoHistoryEntry(saved(), '2026-09-12T00:00:00Z');
expect(entry.id).toBe('123.40');
@@ -90,6 +137,7 @@ describe('video history projection', () => {
wallSeconds: null,
avgPowerW: null,
enforcedLimitW: null,
+ workloadKey: null,
});
});
it('retains source provenance and failure when a new artifact contract is unsupported', () => {
diff --git a/packages/app/src/components/video-benchmark/history.ts b/packages/app/src/components/video-benchmark/history.ts
index 337b60158..b1f2bf9c2 100644
--- a/packages/app/src/components/video-benchmark/history.ts
+++ b/packages/app/src/components/video-benchmark/history.ts
@@ -4,6 +4,9 @@ import { storedBundle, storedFidelityBundle, type StoredArtifact } from './store
import { servingCells } from './serving';
import { efficiencyValue, latencyValue, tradeoffPoints } from './tradeoff';
+/** Shared bound for dashboard history reads in the browser and view API. */
+export const VIDEO_HISTORY_MAX_PAGES = 5;
+
export interface VideoHistoryObservation {
id: string;
cell: string | null;
@@ -11,6 +14,8 @@ export interface VideoHistoryObservation {
concurrency: number | null;
runtime: string;
workload: string;
+ /** Canonical plan and measurement semantics; absent/null on legacy or incomplete projections. */
+ workloadKey?: string | null;
model: string;
status: string;
valid: number | null;
@@ -123,6 +128,7 @@ export function videoHistoryEntry(
concurrency: point.concurrency,
runtime: point.revision,
workload: point.workloadLabel,
+ workloadKey: point.completeWorkload ? point.group : null,
model: point.model,
status: cell ? text(at(cell.cell, 'status')) : text(at(bundle.ci, 'phase')),
valid: point.valid,
diff --git a/packages/app/src/components/video-benchmark/metrics.ts b/packages/app/src/components/video-benchmark/metrics.ts
index 0e86c9319..183a534e3 100644
--- a/packages/app/src/components/video-benchmark/metrics.ts
+++ b/packages/app/src/components/video-benchmark/metrics.ts
@@ -12,6 +12,8 @@ export interface VideoPoint {
model: string;
/** Human-readable workload summary from the projection (resolution · duration · fps · steps · model @ rev · seeds · prompt). */
workload: string;
+ /** Canonical plan and measurement semantics, independent of the display label. */
+ workloadKey?: string | null;
concurrency: number | null;
/** Boards that generated the clip: the denominator of every per-GPU metric. */
participating: number | null;
diff --git a/packages/app/src/components/video-benchmark/points.test.ts b/packages/app/src/components/video-benchmark/points.test.ts
index ef0d7f994..ddd945833 100644
--- a/packages/app/src/components/video-benchmark/points.test.ts
+++ b/packages/app/src/components/video-benchmark/points.test.ts
@@ -9,6 +9,7 @@ const observation: VideoHistoryObservation = {
concurrency: 1,
runtime: '71de97b2',
workload: 'w',
+ workloadKey: 'formal-plan-and-semantics',
model: 'MiniMaxAI/MiniMax-H3',
status: 'complete',
valid: 20,
@@ -97,6 +98,7 @@ describe('videoPoints', () => {
artifactId: 10107476604,
hardwareKey: 'h200',
hardwareName: 'NVIDIA H200',
+ workloadKey: 'formal-plan-and-semantics',
p50: 150.6,
enforcedLimitW: 2800,
server: { tp: 2, ulysses: 2, attention: 'auto' },
@@ -146,12 +148,14 @@ describe('videoPoints', () => {
'avgPowerW',
'enforcedLimitW',
'server',
+ 'workloadKey',
])
delete obs[key];
const [point] = videoPoints([legacy]);
expect(point.participating).toBeNull();
expect(point.wallSeconds).toBeNull();
expect(point.server).toBeNull();
+ expect(point.workloadKey).toBeNull();
expect(point.hardwareKey).toBe('h200');
});
it('keeps only the newest observation per hardware cell', () => {
@@ -231,7 +235,7 @@ describe('dashboardCells', () => {
const pages = [
pageOf('1', 'NVIDIA H200', [
cell({}),
- cell({ id: 'sha:short', cell: 'c1s', workload: SHORT }),
+ cell({ id: 'sha:short', cell: 'c1s', workload: SHORT, workloadKey: 'short-plan' }),
]),
pageOf('2', 'NVIDIA B200', [cell({ id: 'sha:b1', hardware: 'NVIDIA B200' })]),
];
@@ -247,4 +251,35 @@ describe('dashboardCells', () => {
);
expect(result).toEqual({ cells: [], workload: null, otherWorkloads: 1 });
});
+
+ it('does not replace the frozen workload with a newer cell whose cases differ', () => {
+ const result = dashboardCells(
+ videoPoints([
+ pageOf('3', 'NVIDIA H200', [
+ cell({ id: 'new:c1', workloadKey: 'different-prompt-and-seed' }),
+ ]),
+ pageOf('2', 'NVIDIA H200', [cell({ id: 'formal:c1' })]),
+ pageOf('1', 'NVIDIA B200', [cell({ id: 'b:c1', hardware: 'NVIDIA B200' })]),
+ ]),
+ );
+ expect(result.cells.map((p) => p.id)).toEqual(['b:c1', 'formal:c1']);
+ expect(result.otherWorkloads).toBe(1);
+ expect(result.workload).toBe(FORMAL.split(' · ').slice(0, 5).join(' · '));
+ });
+
+ it('keeps legacy cells together only inside their sealed source, never by label', () => {
+ const result = dashboardCells(
+ videoPoints([
+ pageOf('2', 'NVIDIA H200', [
+ cell({ id: 'source-a:c1', workloadKey: null }),
+ cell({ id: 'source-a:c2', cell: 'c2', concurrency: 2, workloadKey: null }),
+ ]),
+ pageOf('1', 'NVIDIA B200', [
+ cell({ id: 'source-b:c1', hardware: 'NVIDIA B200', workloadKey: undefined }),
+ ]),
+ ]),
+ );
+ expect(result.cells.map((p) => p.id)).toEqual(['source-a:c1', 'source-a:c2']);
+ expect(result.otherWorkloads).toBe(1);
+ });
});
diff --git a/packages/app/src/components/video-benchmark/points.ts b/packages/app/src/components/video-benchmark/points.ts
index f0cc1f0fa..f7cb1ea5f 100644
--- a/packages/app/src/components/video-benchmark/points.ts
+++ b/packages/app/src/components/video-benchmark/points.ts
@@ -49,6 +49,8 @@ function toPoint(
runtime: o.runtime ?? '',
model: o.model ?? '',
workload: o.workload ?? '',
+ workloadKey:
+ typeof o.workloadKey === 'string' && o.workloadKey.length > 0 ? o.workloadKey : null,
concurrency: num(o.concurrency),
participating: num(o.participating),
allocated: num(o.allocated),
@@ -100,9 +102,9 @@ export function latestVideoCells(points: VideoPoint[]): VideoPoint[] {
/** Valid clips a cell needs before the dashboard counts it: the same floor as the P90 display. */
export const DASHBOARD_SAMPLE_FLOOR = 10;
-/** Generation settings plus model: the first five label parts, before seeds and prompt text. */
-export function workloadGroup(point: Pick): string {
- return point.workload.split(' · ').slice(0, 5).join(' · ');
+/** Unknown legacy workloads stay inside their sealed source, never merge by display label. */
+export function workloadGroup(point: Pick): string {
+ return point.workloadKey || `unknown:${point.id.split(':')[0]}`;
}
/**
@@ -132,27 +134,28 @@ export function dashboardCells(points: VideoPoint[]): {
),
);
}
- let workload: string | null = null;
+ let workloadKey: string | null = null;
for (const group of hardware.keys()) {
- if (workload === null) {
- workload = group;
+ if (workloadKey === null) {
+ workloadKey = group;
continue;
}
- const byHardware = hardware.get(group)!.size - hardware.get(workload)!.size;
+ const byHardware = hardware.get(group)!.size - hardware.get(workloadKey)!.size;
if (
byHardware > 0 ||
- (byHardware === 0 && cellKeys.get(group)!.size > cellKeys.get(workload)!.size)
+ (byHardware === 0 && cellKeys.get(group)!.size > cellKeys.get(workloadKey)!.size)
)
- workload = group;
+ workloadKey = group;
}
const others = new Set(points.map(workloadGroup));
- if (workload !== null) others.delete(workload);
+ if (workloadKey !== null) others.delete(workloadKey);
+ const cells =
+ workloadKey === null
+ ? []
+ : latestVideoCells(qualified.filter((p) => workloadGroup(p) === workloadKey));
return {
- cells:
- workload === null
- ? []
- : latestVideoCells(qualified.filter((p) => workloadGroup(p) === workload)),
- workload,
+ cells,
+ workload: cells[0]?.workload.split(' · ').slice(0, 5).join(' · ') ?? null,
otherWorkloads: others.size,
};
}
diff --git a/packages/app/src/components/video-benchmark/use-video-points.ts b/packages/app/src/components/video-benchmark/use-video-points.ts
index 1892c7d79..d75bc55b0 100644
--- a/packages/app/src/components/video-benchmark/use-video-points.ts
+++ b/packages/app/src/components/video-benchmark/use-video-points.ts
@@ -1,13 +1,10 @@
'use client';
import { useCallback, useEffect, useState } from 'react';
-import type { VideoHistoryPage } from './history';
+import { VIDEO_HISTORY_MAX_PAGES, type VideoHistoryPage } from './history';
import type { VideoPoint } from './metrics';
import { videoPoints } from './points';
-/** Published pages are read newest first; the frozen campaign fits in far fewer. */
-const MAX_PAGES = 5;
-
/** Load every published history page (bounded) and flatten it into chart points. */
export function useVideoPoints() {
const [points, setPoints] = useState([]);
@@ -22,7 +19,7 @@ export function useVideoPoints() {
(async () => {
const pages: VideoHistoryPage[] = [];
let replayed = false;
- for (let page = 1; page <= MAX_PAGES; page++) {
+ for (let page = 1; page <= VIDEO_HISTORY_MAX_PAGES; page++) {
const response = await fetch(`/api/video-runs?format=history&page=${page}`, {
signal: controller.signal,
cache: 'no-store',
diff --git a/packages/app/src/components/video-benchmark/video-url-state.test.ts b/packages/app/src/components/video-benchmark/video-url-state.test.ts
index bafb1ca8b..1aa98e4be 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.test.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.test.ts
@@ -11,6 +11,17 @@ import {
} from './video-url-state';
describe('video dashboard URL state', () => {
+ it('restores hidden hardware from shared links and omits an empty selection', () => {
+ const state = readVideoDashboardState('?v_hidden=h100,b200,h100,unknown&v_tier=r');
+ expect(state.hidden).toEqual(['b200', 'h100']);
+ const shared = writeVideoDashboardState(new URL('https://x.test/video?unrelated=1'), state);
+ expect(shared.searchParams.get('v_hidden')).toBe('b200,h100');
+ expect(readVideoDashboardState(shared.search).hidden).toEqual(state.hidden);
+ expect(shared.searchParams.get('unrelated')).toBe('1');
+ expect(
+ writeVideoDashboardState(shared, { ...state, hidden: [] }).searchParams.has('v_hidden'),
+ ).toBe(false);
+ });
it('falls back to defaults for missing or invalid params', () => {
expect(readVideoDashboardState('')).toEqual(DEFAULT_VIDEO_DASHBOARD_STATE);
expect(readVideoDashboardState('?v_x=bogus&v_y=nope&v_tier=z&v_view=pie&v_api=free')).toEqual(
@@ -41,6 +52,7 @@ describe('video dashboard URL state', () => {
view: 'table',
optimal: false,
apiPrice: 0.047,
+ hidden: [],
});
expect([...X_METRICS]).toEqual(['p90Latency', 'p50Latency']);
expect([...Y_METRICS]).toEqual([
diff --git a/packages/app/src/components/video-benchmark/video-url-state.ts b/packages/app/src/components/video-benchmark/video-url-state.ts
index f1d024942..3dd228aeb 100644
--- a/packages/app/src/components/video-benchmark/video-url-state.ts
+++ b/packages/app/src/components/video-benchmark/video-url-state.ts
@@ -1,5 +1,5 @@
import { H3_API_REFERENCE } from './api-reference';
-import type { CostTier } from './hardware';
+import { VIDEO_HARDWARE_ROSTER, type CostTier } from './hardware';
import {
COST_TIERS,
X_METRICS,
@@ -18,6 +18,8 @@ export interface VideoDashboardState {
optimal: boolean;
/** USD per video-second the API list price assumes; the dated reference unless the reader overrides it. */
apiPrice: number;
+ /** Hardware hidden from the chart, table and CSV. */
+ hidden: string[];
}
export const DEFAULT_VIDEO_DASHBOARD_STATE: VideoDashboardState = {
@@ -27,10 +29,14 @@ export const DEFAULT_VIDEO_DASHBOARD_STATE: VideoDashboardState = {
view: 'chart',
optimal: true,
apiPrice: H3_API_REFERENCE.pricePerVideoSecondUsd,
+ hidden: [],
};
const VIEWS: readonly VideoDashboardState['view'][] = ['chart', 'table'];
+const hiddenHardware = (keys: readonly string[]) =>
+ VIDEO_HARDWARE_ROSTER.filter(({ key }) => keys.includes(key)).map(({ key }) => key);
+
const pick = (allowed: readonly T[], value: string | null, fallback: T): T =>
allowed.includes(value as T) ? (value as T) : fallback;
@@ -65,6 +71,7 @@ export function readVideoDashboardState(search: string): VideoDashboardState {
// Same shape as the inference tab's `i_optimal`: on unless the URL says `0`.
optimal: p.get('v_optimal') !== '0',
apiPrice: parseApiPrice(p.get('v_api')) ?? d.apiPrice,
+ hidden: hiddenHardware(p.get('v_hidden')?.split(',') ?? []),
};
}
@@ -81,5 +88,6 @@ export function writeVideoDashboardState(url: URL, state: VideoDashboardState):
set('v_optimal', state.optimal ? null : '0');
const apiPrice = parseApiPrice(state.apiPrice);
set('v_api', apiPrice === null || apiPrice === d.apiPrice ? null : String(apiPrice));
+ set('v_hidden', hiddenHardware(state.hidden).join(',') || null);
return out;
}
diff --git a/packages/app/src/lib/api/api-route-catalog.ts b/packages/app/src/lib/api/api-route-catalog.ts
index e50f1f8ea..5d32ffb68 100644
--- a/packages/app/src/lib/api/api-route-catalog.ts
+++ b/packages/app/src/lib/api/api-route-catalog.ts
@@ -203,7 +203,7 @@ export const apiRouteCatalog = [
method: 'GET',
classification: 'published-read',
operationId: 'get-video-view',
- sourceSha256: '566405f7db1eb5ea141b54384238e1b531bfe616c7fcd65b8653aed30d7ba007',
+ sourceSha256: '63a4ab1aebb979a3c4e449fa20bb24b052c3431f492ea140944a517293464248',
},
// Agentic Workload Explorer page backend (frozen ProxyTrace snapshot).
{
@@ -1286,6 +1286,87 @@ export const apiContractSourceDigests = [
zh: '利润估算器的共享默认值与计算一致性,包括各模型的目标假设。',
},
},
+ {
+ source: 'src/lib/views-api/video-dashboard.ts',
+ sourceSha256: '62bbf123e8fd9fb8ceff3724558fc99b52e842433f96266b1be4d3ed5f438036',
+ reviewArea: {
+ en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
+ zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/history.ts',
+ sourceSha256: '4917bac6c0d272bda607697439322fd85e64683f4c63ad621e02101a8e923aae',
+ reviewArea: {
+ en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
+ zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/metrics.ts',
+ sourceSha256: '9d5a4cd412ded8ebc3fb4a4c3b60b8fa9081e6393c901a8431a923b651f6590b',
+ reviewArea: {
+ en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
+ zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/points.ts',
+ sourceSha256: 'a7c5313843b44a3fed1dea989024b1be689fd4952d8c0f8119f19c41e1afaab7',
+ reviewArea: {
+ en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
+ zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/plot.ts',
+ sourceSha256: '50e15dd8ee90b9e96b8b1083294070270044abaf26f540be9cf17f594a3883e3',
+ reviewArea: {
+ en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
+ zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/deployment.ts',
+ sourceSha256: 'f7416efa7fc30edabdefa3802775ba2bbbdcbe106b1651a200922d30cc41430d',
+ reviewArea: {
+ en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
+ zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/evidence.ts',
+ sourceSha256: '4f57a3e2f6b3f55c4f30617db77b93d50dee79836bdc793c7299509ee1d71683',
+ reviewArea: {
+ en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
+ zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/compare.ts',
+ sourceSha256: 'c95658b12f6d249ff13ad9b897a9e9f63983c1b210350437403da8c3b6245a38',
+ reviewArea: {
+ en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
+ zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/compare-url-state.ts',
+ sourceSha256: '00ef527aee602e29cfec6d187d7643e2f7b7bab50e73ed67c073b4ec170e1c74',
+ reviewArea: {
+ en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
+ zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
+ },
+ },
+ {
+ source: 'src/components/video-benchmark/video-url-state.ts',
+ sourceSha256: 'deb6b936fdf5caf2562896ca8a96cb8a08fc5a61b3cde6dd38b866a9a3c27018',
+ reviewArea: {
+ en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
+ zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
+ },
+ },
+
{
source: 'src/lib/views-api/upstream-error.ts',
sourceSha256: 'c3f1b4c318e1ae771a67edd85f16d69b7316461334604fd8c892254eface715a',
@@ -1405,7 +1486,7 @@ export const apiContractSourceDigests = [
{
source: 'src/lib/views-api/registry.ts',
- sourceSha256: '48cc9e1aef031ca1d00aaf0bf15b98a9c3421507d62fc89daa4eb2c1e42f9449',
+ sourceSha256: '11cdeb0878b02c81a2eb2d0219b2eb9aa577c2da45c14df7723b3813ae1719fe',
reviewArea: {
en: 'Dashboard read-only selector and calculation parity.',
zh: '仪表板只读接口的选择项与计算一致性。',
diff --git a/packages/app/src/lib/views-api/docs/extensions.ts b/packages/app/src/lib/views-api/docs/extensions.ts
index 99d23ab7a..9599c0fd3 100644
--- a/packages/app/src/lib/views-api/docs/extensions.ts
+++ b/packages/app/src/lib/views-api/docs/extensions.ts
@@ -5,6 +5,7 @@ import type {
ApiSchema,
} from '@/lib/api/api-documentation';
import { API_BASE_URL } from '@/lib/api/api-documentation-base';
+import { VIDEO_HISTORY_MAX_PAGES } from '@/components/video-benchmark/history';
import { text } from '@/lib/api/api-documentation-helpers';
import { VIEW_QUERY_PARAMS, type ReadonlyView } from '../registry';
@@ -251,8 +252,8 @@ const PARAMETER_NOTES: Record = {
'OperatorX 状态:ok(默认)、unsupported、error、missing 或 all。',
],
page: [
- 'OperatorX zero-based table page; video one-based CI discovery page.',
- 'OperatorX 表格页码从 0 开始;视频 CI 发现页码从 1 开始。',
+ 'OperatorX zero-based table page; video one-based CI discovery page (view=discovery). Video dashboard/compare read at most the first five published history pages.',
+ 'OperatorX 表格页码从 0 开始;视频 CI 发现页码从 1 开始(view=discovery)。视频 dashboard/compare 最多读取前五页已发布历史。',
],
metric: [
'View-specific metric key. OperatorX: tflops or latency; GPU metrics: power, temperature, clocks, utilization or available AMD metrics.',
@@ -323,7 +324,10 @@ const PARAMETER_NOTES: Record = {
'Speculative decoding filter; the image view trims whitespace and ignores case for a single value, default all. Inference uses a comma-separated list.',
'投机解码筛选;镜像视图使用单个值,去除首尾空白、不区分大小写,默认 all。推理视图使用逗号分隔列表。',
],
- run: ['Public video CI run ID. Omit to discover runs.', '公开视频 CI 运行 ID。省略时列出运行。'],
+ run: [
+ 'Public video CI run ID; retains legacy run/artifact selection. Omit for the dashboard, or use view=discovery to list runs.',
+ '公开视频 CI 运行 ID;保留原有运行/产物选择方式。省略时读取仪表板;使用 view=discovery 列出运行。',
+ ],
compare: [
'Video: up to eight comma-separated run:artifact pairs of already published evidence.',
'视频:最多八组已发布证据的 run:artifact,以逗号分隔。',
@@ -365,7 +369,50 @@ const PARAMETER_NOTES: Record = {
'ubenchX test selector: mem-bw, sm-l2-distance, tpc-skyline, or all (default). Determines which benchmark data is returned.',
'ubenchX 测试选择:mem-bw、sm-l2-distance、tpc-skyline 或 all(默认),决定返回哪种基准测试数据。',
],
- view: ['Video results (default) or tradeoff.', '视频 results(默认)或 tradeoff。'],
+ view: [
+ 'Video dashboard (default without run/artifact), compare (dashboard plus published matched-case records), or legacy discovery/results/tradeoff. run/artifact defaults to results. Dashboard v_* and legacy selectors cannot be mixed.',
+ '视频 dashboard(未指定 run/artifact 时默认)、compare(仪表板及已发布匹配用例记录),或原有 discovery/results/tradeoff。指定 run/artifact 时默认 results。v_* 仪表板选择项不能与原有参数混用。',
+ ],
+ v_x: [
+ 'Dashboard X metric: p90Latency (default) or p50Latency, in seconds. Invalid values use the UI default.',
+ '仪表板 X 轴指标:p90Latency(默认)或 p50Latency,单位秒。无效值按界面默认值处理。',
+ ],
+ v_y: [
+ 'Dashboard Y metric: videosPerDollar (default), dollarsPerVideo, videosPerGpuHour or kjPerVideo. Invalid values use the UI default.',
+ '仪表板 Y 轴指标:videosPerDollar(默认)、dollarsPerVideo、videosPerGpuHour 或 kjPerVideo。无效值按界面默认值处理。',
+ ],
+ v_tier: [
+ 'TCO cost tier: h (owning, default) or r (renting), from the same hardware registry as the dashboard; invalid values use h.',
+ 'TCO 成本档位:h(自有,默认)或 r(租赁),使用与仪表板相同的硬件成本表;无效值使用 h。',
+ ],
+ v_view: [
+ 'chart (default) or table; presentation-only preference, echoed as params.displayView without changing returned datasets.',
+ 'chart(默认)或 table;仅影响展示,在 params.displayView 中返回,不改变数据集。',
+ ],
+ v_optimal: [
+ 'Per-hardware Pareto deployments only unless exactly 0. Changes chart/table rows; queued cells never enter either.',
+ '除值恰为 0 外,仅保留每种硬件的 Pareto 部署。作用于图表和表格;排队 cell 始终不进入这两者。',
+ ],
+ v_api: [
+ 'Positive USD/video-second API list-price reference, rounded to four decimals; invalid values use the dated UI reference. Multiplies clip duration only, not TCO or chart efficiency.',
+ '正数 API 视频秒参考价,单位 USD/video-second,四舍五入至四位小数;无效值回退至界面带日期的参考价。仅用于乘以视频时长,不影响 TCO 或图表效率。',
+ ],
+ v_hidden: [
+ 'Comma-separated hidden hardware keys from the video roster; default empty, deduplicated and sorted, unknown keys ignored. Filters chart/table only, not KPI/Compare/Evidence.',
+ '以逗号分隔的隐藏硬件键,仅接受视频硬件列表中的键;默认空,排序去重,忽略未知键。只筛选图表和表格,不改变 KPI、Compare 或 Evidence。',
+ ],
+ v_base: [
+ 'Baseline hardware key; unavailable/invalid selection resolves to the UI default (slowest eligible lead deployment).',
+ '基线硬件键;无效或无可用测量时回退到界面默认值(符合条件的代表部署中最慢的一种)。',
+ ],
+ v_cand: [
+ 'Candidate hardware key; unavailable/invalid selection resolves to the UI default (fastest eligible lead deployment).',
+ '候选硬件键;无效或无可用测量时回退到界面默认值(符合条件的代表部署中最快的一种)。',
+ ],
+ v_case: [
+ 'Zero-based matched-case index, 0–9999 (default 0). view=compare clamps it to the available pairs and returns cases.resolvedCaseIndex; dashboard leaves media not-requested.',
+ '匹配用例索引从零开始,范围 0–9999(默认 0)。view=compare 按可用配对范围收敛,并在 cases.resolvedCaseIndex 返回实际索引;dashboard 不加载媒体。',
+ ],
};
export function viewParameter(view: ReadonlyView, name: string): ApiParameter {
@@ -487,9 +534,28 @@ const NEW_VIEWS = {
},
],
video: [
- 'Published video evidence and tradeoffs',
- '已发布视频证据与权衡数据',
+ 'VideoGenX dashboard and published comparison evidence',
+ 'VideoGenX 仪表板与已发布对比证据',
{
+ cells: objects,
+ metricDefinitions: object,
+ plot: object,
+ rows: objects,
+ kpis: objects,
+ comparison: object,
+ provenance: objects,
+ workload: { type: ['string', 'null'] },
+ otherWorkloads: { type: 'integer', minimum: 0 },
+ coverage: {
+ type: 'object',
+ properties: {
+ pagesRead: { type: 'integer', minimum: 1, maximum: VIDEO_HISTORY_MAX_PAGES },
+ maxPages: { type: 'integer', enum: [VIDEO_HISTORY_MAX_PAGES] },
+ nextPage: { type: ['integer', 'null'] },
+ truncated: { type: 'boolean' },
+ },
+ required: ['pagesRead', 'maxPages', 'nextPage', 'truncated'],
+ },
sources: objects,
points: objects,
curves: object,
@@ -516,7 +582,7 @@ export const operations: ApiOperation[] = Object.entries(NEW_VIEWS).map(
description: text(
`Read-only ${en.toLowerCase()} using the dashboard's source handlers and calculation helpers. Unknown and repeated query keys return 400. The response includes resolved params and preserves missing evidence. Renderer-only styling is not an API parameter.${
view === 'video'
- ? ' Only already published artifacts are read. Cell, phase, slot and GPU-basis choices select result evidence and normalized serving rates; x/y/cost/workload filters produce computed tradeoff points. Local bundles and arbitrary URLs are excluded. Responses are no-store.'
+ ? ' Default dashboard mode reuses published history → videoPoints → dashboardCells → metrics/plot/compare/evidence. It reads at most the same first five history pages as the UI, reports coverage/truncation, selects one canonical workload and keeps the shared sample floor. v_hidden affects chart/table only. view=compare additionally reads at most two already-published media artifacts, pairs cases with the UI helper and returns relative media paths without asset URLs; missing/failed media remains explicit. run/artifact or explicit discovery/results/tradeoff preserve the legacy contract. No date range, full-catalog completeness, power/quality qualification or causal bottleneck claim is implied. Local bundles and arbitrary URLs are excluded. Responses are no-store.'
: view === 'current-inferencex-image'
? ' ageSummary is the nearest-rank p90 of current filtered row submission ages at asOf (future-dated rows excluded). includeHistory=true adds 90 daily ageHistory points reconstructed from successful image-bearing submissions with the current active catalog. Each displayed configuration has one vote; repeated submissions reset its age even if the image tag is unchanged. Neither metric measures container build age.'
: view === 'gpu-metrics'
@@ -525,7 +591,7 @@ export const operations: ApiOperation[] = Object.entries(NEW_VIEWS).map(
}`,
`只读${zh},使用仪表板的数据读取和计算函数。未知或重复查询键返回 400;响应包含解析后的参数,保留缺失数据。仅影响样式的控件不作为 API 参数。${
view === 'video'
- ? ' 仅读取已发布产物。cell、阶段、slot 和 GPU 口径选择对应结果证据,并计算 serving 归一化速率;x/y、成本及工作负载筛选生成权衡图数据点。不读取本地数据包或任意 URL。响应不缓存。'
+ ? ' 默认 dashboard 模式复用已发布历史 → videoPoints → dashboardCells → metrics/plot/compare/evidence。与界面一样最多读取前五页历史,返回覆盖范围和截断状态,选择一个 canonical workload 并应用相同样本门槛。v_hidden 只影响图表和表格。view=compare 额外读取最多两份已发布媒体产物,复用界面配对函数,仅返回相对媒体路径,不返回 asset URL;媒体缺失或读取失败会明确标记。run/artifact 或显式 discovery/results/tradeoff 保留原有契约。不代表日期区间、完整历史、功率/质量验收或瓶颈因果判断。不读取本地数据包或任意 URL。响应不缓存。'
: view === 'current-inferencex-image'
? ' ageSummary 按最近秩法计算当前筛选行在 asOf 的提交年龄 P90(排除未来日期行)。includeHistory=true 基于带镜像的成功提交和当前有效模型目录重建 90 个每日 ageHistory 点。每个展示配置计一次;即使镜像标签未变,重新提交仍会重置年龄。两项指标均不代表镜像构建年龄。'
: view === 'gpu-metrics'
diff --git a/packages/app/src/lib/views-api/registry.ts b/packages/app/src/lib/views-api/registry.ts
index 4de83946c..6d2a1090d 100644
--- a/packages/app/src/lib/views-api/registry.ts
+++ b/packages/app/src/lib/views-api/registry.ts
@@ -244,6 +244,16 @@ export const VIEW_QUERY_PARAMS = {
'selected',
'slot',
'source',
+ 'v_x',
+ 'v_y',
+ 'v_tier',
+ 'v_view',
+ 'v_optimal',
+ 'v_api',
+ 'v_hidden',
+ 'v_base',
+ 'v_cand',
+ 'v_case',
'view',
'workload',
'xAxis',
diff --git a/packages/app/src/lib/views-api/video-dashboard.test.ts b/packages/app/src/lib/views-api/video-dashboard.test.ts
new file mode 100644
index 000000000..1fa3aa53e
--- /dev/null
+++ b/packages/app/src/lib/views-api/video-dashboard.test.ts
@@ -0,0 +1,19 @@
+import { describe, expect, it } from 'vitest';
+import { videoDashboardProjection } from './video-dashboard';
+
+describe('VideoGenX public metadata projection', () => {
+ it('keeps an empty catalog unavailable rather than synthesizing zero metrics or comparison evidence', () => {
+ const result = videoDashboardProjection([], 'v_hidden=h100,unknown&v_api=0');
+ expect(result.workload).toBeNull();
+ expect(result.rows).toEqual([]);
+ expect(result.plot.plotted).toEqual([]);
+ expect(result.params.hidden).toEqual(['h100']);
+ expect(result.params.apiPrice).toBeGreaterThan(0);
+ expect(result.kpis).toHaveLength(4);
+ expect(result.kpis.every((row) => row.point === null && row.metrics === null)).toBe(true);
+ expect(result.comparison).toEqual({ baseline: null, candidate: null, metrics: [] });
+ expect(result.evidence.powerRange).toBeNull();
+ expect(result.evidence.plateauSummary).toBeNull();
+ expect(result.provenance).toEqual([]);
+ });
+});
diff --git a/packages/app/src/lib/views-api/video-dashboard.ts b/packages/app/src/lib/views-api/video-dashboard.ts
new file mode 100644
index 000000000..82810d4d6
--- /dev/null
+++ b/packages/app/src/lib/views-api/video-dashboard.ts
@@ -0,0 +1,101 @@
+import { compareMetrics } from '@/components/video-benchmark/compare';
+import {
+ readVideoCompareSelection,
+ resolveCompareSelection,
+} from '@/components/video-benchmark/compare-url-state';
+import { leadCell } from '@/components/video-benchmark/deployment';
+import {
+ concurrencyPlateau,
+ evidenceFacts,
+ plateauSummary,
+ powerRange,
+ powerUtilization,
+ scalingVsSpec,
+} from '@/components/video-benchmark/evidence';
+import { VIDEO_HARDWARE_ROSTER } from '@/components/video-benchmark/hardware';
+import type { VideoHistoryPage } from '@/components/video-benchmark/history';
+import {
+ metricValue,
+ VIDEO_METRICS,
+ type MetricId,
+ type VideoPoint,
+} from '@/components/video-benchmark/metrics';
+import { listedVideoCells, plotVideoPoints } from '@/components/video-benchmark/plot';
+import { dashboardCells, videoPoints } from '@/components/video-benchmark/points';
+import {
+ metricOptions,
+ readVideoDashboardState,
+} from '@/components/video-benchmark/video-url-state';
+
+/** Public metadata and the dashboard's existing pure calculations; no bundle or asset URLs. */
+export function videoDashboardProjection(pages: VideoHistoryPage[], search: string) {
+ const state = readVideoDashboardState(search);
+ const { cells, workload, otherWorkloads } = dashboardCells(videoPoints(pages));
+ const options = metricOptions(state);
+ const hidden = new Set(state.hidden);
+ const metrics = (point: VideoPoint) =>
+ Object.fromEntries(
+ (Object.keys(VIDEO_METRICS) as MetricId[]).map((id) => [id, metricValue(point, id, options)]),
+ );
+ const pair = resolveCompareSelection(readVideoCompareSelection(search), cells);
+ const power = powerUtilization(cells);
+ const plateau = concurrencyPlateau(cells);
+ return {
+ params: {
+ ...state,
+ baseline: pair.baseline?.hardwareKey ?? null,
+ candidate: pair.candidate?.hardwareKey ?? null,
+ caseIndex: pair.caseIndex,
+ },
+ workload,
+ otherWorkloads,
+ cells,
+ metricDefinitions: VIDEO_METRICS,
+ // Color is renderer state; use the exact plot model with an empty color.
+ plot: plotVideoPoints(cells, state, () => '', hidden),
+ rows: listedVideoCells(cells, state, hidden).map((point) => ({
+ point,
+ metrics: metrics(point),
+ })),
+ kpis: VIDEO_HARDWARE_ROSTER.map(({ key }) => {
+ const point = leadCell(cells, key, options);
+ return { hardwareKey: key, point: point ?? null, metrics: point ? metrics(point) : null };
+ }),
+ comparison: {
+ baseline: pair.baseline,
+ candidate: pair.candidate,
+ metrics:
+ pair.baseline && pair.candidate
+ ? compareMetrics(pair.baseline, pair.candidate, options)
+ : [],
+ },
+ evidence: {
+ power,
+ powerRange: powerRange(power),
+ plateau,
+ plateauSummary: plateauSummary(plateau),
+ scaling: scalingVsSpec(cells),
+ facts: evidenceFacts(cells),
+ },
+ provenance: pages.flatMap((page) =>
+ page.entries.map((entry) => ({
+ runId: entry.runId,
+ artifactId: entry.artifact.id,
+ publishedAt: entry.publishedAt,
+ unavailable: entry.error !== null,
+ sources: entry.sources.map((source) => ({
+ id: source.id,
+ sha256: source.sha256,
+ sourceSha: source.sourceSha,
+ observedAt: source.observedAt,
+ kind: source.kind,
+ execution: source.execution,
+ fidelity: source.fidelity,
+ calibration: source.calibration,
+ releaseQualified: source.releaseQualified,
+ unavailable: source.error !== null,
+ })),
+ })),
+ ),
+ };
+}
diff --git a/packages/skills/skills/inferencex-api/integrity.json b/packages/skills/skills/inferencex-api/integrity.json
index ab24fe980..8bdf54014 100644
--- a/packages/skills/skills/inferencex-api/integrity.json
+++ b/packages/skills/skills/inferencex-api/integrity.json
@@ -8,7 +8,7 @@
"references/cli-contract.md": "fa44faa38d889b4fbdee5ba42752b47758ee3706fab150513bd4e6db87a86cb0",
"references/cli.md": "96b228f34cb3600f4548f4dc84df8506531747286763c56ca834c77bee05e1eb",
"references/collectivex.md": "f79cf8e2779a9289ab69f79f4a4b338e0b9a5f76a3750a3e969f33a744e726a1",
- "references/dashboard-views.md": "f6f207cf5f014cba7bf2e2c8b2b985fb0b34507c0bd74c5ff0368b26d17f90af",
+ "references/dashboard-views.md": "daceebedde3dbdc4850331db6f8f88ddee193752e46b6501d39edde3fdfe5f1c",
"references/offline-exports.md": "95aa565dcd4c9e592159baa560a9a58217bc61e395de1c6daf0576795c7f4ec9",
"references/pareto.md": "1b4d2d163f982e3f2d97addce310789eae9c1e5badd82dd7501708c9e0385027",
"references/powerx.md": "5af5527d54a7e6191a5769080c122638b333b1ceb59e19fdee7df662a5cd3c8f",
diff --git a/packages/skills/skills/inferencex-api/references/dashboard-views.md b/packages/skills/skills/inferencex-api/references/dashboard-views.md
index 5e6ec18ef..992336af0 100644
--- a/packages/skills/skills/inferencex-api/references/dashboard-views.md
+++ b/packages/skills/skills/inferencex-api/references/dashboard-views.md
@@ -136,7 +136,75 @@ which API selectors belong together.
| `current-inferencex-image` | Model, sequence, hardware, precision, speculation, node type, framework families, `asOf` for image age/release status, and `includeHistory` for daily age history. |
| `gpu-metrics` | Required run, file/host artifact, GPU indices, metric or correlation axes, statistics sorting, chart mode and interactive downsampling preference. One telemetry source per run; full-record statistics computed on read. Not a serving-window/role-pool projection. Responses are no-store. |
| `ubenchx` | Test selector (`test`: `mem-bw`, `sm-l2-distance`, `tpc-skyline`, or `all`) plus GPU selector (`all` or one GPU). `mem-bw` returns static device-memory copy bandwidth rows with derived MBU and latency. `sm-l2-distance` returns SM-to-SM L2 latency difference matrix with GPC/die topology and summary statistics. `tpc-skyline` returns measured TPCs per GPC (sorted descending) with GPC, TPC, and SM counts, defaulting to every GPU. `all` (default) returns every test. The Y-axis selector on `/ubenchx/mem-bw` is presentation-only. |
-| `video` | CI run/artifact discovery; only already-published artifact reads; source, serving cell, media/fidelity slot, power phase and GPU denominator; same-workload comparisons, axes, deployment costs and selected tradeoff point. No-store. |
+| `video` | Default VideoGenX dashboard: shared workload, deployment, axes, cost tier, API-price reference, optimal and hidden-hardware filters. `view=compare` adds published matched-case selection. Legacy run/artifact discovery/results/tradeoff remain explicit. No-store. |
+
+### VideoGenX selection and coverage
+
+With no `run`/`artifact`, `/api/v1/views/video` returns the current dashboard's
+published-history projection, not CI discovery. Copy its URL selectors directly:
+`v_x`, `v_y`, `v_tier`, `v_optimal`, `v_api`, `v_hidden`, `v_base`, `v_cand`, `v_case`.
+`v_view=chart|table` is presentation only. Read resolved `params`; malformed values
+use the same defaults as the UI. Unknown/repeated query names still return 400.
+
+- Defaults: P90 seconds vs videos/USD TCO, owning tier `h`, optimal deployments
+ only; `r` selects renting. `v_optimal=0` includes dominated deployments. Queued
+ client-concurrency cells stay in evidence, outside chart/table.
+- `v_hidden` is a comma-separated roster-key list (for example `h100,mi355x`),
+ default empty. It filters chart/table only; KPI/Compare/Evidence keep their
+ original scope. Unknown keys are ignored, remaining keys are sorted/deduplicated.
+- Metrics use participating GPUs. API list price is USD/video-second multiplied
+ by clip duration, not TCO, revenue or measured power. `metricDefinitions`
+ declares units and optimization direction; missing values remain null.
+- The server reads the same first **five published history pages at most** as the
+ UI. `coverage.pagesRead`, `coverage.nextPage` and `coverage.truncated` describe
+ the inspected window; this is not all-history or date-range coverage. It applies
+ the UI's canonical workload selection, sample floor and newest-cell rules.
+- Default mode leaves `comparison.cases.status=not-requested`. `view=compare`
+ reads at most two already-published media artifacts and returns the matched
+ pair selected by `v_case` (zero-based), `resolvedCaseIndex`, pair count and
+ unmatched counts. `not-published`, `no-pair` and `unavailable` are explicit
+ alternatives to `ready`; `no-pair` means a missing baseline/candidate.
+ `ready` means both artifacts were read, not that a matched case exists: always
+ inspect `count` and `selected` (they can be 0 and null).
+ Returned media paths are relative; private asset URLs and raw bundles are omitted.
+- Use `view=discovery&page=1` for the prior CI listing. `run=…&artifact=…` retains
+ the legacy result/serving/fidelity contract; `view=results|tradeoff` is explicit.
+ Legacy selectors and `v_*` selectors cannot be mixed. Legacy missing artifacts
+ return 204; dashboard mode returns its empty/partial projection and coverage.
+
+Example (check deployed OpenAPI availability first; no authentication or write):
+
+```js
+const url = new URL('https://inferencex.semianalysis.com/api/v1/views/video');
+url.search = new URLSearchParams({
+ view: 'compare',
+ v_x: 'p50Latency',
+ v_y: 'videosPerGpuHour',
+ v_tier: 'r',
+ v_optimal: '0',
+ v_api: '0.08',
+ v_hidden: 'mi355x',
+ v_base: 'h200',
+ v_cand: 'b200',
+ v_case: '3',
+}).toString();
+const response = await fetch(url);
+if (!response.ok) throw new Error(`Video view HTTP ${response.status}`);
+const data = await response.json();
+console.log(
+ JSON.stringify({
+ params: data.params,
+ coverage: data.coverage,
+ rows: data.rows,
+ comparison: data.comparison,
+ provenance: data.provenance,
+ }),
+);
+```
+
+Measured ratios and uncalibrated media similarity do not qualify visual quality,
+energy claims or a causal compute/memory bottleneck. Preserve source IDs, seals,
+execution/publication times and coverage alongside exported values.
## Interpretation and maintenance
diff --git a/packages/skills/test/dashboard-views.test.mjs b/packages/skills/test/dashboard-views.test.mjs
new file mode 100644
index 000000000..dd5b19338
--- /dev/null
+++ b/packages/skills/test/dashboard-views.test.mjs
@@ -0,0 +1,60 @@
+import assert from 'node:assert/strict';
+import { readFileSync } from 'node:fs';
+import { test } from 'node:test';
+
+const reference = readFileSync(
+ new URL('../skills/inferencex-api/references/dashboard-views.md', import.meta.url),
+ 'utf8',
+);
+const code = reference.match(/```js\n(?[\s\S]*?)\n```/u)?.groups.code;
+assert.ok(code, 'VideoGenX public GET example must remain executable');
+const AsyncFunction = Object.getPrototypeOf(async () => {
+ await Promise.resolve();
+}).constructor;
+const example = new AsyncFunction('fetch', 'console', code);
+
+test('VideoGenX skill example uses documented selectors and preserves partial coverage and missing evidence', async () => {
+ const requests = [];
+ const output = [];
+ const data = {
+ params: { view: 'compare', x: 'p50Latency', hidden: ['mi355x'], caseIndex: 3 },
+ coverage: { pagesRead: 5, maxPages: 5, nextPage: 6, truncated: true },
+ rows: [{ point: { id: 'source:c1' }, metrics: { kjPerVideo: null } }],
+ comparison: { cases: { status: 'not-published', selected: null } },
+ provenance: [{ runId: '123', artifactId: 456, publishedAt: '2026-09-20T00:00:00Z' }],
+ };
+ await example(
+ (url) => {
+ requests.push(new URL(url));
+ return Promise.resolve(Response.json(data));
+ },
+ { log: (text) => output.push(JSON.parse(text)) },
+ );
+ assert.equal(requests.length, 1);
+ assert.equal(requests[0].origin, 'https://inferencex.semianalysis.com');
+ assert.equal(requests[0].pathname, '/api/v1/views/video');
+ assert.deepEqual(Object.fromEntries(requests[0].searchParams), {
+ view: 'compare',
+ v_x: 'p50Latency',
+ v_y: 'videosPerGpuHour',
+ v_tier: 'r',
+ v_optimal: '0',
+ v_api: '0.08',
+ v_hidden: 'mi355x',
+ v_base: 'h200',
+ v_cand: 'b200',
+ v_case: '3',
+ });
+ assert.deepEqual(output, [data]);
+});
+
+test('VideoGenX skill example fails on an HTTP error instead of printing empty successful evidence', async () => {
+ const output = [];
+ await assert.rejects(
+ example(() => Promise.resolve(Response.json({ secret: 'private detail' }, { status: 503 })), {
+ log: (text) => output.push(text),
+ }),
+ /Video view HTTP 503/u,
+ );
+ assert.deepEqual(output, []);
+});
From ab386e8364ba37a5b02e9f3aed4cdf0499b43d8b Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sat, 26 Sep 2026 23:48:03 -0700
Subject: [PATCH 093/104] fix: keep video concurrency evidence in its shared
cohort
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:将视频并发证据限制在共同的工作负载和部署布局内。
排除不匹配或身份不明的硬件观测;同组硬件缺少 C1 时保留原始测量值,并将比率留空。补充数据、公开 API 和英文桌面和中文手机布局回归测试。
---
.../cypress/component/video-evidence.cy.tsx | 31 ++++++++++++++++++
.../video-benchmark/evidence.test.ts | 32 +++++++++++++++++++
.../components/video-benchmark/evidence.ts | 17 +++++-----
packages/app/src/lib/api/api-route-catalog.ts | 2 +-
.../src/lib/views-api/video-dashboard.test.ts | 20 ++++++++++++
.../skills/inferencex-api/integrity.json | 2 +-
.../references/dashboard-views.md | 3 ++
7 files changed, 96 insertions(+), 11 deletions(-)
diff --git a/packages/app/cypress/component/video-evidence.cy.tsx b/packages/app/cypress/component/video-evidence.cy.tsx
index 3b38526a0..a142e36ba 100644
--- a/packages/app/cypress/component/video-evidence.cy.tsx
+++ b/packages/app/cypress/component/video-evidence.cy.tsx
@@ -22,6 +22,37 @@ function mount(pathname = '/video', select = (points: VideoPoint[]) => points) {
const exhibit = (name: string) => cy.get(`[data-testid="video-evidence-${name}"]`);
describe('Video performance evidence (retained fixture)', () => {
+ for (const { locale, width } of [
+ { locale: 'en', width: 1280 },
+ { locale: 'zh', width: 390 },
+ ]) {
+ it(`keeps the concurrency table within the stated shared layout (${locale}, ${width}px)`, () => {
+ cy.viewport(width, 844);
+ mount(locale === 'zh' ? '/zh/video' : '/video', (points) =>
+ points.map((p) =>
+ p.hardwareKey === 'b200'
+ ? { ...p, participating: 8, server: { tp: 4, ulysses: 2, attention: null } }
+ : p,
+ ),
+ );
+ exhibit('plateau').find('tbody tr').should('have.length', 6);
+ exhibit('plateau').find('tr[data-hardware="b200"]').should('not.exist');
+ exhibit('plateau')
+ .find('tr[data-hardware="h100"][data-concurrency="4"]')
+ .should('contain', '5.37')
+ .and('contain', '4.00×');
+ exhibit('caveats').should(
+ 'contain',
+ locale === 'zh'
+ ? '每条视频由 4 张 GPU 参与计算(TP2 × Ulysses 2)'
+ : '4 participating GPUs per video (TP2 × Ulysses 2)',
+ );
+ cy.get('[data-testid="video-evidence"]').should(($section) => {
+ expect($section[0].scrollWidth).to.be.at.most($section[0].clientWidth);
+ });
+ exhibit('plateau').screenshot(`video-evidence-cohort-${locale}-${width}`);
+ });
+ }
it('does not call low board power compute saturation', () => {
mount('/video', (points) =>
points
diff --git a/packages/app/src/components/video-benchmark/evidence.test.ts b/packages/app/src/components/video-benchmark/evidence.test.ts
index 87c2a1e06..b4822033f 100644
--- a/packages/app/src/components/video-benchmark/evidence.test.ts
+++ b/packages/app/src/components/video-benchmark/evidence.test.ts
@@ -152,6 +152,38 @@ describe('concurrencyPlateau', () => {
const rows = concurrencyPlateau([baseline, { ...step, replicas: 2 }]);
expect(rows.map((row) => row.concurrency)).toEqual([1]);
});
+ it.each([
+ {
+ name: 'different layout',
+ patch: { participating: 8, server: { tp: 4, ulysses: 2, attention: null } },
+ },
+ { name: 'different workload', patch: { workloadKey: 'different-workload' } },
+ { name: 'unknown workload', patch: { workloadKey: null } },
+ { name: 'unknown layout', patch: { server: null } },
+ ])('omits hardware outside the shared cohort: $name', ({ patch }) => {
+ const mixed = points.map((p) => (p.hardwareKey === 'b200' ? { ...p, ...patch } : p));
+ const rows = concurrencyPlateau(mixed);
+ expect(rows).toHaveLength(6);
+ expect(rows.some((row) => row.hardwareKey === 'b200')).toBe(false);
+ expect(plateauSummary(rows)).toEqual({
+ queued: 4,
+ throughputDeviationPct: expect.closeTo(0.399, 2),
+ latency: [
+ { concurrency: 2, min: expect.closeTo(1.9925, 3), max: expect.closeTo(2.0007, 3) },
+ { concurrency: 4, min: expect.closeTo(3.9917, 3), max: expect.closeTo(3.9995, 3) },
+ ],
+ });
+ });
+ it('returns no concurrency evidence without a known C1 cohort', () => {
+ for (const cells of [
+ points.filter((p) => p.concurrency !== 1),
+ points.map((p) => ({ ...p, workloadKey: null })),
+ ]) {
+ const rows = concurrencyPlateau(cells);
+ expect(rows).toEqual([]);
+ expect(plateauSummary(rows)).toBeNull();
+ }
+ });
});
describe('scalingVsSpec', () => {
diff --git a/packages/app/src/components/video-benchmark/evidence.ts b/packages/app/src/components/video-benchmark/evidence.ts
index ba0161b99..fcf500cd1 100644
--- a/packages/app/src/components/video-benchmark/evidence.ts
+++ b/packages/app/src/components/video-benchmark/evidence.ts
@@ -99,15 +99,14 @@ export interface ConcurrencyPlateauRow {
* Throughput is per participating GPU, as everywhere else.
*/
export function concurrencyPlateau(points: VideoPoint[]): ConcurrencyPlateauRow[] {
- const baseline = new Map(
- sharedLayoutCells(measuredCells(points)).map((p) => [p.hardwareKey, p] as const),
- );
- // A step must match the baseline's known workload and deployment. A hardware
- // with no C1 cell keeps its raw observations with null ratios.
- const cells = measuredCells(points).filter((p) => {
- const base = baseline.get(p.hardwareKey);
- return base === undefined || evidenceComparisonKey(p) === evidenceComparisonKey(base);
- });
+ const measured = measuredCells(points);
+ const shared = sharedLayoutCells(measured);
+ const key = shared.length > 0 ? evidenceComparisonKey(shared[0]) : null;
+ if (key === null) return [];
+ const baseline = new Map(shared.map((p) => [p.hardwareKey, p] as const));
+ // Every row belongs to the shared workload and layout. Within that cohort,
+ // hardware with no C1 cell keeps its raw observations with null ratios.
+ const cells = measured.filter((p) => evidenceComparisonKey(p) === key);
return cells.map((p) => {
const base = baseline.get(p.hardwareKey);
const videosPerGpuHour = metricValue(p, 'videosPerGpuHour', options);
diff --git a/packages/app/src/lib/api/api-route-catalog.ts b/packages/app/src/lib/api/api-route-catalog.ts
index 5d32ffb68..8b6dfc7b4 100644
--- a/packages/app/src/lib/api/api-route-catalog.ts
+++ b/packages/app/src/lib/api/api-route-catalog.ts
@@ -1336,7 +1336,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/evidence.ts',
- sourceSha256: '4f57a3e2f6b3f55c4f30617db77b93d50dee79836bdc793c7299509ee1d71683',
+ sourceSha256: '1e1b648fefc7d0837deb985973c01ce7a6a175392d6d642efbb53dcc045a8482',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
diff --git a/packages/app/src/lib/views-api/video-dashboard.test.ts b/packages/app/src/lib/views-api/video-dashboard.test.ts
index 1fa3aa53e..6652d1047 100644
--- a/packages/app/src/lib/views-api/video-dashboard.test.ts
+++ b/packages/app/src/lib/views-api/video-dashboard.test.ts
@@ -1,4 +1,6 @@
import { describe, expect, it } from 'vitest';
+import type { VideoHistoryPage } from '@/components/video-benchmark/history';
+import fixture from '../../../cypress/fixtures/api/video-history.json';
import { videoDashboardProjection } from './video-dashboard';
describe('VideoGenX public metadata projection', () => {
@@ -16,4 +18,22 @@ describe('VideoGenX public metadata projection', () => {
expect(result.evidence.plateauSummary).toBeNull();
expect(result.provenance).toEqual([]);
});
+ it('keeps a different deployment in chart selection but out of the shared evidence cohort', () => {
+ const page = structuredClone(fixture) as unknown as VideoHistoryPage;
+ for (const entry of page.entries)
+ for (const source of entry.sources)
+ for (const observation of source.observations) {
+ if (!observation.hardware.includes('B200')) continue;
+ observation.participating = 8;
+ observation.server = { tp: 4, ulysses: 2, attention: null };
+ }
+ const result = videoDashboardProjection([page], '');
+ expect(result.rows.some((row) => row.point.hardwareKey === 'b200')).toBe(true);
+ expect(result.evidence.plateau).toHaveLength(6);
+ expect(result.evidence.plateau.some((row) => row.hardwareKey === 'b200')).toBe(false);
+ expect(result.evidence.plateauSummary?.queued).toBe(4);
+ expect(result.evidence.facts.participating).toBe(4);
+ expect(result.evidence.power).toHaveLength(2);
+ expect(result.evidence.scaling).toHaveLength(1);
+ });
});
diff --git a/packages/skills/skills/inferencex-api/integrity.json b/packages/skills/skills/inferencex-api/integrity.json
index 8bdf54014..04faa3459 100644
--- a/packages/skills/skills/inferencex-api/integrity.json
+++ b/packages/skills/skills/inferencex-api/integrity.json
@@ -8,7 +8,7 @@
"references/cli-contract.md": "fa44faa38d889b4fbdee5ba42752b47758ee3706fab150513bd4e6db87a86cb0",
"references/cli.md": "96b228f34cb3600f4548f4dc84df8506531747286763c56ca834c77bee05e1eb",
"references/collectivex.md": "f79cf8e2779a9289ab69f79f4a4b338e0b9a5f76a3750a3e969f33a744e726a1",
- "references/dashboard-views.md": "daceebedde3dbdc4850331db6f8f88ddee193752e46b6501d39edde3fdfe5f1c",
+ "references/dashboard-views.md": "33f14e73c3f33bf4afa1ec55f64b39409243e5883d02cc399c6fdc89f685c998",
"references/offline-exports.md": "95aa565dcd4c9e592159baa560a9a58217bc61e395de1c6daf0576795c7f4ec9",
"references/pareto.md": "1b4d2d163f982e3f2d97addce310789eae9c1e5badd82dd7501708c9e0385027",
"references/powerx.md": "5af5527d54a7e6191a5769080c122638b333b1ceb59e19fdee7df662a5cd3c8f",
diff --git a/packages/skills/skills/inferencex-api/references/dashboard-views.md b/packages/skills/skills/inferencex-api/references/dashboard-views.md
index 992336af0..5aa135319 100644
--- a/packages/skills/skills/inferencex-api/references/dashboard-views.md
+++ b/packages/skills/skills/inferencex-api/references/dashboard-views.md
@@ -159,6 +159,9 @@ use the same defaults as the UI. Unknown/repeated query names still return 400.
UI. `coverage.pagesRead`, `coverage.nextPage` and `coverage.truncated` describe
the inspected window; this is not all-history or date-range coverage. It applies
the UI's canonical workload selection, sample floor and newest-cell rules.
+- Evidence rows share one known workload and deployment layout. Hardware without
+ C1 keeps raw concurrency measurements only within that cohort, with null ratios.
+ Without any known C1 cohort, concurrency evidence is empty.
- Default mode leaves `comparison.cases.status=not-requested`. `view=compare`
reads at most two already-published media artifacts and returns the matched
pair selected by `v_case` (zero-based), `resolvedCaseIndex`, pair count and
From f0c8112799c6ceaf9e9cfb19c3c36825ba21fa20 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Fri, 16 Oct 2026 20:19:29 -0700
Subject: [PATCH 094/104] chore: adapt the video dashboard to master's lib
layout and timing baselines
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Re-point the moved @/lib imports, replace the retired video component specs in the component timing baseline with the dashboard specs, and refresh the touched contract digests.
中文:适配 master 的 lib 目录结构与 Cypress 计时基线。更新已迁移的 @/lib 导入路径,在组件计时基线中用仪表板用例替换已删除的视频用例,并刷新受影响的契约摘要。
---
packages/app/component-timings.json | 275 ++++++++----------
.../component/video-api-reference.cy.tsx | 2 +-
.../video-benchmark/VideoApiReference.tsx | 4 +-
.../video-benchmark/VideoCompare.tsx | 4 +-
.../video-benchmark/VideoConfigBar.tsx | 4 +-
.../video-benchmark/VideoDashboard.tsx | 4 +-
.../video-benchmark/VideoEvidence.tsx | 4 +-
.../video-benchmark/VideoHardwareChart.tsx | 4 +-
.../video-benchmark/VideoKpiCards.tsx | 2 +-
.../video-benchmark/VideoPointsTable.tsx | 2 +-
.../components/video-benchmark/evidence.ts | 2 +-
packages/app/src/lib/api/api-route-catalog.ts | 2 +-
.../app/src/lib/routing/url-state.test.ts | 4 +-
packages/app/timings-firefox.json | 70 ++++-
14 files changed, 211 insertions(+), 172 deletions(-)
diff --git a/packages/app/component-timings.json b/packages/app/component-timings.json
index c7ffc5df7..432329f6e 100644
--- a/packages/app/component-timings.json
+++ b/packages/app/component-timings.json
@@ -3492,327 +3492,304 @@
]
},
{
- "spec": "cypress/component/video-ci-runs.cy.tsx",
- "duration": 5955,
+ "spec": "cypress/component/video-api-reference.cy.tsx",
+ "duration": 1120,
"tests": [
{
"title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "keeps an open long-label menu within mobile bounds and supports keyboard selection"
+ "VideoApiReference",
+ "shows the dated reference with its source and applies valid prices as typed"
],
- "duration": 328,
+ "duration": 335,
"attempts": 1
},
{
"title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "loads the newest run automatically and switches to a failed run without inventing media"
+ "VideoApiReference",
+ "keeps the last valid price while the box is empty or zero and snaps back on blur"
],
- "duration": 447,
+ "duration": 273,
"attempts": 1
},
{
"title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "starts shared-artifact loading before run metadata finishes"
+ "VideoApiReference",
+ "resets to the reference, adopts external values and tracks committed changes"
],
- "duration": 69,
+ "duration": 440,
"attempts": 1
},
+ {
+ "title": ["VideoApiReference", "renders Chinese copy under /zh"],
+ "duration": 53,
+ "attempts": 1
+ }
+ ]
+ },
+ {
+ "spec": "cypress/component/video-compare.cy.tsx",
+ "duration": 1803,
+ "tests": [
{
"title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "keeps navigation and bundle validation errors visible on an empty tradeoff link"
+ "Video compare panel (retained fixture)",
+ "plays the same case from the slowest and fastest hardware side by side by default"
],
- "duration": 158,
+ "duration": 216,
"attempts": 1
},
{
"title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "keeps the shared run selected when browsing the first catalog page"
+ "Video compare panel (retained fixture)",
+ "steps through cases with the arrows, keeping v_case in the URL"
],
- "duration": 358,
+ "duration": 365,
"attempts": 1
},
{
- "title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "keeps a direct selection and its download active when an older catalog arrives"
- ],
- "duration": 3387,
+ "title": ["Video compare panel (retained fixture)", "drives both players together"],
+ "duration": 301,
"attempts": 1
},
{
"title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "shows stored measurements without downloading the archive"
+ "Video compare panel (retained fixture)",
+ "switches the candidate, fetching only the new side, and swaps on collision or request"
],
- "duration": 116,
+ "duration": 675,
"attempts": 1
},
{
"title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "opens the shared serving cell and switches from the chart without reloading the CI artifact"
+ "Video compare panel (retained fixture)",
+ "restores v_base and v_cand from the URL and reports a failed media read with a retry"
],
- "duration": 760,
+ "duration": 57,
"attempts": 1
},
{
"title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "shows a malformed serving matrix error instead of empty paired results"
+ "Video compare panel (retained fixture)",
+ "says when a run publishes no clips and keeps the metric deltas"
],
- "duration": 44,
+ "duration": 50,
"attempts": 1
},
{
"title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "reports expiration without downloading or substituting another artifact"
+ "Video compare panel (retained fixture)",
+ "disables the selects when fewer than two hardware are measured"
],
- "duration": 34,
+ "duration": 30,
"attempts": 1
},
{
- "title": [
- "H3 automatic CI viewer (synthetic API fixtures)",
- "withholds invalid generation measurements and separates warmup energy"
- ],
- "duration": 207,
+ "title": ["Video compare panel (retained fixture)", "renders Chinese copy on /zh/video"],
+ "duration": 86,
"attempts": 1
}
]
},
{
- "spec": "cypress/component/video-fidelity.cy.tsx",
- "duration": 1069,
+ "spec": "cypress/component/video-dashboard.cy.tsx",
+ "duration": 3618,
"tests": [
{
"title": [
- "Native paired fidelity UI (synthetic artifacts)",
- "distinguishes valid media from 18 threshold failures and changes both selected videos"
+ "Video hardware dashboard (retained fixture)",
+ "plots one C1 point per measured hardware and lists MI355X as unavailable"
],
- "duration": 498,
+ "duration": 124,
"attempts": 1
},
{
"title": [
- "Native paired fidelity UI (synthetic artifacts)",
- "rewrites report media/download links and removes scripts and external resources"
+ "Video hardware dashboard (retained fixture)",
+ "states model, workload and deployment as facts; the legend offers only Optimal Only"
],
- "duration": 226,
+ "duration": 73,
"attempts": 1
},
{
"title": [
- "Native paired fidelity UI (synthetic artifacts)",
- "loads a raw sealed bundle and revokes owned object URLs when unmounted"
+ "Video hardware dashboard (retained fixture)",
+ "switches the cost tier, repricing the cards, the badges and the URL"
],
- "duration": 94,
+ "duration": 245,
"attempts": 1
},
{
"title": [
- "Native paired fidelity UI (synthetic artifacts)",
- "clears old evidence and reports an invalid or empty comparison"
+ "Video hardware dashboard (retained fixture)",
+ "never plots queued cells, even when a stale URL asks for them"
],
- "duration": 105,
+ "duration": 240,
"attempts": 1
},
{
"title": [
- "Native paired fidelity UI (synthetic artifacts)",
- "renders Chinese status and original-audio controls without relabeling failures as invalid media"
+ "Video hardware dashboard (retained fixture)",
+ "lists the plotted cells with the full column set on demand and no concurrency column"
],
- "duration": 122,
- "attempts": 1
- }
- ]
- },
- {
- "spec": "cypress/component/video-results-navigation.cy.tsx",
- "duration": 1708,
- "tests": [
- {
- "title": [
- "Published video result navigation",
- "opens published videos from History when recent Actions contain no H3 runs"
- ],
- "duration": 359,
+ "duration": 150,
"attempts": 1
},
{
"title": [
- "Published video result navigation",
- "shows the Chinese published empty state and scans CI only after an explicit request"
+ "Video hardware dashboard (retained fixture)",
+ "hides a hardware from the legend and shows the table view"
],
- "duration": 473,
+ "duration": 287,
"attempts": 1
},
{
"title": [
- "Published video result navigation",
- "retries a failed published read and skips unreadable sources without scanning CI"
+ "Video hardware dashboard (retained fixture)",
+ "restores hidden hardware from a shared table URL"
],
- "duration": 136,
+ "duration": 140,
"attempts": 1
},
{
"title": [
- "Published video result navigation",
- "does not select a stale published response after returning to History"
+ "Video hardware dashboard (retained fixture)",
+ "restores v_ params from the URL and opens the history section for history deep links"
],
- "duration": 148,
+ "duration": 73,
"attempts": 1
},
{
"title": [
- "Published video result navigation",
- "retries the shared C4 selection after a refresh metadata failure"
+ "Video hardware dashboard (retained fixture)",
+ "reprices the API list price beside the TCO cost, in the cards, the table and the URL"
],
- "duration": 311,
+ "duration": 629,
"attempts": 1
},
{
"title": [
- "Published video result navigation",
- "resumes the selected artifact when media loading was cancelled by returning to History"
+ "Video hardware dashboard (retained fixture)",
+ "toggles Optimal Only from the legend and restores it from v_optimal"
],
- "duration": 250,
- "attempts": 1
- }
- ]
- },
- {
- "spec": "cypress/component/video-serving-results.cy.tsx",
- "duration": 2301,
- "tests": [
- {
- "title": [
- "H3 serving results (synthetic fixtures)",
- "follows chart-driven cell changes while the result remains mounted"
- ],
- "duration": 567,
+ "duration": 253,
"attempts": 1
},
{
"title": [
- "H3 serving results (synthetic fixtures)",
- "renders a parent-created blob in the report while keeping scripts disabled"
+ "Video hardware dashboard (retained fixture)",
+ "folds Compare and the evidence by default and opens Compare for compare deep links"
],
- "duration": 242,
+ "duration": 253,
"attempts": 1
},
{
"title": [
- "H3 serving results (synthetic fixtures)",
- "shows each concurrency without manufacturing a candidate and separates participating and allocated GPU counts"
+ "Video hardware dashboard (retained fixture)",
+ "shows placeholders while loading instead of a false \"Not measured\""
],
- "duration": 646,
+ "duration": 872,
"attempts": 1
},
{
"title": [
- "H3 serving results (synthetic fixtures)",
- "shows server stages separately from delivery and retains partial coverage"
+ "Video hardware dashboard (retained fixture)",
+ "renders Chinese copy on /zh/video"
],
- "duration": 223,
+ "duration": 229,
"attempts": 1
- },
+ }
+ ]
+ },
+ {
+ "spec": "cypress/component/video-evidence.cy.tsx",
+ "duration": 607,
+ "tests": [
{
"title": [
- "H3 serving results (synthetic fixtures)",
- "distinguishes requested and decoded duration and withholds invalid power"
+ "Video performance evidence (retained fixture)",
+ "keeps the concurrency table within the stated shared layout (en, 1280px)"
],
- "duration": 267,
+ "duration": 150,
"attempts": 1
},
{
"title": [
- "H3 serving results (synthetic fixtures)",
- "withholds headline metrics and power for an unverified configuration"
+ "Video performance evidence (retained fixture)",
+ "keeps the concurrency table within the stated shared layout (zh, 390px)"
],
- "duration": 61,
+ "duration": 137,
"attempts": 1
},
{
"title": [
- "H3 serving results (synthetic fixtures)",
- "supports Chinese copy and missing request, media, and allocation data"
+ "Video performance evidence (retained fixture)",
+ "does not call low board power compute saturation"
],
- "duration": 264,
+ "duration": 26,
"attempts": 1
- }
- ]
- },
- {
- "spec": "cypress/component/video-tradeoff.cy.tsx",
- "duration": 4419,
- "tests": [
+ },
{
"title": [
- "Video tradeoff chart (synthetic fixtures)",
- "plots participating GPU efficiency by default and requires assumptions for the cost axis"
+ "Video performance evidence (retained fixture)",
+ "does not call higher throughput and lower latency a queueing plateau"
],
- "duration": 2525,
+ "duration": 25,
"attempts": 1
},
{
"title": [
- "Video tradeoff chart (synthetic fixtures)",
- "still withholds P90 for single-request results until median diagnostics are selected"
+ "Video performance evidence (retained fixture)",
+ "reads board power against the recorded enforced limit per measured hardware"
],
- "duration": 170,
+ "duration": 31,
"attempts": 1
},
{
"title": [
- "Video tradeoff chart (synthetic fixtures)",
- "shows an empty state without inventing fixture results"
+ "Video performance evidence (retained fixture)",
+ "bounds the power meter to its declared range when mean power exceeds the recorded limit"
],
- "duration": 39,
+ "duration": 27,
"attempts": 1
},
{
"title": [
- "Video tradeoff chart (synthetic fixtures)",
- "distinguishes groups with the same short label and exposes their full workload"
+ "Video performance evidence (retained fixture)",
+ "tabulates concurrency measurements with ratios against each hardware C1 cell"
],
- "duration": 496,
+ "duration": 36,
"attempts": 1
},
{
"title": [
- "Video serving matrix chart (synthetic contract fixture)",
- "shows server coverage in point details without changing the client latency axis"
+ "Video performance evidence (retained fixture)",
+ "compares observed speedups with spec-sheet ratios without attributing a bottleneck"
],
- "duration": 187,
+ "duration": 31,
"attempts": 1
},
{
"title": [
- "Video serving matrix chart (synthetic contract fixture)",
- "defaults to P90 when individual serving cells have enough samples"
+ "Video performance evidence (retained fixture)",
+ "renders Chinese copy on /zh/video at mobile width"
],
- "duration": 78,
+ "duration": 102,
"attempts": 1
},
{
"title": [
- "Video serving matrix chart (synthetic contract fixture)",
- "shows three labeled cell medians and opens the selected concurrency result"
+ "Video performance evidence (retained fixture)",
+ "hides the plateau and scaling exhibits when only one hardware at C1 is measured"
],
- "duration": 754,
+ "duration": 28,
"attempts": 1
},
{
"title": [
- "Video serving matrix chart (synthetic contract fixture)",
- "shows the Chinese serving labels with per-cell medians"
+ "Video performance evidence (retained fixture)",
+ "renders nothing when no cell is measured"
],
- "duration": 120,
+ "duration": 6,
"attempts": 1
}
]
diff --git a/packages/app/cypress/component/video-api-reference.cy.tsx b/packages/app/cypress/component/video-api-reference.cy.tsx
index 68e924e25..30b0c5c51 100644
--- a/packages/app/cypress/component/video-api-reference.cy.tsx
+++ b/packages/app/cypress/component/video-api-reference.cy.tsx
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
import VideoApiReference from '@/components/video-benchmark/VideoApiReference';
-import { registerAnalyticsClient } from '@/lib/analytics';
+import { registerAnalyticsClient } from '@/lib/analytics/analytics';
/** Owns the price like VideoDashboard does and exposes it, plus an external setter. */
function Harness({ initial, pathname = '/video' }: { initial: number; pathname?: string }) {
diff --git a/packages/app/src/components/video-benchmark/VideoApiReference.tsx b/packages/app/src/components/video-benchmark/VideoApiReference.tsx
index b4441a12f..b46ac2a85 100644
--- a/packages/app/src/components/video-benchmark/VideoApiReference.tsx
+++ b/packages/app/src/components/video-benchmark/VideoApiReference.tsx
@@ -3,8 +3,8 @@
import { useId, useRef, useState } from 'react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
-import { track } from '@/lib/analytics';
-import { useLocale } from '@/lib/use-locale';
+import { track } from '@/lib/analytics/analytics';
+import { useLocale } from '@/lib/i18n/use-locale';
import { formatApiPrice, H3_API_REFERENCE } from './api-reference';
import { parseApiPrice } from './video-url-state';
diff --git a/packages/app/src/components/video-benchmark/VideoCompare.tsx b/packages/app/src/components/video-benchmark/VideoCompare.tsx
index 425c7d7c3..1b0a99110 100644
--- a/packages/app/src/components/video-benchmark/VideoCompare.tsx
+++ b/packages/app/src/components/video-benchmark/VideoCompare.tsx
@@ -4,8 +4,8 @@ import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react'
import { Button } from '@/components/ui/button';
import { Heading } from '@/components/ui/heading';
import { Skeleton } from '@/components/ui/skeleton';
-import { track } from '@/lib/analytics';
-import { useLocale } from '@/lib/use-locale';
+import { track } from '@/lib/analytics/analytics';
+import { useLocale } from '@/lib/i18n/use-locale';
import {
comparablePoints,
compareMetrics,
diff --git a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
index b20aa8ebb..e009e1553 100644
--- a/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
+++ b/packages/app/src/components/video-benchmark/VideoConfigBar.tsx
@@ -1,8 +1,8 @@
'use client';
import { ControlPanel } from '@/components/ui/control-panel';
-import { track } from '@/lib/analytics';
-import { useLocale } from '@/lib/use-locale';
+import { track } from '@/lib/analytics/analytics';
+import { useLocale } from '@/lib/i18n/use-locale';
import { metricLabel, X_METRICS, Y_METRICS, type XMetricId, type YMetricId } from './metrics';
import VideoApiReference from './VideoApiReference';
import VideoSelect from './VideoSelect';
diff --git a/packages/app/src/components/video-benchmark/VideoDashboard.tsx b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
index 64c1bca5e..b1f28c16a 100644
--- a/packages/app/src/components/video-benchmark/VideoDashboard.tsx
+++ b/packages/app/src/components/video-benchmark/VideoDashboard.tsx
@@ -17,8 +17,8 @@ import { captionControlTriggerClassName } from '@/components/ui/result-context';
import { SearchableSelect } from '@/components/ui/searchable-select';
import { ShareButton } from '@/components/ui/share-button';
import { useThemeColors } from '@/hooks/useThemeColors';
-import { track } from '@/lib/analytics';
-import { useLocale } from '@/lib/use-locale';
+import { track } from '@/lib/analytics/analytics';
+import { useLocale } from '@/lib/i18n/use-locale';
import { isQueueing, layoutLabel, leadCell } from './deployment';
import { costPerGpuHour, hardwareLabel, VIDEO_HARDWARE_ROSTER, type CostTier } from './hardware';
import {
diff --git a/packages/app/src/components/video-benchmark/VideoEvidence.tsx b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
index eb3929f6a..15587860a 100644
--- a/packages/app/src/components/video-benchmark/VideoEvidence.tsx
+++ b/packages/app/src/components/video-benchmark/VideoEvidence.tsx
@@ -2,8 +2,8 @@
import { Card } from '@/components/ui/card';
import { Heading } from '@/components/ui/heading';
-import type { Locale } from '@/lib/i18n';
-import { useLocale } from '@/lib/use-locale';
+import type { Locale } from '@/lib/i18n/i18n';
+import { useLocale } from '@/lib/i18n/use-locale';
import {
concurrencyPlateau,
evidenceFacts,
diff --git a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
index c9d040aa2..1c52673da 100644
--- a/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
+++ b/packages/app/src/components/video-benchmark/VideoHardwareChart.tsx
@@ -4,8 +4,8 @@ import { curveLinear, type Selection } from 'd3';
import { D3Chart } from '@/lib/d3-chart/D3Chart';
import type { ContinuousScale } from '@/lib/d3-chart/types';
import { CHART_TYPE, px } from '@/lib/d3-chart/typography';
-import { useLocale } from '@/lib/use-locale';
-import { escapeHtml } from '@/lib/utils';
+import { useLocale } from '@/lib/i18n/use-locale';
+import { escapeHtml } from '@/lib/shared/utils';
import { zeroAnchoredDomain } from './chart-domain';
import { layoutLabel } from './deployment';
import { formatMetric, metricLabel, type VideoPoint } from './metrics';
diff --git a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
index 9520d49fc..e2a886675 100644
--- a/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
+++ b/packages/app/src/components/video-benchmark/VideoKpiCards.tsx
@@ -2,7 +2,7 @@
import { Card } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
-import { useLocale } from '@/lib/use-locale';
+import { useLocale } from '@/lib/i18n/use-locale';
import { leadCell } from './deployment';
import { hardwareLabel, VIDEO_HARDWARE_ROSTER } from './hardware';
import { formatMetric, metricValue, type MetricId, type VideoPoint } from './metrics';
diff --git a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
index aecdf75aa..ae673836b 100644
--- a/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
+++ b/packages/app/src/components/video-benchmark/VideoPointsTable.tsx
@@ -1,7 +1,7 @@
'use client';
import { DataTable, type DataTableColumn } from '@/components/ui/data-table';
-import { useLocale } from '@/lib/use-locale';
+import { useLocale } from '@/lib/i18n/use-locale';
import { layoutLabel } from './deployment';
import { hardwareLabel } from './hardware';
import { formatMetric, metricLabel, metricValue, type MetricId, type VideoPoint } from './metrics';
diff --git a/packages/app/src/components/video-benchmark/evidence.ts b/packages/app/src/components/video-benchmark/evidence.ts
index fcf500cd1..2f71852ac 100644
--- a/packages/app/src/components/video-benchmark/evidence.ts
+++ b/packages/app/src/components/video-benchmark/evidence.ts
@@ -1,4 +1,4 @@
-import { GPU_SPECS } from '@/lib/gpu-specs';
+import { GPU_SPECS } from '@/lib/catalog/gpu-specs';
import { evidenceComparisonKey, sharedLayoutCells } from './deployment';
import { hardwareSort } from './hardware';
import { metricValue, type MetricOptions, type VideoPoint } from './metrics';
diff --git a/packages/app/src/lib/api/api-route-catalog.ts b/packages/app/src/lib/api/api-route-catalog.ts
index 8b6dfc7b4..46e7a7d00 100644
--- a/packages/app/src/lib/api/api-route-catalog.ts
+++ b/packages/app/src/lib/api/api-route-catalog.ts
@@ -1336,7 +1336,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/evidence.ts',
- sourceSha256: '1e1b648fefc7d0837deb985973c01ce7a6a175392d6d642efbb53dcc045a8482',
+ sourceSha256: '9b634b47e4a9dc98c5fec645592f5b7ee5a984f144f2566177c0702ebf878f46',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
diff --git a/packages/app/src/lib/routing/url-state.test.ts b/packages/app/src/lib/routing/url-state.test.ts
index bea8f1673..3d3962418 100644
--- a/packages/app/src/lib/routing/url-state.test.ts
+++ b/packages/app/src/lib/routing/url-state.test.ts
@@ -1102,7 +1102,7 @@ describe('buildShareUrl on the video dashboard', () => {
it('shares the live v_ params and nothing else', async () => {
setupWindow('?v_y=kjPerVideo&v_optimal=0&history-hardware=H200&i_metric=y_x', '/video');
- const { buildShareUrl } = await import('@/lib/url-state');
+ const { buildShareUrl } = await import('@/lib/routing/url-state');
const url = new URL(buildShareUrl());
expect(url.pathname).toBe('/video');
expect(url.searchParams.get('v_y')).toBe('kjPerVideo');
@@ -1113,7 +1113,7 @@ describe('buildShareUrl on the video dashboard', () => {
it('keeps live v_ params out of inference share links', async () => {
setupWindow('?v_y=kjPerVideo', '/inference');
- const { buildShareUrl } = await import('@/lib/url-state');
+ const { buildShareUrl } = await import('@/lib/routing/url-state');
expect(buildShareUrl()).not.toContain('v_y');
});
});
diff --git a/packages/app/timings-firefox.json b/packages/app/timings-firefox.json
index 02f06309a..76d9fc66c 100644
--- a/packages/app/timings-firefox.json
+++ b/packages/app/timings-firefox.json
@@ -4971,6 +4971,10 @@
}
]
},
+ {
+ "spec": "cypress/e2e/profit-power-curves.cy.ts",
+ "duration": 3568
+ },
{
"spec": "cypress/e2e/profit-route-params.cy.ts",
"duration": 12889,
@@ -5025,10 +5029,6 @@
}
]
},
- {
- "spec": "cypress/e2e/profit-power-curves.cy.ts",
- "duration": 3568
- },
{
"spec": "cypress/e2e/reliability-chart.cy.ts",
"duration": 3548,
@@ -6041,6 +6041,68 @@
}
]
},
+ {
+ "spec": "cypress/e2e/video-dashboard.cy.ts",
+ "duration": 6559,
+ "tests": [
+ {
+ "title": [
+ "Video hardware dashboard (E2E fixtures)",
+ "keeps hardware visibility after reload and on a shared Chinese URL"
+ ],
+ "duration": 2283,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Video hardware dashboard (E2E fixtures)",
+ "leads with the cross-hardware chart and restores v_ params from the URL"
+ ],
+ "duration": 91,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Video hardware dashboard (E2E fixtures)",
+ "lists only the measured deployments in the table view, without a concurrency column"
+ ],
+ "duration": 163,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Video hardware dashboard (E2E fixtures)",
+ "prices the API list reference from v_api and resets it to the dated default"
+ ],
+ "duration": 236,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Video hardware dashboard (E2E fixtures)",
+ "compares the slowest lead deployment against the fastest with time, cost and energy deltas"
+ ],
+ "duration": 283,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Video hardware dashboard (E2E fixtures)",
+ "opens the history section for history deep links and renders the Chinese dashboard"
+ ],
+ "duration": 124,
+ "attempts": 1
+ },
+ {
+ "title": [
+ "Video hardware dashboard (E2E fixtures)",
+ "fits a phone viewport without horizontal page scroll in both locales"
+ ],
+ "duration": 3357,
+ "attempts": 1
+ }
+ ]
+ },
{
"spec": "cypress/e2e/yaxis-metrics-render.cy.ts",
"duration": 6488,
From 3b6e4014e0e2871f00da9ee13af9a2fc4c1bf328 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Fri, 16 Oct 2026 21:31:08 -0700
Subject: [PATCH 095/104] feat: accept native srt-slurm H3 bundles in the video
dashboard
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The native launcher seals power into the receipt, records no GPU model and
can ship untimed request records; the legacy supervisor contract is unchanged.
中文:视频仪表板接受原生 srt-slurm H3 产物包;功率以回执封印校验,无效或缺失时显示为未测得,旧 supervisor 契约保持不变。
---
.prettierignore | 3 +
docs/video-history.md | 4 +
docs/videogenx-dashboard.md | 3 +
.../cypress/component/video-dashboard.cy.tsx | 26 +
.../video-benchmark/VideoHistory.tsx | 12 +
.../fixtures/native-serving-bundle/SHA256SUMS | 24 +
.../fixtures/native-serving-bundle/ci.json | 41 +
.../gpu/c1/aggregate.json | 4 +
.../gpu/c1/baseline/run.json | 1 +
.../gpu/c1/benchmark_concurrency_1.json | 1 +
.../native-serving-bundle/gpu/c1/gpu-job.json | 65 ++
.../gpu/c1/power-validation.json | 32 +
.../native-serving-bundle/gpu/c1/power.json | 862 ++++++++++++++++++
.../native-serving-bundle/gpu/c1/spec.json | 521 +++++++++++
.../gpu/c2/aggregate.json | 4 +
.../gpu/c2/baseline/run.json | 1 +
.../gpu/c2/benchmark_concurrency_2.json | 1 +
.../native-serving-bundle/gpu/c2/gpu-job.json | 65 ++
.../gpu/c2/power-validation.json | 32 +
.../native-serving-bundle/gpu/c2/power.json | 862 ++++++++++++++++++
.../native-serving-bundle/gpu/c2/spec.json | 521 +++++++++++
.../gpu/c4/aggregate.json | 4 +
.../gpu/c4/baseline/run.json | 1 +
.../gpu/c4/benchmark_concurrency_4.json | 1 +
.../native-serving-bundle/gpu/c4/gpu-job.json | 65 ++
.../gpu/c4/power-validation.json | 32 +
.../native-serving-bundle/gpu/c4/power.json | 862 ++++++++++++++++++
.../native-serving-bundle/gpu/c4/spec.json | 521 +++++++++++
.../native-serving-bundle/manifest.json | 84 ++
.../native-serving-bundle/serving-smoke.json | 315 +++++++
.../components/video-benchmark/hardware.ts | 14 +
.../src/components/video-benchmark/history.ts | 16 +-
.../video-benchmark/native-serving.test.ts | 236 +++++
.../src/components/video-benchmark/serving.ts | 83 +-
.../components/video-benchmark/tradeoff.ts | 95 +-
packages/app/src/lib/api/api-route-catalog.ts | 2 +-
36 files changed, 5385 insertions(+), 31 deletions(-)
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/SHA256SUMS
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/ci.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/aggregate.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/baseline/run.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/benchmark_concurrency_1.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/gpu-job.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/power-validation.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/power.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/spec.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/aggregate.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/baseline/run.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/benchmark_concurrency_2.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/gpu-job.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/power-validation.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/power.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/spec.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/aggregate.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/baseline/run.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/benchmark_concurrency_4.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/gpu-job.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/power-validation.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/power.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/spec.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/manifest.json
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/serving-smoke.json
create mode 100644 packages/app/src/components/video-benchmark/native-serving.test.ts
diff --git a/.prettierignore b/.prettierignore
index 7567a05df..01b155e54 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -11,3 +11,6 @@ packages/app/cypress/fixtures/api/collectivex-runs.json
# The power-model parity fixture is upstream Python output, regenerated wholesale by
# packages/app/scripts/generate-power-model-parity.py; pretty-printed it is ~5x larger.
packages/app/src/lib/power/power-model.parity.json
+# The native H3 bundle fixture is a checksum-sealed copy of the InferenceX producer's
+# output: SHA256SUMS and the manifest bind every byte, so reformatting breaks the seal.
+packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/
diff --git a/docs/video-history.md b/docs/video-history.md
index 0cc7762a7..3f9a7cb05 100644
--- a/docs/video-history.md
+++ b/docs/video-history.md
@@ -8,6 +8,8 @@
The projection groups all cells under the original source inside one artifact entry. It reuses `storedBundle`, `servingCells`, `storedFidelityBundle`, and the existing tradeoff calculations. Invalid or unavailable indexes remain explicit error entries. Original execution time comes from `ci.started_at`; index publication time is separate and must never be substituted for execution time. Original run IDs and export run IDs remain distinct.
+Two launchers produce the serving matrix, and `serving.ts` keys the contract on the manifest's `evidence_kind`. The legacy controlled GPU supervisor (`controlled_h3_gpu`) wrote `controlled_serving_smoke` receipts, device inventories, power-limit snapshots and fully timed request records. The native srt-slurm launcher (`srt_slurm_h3_service`, InferenceX #2916) writes `srt_slurm_h3_service_receipt` receipts that seal a `h3_native_power` document (`power.valid`, the receipt's `power.sha256` and the measurement phase must agree), per-cell InferenceX sidecars (`aggregate.json`, `benchmark_concurrency_.json`; a `power_valid` of 0 or an `energy_normalization` other than `clips` withholds the number), and a matrix-level `power_verified` verdict shown on the source line. Native bundles name no GPU model: the projection reads `ci.site.gpu_model` when present, else the registry SKU in `ci.ci.runner_name`, else leaves the hardware empty. When an srt-client run record carries no per-request latency, the harness summary (`latency_median_seconds`, `valid_clips_per_second`, cross-checked against the matrix cell) stands in for P50 and throughput; P90 still needs the per-request population. Power that is not `valid` renders as not measured, never as a number.
+
Each observation also carries the cell's participating and allocated GPU counts, measurement wall seconds, clip duration and frame count, summed mean board watts, summed recorded enforced limits (null when no limit snapshot exists), the configured `tp_size` / `ulysses_degree` / `attention_backend` and the endpoint's replica count (`execution.deployment.replica_count`, null for bundles that predate it). The nullable `workloadKey` carries the full canonical workload identity when complete; prompts and seeds cannot be replaced by the shortened display label. These are additive, nullable fields under the same `schemaVersion: 1`; the hardware dashboard reads at most five pages and derives every displayed metric from them, so the browser never parses an artifact bundle for the chart.
## Evidence boundaries
@@ -28,6 +30,8 @@ Each observation also carries the cell's participating and allocated GPU counts,
历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。每个 cell 另附参与/已分配 GPU 数、测量窗口秒数、视频时长与帧数、板卡平均功率之和、记录的生效功率上限之和(无快照时为 null)、配置的 `tp_size` / `ulysses_degree` / `attention_backend`,以及端点的副本数(`execution.deployment.replica_count`,早于该记录的产物包为 null);`workloadKey` 在信息完整时保留完整工作负载身份,prompts 与 seeds 不能由缩写显示标签替代。这些都是同一 `schemaVersion: 1` 下可为空的附加字段,硬件仪表板最多读取五页,并据此推导全部指标,浏览器不再解析产物包。
+serving 矩阵有两种来源,`serving.ts` 按 manifest 的 `evidence_kind` 区分契约:旧的受控 GPU supervisor(`controlled_h3_gpu`)写入 `controlled_serving_smoke` 回执、设备清单、功率上限快照和带完整计时的请求记录;原生 srt-slurm launcher(`srt_slurm_h3_service`,InferenceX #2916)写入 `srt_slurm_h3_service_receipt` 回执,并对 `h3_native_power` 功率文档做封印(`power.valid`、回执中的 `power.sha256` 与测量阶段必须一致),同时附带每个 cell 的 InferenceX sidecar(`aggregate.json`、`benchmark_concurrency_.json`;`power_valid` 为 0 或 `energy_normalization` 不是 `clips` 时不显示对应数值),矩阵级的 `power_verified` 结论显示在来源行。原生产物包不记录 GPU 型号:投影优先读取 `ci.site.gpu_model`,其次从 `ci.ci.runner_name` 中识别注册表 SKU,都没有时硬件留空。srt-client 的运行记录没有逐请求延迟时,以 harness 汇总(`latency_median_seconds`、`valid_clips_per_second`,并与矩阵 cell 交叉核对)代替 P50 与吞吐量;P90 仍需要逐请求样本。功率未通过 `valid` 校验时一律显示为未测得,不显示数字。
+
当前展示观测值,未选择匹配基线,也不计算 before/after。延迟、吞吐量使用提交到下载完成的窗口;板卡能耗使用记录的生成窗口。保真度、阈值校准、发布验收单独展示。筛选仅作用于已加载的页面,可继续加载较早结果。
`E2E_FIXTURES=1` 使用保留结果的脱敏元数据回放,遵循现有 fixture 校验和清单,并显示回放提示。未知发布时间保持为空;这不是新测量或新发布。
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
index 197a17502..6aa93f838 100644
--- a/docs/videogenx-dashboard.md
+++ b/docs/videogenx-dashboard.md
@@ -39,6 +39,7 @@ The retained dashboard fixture has exactly one measured deployment per measured
- **Newest observation wins**: `latestVideoCells` keeps the first (newest publication) observation per hardware × deployment × concurrency, so a re-run replaces, never duplicates, a point, while a new server layout adds one.
- **One workload, real samples**: the additive `workloadKey` preserves the full canonical workload identity from the source, including prompts and seeds; the shortened workload label is display text only. Missing identity stays null and is isolated by original source manifest. Runtime revision remains a disclosed comparison variable. `dashboardCells` keeps only the workload measured on the most hardware and drops cells with fewer than ten valid clips (the P90 floor), so a smoke run of a shorter plan never becomes a point, a KPI lead or a Compare side; the Performance history list still shows it, and the Workload fact counts the hidden workloads.
- **Strings**: component-local `STRINGS = { en, zh }` via `useLocale()`; SKUs, units and identifiers stay English.
+- **Native srt-slurm bundles**: the `h3-results--` artifacts of InferenceX #2916 (`evidence_kind: srt_slurm_h3_service`) feed the same projection; see [Video performance history](./video-history.md) for the contract. They record no GPU model, so a point joins the per-SKU chart, cards and Compare only when `ci.site.gpu_model` or the CI runner's name identifies the hardware; otherwise it stays in the Performance history list with an empty hardware. Invalid or missing power renders as not measured.
- **Fixture**: `cypress/fixtures/api/video-history.json` is rebuilt from retained `StoredArtifact` exports with `bun run fixtures:video-history ` (`scripts/build-video-history-fixture.ts`); it is metadata only and registered in `_manifest.json`.
## 中文说明
@@ -49,4 +50,6 @@ The retained dashboard fixture has exactly one measured deployment per measured
图表下方还有三个区块。带日期、可编辑的 API 参考价(`v_api`,记录 MiniMax 开放平台按量付费页在 2026-09-24 的价格,页面未标注生效日期;不保证当前仍适用)只推导一个数字——每条视频 API 标价(单价 × 视频秒数),显示在 KPI 卡每条视频 TCO 成本旁边,并作为表格和 CSV 的一列;它不进入图表,也不再推导收入、利润或价格倍数。价格缺失或不为正时该值为 null,`parseApiPrice` 会回退到参考价,而不是按 0 计价。Arena 式 Compare 以视频为主:同一 prompt 与 seed 在两种硬件上的视频并排播放,支持同步播放/暂停/重播和上一个/下一个用例箭头,没有盲测模式,也没有用例下拉框;下方的差值行固定为出片时间(P50)、每条视频 TCO 成本和每条视频能耗,并以脚注注明成本档位。每种硬件只有一个可选 cell(其代表部署),默认以最慢的硬件为基线、最快的为候选,选择记录在 `v_base`、`v_cand`、`v_case` 中;面板滚入视口时才加载两个已发布产物,HTTP 204 读作“未发布视频”而不是错误。性能测量证据面板展示板卡功率相对生效上限的比值、并发下的吞吐量和延迟比值,以及带宽/FLOPS 规格比与实测加速比。跨硬件比较要求完整且相同的工作负载身份、完整部署布局和 C1;缺少匹配布局的硬件直接省略,不回退到其代表部署。并发比较还要求相同副本数。文案只描述数值,不据此断言功率饱和、吞吐量平台或计算/内存瓶颈。
+InferenceX #2916 的原生 srt-slurm 产物包(`h3-results--`,`evidence_kind: srt_slurm_h3_service`)走同一条投影路径,契约见[视频性能历史](./video-history.md)。它们不记录 GPU 型号:只有在 `ci.site.gpu_model` 或 CI runner 名称能识别出硬件时,对应点才会进入按 SKU 划分的图表、KPI 卡和 Compare;否则只保留在性能历史列表中,硬件留空。功率无效或缺失时显示为未测得。
+
完整工作负载身份由附加字段 `workloadKey` 保存,包含 prompts 与 seeds;缩写标签只用于显示。身份缺失时保持 null,按原始 source manifest 隔离,不跨来源合并。runtime revision 作为比较变量单独披露。仪表板最多读取五页历史;公开 `/api/v1/views/video` 默认复用相同选择与计算逻辑,旧 API 视图仍可显式指定。
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index de79bed48..c63964c8f 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -304,6 +304,32 @@ describe('Video hardware dashboard (retained fixture)', () => {
kpi('mi355x').find('[data-testid="video-kpi-unavailable"]').should('exist');
cy.get('[data-testid="video-idle-note"]').should('have.text', IDLE_NOTE);
});
+ it('states each published source’s GPU power verdict in the history list', () => {
+ // Native srt-slurm sources record power_verified; retained supervisor sources do not.
+ cy.fixture('api/video-history.json').then((page) => {
+ page.entries[0].sources[0].powerVerified = true;
+ page.entries[2].sources[0].powerVerified = false;
+ cy.intercept('GET', '/api/video-runs?format=history&page=1', page).as('verdicts');
+ });
+ cy.intercept('GET', '/api/video-runs?page=*', { runs: [], nextPage: null });
+ cy.intercept('GET', '/api/video-runs?run=*', { statusCode: 204 });
+ cy.window().then((win) =>
+ win.history.replaceState(null, '', `${win.location.pathname}?history-query=`),
+ );
+ cy.mount(
+
+
+ ,
+ );
+ cy.wait('@verdicts');
+ cy.get('[data-testid="video-history-entry"]').should('have.length', 6);
+ cy.get('[data-testid="video-history-power"]').should(($verdicts) => {
+ expect([...$verdicts].map((el) => el.textContent?.trim())).to.deep.equal([
+ '· GPU power: Measured',
+ '· GPU power: Not measured',
+ ]);
+ });
+ });
it('renders Chinese copy on /zh/video', () => {
mount('/zh/video');
cy.get('[data-testid="video-chart-card"]')
diff --git a/packages/app/src/components/video-benchmark/VideoHistory.tsx b/packages/app/src/components/video-benchmark/VideoHistory.tsx
index b23eb05a5..81df9ee43 100644
--- a/packages/app/src/components/video-benchmark/VideoHistory.tsx
+++ b/packages/app/src/components/video-benchmark/VideoHistory.tsx
@@ -39,6 +39,9 @@ const STRINGS = {
qualification: 'Release qualification',
no: 'Not qualified',
yes: 'Qualified by recorded policy',
+ power: 'GPU power',
+ measured: 'Measured',
+ notMeasured: 'Not measured',
unavailable: 'Unavailable',
details: 'Evidence and limitations',
counts: 'Valid / completed / scheduled',
@@ -82,6 +85,9 @@ const STRINGS = {
qualification: '发布验收',
no: '未经验证',
yes: '已按记录策略通过',
+ power: 'GPU 功率',
+ measured: '已测得',
+ notMeasured: '未测得',
unavailable: '无数据',
details: '证据与局限',
counts: '有效 / 已完成 / 计划',
@@ -284,6 +290,12 @@ export default function VideoHistory() {
: source.releaseQualified
? s.yes
: s.no}
+ {typeof source.powerVerified === 'boolean' && (
+
+ {' '}
+ · {s.power}: {source.powerVerified ? s.measured : s.notMeasured}
+
+ )}
{source.error && (
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/SHA256SUMS b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/SHA256SUMS
new file mode 100644
index 000000000..cb849c105
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/SHA256SUMS
@@ -0,0 +1,24 @@
+d13dc609015bc1934f2a56b39a88861821cd580dbdd283341250274ac7a50975 ci.json
+d9efc377307bd6fd2b4379076f9b3d7ed6e231c60060ad9ef78ac1590c63e902 gpu/c1/aggregate.json
+fee60ee8349f71bc43805a42ea61e1da79c727cbd9c4ada6fb930b9cdbbd939d gpu/c1/baseline/run.json
+0e6b28e34e5a1505c53a75228298c657b68f4c9730a60700859b1d796b1bb31d gpu/c1/benchmark_concurrency_1.json
+29a424efce674a7ca0a786ce9a7c02949fbdaaa4cbb91c1bfbc5a67979b60bba gpu/c1/gpu-job.json
+3952eb8f322479c2d413424d3b82ceef6f6a970c162f9c37a54cf3a84fe6deb0 gpu/c1/power-validation.json
+763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677 gpu/c1/power.json
+3fe1ad75b8e1cd485e3b376cefdea422385cbe9743ed7b154cf8fc614ccb9269 gpu/c1/spec.json
+ff914c37e5170b78f28c832f07c08282b764b4ae85ce9e2570414b8ab661e9e0 gpu/c2/aggregate.json
+0a52c7c925c0e1bb1641dd973c596f67496db42859a8d2fca60c203821f09816 gpu/c2/baseline/run.json
+c4cf6ecdc0dc2a618eaf7bb2ba1c5ec46e307101221047cd3bef97c53ee7785d gpu/c2/benchmark_concurrency_2.json
+68a4d7292268b7551ef98af8b378a4b7a41e90d6a2b55db38c5775acb4cc0782 gpu/c2/gpu-job.json
+3952eb8f322479c2d413424d3b82ceef6f6a970c162f9c37a54cf3a84fe6deb0 gpu/c2/power-validation.json
+763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677 gpu/c2/power.json
+77b417da60aa333eb86e5cd7c6f3fa1913013489650664ce2f2e2f8de5ccd149 gpu/c2/spec.json
+ff9e6e9ea7a4c052d61d8ed044d174fa56dfcdfe11642118fdf2ef4a1168cc19 gpu/c4/aggregate.json
+4a0cffaffc3636c2fd7931bfffe51174604d459e8338a2873843262075adf10d gpu/c4/baseline/run.json
+3c04e17724f8e11ccedea612ab94ea4e4b0b2bdbef5d1e3d9608171b77a5f0b1 gpu/c4/benchmark_concurrency_4.json
+3e1510a484293e91da9be9c5026afd8cfc9caaa1ba6f67ba713edc38771e85f9 gpu/c4/gpu-job.json
+3952eb8f322479c2d413424d3b82ceef6f6a970c162f9c37a54cf3a84fe6deb0 gpu/c4/power-validation.json
+763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677 gpu/c4/power.json
+0c11c7804043c108718f1285af13c47c9e54a53a52dd5b81eab585044092d96a gpu/c4/spec.json
+6d430666e9c6b144249f95b734cfcbd018a89fc45b95493a2ad252a0c0e0024d manifest.json
+2fc3816b635e85e97f5a945676e8375ddaa1eac351d5dbdec0c268741c0427c0 serving-smoke.json
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/ci.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/ci.json
new file mode 100644
index 000000000..13780f884
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/ci.json
@@ -0,0 +1,41 @@
+{
+ "ci": {
+ "actor": null,
+ "repository": "SemiAnalysisAI/InferenceX",
+ "run_url": "https://github.com/SemiAnalysisAI/InferenceX/actions/runs/123456789",
+ "runner_name": null,
+ "triggering_actor": null,
+ "workflow_ref": null,
+ "workflow_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
+ },
+ "ci_accepted": false,
+ "concurrencies": [
+ 1,
+ 2,
+ 4
+ ],
+ "evidence_kind": "srt_slurm_h3_service",
+ "failures": [],
+ "finished_at": "2026-10-17T03:38:07.267054Z",
+ "launcher": "srt-slurm",
+ "mode": "serving-smoke",
+ "phase": "complete",
+ "power": {
+ "exporter_image_sha256": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
+ "producer_git_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ },
+ "power_verified": true,
+ "release_qualified": false,
+ "result_filename": "r",
+ "run_attempt": "1",
+ "run_id": "123456789",
+ "schema_version": 1,
+ "slurm_job": {
+ "job_id": "77",
+ "state": "COMPLETED"
+ },
+ "source_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
+ "started_at": "2026-10-17T03:38:07.253472Z",
+ "status": "complete",
+ "task_id": "h3-video"
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/aggregate.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/aggregate.json
new file mode 100644
index 000000000..280c302dd
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/aggregate.json
@@ -0,0 +1,4 @@
+{
+ "max_concurrency": 1,
+ "power_valid": 1
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/baseline/run.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/baseline/run.json
new file mode 100644
index 000000000..c7c63e8f7
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/baseline/run.json
@@ -0,0 +1 @@
+{"bundle_type": "mvp_run", "status": "complete", "plan_id": "h3-serving-2gpu-c124-v1", "plan_sha256": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "plan": {"cases": [{"case_id": "drum-taps", "prompt": "A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.", "requires_motion": true, "requires_sound": true, "seed": 11}], "generation": {"aspect_ratio": "16:9", "audio_channels": 2, "audio_flow_shift": 3.0, "audio_sample_rate_hz": 32000, "duration_seconds": 4, "flow_shift": 12.0, "fps": 24, "frame_count": 107, "height": 768, "num_inference_steps": 50, "width": 1344}, "model_id": "MiniMaxAI/MiniMax-H3", "model_revision": "42ed227ee7df40d41602854ae760620d6eb651fe", "plan_id": "h3-serving-2gpu-c124-v1", "repetitions": 4, "warmup_runs": 1}, "configuration": {"runtime": "sglang", "runtime_revision": "7777777777777777777777777777777777777777"}, "started_at": "2026-10-17T00:00:00Z", "finished_at": "2026-10-17T00:10:00Z", "measurement": {"boundary": "submit_to_downloaded_media", "concurrency": 1, "warmup_runs": 1, "wall_seconds": 60.0, "start_monotonic_seconds": 100.0, "end_monotonic_seconds": 160.0}, "serving": {"mode": "closed_loop", "concurrency": 1, "client_ready_latency_seconds": {"p50": 118.0}}, "records": [{"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}, {"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}, {"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}, {"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}], "summary": {"scheduled": 4, "completed": 4, "valid": 4, "failed": 0, "not_started": 0, "latency_median_seconds": 119.0, "valid_clips_per_second": 0.06666666666666667}}
\ No newline at end of file
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/benchmark_concurrency_1.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/benchmark_concurrency_1.json
new file mode 100644
index 000000000..d38b1c764
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/benchmark_concurrency_1.json
@@ -0,0 +1 @@
+{"max_concurrency": 1, "benchmark_start_time_unix": 1005.0, "benchmark_end_time_unix": 1065.0, "duration": 60.0, "completed": 4, "scheduled": 4, "energy_normalization": "clips", "clock": {"utc_minus_monotonic_seconds": 905.0}}
\ No newline at end of file
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/gpu-job.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/gpu-job.json
new file mode 100644
index 000000000..02bf5aa04
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/gpu-job.json
@@ -0,0 +1,65 @@
+{
+ "aggregate_path": "aggregate.json",
+ "allocation": {
+ "label": "srt-slurm job assigned at launch",
+ "mode": "dedicated_ci"
+ },
+ "authorization": {
+ "approval_reference": "InferenceX #2916 native srt-slurm H3 serving run, authorized by the repository owner on 2026-10-17 (SemiAnalysis clusters only); model use per the MiniMax-H3 license review recorded for the #2894 baseline (user-confirmation-2026-09-02).",
+ "compute_approved": true,
+ "model_license_reviewed": true
+ },
+ "bundle_type": "srt_slurm_h3_service_receipt",
+ "ci_accepted": false,
+ "cleanup_status": "srt_slurm_job_teardown",
+ "evidence_kind": "srt_slurm_h3_service",
+ "execution_id": "slurm-77",
+ "failures": [],
+ "finished_at": "2026-10-17T00:10:00Z",
+ "job_id": "github-123456789-1-c1",
+ "measurement_status": "complete",
+ "measurement_verified": true,
+ "plan_sha256": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "power": {
+ "invalid_reasons": [],
+ "path": "power.json",
+ "sha256": "763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677",
+ "valid": true
+ },
+ "power_verified": true,
+ "regression_status": "inconclusive",
+ "release_qualified": false,
+ "roles": {
+ "baseline": {
+ "finished_at": "2026-10-17T00:10:00Z",
+ "run_path": "baseline/run.json",
+ "run_sha256": "fee60ee8349f71bc43805a42ea61e1da79c727cbd9c4ada6fb930b9cdbbd939d",
+ "run_status": "complete",
+ "run_summary": {
+ "completed": 4,
+ "failed": 0,
+ "latency_median_seconds": 119.0,
+ "not_started": 0,
+ "scheduled": 4,
+ "valid": 4,
+ "valid_clips_per_second": 0.06666666666666667
+ },
+ "started_at": "2026-10-17T00:00:00Z",
+ "status": "complete"
+ }
+ },
+ "schema_version": "0.1.0",
+ "server": {
+ "argv": [
+ "x"
+ ],
+ "slurm_job_id": "77"
+ },
+ "slurm": {
+ "job_id": "77",
+ "state": "COMPLETED"
+ },
+ "spec_sha256": "3fe1ad75b8e1cd485e3b376cefdea422385cbe9743ed7b154cf8fc614ccb9269",
+ "started_at": "2026-10-17T00:00:00Z",
+ "status": "complete"
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/power-validation.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/power-validation.json
new file mode 100644
index 000000000..bef9a8df9
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/power-validation.json
@@ -0,0 +1,32 @@
+{
+ "benchmark_window": {
+ "end_time_unix": 1065.0,
+ "start_time_unix": 1005.0
+ },
+ "expected_gpu_count": 2,
+ "integration_method": "per_device_trapezoidal_with_linear_boundary_interpolation",
+ "metrics": {
+ "avg_total_gpu_power_w": 1201.0,
+ "joules_per_successful_query": 18000.25,
+ "total_gpu_energy_j": 72001.0
+ },
+ "observed_gpu_count": 2,
+ "per_gpu_energy_j": {
+ "node/GPU-11111111-1111-1111-1111-111111111111": 36000.0,
+ "node/GPU-22222222-2222-2222-2222-222222222222": 36001.0
+ },
+ "per_gpu_max_sample_gap_s": {
+ "node/GPU-11111111-1111-1111-1111-111111111111": 1.0,
+ "node/GPU-22222222-2222-2222-2222-222222222222": 1.0
+ },
+ "per_gpu_role": {
+ "node/GPU-11111111-1111-1111-1111-111111111111": "h3-server",
+ "node/GPU-22222222-2222-2222-2222-222222222222": "h3-server"
+ },
+ "power_valid": true,
+ "producer": {
+ "exporter_image_sha256": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
+ "producer_git_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ },
+ "reasons": []
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/power.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/power.json
new file mode 100644
index 000000000..7ce2eb3e5
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/power.json
@@ -0,0 +1,862 @@
+{
+ "bundle_type": "h3_native_power",
+ "evidence_kind": "srt_slurm_h3_service",
+ "expected_gpu_count": 2,
+ "gpu_uuids": [
+ "GPU-11111111-1111-1111-1111-111111111111",
+ "GPU-22222222-2222-2222-2222-222222222222"
+ ],
+ "invalid_reasons": [],
+ "metrics": {
+ "avg_total_gpu_power_w": 1201.0,
+ "joules_per_successful_query": 18000.25,
+ "total_gpu_energy_j": 72001.0
+ },
+ "observed_gpu_count": 2,
+ "per_gpu": {
+ "GPU-11111111-1111-1111-1111-111111111111": {
+ "avg_power_w": 600.0,
+ "energy_j": 36000.0,
+ "max_sample_gap_s": 1.0,
+ "observed_peak_power_w": 600.0,
+ "role": "h3-server"
+ },
+ "GPU-22222222-2222-2222-2222-222222222222": {
+ "avg_power_w": 600.0166666666667,
+ "energy_j": 36001.0,
+ "max_sample_gap_s": 1.0,
+ "observed_peak_power_w": 601.0,
+ "role": "h3-server"
+ }
+ },
+ "phases": {
+ "measurement": {
+ "aggregate": {
+ "avg_power_w": 1201.0,
+ "energy_j": 72001.0,
+ "joules_per_valid_clip": 18000.25,
+ "observed_peak_power_w": 1201.0
+ },
+ "attempted": 4,
+ "completed": 4,
+ "duration_seconds": 60.0,
+ "invalid_reasons": [],
+ "per_gpu": {
+ "GPU-11111111-1111-1111-1111-111111111111": {
+ "avg_power_w": 600.0,
+ "energy_j": 36000.0,
+ "observed_peak_power_w": 600.0
+ },
+ "GPU-22222222-2222-2222-2222-222222222222": {
+ "avg_power_w": 600.0166666666667,
+ "energy_j": 36001.0,
+ "observed_peak_power_w": 601.0
+ }
+ },
+ "status": "valid",
+ "valid": true,
+ "valid_clips": 4,
+ "valid_window_count": 1,
+ "window_count": 1
+ }
+ },
+ "producer": {
+ "exporter_image_sha256": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
+ "integration_method": "per_device_trapezoidal_with_linear_boundary_interpolation",
+ "power_percentile_method": null,
+ "producer_git_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ },
+ "sample_series": [
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:40.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1000.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:41.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1001.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:42.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1002.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:43.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1003.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:44.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1004.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:45.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1005.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:46.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1006.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:47.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1007.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:48.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1008.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:49.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1009.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:50.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1010.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:51.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1011.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:52.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1012.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:53.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1013.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:54.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1014.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:55.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1015.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:56.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1016.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:57.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1017.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:58.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1018.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:59.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1019.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:00.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1020.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:01.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1021.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:02.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1022.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:03.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1023.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:04.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1024.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:05.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1025.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:06.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1026.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:07.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1027.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:08.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1028.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:09.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1029.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:10.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1030.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:11.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1031.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:12.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1032.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:13.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1033.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:14.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1034.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:15.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1035.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:16.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1036.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:17.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1037.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:18.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1038.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:19.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1039.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:20.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1040.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:21.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1041.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:22.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1042.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:23.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1043.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:24.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1044.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:25.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1045.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:26.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1046.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:27.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1047.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:28.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1048.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:29.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1049.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:30.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1050.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:31.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1051.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:32.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1052.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:33.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1053.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:34.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1054.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:35.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1055.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:36.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1056.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:37.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1057.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:38.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1058.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:39.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1059.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:40.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1060.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:41.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1061.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:42.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1062.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:43.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1063.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:44.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1064.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:45.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1065.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:46.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1066.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:47.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1067.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:48.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1068.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:49.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1069.0,
+ "valid": true
+ }
+ ],
+ "schema_version": "1.0.0",
+ "semantics": {
+ "energy_per_valid_clip": "whole-window GPU energy divided by technically valid clips",
+ "energy_unit": "J",
+ "generation_window": "client measured block: first measurement submit to last downloaded media",
+ "integration": "per_device_trapezoidal_with_linear_boundary_interpolation",
+ "power_unit": "W",
+ "scope": "job GPUs sampled by srt-slurm's DCGM exporter; excludes host and unsampled devices",
+ "sensor": "DCGM_FI_DEV_POWER_USAGE board power, head-node Unix clock",
+ "time_unit": "s"
+ },
+ "source": "srt-slurm.dcgm-power",
+ "status": "valid",
+ "valid": true,
+ "window": {
+ "clock_source": "head_node_unix_clock",
+ "duration_seconds": 60.0,
+ "end_unix": 1065.0,
+ "start_unix": 1005.0,
+ "utc_minus_monotonic_seconds": 905.0
+ }
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/spec.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/spec.json
new file mode 100644
index 000000000..c545bd9a8
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c1/spec.json
@@ -0,0 +1,521 @@
+{
+ "allocation": {
+ "label": "srt-slurm job assigned at launch",
+ "mode": "dedicated_ci"
+ },
+ "authorization": {
+ "approval_reference": "InferenceX #2916 native srt-slurm H3 serving run, authorized by the repository owner on 2026-10-17 (SemiAnalysis clusters only); model use per the MiniMax-H3 license review recorded for the #2894 baseline (user-confirmation-2026-09-02).",
+ "compute_approved": true,
+ "model_license_reviewed": true
+ },
+ "baseline": {
+ "python": "/usr/bin/python3",
+ "revision": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "source": "/sgl-workspace/sglang",
+ "source_sha256": "e6069f8b948234075fdcfba23e459e2f56a45b11d0ba3ee5ecbb754e338deb13"
+ },
+ "candidate": {
+ "python": "/usr/bin/python3",
+ "revision": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "source": "/sgl-workspace/sglang",
+ "source_sha256": "e6069f8b948234075fdcfba23e459e2f56a45b11d0ba3ee5ecbb754e338deb13"
+ },
+ "gpu_uuids": [
+ "GPU-11111111-1111-1111-1111-111111111111",
+ "GPU-22222222-2222-2222-2222-222222222222"
+ ],
+ "job_id": "github-123456789-1-c1",
+ "limits": {
+ "cleanup_seconds": 60,
+ "command_seconds": 30,
+ "job_seconds": 3600,
+ "max_idle_memory_mib": 64,
+ "request_seconds": 900,
+ "startup_seconds": 900,
+ "telemetry_interval_seconds": 1
+ },
+ "lock_directory": "/logs/h3/locks",
+ "model": {
+ "files": [
+ {
+ "path": "FL2VA/audio_vae/config.json",
+ "sha256": "d8f3bcc62e23c7e9806970fa63cca6139c06faa3797cf9c94034f60db8512771",
+ "size_bytes": 1973
+ },
+ {
+ "path": "FL2VA/audio_vae/config.yaml",
+ "sha256": "259f675c9f71eedc24ca4f23965cd32a1b3878fc894f56664c40328d99831a5e",
+ "size_bytes": 91
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_activations.py",
+ "sha256": "74ca8bb9e8039f1ff362ca4219eee5240a7df9502f3dbdc3161d4e86fbd6dc04",
+ "size_bytes": 2189
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_alias_free_act.py",
+ "sha256": "db8761e66c0eaf9fce2dcccb59162d52b22ca0de9f699cf7d21ec7cd507e86fd",
+ "size_bytes": 835
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_alias_free_filter.py",
+ "sha256": "a369523cd7f14f4f299d8e2e47f3c473da76ed1910e6e9134fd7a9fce02537e8",
+ "size_bytes": 3300
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_alias_free_resample.py",
+ "sha256": "fe35055893833c563e42adc5e5882cbe7628c82d48d33c300fcf0a9576997910",
+ "size_bytes": 1740
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_attn_proj.py",
+ "sha256": "0e04556fa5fd38d4a71e62fcf4d3242fd9a2464fd72ed62baef2ec0980d910c6",
+ "size_bytes": 3317
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_audio_vae.py",
+ "sha256": "ec04939602d4710d039e83f558a7572547669652f7fa967e3de0a3b6c48cfd48",
+ "size_bytes": 7266
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_bigvgan.py",
+ "sha256": "f5df4e6f633e74da479549ef7a6d2684964e4b65ac42c6765be42f9c7fcb7bd2",
+ "size_bytes": 7102
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_utils.py",
+ "sha256": "74ef0ba2c2a11ca35a7c0cc166fe88e564de01230000a0bcc8429103312ad9f0",
+ "size_bytes": 362
+ },
+ {
+ "path": "FL2VA/audio_vae/metadata.json",
+ "sha256": "755d0529d43b2b5c83590f6f44ca659bc68e6a21b01d5669c93e8b2965749bff",
+ "size_bytes": 440
+ },
+ {
+ "path": "FL2VA/audio_vae/minimax_h3_audio_vae.py",
+ "sha256": "63bc0dab6def69480cfd77ea820f9a9a84fc4bd6e56868e4f45ec1e1e200578f",
+ "size_bytes": 3532
+ },
+ {
+ "path": "FL2VA/audio_vae/model.safetensors",
+ "sha256": "37dddc2f3e6d5d5139d823d5ea283bbf304dadcb885b1ccda818aa13dade5ea2",
+ "size_bytes": 605429308
+ },
+ {
+ "path": "FL2VA/model_index.json",
+ "sha256": "d1113e0f123c69f79cd0de35ca1771606ebc3ec924270d257b771f96f584aa6b",
+ "size_bytes": 719
+ },
+ {
+ "path": "FL2VA/processor/chat_template.json",
+ "sha256": "5c72a170d2a4a1a3bc5adad2e689ae28138a9700e5b8c96c0266331e86c0acce",
+ "size_bytes": 5499
+ },
+ {
+ "path": "FL2VA/processor/merges.txt",
+ "sha256": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
+ "size_bytes": 1671839
+ },
+ {
+ "path": "FL2VA/processor/preprocessor_config.json",
+ "sha256": "27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516",
+ "size_bytes": 390
+ },
+ {
+ "path": "FL2VA/processor/tokenizer.json",
+ "sha256": "a5d85b6dcc535e6b93115a9ef287e6132fdbf30270da6218194ba742261173c7",
+ "size_bytes": 7032403
+ },
+ {
+ "path": "FL2VA/processor/tokenizer_config.json",
+ "sha256": "a07e942ac874baa13758de8d1fbdb186683cc03416b5589e1b6671c6b3057c68",
+ "size_bytes": 11003
+ },
+ {
+ "path": "FL2VA/processor/video_preprocessor_config.json",
+ "sha256": "7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13",
+ "size_bytes": 385
+ },
+ {
+ "path": "FL2VA/processor/vocab.json",
+ "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910",
+ "size_bytes": 2776833
+ },
+ {
+ "path": "FL2VA/text_encoder/chat_template.json",
+ "sha256": "5c72a170d2a4a1a3bc5adad2e689ae28138a9700e5b8c96c0266331e86c0acce",
+ "size_bytes": 5499
+ },
+ {
+ "path": "FL2VA/text_encoder/config.json",
+ "sha256": "d2dd0c60d01b9e195d9447c52da61c7302d28828524914c044d9c6e1b81d0427",
+ "size_bytes": 1474
+ },
+ {
+ "path": "FL2VA/text_encoder/merges.txt",
+ "sha256": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
+ "size_bytes": 1671839
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00001-of-00014.safetensors",
+ "sha256": "6b9dfbc930e505402ae9d7e5091a9d7d656cda5f34614f01cfe70bfb0cca27cb",
+ "size_bytes": 4932328944
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00002-of-00014.safetensors",
+ "sha256": "d8bb44b4ff303fe76fe9e894022fb3dc71b15a2e716592790fe0e3c3e60478fa",
+ "size_bytes": 4875990528
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00003-of-00014.safetensors",
+ "sha256": "54f22e8b3168f8dc962fac0d313607ebf52a12b433d4cf3098a0d82d9f042940",
+ "size_bytes": 4875990552
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00004-of-00014.safetensors",
+ "sha256": "ad09c74d3c13ee29b5d0d84548fd8a3424a651564eaccd519946c296e59c557f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00005-of-00014.safetensors",
+ "sha256": "fc993c8a0e2a5b0570f383e1a95dc3a1281d1b224b6f3ee908f4827941e1dfc2",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00006-of-00014.safetensors",
+ "sha256": "82f05620d1f718a90c362b221d6a184ff1a0f53301d706882d3df49695fa1974",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00007-of-00014.safetensors",
+ "sha256": "fb91da8cb01ff4de3eef0eab1c3e769a734b3a1aafc61734068638a0d6c86934",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00008-of-00014.safetensors",
+ "sha256": "431ca56535c8781944ce3801f5eb61c45531e853ecc5846d936ebaf4761b764f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00009-of-00014.safetensors",
+ "sha256": "3825e3f4302f4d2f7d76aa7430d2ce0864fde6b9e540a5806bf0d8e38e4d9f47",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00010-of-00014.safetensors",
+ "sha256": "aded5a4d1d5e22dbd8b6f79266b6eb88c840411b09527c53917a1419ace22e2f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00011-of-00014.safetensors",
+ "sha256": "3820ffe8d8d6477f6fe8d614ef3c87abb264ee39accebf43a1507b970d80946f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00012-of-00014.safetensors",
+ "sha256": "05ad2d08ce71963121c9b03f1d9ec5d7641052f4b23c6c12b80d71065eb8e98e",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00013-of-00014.safetensors",
+ "sha256": "b64f2289871261fdd1abbd3b78bcd66011b341de3dc8eeb2ed1a473ee7c8d95c",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00014-of-00014.safetensors",
+ "sha256": "e45b6c9998c77ee5a6577f9f47bc76416c1d4d387169e50c4c9d3134ea51b13b",
+ "size_bytes": 3270697008
+ },
+ {
+ "path": "FL2VA/text_encoder/model.safetensors.index.json",
+ "sha256": "06c952c569285870b811989b794b9766493e280fb77fbcb957fc4e5fcf25403a",
+ "size_bytes": 97831
+ },
+ {
+ "path": "FL2VA/text_encoder/preprocessor_config.json",
+ "sha256": "27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516",
+ "size_bytes": 390
+ },
+ {
+ "path": "FL2VA/text_encoder/tokenizer.json",
+ "sha256": "a5d85b6dcc535e6b93115a9ef287e6132fdbf30270da6218194ba742261173c7",
+ "size_bytes": 7032403
+ },
+ {
+ "path": "FL2VA/text_encoder/tokenizer_config.json",
+ "sha256": "a07e942ac874baa13758de8d1fbdb186683cc03416b5589e1b6671c6b3057c68",
+ "size_bytes": 11003
+ },
+ {
+ "path": "FL2VA/text_encoder/video_preprocessor_config.json",
+ "sha256": "7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13",
+ "size_bytes": 385
+ },
+ {
+ "path": "FL2VA/text_encoder/vocab.json",
+ "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910",
+ "size_bytes": 2776833
+ },
+ {
+ "path": "FL2VA/tokenizer/merges.txt",
+ "sha256": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
+ "size_bytes": 1671839
+ },
+ {
+ "path": "FL2VA/tokenizer/tokenizer.json",
+ "sha256": "a5d85b6dcc535e6b93115a9ef287e6132fdbf30270da6218194ba742261173c7",
+ "size_bytes": 7032403
+ },
+ {
+ "path": "FL2VA/tokenizer/tokenizer_config.json",
+ "sha256": "a07e942ac874baa13758de8d1fbdb186683cc03416b5589e1b6671c6b3057c68",
+ "size_bytes": 11003
+ },
+ {
+ "path": "FL2VA/tokenizer/vocab.json",
+ "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910",
+ "size_bytes": 2776833
+ },
+ {
+ "path": "FL2VA/transformer/config.json",
+ "sha256": "f619093a231fcfbcc3d035bec26c50ad864e7331a500d5c519f5045dc1e50458",
+ "size_bytes": 604
+ },
+ {
+ "path": "FL2VA/transformer/model-00001-of-00013.safetensors",
+ "sha256": "0b3386565e476bfdea287e9ea9f269d036e5c649ed14bb9b4afac1dc4661bd2a",
+ "size_bytes": 5227812968
+ },
+ {
+ "path": "FL2VA/transformer/model-00002-of-00013.safetensors",
+ "sha256": "9c98fd4579c9bc96d1b1bbf65c1243f9256df60bccd229570cecc61897773003",
+ "size_bytes": 5164578856
+ },
+ {
+ "path": "FL2VA/transformer/model-00003-of-00013.safetensors",
+ "sha256": "fa484c940d4170199fb69f5016739df2daf6ecd1150631b12a297e06e3964730",
+ "size_bytes": 5164578872
+ },
+ {
+ "path": "FL2VA/transformer/model-00004-of-00013.safetensors",
+ "sha256": "4a851df37cce2d14b39cb58df41def7b591b1f11b8520a32b421a5fa3e997c9f",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00005-of-00013.safetensors",
+ "sha256": "3fe6ff94dc9d3107c6776a25277d2b72b5443f88cf0f4ed835fd5b65a94ea5d4",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00006-of-00013.safetensors",
+ "sha256": "79b47e1b9ff03a2c6f06dd15a28972acf32c0867172ee34e5aa6e96b99494127",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00007-of-00013.safetensors",
+ "sha256": "6ac4d6ce639786b722a8dd99843ed56dcab48a0d174a4b0f9b8cdcbe5160fb0f",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00008-of-00013.safetensors",
+ "sha256": "03531812243fb0a333e01efa7e3d39750580bca8cbf2ba0529da419278eab736",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00009-of-00013.safetensors",
+ "sha256": "7e82a80b0d0d267026eb841b81523069cc7b956c1ebd8a18c07e462ffb262487",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00010-of-00013.safetensors",
+ "sha256": "ef0a1f6b65145232543dd2232d58d91a4d31f44b0da5084acf22cea123255481",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00011-of-00013.safetensors",
+ "sha256": "bf885b8f2f078c5499b75fded21094a26bfe0e6e00bee276e499443ecd2f298d",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00012-of-00013.safetensors",
+ "sha256": "dc717572d014ebf8527e35af815d10eb2f5a6bc87253b8a7d2f456965192db69",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00013-of-00013.safetensors",
+ "sha256": "8bfd852d5817e9836de1d3ec8dbac1c5446b167568b717371f08282b22291aa2",
+ "size_bytes": 4242305176
+ },
+ {
+ "path": "FL2VA/transformer/model.safetensors.index.json",
+ "sha256": "fb457a26ffa6294660e249b0ddd03a337f2e5393f770b5c34c8b8f90a29a7efb",
+ "size_bytes": 38323
+ },
+ {
+ "path": "FL2VA/video_vae/attention.py",
+ "sha256": "c9db8465c57f0bfb40c0194227be6e34b2c1ff7c5b5d63abca9964eed6283767",
+ "size_bytes": 5785
+ },
+ {
+ "path": "FL2VA/video_vae/base_module.py",
+ "sha256": "0e7ddf5086179a306298693ac461ffcbc27ccb28dbc786b1a05060de7a3357c0",
+ "size_bytes": 9520
+ },
+ {
+ "path": "FL2VA/video_vae/config.json",
+ "sha256": "3edd2cdd1ebc823c868be55ef917e1b3b8a398fde4d3150dae44a3bf05d9f627",
+ "size_bytes": 1807
+ },
+ {
+ "path": "FL2VA/video_vae/conv.py",
+ "sha256": "b3adee35f27e5d372543242aa86ce5e0138f13b794b6c81f919001e3e2346723",
+ "size_bytes": 4487
+ },
+ {
+ "path": "FL2VA/video_vae/flash.py",
+ "sha256": "c1918463d303a16f278a670bb4f33d3f8d6f7653b0d473313ff5835699b86d04",
+ "size_bytes": 5763
+ },
+ {
+ "path": "FL2VA/video_vae/func.py",
+ "sha256": "0612c26a65f095699cc7acd51937cd153584fa5a0476956e46a4679aa575c22d",
+ "size_bytes": 5840
+ },
+ {
+ "path": "FL2VA/video_vae/klvae.py",
+ "sha256": "d05a22b4918ad303f147d6b0d0ae9038bd1af1f810a5553b04f3542ab9bcff96",
+ "size_bytes": 48594
+ },
+ {
+ "path": "FL2VA/video_vae/minimax_h3_video_vae.py",
+ "sha256": "77fdea69a48485b5434f65d08096657b5d78b78b7cdf24e1241038f237720138",
+ "size_bytes": 5123
+ },
+ {
+ "path": "FL2VA/video_vae/norm.py",
+ "sha256": "258b120ca8d9a16366d7b811fe93eebf98fe1564db0995e8b7747229c651919a",
+ "size_bytes": 10686
+ },
+ {
+ "path": "FL2VA/video_vae/normalize.py",
+ "sha256": "8db651acb9eb551c906a2850bbca8e9d851f00d07b30ccf66ceb6057da687a13",
+ "size_bytes": 1200
+ },
+ {
+ "path": "FL2VA/video_vae/parallel.py",
+ "sha256": "7193522beafd65bc3dbe40b9843e360ab8da3a0bb211e9bfb67bb0d5d0e66919",
+ "size_bytes": 12997
+ },
+ {
+ "path": "FL2VA/video_vae/source/config.json",
+ "sha256": "66c68f541e6578ce613ce7a0fc985eb59097038829e49f7535e6d08e6d95ab12",
+ "size_bytes": 1164
+ },
+ {
+ "path": "FL2VA/video_vae/source/model.safetensors",
+ "sha256": "5f0c2e161d895a9fee7645ca32d4a7e3a22b90cacfcbeba62ec999cdbbefe0d3",
+ "size_bytes": 10415548320
+ },
+ {
+ "path": "FL2VA/video_vae/utils.py",
+ "sha256": "309e45e9d9e33cd5516a10eac2d207eb9f940079a6d9bbe0ee80aaaf7eb42dcd",
+ "size_bytes": 764
+ },
+ {
+ "path": "FL2VA/video_vae/vae_cnn.py",
+ "sha256": "3949b701e6893bd2ea070cd5b18ed8135a7c21d884290df449b1997212d65b11",
+ "size_bytes": 8836
+ },
+ {
+ "path": "FL2VA/video_vae/vae_module.py",
+ "sha256": "9558fb302e10a619f198e12e04701c68988e897d0b627f958f33d27fd2a30d94",
+ "size_bytes": 1884
+ },
+ {
+ "path": "FL2VA/video_vae/vae_processor.py",
+ "sha256": "32870580a1802d9163104a4d68170e35a4772106867181e1bd343dff11f87d2e",
+ "size_bytes": 8369
+ },
+ {
+ "path": "FL2VA/video_vae/vae_vit.py",
+ "sha256": "a372c28441b56ec2dbc6041dbd6ce2766c64c0e61b2c69a16594a97a11da3f58",
+ "size_bytes": 13490
+ },
+ {
+ "path": "LICENSE",
+ "sha256": "59b99642b95ea21630e311198ddbfffbfe05aadba0c2f5d884cbdf4efcc90f44",
+ "size_bytes": 17604
+ },
+ {
+ "path": "README.md",
+ "sha256": "f0116a90332496bdfcc827320c603a26b849c73bf804f2674d03682fbbd2334a",
+ "size_bytes": 38406
+ },
+ {
+ "path": "model_index.json",
+ "sha256": "5a587fe13b2371427415ac892463142683aefcd8d322e274a3a095eac37ac7d2",
+ "size_bytes": 2936
+ },
+ {
+ "path": "modular_model_index.json",
+ "sha256": "a2b6a210e482ffb78e613b553f570c44e101afce6741bd4ed91429d0559af031",
+ "size_bytes": 2935
+ }
+ ],
+ "path": "/mnt/hf_hub_cache/models--MiniMaxAI--MiniMax-H3/snapshots/42ed227ee7df40d41602854ae760620d6eb651fe",
+ "revision": "42ed227ee7df40d41602854ae760620d6eb651fe"
+ },
+ "plan": {
+ "cases": [
+ {
+ "case_id": "drum-taps",
+ "prompt": "A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.",
+ "requires_motion": true,
+ "requires_sound": true,
+ "seed": 11
+ }
+ ],
+ "generation": {
+ "aspect_ratio": "16:9",
+ "audio_channels": 2,
+ "audio_flow_shift": 3.0,
+ "audio_sample_rate_hz": 32000,
+ "duration_seconds": 4,
+ "flow_shift": 12.0,
+ "fps": 24,
+ "frame_count": 107,
+ "height": 768,
+ "num_inference_steps": 50,
+ "width": 1344
+ },
+ "model_id": "MiniMaxAI/MiniMax-H3",
+ "model_revision": "42ed227ee7df40d41602854ae760620d6eb651fe",
+ "plan_id": "h3-serving-2gpu-c124-v1",
+ "repetitions": 4,
+ "warmup_runs": 1
+ },
+ "policy": {
+ "calibration_status": "uncalibrated",
+ "max_audio_rms_ratio_error": 0.1,
+ "max_latency_increase_fraction": 0.1,
+ "max_memory_increase_fraction": 0.1,
+ "min_audio_spectral_cosine": 0.95,
+ "min_video_psnr_db": 30,
+ "policy_id": "h3-example-uncalibrated-gpu-v1"
+ },
+ "port": 30283,
+ "schema_version": "0.1.0",
+ "server": {
+ "dit_cpu_offload": false,
+ "encoder_parallel": "auto",
+ "performance_mode": "speed",
+ "tp_size": 1,
+ "ulysses_degree": 2
+ },
+ "serving": {
+ "concurrency": 1,
+ "delivery_deadline_seconds": null,
+ "mode": "closed_loop"
+ }
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/aggregate.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/aggregate.json
new file mode 100644
index 000000000..872d1a50f
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/aggregate.json
@@ -0,0 +1,4 @@
+{
+ "max_concurrency": 2,
+ "power_valid": 1
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/baseline/run.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/baseline/run.json
new file mode 100644
index 000000000..fcdb08a53
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/baseline/run.json
@@ -0,0 +1 @@
+{"bundle_type": "mvp_run", "status": "complete", "plan_id": "h3-serving-2gpu-c124-v1", "plan_sha256": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "plan": {"cases": [{"case_id": "drum-taps", "prompt": "A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.", "requires_motion": true, "requires_sound": true, "seed": 11}], "generation": {"aspect_ratio": "16:9", "audio_channels": 2, "audio_flow_shift": 3.0, "audio_sample_rate_hz": 32000, "duration_seconds": 4, "flow_shift": 12.0, "fps": 24, "frame_count": 107, "height": 768, "num_inference_steps": 50, "width": 1344}, "model_id": "MiniMaxAI/MiniMax-H3", "model_revision": "42ed227ee7df40d41602854ae760620d6eb651fe", "plan_id": "h3-serving-2gpu-c124-v1", "repetitions": 4, "warmup_runs": 1}, "configuration": {"runtime": "sglang", "runtime_revision": "7777777777777777777777777777777777777777"}, "started_at": "2026-10-17T00:00:00Z", "finished_at": "2026-10-17T00:10:00Z", "measurement": {"boundary": "submit_to_downloaded_media", "concurrency": 2, "warmup_runs": 1, "wall_seconds": 60.0, "start_monotonic_seconds": 100.0, "end_monotonic_seconds": 160.0}, "serving": {"mode": "closed_loop", "concurrency": 2, "client_ready_latency_seconds": {"p50": 118.0}}, "records": [{"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}, {"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}, {"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}, {"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}], "summary": {"scheduled": 4, "completed": 4, "valid": 4, "failed": 0, "not_started": 0, "latency_median_seconds": 119.0, "valid_clips_per_second": 0.06666666666666667}}
\ No newline at end of file
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/benchmark_concurrency_2.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/benchmark_concurrency_2.json
new file mode 100644
index 000000000..19a2b0126
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/benchmark_concurrency_2.json
@@ -0,0 +1 @@
+{"max_concurrency": 2, "benchmark_start_time_unix": 1005.0, "benchmark_end_time_unix": 1065.0, "duration": 60.0, "completed": 4, "scheduled": 4, "energy_normalization": "clips", "clock": {"utc_minus_monotonic_seconds": 905.0}}
\ No newline at end of file
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/gpu-job.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/gpu-job.json
new file mode 100644
index 000000000..35b3a0067
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/gpu-job.json
@@ -0,0 +1,65 @@
+{
+ "aggregate_path": "aggregate.json",
+ "allocation": {
+ "label": "srt-slurm job assigned at launch",
+ "mode": "dedicated_ci"
+ },
+ "authorization": {
+ "approval_reference": "InferenceX #2916 native srt-slurm H3 serving run, authorized by the repository owner on 2026-10-17 (SemiAnalysis clusters only); model use per the MiniMax-H3 license review recorded for the #2894 baseline (user-confirmation-2026-09-02).",
+ "compute_approved": true,
+ "model_license_reviewed": true
+ },
+ "bundle_type": "srt_slurm_h3_service_receipt",
+ "ci_accepted": false,
+ "cleanup_status": "srt_slurm_job_teardown",
+ "evidence_kind": "srt_slurm_h3_service",
+ "execution_id": "slurm-77",
+ "failures": [],
+ "finished_at": "2026-10-17T00:10:00Z",
+ "job_id": "github-123456789-1-c2",
+ "measurement_status": "complete",
+ "measurement_verified": true,
+ "plan_sha256": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "power": {
+ "invalid_reasons": [],
+ "path": "power.json",
+ "sha256": "763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677",
+ "valid": true
+ },
+ "power_verified": true,
+ "regression_status": "inconclusive",
+ "release_qualified": false,
+ "roles": {
+ "baseline": {
+ "finished_at": "2026-10-17T00:10:00Z",
+ "run_path": "baseline/run.json",
+ "run_sha256": "0a52c7c925c0e1bb1641dd973c596f67496db42859a8d2fca60c203821f09816",
+ "run_status": "complete",
+ "run_summary": {
+ "completed": 4,
+ "failed": 0,
+ "latency_median_seconds": 119.0,
+ "not_started": 0,
+ "scheduled": 4,
+ "valid": 4,
+ "valid_clips_per_second": 0.06666666666666667
+ },
+ "started_at": "2026-10-17T00:00:00Z",
+ "status": "complete"
+ }
+ },
+ "schema_version": "0.1.0",
+ "server": {
+ "argv": [
+ "x"
+ ],
+ "slurm_job_id": "77"
+ },
+ "slurm": {
+ "job_id": "77",
+ "state": "COMPLETED"
+ },
+ "spec_sha256": "77b417da60aa333eb86e5cd7c6f3fa1913013489650664ce2f2e2f8de5ccd149",
+ "started_at": "2026-10-17T00:00:00Z",
+ "status": "complete"
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/power-validation.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/power-validation.json
new file mode 100644
index 000000000..bef9a8df9
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/power-validation.json
@@ -0,0 +1,32 @@
+{
+ "benchmark_window": {
+ "end_time_unix": 1065.0,
+ "start_time_unix": 1005.0
+ },
+ "expected_gpu_count": 2,
+ "integration_method": "per_device_trapezoidal_with_linear_boundary_interpolation",
+ "metrics": {
+ "avg_total_gpu_power_w": 1201.0,
+ "joules_per_successful_query": 18000.25,
+ "total_gpu_energy_j": 72001.0
+ },
+ "observed_gpu_count": 2,
+ "per_gpu_energy_j": {
+ "node/GPU-11111111-1111-1111-1111-111111111111": 36000.0,
+ "node/GPU-22222222-2222-2222-2222-222222222222": 36001.0
+ },
+ "per_gpu_max_sample_gap_s": {
+ "node/GPU-11111111-1111-1111-1111-111111111111": 1.0,
+ "node/GPU-22222222-2222-2222-2222-222222222222": 1.0
+ },
+ "per_gpu_role": {
+ "node/GPU-11111111-1111-1111-1111-111111111111": "h3-server",
+ "node/GPU-22222222-2222-2222-2222-222222222222": "h3-server"
+ },
+ "power_valid": true,
+ "producer": {
+ "exporter_image_sha256": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
+ "producer_git_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ },
+ "reasons": []
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/power.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/power.json
new file mode 100644
index 000000000..7ce2eb3e5
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/power.json
@@ -0,0 +1,862 @@
+{
+ "bundle_type": "h3_native_power",
+ "evidence_kind": "srt_slurm_h3_service",
+ "expected_gpu_count": 2,
+ "gpu_uuids": [
+ "GPU-11111111-1111-1111-1111-111111111111",
+ "GPU-22222222-2222-2222-2222-222222222222"
+ ],
+ "invalid_reasons": [],
+ "metrics": {
+ "avg_total_gpu_power_w": 1201.0,
+ "joules_per_successful_query": 18000.25,
+ "total_gpu_energy_j": 72001.0
+ },
+ "observed_gpu_count": 2,
+ "per_gpu": {
+ "GPU-11111111-1111-1111-1111-111111111111": {
+ "avg_power_w": 600.0,
+ "energy_j": 36000.0,
+ "max_sample_gap_s": 1.0,
+ "observed_peak_power_w": 600.0,
+ "role": "h3-server"
+ },
+ "GPU-22222222-2222-2222-2222-222222222222": {
+ "avg_power_w": 600.0166666666667,
+ "energy_j": 36001.0,
+ "max_sample_gap_s": 1.0,
+ "observed_peak_power_w": 601.0,
+ "role": "h3-server"
+ }
+ },
+ "phases": {
+ "measurement": {
+ "aggregate": {
+ "avg_power_w": 1201.0,
+ "energy_j": 72001.0,
+ "joules_per_valid_clip": 18000.25,
+ "observed_peak_power_w": 1201.0
+ },
+ "attempted": 4,
+ "completed": 4,
+ "duration_seconds": 60.0,
+ "invalid_reasons": [],
+ "per_gpu": {
+ "GPU-11111111-1111-1111-1111-111111111111": {
+ "avg_power_w": 600.0,
+ "energy_j": 36000.0,
+ "observed_peak_power_w": 600.0
+ },
+ "GPU-22222222-2222-2222-2222-222222222222": {
+ "avg_power_w": 600.0166666666667,
+ "energy_j": 36001.0,
+ "observed_peak_power_w": 601.0
+ }
+ },
+ "status": "valid",
+ "valid": true,
+ "valid_clips": 4,
+ "valid_window_count": 1,
+ "window_count": 1
+ }
+ },
+ "producer": {
+ "exporter_image_sha256": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
+ "integration_method": "per_device_trapezoidal_with_linear_boundary_interpolation",
+ "power_percentile_method": null,
+ "producer_git_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ },
+ "sample_series": [
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:40.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1000.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:41.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1001.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:42.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1002.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:43.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1003.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:44.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1004.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:45.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1005.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:46.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1006.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:47.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1007.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:48.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1008.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:49.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1009.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:50.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1010.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:51.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1011.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:52.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1012.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:53.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1013.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:54.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1014.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:55.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1015.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:56.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1016.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:57.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1017.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:58.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1018.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:59.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1019.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:00.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1020.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:01.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1021.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:02.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1022.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:03.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1023.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:04.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1024.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:05.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1025.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:06.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1026.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:07.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1027.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:08.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1028.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:09.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1029.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:10.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1030.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:11.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1031.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:12.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1032.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:13.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1033.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:14.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1034.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:15.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1035.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:16.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1036.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:17.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1037.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:18.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1038.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:19.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1039.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:20.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1040.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:21.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1041.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:22.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1042.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:23.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1043.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:24.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1044.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:25.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1045.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:26.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1046.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:27.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1047.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:28.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1048.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:29.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1049.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:30.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1050.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:31.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1051.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:32.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1052.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:33.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1053.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:34.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1054.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:35.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1055.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:36.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1056.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:37.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1057.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:38.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1058.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:39.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1059.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:40.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1060.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:41.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1061.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:42.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1062.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:43.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1063.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:44.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1064.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:45.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1065.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:46.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1066.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:47.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1067.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:48.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1068.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:49.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1069.0,
+ "valid": true
+ }
+ ],
+ "schema_version": "1.0.0",
+ "semantics": {
+ "energy_per_valid_clip": "whole-window GPU energy divided by technically valid clips",
+ "energy_unit": "J",
+ "generation_window": "client measured block: first measurement submit to last downloaded media",
+ "integration": "per_device_trapezoidal_with_linear_boundary_interpolation",
+ "power_unit": "W",
+ "scope": "job GPUs sampled by srt-slurm's DCGM exporter; excludes host and unsampled devices",
+ "sensor": "DCGM_FI_DEV_POWER_USAGE board power, head-node Unix clock",
+ "time_unit": "s"
+ },
+ "source": "srt-slurm.dcgm-power",
+ "status": "valid",
+ "valid": true,
+ "window": {
+ "clock_source": "head_node_unix_clock",
+ "duration_seconds": 60.0,
+ "end_unix": 1065.0,
+ "start_unix": 1005.0,
+ "utc_minus_monotonic_seconds": 905.0
+ }
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/spec.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/spec.json
new file mode 100644
index 000000000..db71d065a
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c2/spec.json
@@ -0,0 +1,521 @@
+{
+ "allocation": {
+ "label": "srt-slurm job assigned at launch",
+ "mode": "dedicated_ci"
+ },
+ "authorization": {
+ "approval_reference": "InferenceX #2916 native srt-slurm H3 serving run, authorized by the repository owner on 2026-10-17 (SemiAnalysis clusters only); model use per the MiniMax-H3 license review recorded for the #2894 baseline (user-confirmation-2026-09-02).",
+ "compute_approved": true,
+ "model_license_reviewed": true
+ },
+ "baseline": {
+ "python": "/usr/bin/python3",
+ "revision": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "source": "/sgl-workspace/sglang",
+ "source_sha256": "e6069f8b948234075fdcfba23e459e2f56a45b11d0ba3ee5ecbb754e338deb13"
+ },
+ "candidate": {
+ "python": "/usr/bin/python3",
+ "revision": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "source": "/sgl-workspace/sglang",
+ "source_sha256": "e6069f8b948234075fdcfba23e459e2f56a45b11d0ba3ee5ecbb754e338deb13"
+ },
+ "gpu_uuids": [
+ "GPU-11111111-1111-1111-1111-111111111111",
+ "GPU-22222222-2222-2222-2222-222222222222"
+ ],
+ "job_id": "github-123456789-1-c2",
+ "limits": {
+ "cleanup_seconds": 60,
+ "command_seconds": 30,
+ "job_seconds": 3600,
+ "max_idle_memory_mib": 64,
+ "request_seconds": 900,
+ "startup_seconds": 900,
+ "telemetry_interval_seconds": 1
+ },
+ "lock_directory": "/logs/h3/locks",
+ "model": {
+ "files": [
+ {
+ "path": "FL2VA/audio_vae/config.json",
+ "sha256": "d8f3bcc62e23c7e9806970fa63cca6139c06faa3797cf9c94034f60db8512771",
+ "size_bytes": 1973
+ },
+ {
+ "path": "FL2VA/audio_vae/config.yaml",
+ "sha256": "259f675c9f71eedc24ca4f23965cd32a1b3878fc894f56664c40328d99831a5e",
+ "size_bytes": 91
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_activations.py",
+ "sha256": "74ca8bb9e8039f1ff362ca4219eee5240a7df9502f3dbdc3161d4e86fbd6dc04",
+ "size_bytes": 2189
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_alias_free_act.py",
+ "sha256": "db8761e66c0eaf9fce2dcccb59162d52b22ca0de9f699cf7d21ec7cd507e86fd",
+ "size_bytes": 835
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_alias_free_filter.py",
+ "sha256": "a369523cd7f14f4f299d8e2e47f3c473da76ed1910e6e9134fd7a9fce02537e8",
+ "size_bytes": 3300
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_alias_free_resample.py",
+ "sha256": "fe35055893833c563e42adc5e5882cbe7628c82d48d33c300fcf0a9576997910",
+ "size_bytes": 1740
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_attn_proj.py",
+ "sha256": "0e04556fa5fd38d4a71e62fcf4d3242fd9a2464fd72ed62baef2ec0980d910c6",
+ "size_bytes": 3317
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_audio_vae.py",
+ "sha256": "ec04939602d4710d039e83f558a7572547669652f7fa967e3de0a3b6c48cfd48",
+ "size_bytes": 7266
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_bigvgan.py",
+ "sha256": "f5df4e6f633e74da479549ef7a6d2684964e4b65ac42c6765be42f9c7fcb7bd2",
+ "size_bytes": 7102
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_utils.py",
+ "sha256": "74ef0ba2c2a11ca35a7c0cc166fe88e564de01230000a0bcc8429103312ad9f0",
+ "size_bytes": 362
+ },
+ {
+ "path": "FL2VA/audio_vae/metadata.json",
+ "sha256": "755d0529d43b2b5c83590f6f44ca659bc68e6a21b01d5669c93e8b2965749bff",
+ "size_bytes": 440
+ },
+ {
+ "path": "FL2VA/audio_vae/minimax_h3_audio_vae.py",
+ "sha256": "63bc0dab6def69480cfd77ea820f9a9a84fc4bd6e56868e4f45ec1e1e200578f",
+ "size_bytes": 3532
+ },
+ {
+ "path": "FL2VA/audio_vae/model.safetensors",
+ "sha256": "37dddc2f3e6d5d5139d823d5ea283bbf304dadcb885b1ccda818aa13dade5ea2",
+ "size_bytes": 605429308
+ },
+ {
+ "path": "FL2VA/model_index.json",
+ "sha256": "d1113e0f123c69f79cd0de35ca1771606ebc3ec924270d257b771f96f584aa6b",
+ "size_bytes": 719
+ },
+ {
+ "path": "FL2VA/processor/chat_template.json",
+ "sha256": "5c72a170d2a4a1a3bc5adad2e689ae28138a9700e5b8c96c0266331e86c0acce",
+ "size_bytes": 5499
+ },
+ {
+ "path": "FL2VA/processor/merges.txt",
+ "sha256": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
+ "size_bytes": 1671839
+ },
+ {
+ "path": "FL2VA/processor/preprocessor_config.json",
+ "sha256": "27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516",
+ "size_bytes": 390
+ },
+ {
+ "path": "FL2VA/processor/tokenizer.json",
+ "sha256": "a5d85b6dcc535e6b93115a9ef287e6132fdbf30270da6218194ba742261173c7",
+ "size_bytes": 7032403
+ },
+ {
+ "path": "FL2VA/processor/tokenizer_config.json",
+ "sha256": "a07e942ac874baa13758de8d1fbdb186683cc03416b5589e1b6671c6b3057c68",
+ "size_bytes": 11003
+ },
+ {
+ "path": "FL2VA/processor/video_preprocessor_config.json",
+ "sha256": "7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13",
+ "size_bytes": 385
+ },
+ {
+ "path": "FL2VA/processor/vocab.json",
+ "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910",
+ "size_bytes": 2776833
+ },
+ {
+ "path": "FL2VA/text_encoder/chat_template.json",
+ "sha256": "5c72a170d2a4a1a3bc5adad2e689ae28138a9700e5b8c96c0266331e86c0acce",
+ "size_bytes": 5499
+ },
+ {
+ "path": "FL2VA/text_encoder/config.json",
+ "sha256": "d2dd0c60d01b9e195d9447c52da61c7302d28828524914c044d9c6e1b81d0427",
+ "size_bytes": 1474
+ },
+ {
+ "path": "FL2VA/text_encoder/merges.txt",
+ "sha256": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
+ "size_bytes": 1671839
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00001-of-00014.safetensors",
+ "sha256": "6b9dfbc930e505402ae9d7e5091a9d7d656cda5f34614f01cfe70bfb0cca27cb",
+ "size_bytes": 4932328944
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00002-of-00014.safetensors",
+ "sha256": "d8bb44b4ff303fe76fe9e894022fb3dc71b15a2e716592790fe0e3c3e60478fa",
+ "size_bytes": 4875990528
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00003-of-00014.safetensors",
+ "sha256": "54f22e8b3168f8dc962fac0d313607ebf52a12b433d4cf3098a0d82d9f042940",
+ "size_bytes": 4875990552
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00004-of-00014.safetensors",
+ "sha256": "ad09c74d3c13ee29b5d0d84548fd8a3424a651564eaccd519946c296e59c557f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00005-of-00014.safetensors",
+ "sha256": "fc993c8a0e2a5b0570f383e1a95dc3a1281d1b224b6f3ee908f4827941e1dfc2",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00006-of-00014.safetensors",
+ "sha256": "82f05620d1f718a90c362b221d6a184ff1a0f53301d706882d3df49695fa1974",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00007-of-00014.safetensors",
+ "sha256": "fb91da8cb01ff4de3eef0eab1c3e769a734b3a1aafc61734068638a0d6c86934",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00008-of-00014.safetensors",
+ "sha256": "431ca56535c8781944ce3801f5eb61c45531e853ecc5846d936ebaf4761b764f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00009-of-00014.safetensors",
+ "sha256": "3825e3f4302f4d2f7d76aa7430d2ce0864fde6b9e540a5806bf0d8e38e4d9f47",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00010-of-00014.safetensors",
+ "sha256": "aded5a4d1d5e22dbd8b6f79266b6eb88c840411b09527c53917a1419ace22e2f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00011-of-00014.safetensors",
+ "sha256": "3820ffe8d8d6477f6fe8d614ef3c87abb264ee39accebf43a1507b970d80946f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00012-of-00014.safetensors",
+ "sha256": "05ad2d08ce71963121c9b03f1d9ec5d7641052f4b23c6c12b80d71065eb8e98e",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00013-of-00014.safetensors",
+ "sha256": "b64f2289871261fdd1abbd3b78bcd66011b341de3dc8eeb2ed1a473ee7c8d95c",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00014-of-00014.safetensors",
+ "sha256": "e45b6c9998c77ee5a6577f9f47bc76416c1d4d387169e50c4c9d3134ea51b13b",
+ "size_bytes": 3270697008
+ },
+ {
+ "path": "FL2VA/text_encoder/model.safetensors.index.json",
+ "sha256": "06c952c569285870b811989b794b9766493e280fb77fbcb957fc4e5fcf25403a",
+ "size_bytes": 97831
+ },
+ {
+ "path": "FL2VA/text_encoder/preprocessor_config.json",
+ "sha256": "27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516",
+ "size_bytes": 390
+ },
+ {
+ "path": "FL2VA/text_encoder/tokenizer.json",
+ "sha256": "a5d85b6dcc535e6b93115a9ef287e6132fdbf30270da6218194ba742261173c7",
+ "size_bytes": 7032403
+ },
+ {
+ "path": "FL2VA/text_encoder/tokenizer_config.json",
+ "sha256": "a07e942ac874baa13758de8d1fbdb186683cc03416b5589e1b6671c6b3057c68",
+ "size_bytes": 11003
+ },
+ {
+ "path": "FL2VA/text_encoder/video_preprocessor_config.json",
+ "sha256": "7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13",
+ "size_bytes": 385
+ },
+ {
+ "path": "FL2VA/text_encoder/vocab.json",
+ "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910",
+ "size_bytes": 2776833
+ },
+ {
+ "path": "FL2VA/tokenizer/merges.txt",
+ "sha256": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
+ "size_bytes": 1671839
+ },
+ {
+ "path": "FL2VA/tokenizer/tokenizer.json",
+ "sha256": "a5d85b6dcc535e6b93115a9ef287e6132fdbf30270da6218194ba742261173c7",
+ "size_bytes": 7032403
+ },
+ {
+ "path": "FL2VA/tokenizer/tokenizer_config.json",
+ "sha256": "a07e942ac874baa13758de8d1fbdb186683cc03416b5589e1b6671c6b3057c68",
+ "size_bytes": 11003
+ },
+ {
+ "path": "FL2VA/tokenizer/vocab.json",
+ "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910",
+ "size_bytes": 2776833
+ },
+ {
+ "path": "FL2VA/transformer/config.json",
+ "sha256": "f619093a231fcfbcc3d035bec26c50ad864e7331a500d5c519f5045dc1e50458",
+ "size_bytes": 604
+ },
+ {
+ "path": "FL2VA/transformer/model-00001-of-00013.safetensors",
+ "sha256": "0b3386565e476bfdea287e9ea9f269d036e5c649ed14bb9b4afac1dc4661bd2a",
+ "size_bytes": 5227812968
+ },
+ {
+ "path": "FL2VA/transformer/model-00002-of-00013.safetensors",
+ "sha256": "9c98fd4579c9bc96d1b1bbf65c1243f9256df60bccd229570cecc61897773003",
+ "size_bytes": 5164578856
+ },
+ {
+ "path": "FL2VA/transformer/model-00003-of-00013.safetensors",
+ "sha256": "fa484c940d4170199fb69f5016739df2daf6ecd1150631b12a297e06e3964730",
+ "size_bytes": 5164578872
+ },
+ {
+ "path": "FL2VA/transformer/model-00004-of-00013.safetensors",
+ "sha256": "4a851df37cce2d14b39cb58df41def7b591b1f11b8520a32b421a5fa3e997c9f",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00005-of-00013.safetensors",
+ "sha256": "3fe6ff94dc9d3107c6776a25277d2b72b5443f88cf0f4ed835fd5b65a94ea5d4",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00006-of-00013.safetensors",
+ "sha256": "79b47e1b9ff03a2c6f06dd15a28972acf32c0867172ee34e5aa6e96b99494127",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00007-of-00013.safetensors",
+ "sha256": "6ac4d6ce639786b722a8dd99843ed56dcab48a0d174a4b0f9b8cdcbe5160fb0f",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00008-of-00013.safetensors",
+ "sha256": "03531812243fb0a333e01efa7e3d39750580bca8cbf2ba0529da419278eab736",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00009-of-00013.safetensors",
+ "sha256": "7e82a80b0d0d267026eb841b81523069cc7b956c1ebd8a18c07e462ffb262487",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00010-of-00013.safetensors",
+ "sha256": "ef0a1f6b65145232543dd2232d58d91a4d31f44b0da5084acf22cea123255481",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00011-of-00013.safetensors",
+ "sha256": "bf885b8f2f078c5499b75fded21094a26bfe0e6e00bee276e499443ecd2f298d",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00012-of-00013.safetensors",
+ "sha256": "dc717572d014ebf8527e35af815d10eb2f5a6bc87253b8a7d2f456965192db69",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00013-of-00013.safetensors",
+ "sha256": "8bfd852d5817e9836de1d3ec8dbac1c5446b167568b717371f08282b22291aa2",
+ "size_bytes": 4242305176
+ },
+ {
+ "path": "FL2VA/transformer/model.safetensors.index.json",
+ "sha256": "fb457a26ffa6294660e249b0ddd03a337f2e5393f770b5c34c8b8f90a29a7efb",
+ "size_bytes": 38323
+ },
+ {
+ "path": "FL2VA/video_vae/attention.py",
+ "sha256": "c9db8465c57f0bfb40c0194227be6e34b2c1ff7c5b5d63abca9964eed6283767",
+ "size_bytes": 5785
+ },
+ {
+ "path": "FL2VA/video_vae/base_module.py",
+ "sha256": "0e7ddf5086179a306298693ac461ffcbc27ccb28dbc786b1a05060de7a3357c0",
+ "size_bytes": 9520
+ },
+ {
+ "path": "FL2VA/video_vae/config.json",
+ "sha256": "3edd2cdd1ebc823c868be55ef917e1b3b8a398fde4d3150dae44a3bf05d9f627",
+ "size_bytes": 1807
+ },
+ {
+ "path": "FL2VA/video_vae/conv.py",
+ "sha256": "b3adee35f27e5d372543242aa86ce5e0138f13b794b6c81f919001e3e2346723",
+ "size_bytes": 4487
+ },
+ {
+ "path": "FL2VA/video_vae/flash.py",
+ "sha256": "c1918463d303a16f278a670bb4f33d3f8d6f7653b0d473313ff5835699b86d04",
+ "size_bytes": 5763
+ },
+ {
+ "path": "FL2VA/video_vae/func.py",
+ "sha256": "0612c26a65f095699cc7acd51937cd153584fa5a0476956e46a4679aa575c22d",
+ "size_bytes": 5840
+ },
+ {
+ "path": "FL2VA/video_vae/klvae.py",
+ "sha256": "d05a22b4918ad303f147d6b0d0ae9038bd1af1f810a5553b04f3542ab9bcff96",
+ "size_bytes": 48594
+ },
+ {
+ "path": "FL2VA/video_vae/minimax_h3_video_vae.py",
+ "sha256": "77fdea69a48485b5434f65d08096657b5d78b78b7cdf24e1241038f237720138",
+ "size_bytes": 5123
+ },
+ {
+ "path": "FL2VA/video_vae/norm.py",
+ "sha256": "258b120ca8d9a16366d7b811fe93eebf98fe1564db0995e8b7747229c651919a",
+ "size_bytes": 10686
+ },
+ {
+ "path": "FL2VA/video_vae/normalize.py",
+ "sha256": "8db651acb9eb551c906a2850bbca8e9d851f00d07b30ccf66ceb6057da687a13",
+ "size_bytes": 1200
+ },
+ {
+ "path": "FL2VA/video_vae/parallel.py",
+ "sha256": "7193522beafd65bc3dbe40b9843e360ab8da3a0bb211e9bfb67bb0d5d0e66919",
+ "size_bytes": 12997
+ },
+ {
+ "path": "FL2VA/video_vae/source/config.json",
+ "sha256": "66c68f541e6578ce613ce7a0fc985eb59097038829e49f7535e6d08e6d95ab12",
+ "size_bytes": 1164
+ },
+ {
+ "path": "FL2VA/video_vae/source/model.safetensors",
+ "sha256": "5f0c2e161d895a9fee7645ca32d4a7e3a22b90cacfcbeba62ec999cdbbefe0d3",
+ "size_bytes": 10415548320
+ },
+ {
+ "path": "FL2VA/video_vae/utils.py",
+ "sha256": "309e45e9d9e33cd5516a10eac2d207eb9f940079a6d9bbe0ee80aaaf7eb42dcd",
+ "size_bytes": 764
+ },
+ {
+ "path": "FL2VA/video_vae/vae_cnn.py",
+ "sha256": "3949b701e6893bd2ea070cd5b18ed8135a7c21d884290df449b1997212d65b11",
+ "size_bytes": 8836
+ },
+ {
+ "path": "FL2VA/video_vae/vae_module.py",
+ "sha256": "9558fb302e10a619f198e12e04701c68988e897d0b627f958f33d27fd2a30d94",
+ "size_bytes": 1884
+ },
+ {
+ "path": "FL2VA/video_vae/vae_processor.py",
+ "sha256": "32870580a1802d9163104a4d68170e35a4772106867181e1bd343dff11f87d2e",
+ "size_bytes": 8369
+ },
+ {
+ "path": "FL2VA/video_vae/vae_vit.py",
+ "sha256": "a372c28441b56ec2dbc6041dbd6ce2766c64c0e61b2c69a16594a97a11da3f58",
+ "size_bytes": 13490
+ },
+ {
+ "path": "LICENSE",
+ "sha256": "59b99642b95ea21630e311198ddbfffbfe05aadba0c2f5d884cbdf4efcc90f44",
+ "size_bytes": 17604
+ },
+ {
+ "path": "README.md",
+ "sha256": "f0116a90332496bdfcc827320c603a26b849c73bf804f2674d03682fbbd2334a",
+ "size_bytes": 38406
+ },
+ {
+ "path": "model_index.json",
+ "sha256": "5a587fe13b2371427415ac892463142683aefcd8d322e274a3a095eac37ac7d2",
+ "size_bytes": 2936
+ },
+ {
+ "path": "modular_model_index.json",
+ "sha256": "a2b6a210e482ffb78e613b553f570c44e101afce6741bd4ed91429d0559af031",
+ "size_bytes": 2935
+ }
+ ],
+ "path": "/mnt/hf_hub_cache/models--MiniMaxAI--MiniMax-H3/snapshots/42ed227ee7df40d41602854ae760620d6eb651fe",
+ "revision": "42ed227ee7df40d41602854ae760620d6eb651fe"
+ },
+ "plan": {
+ "cases": [
+ {
+ "case_id": "drum-taps",
+ "prompt": "A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.",
+ "requires_motion": true,
+ "requires_sound": true,
+ "seed": 11
+ }
+ ],
+ "generation": {
+ "aspect_ratio": "16:9",
+ "audio_channels": 2,
+ "audio_flow_shift": 3.0,
+ "audio_sample_rate_hz": 32000,
+ "duration_seconds": 4,
+ "flow_shift": 12.0,
+ "fps": 24,
+ "frame_count": 107,
+ "height": 768,
+ "num_inference_steps": 50,
+ "width": 1344
+ },
+ "model_id": "MiniMaxAI/MiniMax-H3",
+ "model_revision": "42ed227ee7df40d41602854ae760620d6eb651fe",
+ "plan_id": "h3-serving-2gpu-c124-v1",
+ "repetitions": 4,
+ "warmup_runs": 1
+ },
+ "policy": {
+ "calibration_status": "uncalibrated",
+ "max_audio_rms_ratio_error": 0.1,
+ "max_latency_increase_fraction": 0.1,
+ "max_memory_increase_fraction": 0.1,
+ "min_audio_spectral_cosine": 0.95,
+ "min_video_psnr_db": 30,
+ "policy_id": "h3-example-uncalibrated-gpu-v1"
+ },
+ "port": 30283,
+ "schema_version": "0.1.0",
+ "server": {
+ "dit_cpu_offload": false,
+ "encoder_parallel": "auto",
+ "performance_mode": "speed",
+ "tp_size": 1,
+ "ulysses_degree": 2
+ },
+ "serving": {
+ "concurrency": 2,
+ "delivery_deadline_seconds": null,
+ "mode": "closed_loop"
+ }
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/aggregate.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/aggregate.json
new file mode 100644
index 000000000..7b1e29064
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/aggregate.json
@@ -0,0 +1,4 @@
+{
+ "max_concurrency": 4,
+ "power_valid": 1
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/baseline/run.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/baseline/run.json
new file mode 100644
index 000000000..872ea6766
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/baseline/run.json
@@ -0,0 +1 @@
+{"bundle_type": "mvp_run", "status": "complete", "plan_id": "h3-serving-2gpu-c124-v1", "plan_sha256": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "plan": {"cases": [{"case_id": "drum-taps", "prompt": "A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.", "requires_motion": true, "requires_sound": true, "seed": 11}], "generation": {"aspect_ratio": "16:9", "audio_channels": 2, "audio_flow_shift": 3.0, "audio_sample_rate_hz": 32000, "duration_seconds": 4, "flow_shift": 12.0, "fps": 24, "frame_count": 107, "height": 768, "num_inference_steps": 50, "width": 1344}, "model_id": "MiniMaxAI/MiniMax-H3", "model_revision": "42ed227ee7df40d41602854ae760620d6eb651fe", "plan_id": "h3-serving-2gpu-c124-v1", "repetitions": 4, "warmup_runs": 1}, "configuration": {"runtime": "sglang", "runtime_revision": "7777777777777777777777777777777777777777"}, "started_at": "2026-10-17T00:00:00Z", "finished_at": "2026-10-17T00:10:00Z", "measurement": {"boundary": "submit_to_downloaded_media", "concurrency": 4, "warmup_runs": 1, "wall_seconds": 60.0, "start_monotonic_seconds": 100.0, "end_monotonic_seconds": 160.0}, "serving": {"mode": "closed_loop", "concurrency": 4, "client_ready_latency_seconds": {"p50": 118.0}}, "records": [{"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}, {"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}, {"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}, {"phase": "measurement", "attempted": true, "timing_window": {"end_monotonic_seconds": 150.0}}], "summary": {"scheduled": 4, "completed": 4, "valid": 4, "failed": 0, "not_started": 0, "latency_median_seconds": 119.0, "valid_clips_per_second": 0.06666666666666667}}
\ No newline at end of file
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/benchmark_concurrency_4.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/benchmark_concurrency_4.json
new file mode 100644
index 000000000..a92c3fca8
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/benchmark_concurrency_4.json
@@ -0,0 +1 @@
+{"max_concurrency": 4, "benchmark_start_time_unix": 1005.0, "benchmark_end_time_unix": 1065.0, "duration": 60.0, "completed": 4, "scheduled": 4, "energy_normalization": "clips", "clock": {"utc_minus_monotonic_seconds": 905.0}}
\ No newline at end of file
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/gpu-job.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/gpu-job.json
new file mode 100644
index 000000000..ad44b4da6
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/gpu-job.json
@@ -0,0 +1,65 @@
+{
+ "aggregate_path": "aggregate.json",
+ "allocation": {
+ "label": "srt-slurm job assigned at launch",
+ "mode": "dedicated_ci"
+ },
+ "authorization": {
+ "approval_reference": "InferenceX #2916 native srt-slurm H3 serving run, authorized by the repository owner on 2026-10-17 (SemiAnalysis clusters only); model use per the MiniMax-H3 license review recorded for the #2894 baseline (user-confirmation-2026-09-02).",
+ "compute_approved": true,
+ "model_license_reviewed": true
+ },
+ "bundle_type": "srt_slurm_h3_service_receipt",
+ "ci_accepted": false,
+ "cleanup_status": "srt_slurm_job_teardown",
+ "evidence_kind": "srt_slurm_h3_service",
+ "execution_id": "slurm-77",
+ "failures": [],
+ "finished_at": "2026-10-17T00:10:00Z",
+ "job_id": "github-123456789-1-c4",
+ "measurement_status": "complete",
+ "measurement_verified": true,
+ "plan_sha256": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "power": {
+ "invalid_reasons": [],
+ "path": "power.json",
+ "sha256": "763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677",
+ "valid": true
+ },
+ "power_verified": true,
+ "regression_status": "inconclusive",
+ "release_qualified": false,
+ "roles": {
+ "baseline": {
+ "finished_at": "2026-10-17T00:10:00Z",
+ "run_path": "baseline/run.json",
+ "run_sha256": "4a0cffaffc3636c2fd7931bfffe51174604d459e8338a2873843262075adf10d",
+ "run_status": "complete",
+ "run_summary": {
+ "completed": 4,
+ "failed": 0,
+ "latency_median_seconds": 119.0,
+ "not_started": 0,
+ "scheduled": 4,
+ "valid": 4,
+ "valid_clips_per_second": 0.06666666666666667
+ },
+ "started_at": "2026-10-17T00:00:00Z",
+ "status": "complete"
+ }
+ },
+ "schema_version": "0.1.0",
+ "server": {
+ "argv": [
+ "x"
+ ],
+ "slurm_job_id": "77"
+ },
+ "slurm": {
+ "job_id": "77",
+ "state": "COMPLETED"
+ },
+ "spec_sha256": "0c11c7804043c108718f1285af13c47c9e54a53a52dd5b81eab585044092d96a",
+ "started_at": "2026-10-17T00:00:00Z",
+ "status": "complete"
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/power-validation.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/power-validation.json
new file mode 100644
index 000000000..bef9a8df9
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/power-validation.json
@@ -0,0 +1,32 @@
+{
+ "benchmark_window": {
+ "end_time_unix": 1065.0,
+ "start_time_unix": 1005.0
+ },
+ "expected_gpu_count": 2,
+ "integration_method": "per_device_trapezoidal_with_linear_boundary_interpolation",
+ "metrics": {
+ "avg_total_gpu_power_w": 1201.0,
+ "joules_per_successful_query": 18000.25,
+ "total_gpu_energy_j": 72001.0
+ },
+ "observed_gpu_count": 2,
+ "per_gpu_energy_j": {
+ "node/GPU-11111111-1111-1111-1111-111111111111": 36000.0,
+ "node/GPU-22222222-2222-2222-2222-222222222222": 36001.0
+ },
+ "per_gpu_max_sample_gap_s": {
+ "node/GPU-11111111-1111-1111-1111-111111111111": 1.0,
+ "node/GPU-22222222-2222-2222-2222-222222222222": 1.0
+ },
+ "per_gpu_role": {
+ "node/GPU-11111111-1111-1111-1111-111111111111": "h3-server",
+ "node/GPU-22222222-2222-2222-2222-222222222222": "h3-server"
+ },
+ "power_valid": true,
+ "producer": {
+ "exporter_image_sha256": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
+ "producer_git_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ },
+ "reasons": []
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/power.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/power.json
new file mode 100644
index 000000000..7ce2eb3e5
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/power.json
@@ -0,0 +1,862 @@
+{
+ "bundle_type": "h3_native_power",
+ "evidence_kind": "srt_slurm_h3_service",
+ "expected_gpu_count": 2,
+ "gpu_uuids": [
+ "GPU-11111111-1111-1111-1111-111111111111",
+ "GPU-22222222-2222-2222-2222-222222222222"
+ ],
+ "invalid_reasons": [],
+ "metrics": {
+ "avg_total_gpu_power_w": 1201.0,
+ "joules_per_successful_query": 18000.25,
+ "total_gpu_energy_j": 72001.0
+ },
+ "observed_gpu_count": 2,
+ "per_gpu": {
+ "GPU-11111111-1111-1111-1111-111111111111": {
+ "avg_power_w": 600.0,
+ "energy_j": 36000.0,
+ "max_sample_gap_s": 1.0,
+ "observed_peak_power_w": 600.0,
+ "role": "h3-server"
+ },
+ "GPU-22222222-2222-2222-2222-222222222222": {
+ "avg_power_w": 600.0166666666667,
+ "energy_j": 36001.0,
+ "max_sample_gap_s": 1.0,
+ "observed_peak_power_w": 601.0,
+ "role": "h3-server"
+ }
+ },
+ "phases": {
+ "measurement": {
+ "aggregate": {
+ "avg_power_w": 1201.0,
+ "energy_j": 72001.0,
+ "joules_per_valid_clip": 18000.25,
+ "observed_peak_power_w": 1201.0
+ },
+ "attempted": 4,
+ "completed": 4,
+ "duration_seconds": 60.0,
+ "invalid_reasons": [],
+ "per_gpu": {
+ "GPU-11111111-1111-1111-1111-111111111111": {
+ "avg_power_w": 600.0,
+ "energy_j": 36000.0,
+ "observed_peak_power_w": 600.0
+ },
+ "GPU-22222222-2222-2222-2222-222222222222": {
+ "avg_power_w": 600.0166666666667,
+ "energy_j": 36001.0,
+ "observed_peak_power_w": 601.0
+ }
+ },
+ "status": "valid",
+ "valid": true,
+ "valid_clips": 4,
+ "valid_window_count": 1,
+ "window_count": 1
+ }
+ },
+ "producer": {
+ "exporter_image_sha256": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
+ "integration_method": "per_device_trapezoidal_with_linear_boundary_interpolation",
+ "power_percentile_method": null,
+ "producer_git_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ },
+ "sample_series": [
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:40.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1000.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:41.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1001.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:42.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1002.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:43.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1003.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:44.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1004.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:45.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1005.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:46.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1006.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:47.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1007.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:48.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1008.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:49.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1009.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:50.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1010.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:51.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1011.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:52.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1012.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:53.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1013.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:54.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1014.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:55.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1015.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:56.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1016.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:57.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1017.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:58.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1018.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:16:59.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1019.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:00.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1020.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:01.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1021.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:02.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1022.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:03.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1023.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:04.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1024.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:05.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1025.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:06.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1026.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:07.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1027.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:08.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1028.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:09.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1029.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:10.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1030.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:11.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1031.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:12.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1032.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:13.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1033.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:14.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1034.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:15.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1035.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:16.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1036.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:17.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1037.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:18.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1038.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:19.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1039.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:20.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1040.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:21.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1041.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:22.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1042.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:23.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1043.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:24.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1044.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:25.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1045.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:26.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1046.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:27.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1047.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:28.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1048.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:29.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1049.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:30.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1050.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:31.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1051.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:32.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1052.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:33.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1053.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:34.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1054.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:35.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1055.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:36.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1056.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:37.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1057.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:38.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1058.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:39.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1059.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:40.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1060.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:41.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1061.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:42.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1062.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:43.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1063.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:44.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1064.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:45.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1065.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:46.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1066.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:47.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1067.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:48.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1068.0,
+ "valid": true
+ },
+ {
+ "aggregate_watts": 1201.0,
+ "at": "1970-01-01T00:17:49.000000Z",
+ "invalid_reasons": [],
+ "per_gpu_watts": {
+ "GPU-11111111-1111-1111-1111-111111111111": 600.0,
+ "GPU-22222222-2222-2222-2222-222222222222": 601.0
+ },
+ "unix_seconds": 1069.0,
+ "valid": true
+ }
+ ],
+ "schema_version": "1.0.0",
+ "semantics": {
+ "energy_per_valid_clip": "whole-window GPU energy divided by technically valid clips",
+ "energy_unit": "J",
+ "generation_window": "client measured block: first measurement submit to last downloaded media",
+ "integration": "per_device_trapezoidal_with_linear_boundary_interpolation",
+ "power_unit": "W",
+ "scope": "job GPUs sampled by srt-slurm's DCGM exporter; excludes host and unsampled devices",
+ "sensor": "DCGM_FI_DEV_POWER_USAGE board power, head-node Unix clock",
+ "time_unit": "s"
+ },
+ "source": "srt-slurm.dcgm-power",
+ "status": "valid",
+ "valid": true,
+ "window": {
+ "clock_source": "head_node_unix_clock",
+ "duration_seconds": 60.0,
+ "end_unix": 1065.0,
+ "start_unix": 1005.0,
+ "utc_minus_monotonic_seconds": 905.0
+ }
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/spec.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/spec.json
new file mode 100644
index 000000000..6afa32a51
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/gpu/c4/spec.json
@@ -0,0 +1,521 @@
+{
+ "allocation": {
+ "label": "srt-slurm job assigned at launch",
+ "mode": "dedicated_ci"
+ },
+ "authorization": {
+ "approval_reference": "InferenceX #2916 native srt-slurm H3 serving run, authorized by the repository owner on 2026-10-17 (SemiAnalysis clusters only); model use per the MiniMax-H3 license review recorded for the #2894 baseline (user-confirmation-2026-09-02).",
+ "compute_approved": true,
+ "model_license_reviewed": true
+ },
+ "baseline": {
+ "python": "/usr/bin/python3",
+ "revision": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "source": "/sgl-workspace/sglang",
+ "source_sha256": "e6069f8b948234075fdcfba23e459e2f56a45b11d0ba3ee5ecbb754e338deb13"
+ },
+ "candidate": {
+ "python": "/usr/bin/python3",
+ "revision": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "source": "/sgl-workspace/sglang",
+ "source_sha256": "e6069f8b948234075fdcfba23e459e2f56a45b11d0ba3ee5ecbb754e338deb13"
+ },
+ "gpu_uuids": [
+ "GPU-11111111-1111-1111-1111-111111111111",
+ "GPU-22222222-2222-2222-2222-222222222222"
+ ],
+ "job_id": "github-123456789-1-c4",
+ "limits": {
+ "cleanup_seconds": 60,
+ "command_seconds": 30,
+ "job_seconds": 3600,
+ "max_idle_memory_mib": 64,
+ "request_seconds": 900,
+ "startup_seconds": 900,
+ "telemetry_interval_seconds": 1
+ },
+ "lock_directory": "/logs/h3/locks",
+ "model": {
+ "files": [
+ {
+ "path": "FL2VA/audio_vae/config.json",
+ "sha256": "d8f3bcc62e23c7e9806970fa63cca6139c06faa3797cf9c94034f60db8512771",
+ "size_bytes": 1973
+ },
+ {
+ "path": "FL2VA/audio_vae/config.yaml",
+ "sha256": "259f675c9f71eedc24ca4f23965cd32a1b3878fc894f56664c40328d99831a5e",
+ "size_bytes": 91
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_activations.py",
+ "sha256": "74ca8bb9e8039f1ff362ca4219eee5240a7df9502f3dbdc3161d4e86fbd6dc04",
+ "size_bytes": 2189
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_alias_free_act.py",
+ "sha256": "db8761e66c0eaf9fce2dcccb59162d52b22ca0de9f699cf7d21ec7cd507e86fd",
+ "size_bytes": 835
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_alias_free_filter.py",
+ "sha256": "a369523cd7f14f4f299d8e2e47f3c473da76ed1910e6e9134fd7a9fce02537e8",
+ "size_bytes": 3300
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_alias_free_resample.py",
+ "sha256": "fe35055893833c563e42adc5e5882cbe7628c82d48d33c300fcf0a9576997910",
+ "size_bytes": 1740
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_attn_proj.py",
+ "sha256": "0e04556fa5fd38d4a71e62fcf4d3242fd9a2464fd72ed62baef2ec0980d910c6",
+ "size_bytes": 3317
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_audio_vae.py",
+ "sha256": "ec04939602d4710d039e83f558a7572547669652f7fa967e3de0a3b6c48cfd48",
+ "size_bytes": 7266
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_bigvgan.py",
+ "sha256": "f5df4e6f633e74da479549ef7a6d2684964e4b65ac42c6765be42f9c7fcb7bd2",
+ "size_bytes": 7102
+ },
+ {
+ "path": "FL2VA/audio_vae/dac_utils.py",
+ "sha256": "74ef0ba2c2a11ca35a7c0cc166fe88e564de01230000a0bcc8429103312ad9f0",
+ "size_bytes": 362
+ },
+ {
+ "path": "FL2VA/audio_vae/metadata.json",
+ "sha256": "755d0529d43b2b5c83590f6f44ca659bc68e6a21b01d5669c93e8b2965749bff",
+ "size_bytes": 440
+ },
+ {
+ "path": "FL2VA/audio_vae/minimax_h3_audio_vae.py",
+ "sha256": "63bc0dab6def69480cfd77ea820f9a9a84fc4bd6e56868e4f45ec1e1e200578f",
+ "size_bytes": 3532
+ },
+ {
+ "path": "FL2VA/audio_vae/model.safetensors",
+ "sha256": "37dddc2f3e6d5d5139d823d5ea283bbf304dadcb885b1ccda818aa13dade5ea2",
+ "size_bytes": 605429308
+ },
+ {
+ "path": "FL2VA/model_index.json",
+ "sha256": "d1113e0f123c69f79cd0de35ca1771606ebc3ec924270d257b771f96f584aa6b",
+ "size_bytes": 719
+ },
+ {
+ "path": "FL2VA/processor/chat_template.json",
+ "sha256": "5c72a170d2a4a1a3bc5adad2e689ae28138a9700e5b8c96c0266331e86c0acce",
+ "size_bytes": 5499
+ },
+ {
+ "path": "FL2VA/processor/merges.txt",
+ "sha256": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
+ "size_bytes": 1671839
+ },
+ {
+ "path": "FL2VA/processor/preprocessor_config.json",
+ "sha256": "27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516",
+ "size_bytes": 390
+ },
+ {
+ "path": "FL2VA/processor/tokenizer.json",
+ "sha256": "a5d85b6dcc535e6b93115a9ef287e6132fdbf30270da6218194ba742261173c7",
+ "size_bytes": 7032403
+ },
+ {
+ "path": "FL2VA/processor/tokenizer_config.json",
+ "sha256": "a07e942ac874baa13758de8d1fbdb186683cc03416b5589e1b6671c6b3057c68",
+ "size_bytes": 11003
+ },
+ {
+ "path": "FL2VA/processor/video_preprocessor_config.json",
+ "sha256": "7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13",
+ "size_bytes": 385
+ },
+ {
+ "path": "FL2VA/processor/vocab.json",
+ "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910",
+ "size_bytes": 2776833
+ },
+ {
+ "path": "FL2VA/text_encoder/chat_template.json",
+ "sha256": "5c72a170d2a4a1a3bc5adad2e689ae28138a9700e5b8c96c0266331e86c0acce",
+ "size_bytes": 5499
+ },
+ {
+ "path": "FL2VA/text_encoder/config.json",
+ "sha256": "d2dd0c60d01b9e195d9447c52da61c7302d28828524914c044d9c6e1b81d0427",
+ "size_bytes": 1474
+ },
+ {
+ "path": "FL2VA/text_encoder/merges.txt",
+ "sha256": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
+ "size_bytes": 1671839
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00001-of-00014.safetensors",
+ "sha256": "6b9dfbc930e505402ae9d7e5091a9d7d656cda5f34614f01cfe70bfb0cca27cb",
+ "size_bytes": 4932328944
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00002-of-00014.safetensors",
+ "sha256": "d8bb44b4ff303fe76fe9e894022fb3dc71b15a2e716592790fe0e3c3e60478fa",
+ "size_bytes": 4875990528
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00003-of-00014.safetensors",
+ "sha256": "54f22e8b3168f8dc962fac0d313607ebf52a12b433d4cf3098a0d82d9f042940",
+ "size_bytes": 4875990552
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00004-of-00014.safetensors",
+ "sha256": "ad09c74d3c13ee29b5d0d84548fd8a3424a651564eaccd519946c296e59c557f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00005-of-00014.safetensors",
+ "sha256": "fc993c8a0e2a5b0570f383e1a95dc3a1281d1b224b6f3ee908f4827941e1dfc2",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00006-of-00014.safetensors",
+ "sha256": "82f05620d1f718a90c362b221d6a184ff1a0f53301d706882d3df49695fa1974",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00007-of-00014.safetensors",
+ "sha256": "fb91da8cb01ff4de3eef0eab1c3e769a734b3a1aafc61734068638a0d6c86934",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00008-of-00014.safetensors",
+ "sha256": "431ca56535c8781944ce3801f5eb61c45531e853ecc5846d936ebaf4761b764f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00009-of-00014.safetensors",
+ "sha256": "3825e3f4302f4d2f7d76aa7430d2ce0864fde6b9e540a5806bf0d8e38e4d9f47",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00010-of-00014.safetensors",
+ "sha256": "aded5a4d1d5e22dbd8b6f79266b6eb88c840411b09527c53917a1419ace22e2f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00011-of-00014.safetensors",
+ "sha256": "3820ffe8d8d6477f6fe8d614ef3c87abb264ee39accebf43a1507b970d80946f",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00012-of-00014.safetensors",
+ "sha256": "05ad2d08ce71963121c9b03f1d9ec5d7641052f4b23c6c12b80d71065eb8e98e",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00013-of-00014.safetensors",
+ "sha256": "b64f2289871261fdd1abbd3b78bcd66011b341de3dc8eeb2ed1a473ee7c8d95c",
+ "size_bytes": 4875990584
+ },
+ {
+ "path": "FL2VA/text_encoder/model-00014-of-00014.safetensors",
+ "sha256": "e45b6c9998c77ee5a6577f9f47bc76416c1d4d387169e50c4c9d3134ea51b13b",
+ "size_bytes": 3270697008
+ },
+ {
+ "path": "FL2VA/text_encoder/model.safetensors.index.json",
+ "sha256": "06c952c569285870b811989b794b9766493e280fb77fbcb957fc4e5fcf25403a",
+ "size_bytes": 97831
+ },
+ {
+ "path": "FL2VA/text_encoder/preprocessor_config.json",
+ "sha256": "27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516",
+ "size_bytes": 390
+ },
+ {
+ "path": "FL2VA/text_encoder/tokenizer.json",
+ "sha256": "a5d85b6dcc535e6b93115a9ef287e6132fdbf30270da6218194ba742261173c7",
+ "size_bytes": 7032403
+ },
+ {
+ "path": "FL2VA/text_encoder/tokenizer_config.json",
+ "sha256": "a07e942ac874baa13758de8d1fbdb186683cc03416b5589e1b6671c6b3057c68",
+ "size_bytes": 11003
+ },
+ {
+ "path": "FL2VA/text_encoder/video_preprocessor_config.json",
+ "sha256": "7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13",
+ "size_bytes": 385
+ },
+ {
+ "path": "FL2VA/text_encoder/vocab.json",
+ "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910",
+ "size_bytes": 2776833
+ },
+ {
+ "path": "FL2VA/tokenizer/merges.txt",
+ "sha256": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
+ "size_bytes": 1671839
+ },
+ {
+ "path": "FL2VA/tokenizer/tokenizer.json",
+ "sha256": "a5d85b6dcc535e6b93115a9ef287e6132fdbf30270da6218194ba742261173c7",
+ "size_bytes": 7032403
+ },
+ {
+ "path": "FL2VA/tokenizer/tokenizer_config.json",
+ "sha256": "a07e942ac874baa13758de8d1fbdb186683cc03416b5589e1b6671c6b3057c68",
+ "size_bytes": 11003
+ },
+ {
+ "path": "FL2VA/tokenizer/vocab.json",
+ "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910",
+ "size_bytes": 2776833
+ },
+ {
+ "path": "FL2VA/transformer/config.json",
+ "sha256": "f619093a231fcfbcc3d035bec26c50ad864e7331a500d5c519f5045dc1e50458",
+ "size_bytes": 604
+ },
+ {
+ "path": "FL2VA/transformer/model-00001-of-00013.safetensors",
+ "sha256": "0b3386565e476bfdea287e9ea9f269d036e5c649ed14bb9b4afac1dc4661bd2a",
+ "size_bytes": 5227812968
+ },
+ {
+ "path": "FL2VA/transformer/model-00002-of-00013.safetensors",
+ "sha256": "9c98fd4579c9bc96d1b1bbf65c1243f9256df60bccd229570cecc61897773003",
+ "size_bytes": 5164578856
+ },
+ {
+ "path": "FL2VA/transformer/model-00003-of-00013.safetensors",
+ "sha256": "fa484c940d4170199fb69f5016739df2daf6ecd1150631b12a297e06e3964730",
+ "size_bytes": 5164578872
+ },
+ {
+ "path": "FL2VA/transformer/model-00004-of-00013.safetensors",
+ "sha256": "4a851df37cce2d14b39cb58df41def7b591b1f11b8520a32b421a5fa3e997c9f",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00005-of-00013.safetensors",
+ "sha256": "3fe6ff94dc9d3107c6776a25277d2b72b5443f88cf0f4ed835fd5b65a94ea5d4",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00006-of-00013.safetensors",
+ "sha256": "79b47e1b9ff03a2c6f06dd15a28972acf32c0867172ee34e5aa6e96b99494127",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00007-of-00013.safetensors",
+ "sha256": "6ac4d6ce639786b722a8dd99843ed56dcab48a0d174a4b0f9b8cdcbe5160fb0f",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00008-of-00013.safetensors",
+ "sha256": "03531812243fb0a333e01efa7e3d39750580bca8cbf2ba0529da419278eab736",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00009-of-00013.safetensors",
+ "sha256": "7e82a80b0d0d267026eb841b81523069cc7b956c1ebd8a18c07e462ffb262487",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00010-of-00013.safetensors",
+ "sha256": "ef0a1f6b65145232543dd2232d58d91a4d31f44b0da5084acf22cea123255481",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00011-of-00013.safetensors",
+ "sha256": "bf885b8f2f078c5499b75fded21094a26bfe0e6e00bee276e499443ecd2f298d",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00012-of-00013.safetensors",
+ "sha256": "dc717572d014ebf8527e35af815d10eb2f5a6bc87253b8a7d2f456965192db69",
+ "size_bytes": 5164578896
+ },
+ {
+ "path": "FL2VA/transformer/model-00013-of-00013.safetensors",
+ "sha256": "8bfd852d5817e9836de1d3ec8dbac1c5446b167568b717371f08282b22291aa2",
+ "size_bytes": 4242305176
+ },
+ {
+ "path": "FL2VA/transformer/model.safetensors.index.json",
+ "sha256": "fb457a26ffa6294660e249b0ddd03a337f2e5393f770b5c34c8b8f90a29a7efb",
+ "size_bytes": 38323
+ },
+ {
+ "path": "FL2VA/video_vae/attention.py",
+ "sha256": "c9db8465c57f0bfb40c0194227be6e34b2c1ff7c5b5d63abca9964eed6283767",
+ "size_bytes": 5785
+ },
+ {
+ "path": "FL2VA/video_vae/base_module.py",
+ "sha256": "0e7ddf5086179a306298693ac461ffcbc27ccb28dbc786b1a05060de7a3357c0",
+ "size_bytes": 9520
+ },
+ {
+ "path": "FL2VA/video_vae/config.json",
+ "sha256": "3edd2cdd1ebc823c868be55ef917e1b3b8a398fde4d3150dae44a3bf05d9f627",
+ "size_bytes": 1807
+ },
+ {
+ "path": "FL2VA/video_vae/conv.py",
+ "sha256": "b3adee35f27e5d372543242aa86ce5e0138f13b794b6c81f919001e3e2346723",
+ "size_bytes": 4487
+ },
+ {
+ "path": "FL2VA/video_vae/flash.py",
+ "sha256": "c1918463d303a16f278a670bb4f33d3f8d6f7653b0d473313ff5835699b86d04",
+ "size_bytes": 5763
+ },
+ {
+ "path": "FL2VA/video_vae/func.py",
+ "sha256": "0612c26a65f095699cc7acd51937cd153584fa5a0476956e46a4679aa575c22d",
+ "size_bytes": 5840
+ },
+ {
+ "path": "FL2VA/video_vae/klvae.py",
+ "sha256": "d05a22b4918ad303f147d6b0d0ae9038bd1af1f810a5553b04f3542ab9bcff96",
+ "size_bytes": 48594
+ },
+ {
+ "path": "FL2VA/video_vae/minimax_h3_video_vae.py",
+ "sha256": "77fdea69a48485b5434f65d08096657b5d78b78b7cdf24e1241038f237720138",
+ "size_bytes": 5123
+ },
+ {
+ "path": "FL2VA/video_vae/norm.py",
+ "sha256": "258b120ca8d9a16366d7b811fe93eebf98fe1564db0995e8b7747229c651919a",
+ "size_bytes": 10686
+ },
+ {
+ "path": "FL2VA/video_vae/normalize.py",
+ "sha256": "8db651acb9eb551c906a2850bbca8e9d851f00d07b30ccf66ceb6057da687a13",
+ "size_bytes": 1200
+ },
+ {
+ "path": "FL2VA/video_vae/parallel.py",
+ "sha256": "7193522beafd65bc3dbe40b9843e360ab8da3a0bb211e9bfb67bb0d5d0e66919",
+ "size_bytes": 12997
+ },
+ {
+ "path": "FL2VA/video_vae/source/config.json",
+ "sha256": "66c68f541e6578ce613ce7a0fc985eb59097038829e49f7535e6d08e6d95ab12",
+ "size_bytes": 1164
+ },
+ {
+ "path": "FL2VA/video_vae/source/model.safetensors",
+ "sha256": "5f0c2e161d895a9fee7645ca32d4a7e3a22b90cacfcbeba62ec999cdbbefe0d3",
+ "size_bytes": 10415548320
+ },
+ {
+ "path": "FL2VA/video_vae/utils.py",
+ "sha256": "309e45e9d9e33cd5516a10eac2d207eb9f940079a6d9bbe0ee80aaaf7eb42dcd",
+ "size_bytes": 764
+ },
+ {
+ "path": "FL2VA/video_vae/vae_cnn.py",
+ "sha256": "3949b701e6893bd2ea070cd5b18ed8135a7c21d884290df449b1997212d65b11",
+ "size_bytes": 8836
+ },
+ {
+ "path": "FL2VA/video_vae/vae_module.py",
+ "sha256": "9558fb302e10a619f198e12e04701c68988e897d0b627f958f33d27fd2a30d94",
+ "size_bytes": 1884
+ },
+ {
+ "path": "FL2VA/video_vae/vae_processor.py",
+ "sha256": "32870580a1802d9163104a4d68170e35a4772106867181e1bd343dff11f87d2e",
+ "size_bytes": 8369
+ },
+ {
+ "path": "FL2VA/video_vae/vae_vit.py",
+ "sha256": "a372c28441b56ec2dbc6041dbd6ce2766c64c0e61b2c69a16594a97a11da3f58",
+ "size_bytes": 13490
+ },
+ {
+ "path": "LICENSE",
+ "sha256": "59b99642b95ea21630e311198ddbfffbfe05aadba0c2f5d884cbdf4efcc90f44",
+ "size_bytes": 17604
+ },
+ {
+ "path": "README.md",
+ "sha256": "f0116a90332496bdfcc827320c603a26b849c73bf804f2674d03682fbbd2334a",
+ "size_bytes": 38406
+ },
+ {
+ "path": "model_index.json",
+ "sha256": "5a587fe13b2371427415ac892463142683aefcd8d322e274a3a095eac37ac7d2",
+ "size_bytes": 2936
+ },
+ {
+ "path": "modular_model_index.json",
+ "sha256": "a2b6a210e482ffb78e613b553f570c44e101afce6741bd4ed91429d0559af031",
+ "size_bytes": 2935
+ }
+ ],
+ "path": "/mnt/hf_hub_cache/models--MiniMaxAI--MiniMax-H3/snapshots/42ed227ee7df40d41602854ae760620d6eb651fe",
+ "revision": "42ed227ee7df40d41602854ae760620d6eb651fe"
+ },
+ "plan": {
+ "cases": [
+ {
+ "case_id": "drum-taps",
+ "prompt": "A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.",
+ "requires_motion": true,
+ "requires_sound": true,
+ "seed": 11
+ }
+ ],
+ "generation": {
+ "aspect_ratio": "16:9",
+ "audio_channels": 2,
+ "audio_flow_shift": 3.0,
+ "audio_sample_rate_hz": 32000,
+ "duration_seconds": 4,
+ "flow_shift": 12.0,
+ "fps": 24,
+ "frame_count": 107,
+ "height": 768,
+ "num_inference_steps": 50,
+ "width": 1344
+ },
+ "model_id": "MiniMaxAI/MiniMax-H3",
+ "model_revision": "42ed227ee7df40d41602854ae760620d6eb651fe",
+ "plan_id": "h3-serving-2gpu-c124-v1",
+ "repetitions": 4,
+ "warmup_runs": 1
+ },
+ "policy": {
+ "calibration_status": "uncalibrated",
+ "max_audio_rms_ratio_error": 0.1,
+ "max_latency_increase_fraction": 0.1,
+ "max_memory_increase_fraction": 0.1,
+ "min_audio_spectral_cosine": 0.95,
+ "min_video_psnr_db": 30,
+ "policy_id": "h3-example-uncalibrated-gpu-v1"
+ },
+ "port": 30283,
+ "schema_version": "0.1.0",
+ "server": {
+ "dit_cpu_offload": false,
+ "encoder_parallel": "auto",
+ "performance_mode": "speed",
+ "tp_size": 1,
+ "ulysses_degree": 2
+ },
+ "serving": {
+ "concurrency": 4,
+ "delivery_deadline_seconds": null,
+ "mode": "closed_loop"
+ }
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/manifest.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/manifest.json
new file mode 100644
index 000000000..3e4b90883
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/manifest.json
@@ -0,0 +1,84 @@
+{
+ "artifact_checksums": "SHA256SUMS",
+ "ci": {
+ "actor": null,
+ "repository": "SemiAnalysisAI/InferenceX",
+ "run_url": "https://github.com/SemiAnalysisAI/InferenceX/actions/runs/123456789",
+ "runner_name": null,
+ "triggering_actor": null,
+ "workflow_ref": null,
+ "workflow_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
+ },
+ "evidence": {
+ "ci.json": "d13dc609015bc1934f2a56b39a88861821cd580dbdd283341250274ac7a50975",
+ "gpu/c1/aggregate.json": "d9efc377307bd6fd2b4379076f9b3d7ed6e231c60060ad9ef78ac1590c63e902",
+ "gpu/c1/baseline/run.json": "fee60ee8349f71bc43805a42ea61e1da79c727cbd9c4ada6fb930b9cdbbd939d",
+ "gpu/c1/benchmark_concurrency_1.json": "0e6b28e34e5a1505c53a75228298c657b68f4c9730a60700859b1d796b1bb31d",
+ "gpu/c1/gpu-job.json": "29a424efce674a7ca0a786ce9a7c02949fbdaaa4cbb91c1bfbc5a67979b60bba",
+ "gpu/c1/power-validation.json": "3952eb8f322479c2d413424d3b82ceef6f6a970c162f9c37a54cf3a84fe6deb0",
+ "gpu/c1/power.json": "763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677",
+ "gpu/c1/spec.json": "3fe1ad75b8e1cd485e3b376cefdea422385cbe9743ed7b154cf8fc614ccb9269",
+ "gpu/c2/aggregate.json": "ff914c37e5170b78f28c832f07c08282b764b4ae85ce9e2570414b8ab661e9e0",
+ "gpu/c2/baseline/run.json": "0a52c7c925c0e1bb1641dd973c596f67496db42859a8d2fca60c203821f09816",
+ "gpu/c2/benchmark_concurrency_2.json": "c4cf6ecdc0dc2a618eaf7bb2ba1c5ec46e307101221047cd3bef97c53ee7785d",
+ "gpu/c2/gpu-job.json": "68a4d7292268b7551ef98af8b378a4b7a41e90d6a2b55db38c5775acb4cc0782",
+ "gpu/c2/power-validation.json": "3952eb8f322479c2d413424d3b82ceef6f6a970c162f9c37a54cf3a84fe6deb0",
+ "gpu/c2/power.json": "763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677",
+ "gpu/c2/spec.json": "77b417da60aa333eb86e5cd7c6f3fa1913013489650664ce2f2e2f8de5ccd149",
+ "gpu/c4/aggregate.json": "ff9e6e9ea7a4c052d61d8ed044d174fa56dfcdfe11642118fdf2ef4a1168cc19",
+ "gpu/c4/baseline/run.json": "4a0cffaffc3636c2fd7931bfffe51174604d459e8338a2873843262075adf10d",
+ "gpu/c4/benchmark_concurrency_4.json": "3c04e17724f8e11ccedea612ab94ea4e4b0b2bdbef5d1e3d9608171b77a5f0b1",
+ "gpu/c4/gpu-job.json": "3e1510a484293e91da9be9c5026afd8cfc9caaa1ba6f67ba713edc38771e85f9",
+ "gpu/c4/power-validation.json": "3952eb8f322479c2d413424d3b82ceef6f6a970c162f9c37a54cf3a84fe6deb0",
+ "gpu/c4/power.json": "763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677",
+ "gpu/c4/spec.json": "0c11c7804043c108718f1285af13c47c9e54a53a52dd5b81eab585044092d96a",
+ "serving-smoke.json": "2fc3816b635e85e97f5a945676e8375ddaa1eac351d5dbdec0c268741c0427c0"
+ },
+ "evidence_kind": "srt_slurm_h3_service",
+ "excluded_persistent_caches": [],
+ "exit_code": 0,
+ "git_commit": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
+ "gpu_uuids": [
+ "GPU-11111111-1111-1111-1111-111111111111",
+ "GPU-22222222-2222-2222-2222-222222222222"
+ ],
+ "launcher": "srt-slurm",
+ "mode": "serving-smoke",
+ "run_attempt": "1",
+ "run_id": "123456789",
+ "runtime": {
+ "image": "hongccc/sglang-omni:h3-runtime-71de97b",
+ "python": "/usr/bin/python3"
+ },
+ "schema_version": 1,
+ "task_id": "h3-video",
+ "workload_plan": {
+ "cases": [
+ {
+ "case_id": "drum-taps",
+ "prompt": "A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.",
+ "requires_motion": true,
+ "requires_sound": true,
+ "seed": 11
+ }
+ ],
+ "generation": {
+ "aspect_ratio": "16:9",
+ "audio_channels": 2,
+ "audio_flow_shift": 3.0,
+ "audio_sample_rate_hz": 32000,
+ "duration_seconds": 4,
+ "flow_shift": 12.0,
+ "fps": 24,
+ "frame_count": 107,
+ "height": 768,
+ "num_inference_steps": 50,
+ "width": 1344
+ },
+ "model_id": "MiniMaxAI/MiniMax-H3",
+ "model_revision": "42ed227ee7df40d41602854ae760620d6eb651fe",
+ "plan_id": "h3-serving-2gpu-c124-v1",
+ "repetitions": 4,
+ "warmup_runs": 1
+ }
+}
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/serving-smoke.json b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/serving-smoke.json
new file mode 100644
index 000000000..0c0cfca38
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-serving-bundle/serving-smoke.json
@@ -0,0 +1,315 @@
+{
+ "bundle_type": "h3_serving_smoke_matrix",
+ "cells": [
+ {
+ "aggregate": {
+ "path": "gpu/c1/aggregate.json",
+ "sha256": "d9efc377307bd6fd2b4379076f9b3d7ed6e231c60060ad9ef78ac1590c63e902"
+ },
+ "completion": {
+ "attempted": 4,
+ "completed": 4,
+ "failed": 0,
+ "not_started": 0,
+ "scheduled": 4,
+ "unfinished": 0,
+ "valid": 4
+ },
+ "concurrency": 1,
+ "metrics": {
+ "client_ready_p50_seconds": 118.0,
+ "latency_median_seconds": 119.0,
+ "measurement": {
+ "boundary": "submit_to_downloaded_media",
+ "concurrency": 1,
+ "end_monotonic_seconds": 160.0,
+ "start_monotonic_seconds": 100.0,
+ "wall_seconds": 60.0,
+ "warmup_runs": 1
+ },
+ "serving": {
+ "client_ready_latency_seconds": {
+ "p50": 118.0
+ },
+ "concurrency": 1,
+ "mode": "closed_loop"
+ },
+ "valid_clips_per_second": 0.06666666666666667
+ },
+ "power": {
+ "path": "gpu/c1/power.json",
+ "phases": {
+ "measurement": {
+ "aggregate": {
+ "avg_power_w": 1201.0,
+ "energy_j": 72001.0,
+ "joules_per_valid_clip": 18000.25,
+ "observed_peak_power_w": 1201.0
+ },
+ "attempted": 4,
+ "completed": 4,
+ "duration_seconds": 60.0,
+ "invalid_reasons": [],
+ "per_gpu": {
+ "GPU-11111111-1111-1111-1111-111111111111": {
+ "avg_power_w": 600.0,
+ "energy_j": 36000.0,
+ "observed_peak_power_w": 600.0
+ },
+ "GPU-22222222-2222-2222-2222-222222222222": {
+ "avg_power_w": 600.0166666666667,
+ "energy_j": 36001.0,
+ "observed_peak_power_w": 601.0
+ }
+ },
+ "status": "valid",
+ "valid": true,
+ "valid_clips": 4,
+ "valid_window_count": 1,
+ "window_count": 1
+ }
+ },
+ "sha256": "763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677"
+ },
+ "receipt": {
+ "path": "gpu/c1/gpu-job.json",
+ "sha256": "29a424efce674a7ca0a786ce9a7c02949fbdaaa4cbb91c1bfbc5a67979b60bba"
+ },
+ "run": {
+ "path": "gpu/c1/baseline/run.json",
+ "sha256": "fee60ee8349f71bc43805a42ea61e1da79c727cbd9c4ada6fb930b9cdbbd939d"
+ },
+ "status": "complete",
+ "verified": true
+ },
+ {
+ "aggregate": {
+ "path": "gpu/c2/aggregate.json",
+ "sha256": "ff914c37e5170b78f28c832f07c08282b764b4ae85ce9e2570414b8ab661e9e0"
+ },
+ "completion": {
+ "attempted": 4,
+ "completed": 4,
+ "failed": 0,
+ "not_started": 0,
+ "scheduled": 4,
+ "unfinished": 0,
+ "valid": 4
+ },
+ "concurrency": 2,
+ "metrics": {
+ "client_ready_p50_seconds": 118.0,
+ "latency_median_seconds": 119.0,
+ "measurement": {
+ "boundary": "submit_to_downloaded_media",
+ "concurrency": 2,
+ "end_monotonic_seconds": 160.0,
+ "start_monotonic_seconds": 100.0,
+ "wall_seconds": 60.0,
+ "warmup_runs": 1
+ },
+ "serving": {
+ "client_ready_latency_seconds": {
+ "p50": 118.0
+ },
+ "concurrency": 2,
+ "mode": "closed_loop"
+ },
+ "valid_clips_per_second": 0.06666666666666667
+ },
+ "power": {
+ "path": "gpu/c2/power.json",
+ "phases": {
+ "measurement": {
+ "aggregate": {
+ "avg_power_w": 1201.0,
+ "energy_j": 72001.0,
+ "joules_per_valid_clip": 18000.25,
+ "observed_peak_power_w": 1201.0
+ },
+ "attempted": 4,
+ "completed": 4,
+ "duration_seconds": 60.0,
+ "invalid_reasons": [],
+ "per_gpu": {
+ "GPU-11111111-1111-1111-1111-111111111111": {
+ "avg_power_w": 600.0,
+ "energy_j": 36000.0,
+ "observed_peak_power_w": 600.0
+ },
+ "GPU-22222222-2222-2222-2222-222222222222": {
+ "avg_power_w": 600.0166666666667,
+ "energy_j": 36001.0,
+ "observed_peak_power_w": 601.0
+ }
+ },
+ "status": "valid",
+ "valid": true,
+ "valid_clips": 4,
+ "valid_window_count": 1,
+ "window_count": 1
+ }
+ },
+ "sha256": "763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677"
+ },
+ "receipt": {
+ "path": "gpu/c2/gpu-job.json",
+ "sha256": "68a4d7292268b7551ef98af8b378a4b7a41e90d6a2b55db38c5775acb4cc0782"
+ },
+ "run": {
+ "path": "gpu/c2/baseline/run.json",
+ "sha256": "0a52c7c925c0e1bb1641dd973c596f67496db42859a8d2fca60c203821f09816"
+ },
+ "status": "complete",
+ "verified": true
+ },
+ {
+ "aggregate": {
+ "path": "gpu/c4/aggregate.json",
+ "sha256": "ff9e6e9ea7a4c052d61d8ed044d174fa56dfcdfe11642118fdf2ef4a1168cc19"
+ },
+ "completion": {
+ "attempted": 4,
+ "completed": 4,
+ "failed": 0,
+ "not_started": 0,
+ "scheduled": 4,
+ "unfinished": 0,
+ "valid": 4
+ },
+ "concurrency": 4,
+ "metrics": {
+ "client_ready_p50_seconds": 118.0,
+ "latency_median_seconds": 119.0,
+ "measurement": {
+ "boundary": "submit_to_downloaded_media",
+ "concurrency": 4,
+ "end_monotonic_seconds": 160.0,
+ "start_monotonic_seconds": 100.0,
+ "wall_seconds": 60.0,
+ "warmup_runs": 1
+ },
+ "serving": {
+ "client_ready_latency_seconds": {
+ "p50": 118.0
+ },
+ "concurrency": 4,
+ "mode": "closed_loop"
+ },
+ "valid_clips_per_second": 0.06666666666666667
+ },
+ "power": {
+ "path": "gpu/c4/power.json",
+ "phases": {
+ "measurement": {
+ "aggregate": {
+ "avg_power_w": 1201.0,
+ "energy_j": 72001.0,
+ "joules_per_valid_clip": 18000.25,
+ "observed_peak_power_w": 1201.0
+ },
+ "attempted": 4,
+ "completed": 4,
+ "duration_seconds": 60.0,
+ "invalid_reasons": [],
+ "per_gpu": {
+ "GPU-11111111-1111-1111-1111-111111111111": {
+ "avg_power_w": 600.0,
+ "energy_j": 36000.0,
+ "observed_peak_power_w": 600.0
+ },
+ "GPU-22222222-2222-2222-2222-222222222222": {
+ "avg_power_w": 600.0166666666667,
+ "energy_j": 36001.0,
+ "observed_peak_power_w": 601.0
+ }
+ },
+ "status": "valid",
+ "valid": true,
+ "valid_clips": 4,
+ "valid_window_count": 1,
+ "window_count": 1
+ }
+ },
+ "sha256": "763232b739ae6aa6efad4b3e42c1b5fada11d45b95deb173802a8332a06ab677"
+ },
+ "receipt": {
+ "path": "gpu/c4/gpu-job.json",
+ "sha256": "3e1510a484293e91da9be9c5026afd8cfc9caaa1ba6f67ba713edc38771e85f9"
+ },
+ "run": {
+ "path": "gpu/c4/baseline/run.json",
+ "sha256": "4a0cffaffc3636c2fd7931bfffe51174604d459e8338a2873843262075adf10d"
+ },
+ "status": "complete",
+ "verified": true
+ }
+ ],
+ "ci_accepted": false,
+ "completion": {
+ "attempted": 12,
+ "completed": 12,
+ "failed": 0,
+ "not_started": 0,
+ "scheduled": 12,
+ "unfinished": 0,
+ "valid": 12
+ },
+ "evidence_kind": "srt_slurm_h3_service",
+ "failures": [],
+ "finished_at": "2026-10-17T03:38:07.267054Z",
+ "gpu_uuids": [
+ "GPU-11111111-1111-1111-1111-111111111111",
+ "GPU-22222222-2222-2222-2222-222222222222"
+ ],
+ "plan": {
+ "cases": [
+ {
+ "case_id": "drum-taps",
+ "prompt": "A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.",
+ "requires_motion": true,
+ "requires_sound": true,
+ "seed": 11
+ }
+ ],
+ "generation": {
+ "aspect_ratio": "16:9",
+ "audio_channels": 2,
+ "audio_flow_shift": 3.0,
+ "audio_sample_rate_hz": 32000,
+ "duration_seconds": 4,
+ "flow_shift": 12.0,
+ "fps": 24,
+ "frame_count": 107,
+ "height": 768,
+ "num_inference_steps": 50,
+ "width": 1344
+ },
+ "model_id": "MiniMaxAI/MiniMax-H3",
+ "model_revision": "42ed227ee7df40d41602854ae760620d6eb651fe",
+ "plan_id": "h3-serving-2gpu-c124-v1",
+ "repetitions": 4,
+ "warmup_runs": 1
+ },
+ "power_verified": true,
+ "release_qualified": false,
+ "requests_per_configuration": 4,
+ "runtime": {
+ "python": "/usr/bin/python3",
+ "revision": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "source": "/sgl-workspace/sglang",
+ "source_sha256": "e6069f8b948234075fdcfba23e459e2f56a45b11d0ba3ee5ecbb754e338deb13"
+ },
+ "scheduled": 12,
+ "schema_version": "1.0.0",
+ "server": {
+ "dit_cpu_offload": false,
+ "encoder_parallel": "auto",
+ "performance_mode": "speed",
+ "tp_size": 1,
+ "ulysses_degree": 2
+ },
+ "started_at": "2026-10-17T03:38:07.253472Z",
+ "status": "complete",
+ "warmup_per_configuration": 1
+}
diff --git a/packages/app/src/components/video-benchmark/hardware.ts b/packages/app/src/components/video-benchmark/hardware.ts
index 36a4b14b5..b2624b684 100644
--- a/packages/app/src/components/video-benchmark/hardware.ts
+++ b/packages/app/src/components/video-benchmark/hardware.ts
@@ -1,4 +1,5 @@
import { HW_REGISTRY } from '@semianalysisai/inferencex-constants';
+import { at, text, type Json } from './bundle';
/** `h` = Owning at Large Hyperscaler Volume, `r` = Rent - 3 Year Commit (HW_REGISTRY costh/costr). */
export type CostTier = 'h' | 'r';
@@ -19,6 +20,19 @@ export function hardwareKey(name: string): string | null {
export const hardwareLabel = (key: string): string => HW_REGISTRY[key]?.label ?? key;
+/**
+ * Hardware a native srt-slurm bundle names. Its producer records no GPU model
+ * and no device inventory, so the site record is honoured when present, else
+ * the SKU the CI runner's name carries (`h200-dgxc-…` → H200). Nothing
+ * recognisable reads as empty, never as a guess.
+ */
+export function nativeHardware(ci: Json): string {
+ const site = text(at(ci, 'site', 'gpu_model'));
+ if (site) return site;
+ const key = hardwareKey(text(at(ci, 'ci', 'runner_name')));
+ return key === null ? '' : hardwareLabel(key);
+}
+
export const hardwareSort = (key: string): number =>
HW_REGISTRY[key]?.sort ?? Number.MAX_SAFE_INTEGER;
diff --git a/packages/app/src/components/video-benchmark/history.ts b/packages/app/src/components/video-benchmark/history.ts
index b1f2bf9c2..2a7b29fb3 100644
--- a/packages/app/src/components/video-benchmark/history.ts
+++ b/packages/app/src/components/video-benchmark/history.ts
@@ -1,7 +1,8 @@
import { at, number, text } from './bundle';
import type { CIArtifact } from './archive';
+import { nativeHardware } from './hardware';
import { storedBundle, storedFidelityBundle, type StoredArtifact } from './stored';
-import { servingCells } from './serving';
+import { isNativeH3, servingCells } from './serving';
import { efficiencyValue, latencyValue, tradeoffPoints } from './tradeoff';
/** Shared bound for dashboard history reads in the browser and view API. */
@@ -54,6 +55,8 @@ export interface VideoHistorySource {
fidelity: string | null;
calibration: string | null;
releaseQualified: boolean | null;
+ /** Whether every cell's GPU power was measured and valid; null when the matrix records no verdict. */
+ powerVerified?: boolean | null;
error: string | null;
}
export interface VideoHistoryEntry {
@@ -88,6 +91,7 @@ export function videoHistoryEntry(
fidelity: null,
calibration: null,
releaseQualified: null,
+ powerVerified: null,
error: null,
};
try {
@@ -105,7 +109,9 @@ export function videoHistoryEntry(
result.sha256 = bundle.manifestSha256;
result.sourceSha = text(at(bundle.manifest, 'git_commit'));
result.observedAt = text(at(bundle.ci, 'started_at')) || null;
- result.hardware = text(at(bundle.ci, 'site', 'gpu_model'));
+ result.hardware = isNativeH3(bundle.manifest)
+ ? nativeHardware(bundle.ci)
+ : text(at(bundle.ci, 'site', 'gpu_model'));
result.execution = text(at(bundle.ci, 'phase'));
result.fidelity = text(at(bundle.result, 'paired_fidelity', 'overall_status')) || null;
result.calibration =
@@ -114,6 +120,8 @@ export function videoHistoryEntry(
null;
const qualified = at(bundle.ci, 'release_qualified');
result.releaseQualified = typeof qualified === 'boolean' ? qualified : null;
+ const verified = at(bundle.documents.get('serving-smoke.json') ?? null, 'power_verified');
+ result.powerVerified = typeof verified === 'boolean' ? verified : null;
const cells = servingCells(bundle);
result.observations = tradeoffPoints({
bundle,
@@ -124,7 +132,7 @@ export function videoHistoryEntry(
return {
id: point.id,
cell: point.cellId ?? null,
- hardware: point.hardware || text(at(bundle.ci, 'site', 'gpu_model')),
+ hardware: point.hardware || result.hardware,
concurrency: point.concurrency,
runtime: point.revision,
workload: point.workloadLabel,
@@ -135,7 +143,7 @@ export function videoHistoryEntry(
completed: point.completed,
scheduled: point.scheduled ?? number(at(cell?.cell, 'completion', 'scheduled')),
failed: point.failed ?? number(at(cell?.cell, 'completion', 'failed')),
- samples: point.latencies.length,
+ samples: point.samples,
p50: latencyValue(point, 'median'),
p90: latencyValue(point, 'p90'),
clipsGpuHour: efficiencyValue(point, 'clipsGpu'),
diff --git a/packages/app/src/components/video-benchmark/native-serving.test.ts b/packages/app/src/components/video-benchmark/native-serving.test.ts
new file mode 100644
index 000000000..516a21126
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/native-serving.test.ts
@@ -0,0 +1,236 @@
+import { readFile } from 'node:fs/promises';
+import { join } from 'node:path';
+import { describe, expect, it } from 'vitest';
+import { at, loadBundle, type Bundle, type Json } from './bundle';
+import { nativeHardware } from './hardware';
+import { videoHistoryEntry } from './history';
+import { servingFixture } from './serving.fixture';
+import { isNativeH3, servingCells } from './serving';
+import type { StoredArtifact } from './stored';
+import { efficiencyValue, latencyValue, tradeoffPoints } from './tradeoff';
+
+// Trimmed copy of the InferenceX #2916 native srt-slurm sample bundle: JSON only, the
+// placeholder clips and their SHA256SUMS lines dropped. Synthetic values, never evidence.
+const FIXTURE = join(import.meta.dirname, 'fixtures', 'native-serving-bundle');
+const RUN_ID = '123456789';
+
+const bundle = () => loadBundle(async (path) => new Blob([await readFile(join(FIXTURE, path))]));
+const points = (b: Bundle) => tradeoffPoints({ bundle: b, exportRun: RUN_ID, artifact: '9' });
+const stored = (b: Bundle): StoredArtifact => ({
+ storageVersion: 1,
+ runId: RUN_ID,
+ artifact: { id: 9, name: `h3-results-${RUN_ID}-1`, expired: false, size_in_bytes: 0 },
+ sources: [
+ { id: RUN_ID, documents: [...b.documents], checksums: [...b.checksums], assets: [], texts: [] },
+ ],
+});
+function set(value: Json, key: string, replacement: Json) {
+ if (value === null || typeof value !== 'object' || Array.isArray(value))
+ throw new Error('Expected object');
+ value[key] = replacement;
+}
+const cellOf = (b: Bundle, concurrency: number) =>
+ at(b.documents.get('serving-smoke.json') ?? null, 'cells', [1, 2, 4].indexOf(concurrency));
+
+/** Mirror the producer: invalid power empties the phase aggregate and un-verifies the cell. */
+function invalidatePower(b: Bundle, concurrency: number) {
+ const power = b.documents.get(`gpu/c${concurrency}/power.json`)!;
+ const phase = at(power, 'phases', 'measurement');
+ for (const document of [power, phase]) {
+ set(document, 'valid', false);
+ set(document, 'status', 'invalid');
+ set(document, 'invalid_reasons', ['expected_device_missing']);
+ }
+ set(phase, 'aggregate', null);
+ set(phase, 'per_gpu', null);
+ set(phase, 'valid_window_count', 0);
+ const cell = cellOf(b, concurrency);
+ set(at(cell, 'power'), 'phases', structuredClone(at(power, 'phases')));
+ set(cell, 'verified', false);
+ const job = b.documents.get(`gpu/c${concurrency}/gpu-job.json`)!;
+ set(at(job, 'power'), 'valid', false);
+ set(job, 'measurement_verified', false);
+ set(job, 'power_verified', false);
+ set(b.documents.get('serving-smoke.json')!, 'power_verified', false);
+}
+
+describe('native srt-slurm H3 bundle', () => {
+ it('accepts the native matrix, receipts and power documents as a first-class source', async () => {
+ const b = await bundle();
+ expect(isNativeH3(b.manifest)).toBe(true);
+ expect(b.report).toBeNull();
+ expect(b.result).toBeNull();
+ const cells = servingCells(b);
+ expect(cells.map(({ id, concurrency }) => [id, concurrency])).toEqual([
+ ['c1', 1],
+ ['c2', 2],
+ ['c4', 4],
+ ]);
+ for (const cell of cells) {
+ expect(at(cell.job, 'bundle_type')).toBe('srt_slurm_h3_service_receipt');
+ expect(at(cell.power, 'bundle_type')).toBe('h3_native_power');
+ expect(at(cell.power, 'valid')).toBe(true);
+ expect(at(cell.cell, 'verified')).toBe(true);
+ }
+ expect(isNativeH3(servingFixture().manifest)).toBe(false);
+ });
+
+ it('projects latency, throughput, GPU counts, power and energy per concurrency', async () => {
+ const b = await bundle();
+ const all = points(b);
+ expect(all.map((p) => [p.cellId, p.concurrency, p.role])).toEqual([
+ ['c1', 1, 'serving'],
+ ['c2', 2, 'serving'],
+ ['c4', 4, 'serving'],
+ ]);
+ for (const p of all) {
+ // The sample's srt-client records carry no per-request timing: the harness median stands in.
+ expect(p.latencies).toEqual([]);
+ expect(latencyValue(p, 'median')).toBe(119);
+ expect(latencyValue(p, 'p90')).toBeNull();
+ expect(p.samples).toBe(4);
+ expect(p.rate).toBeCloseTo(240);
+ expect(efficiencyValue(p, 'clipsGpu')).toBeCloseTo(120);
+ expect(p.participating).toBe(2);
+ expect(p.allocated).toBe(2);
+ expect(p.power).toBe(1201);
+ expect(p.energy).toBe(18000.25);
+ expect(p.powerWindow).toBe(60);
+ expect(p.powerLimit).toBeNull();
+ expect(p.revision).toBe('71de97b264b04dcd514cf904003028aefe9775c8');
+ expect(p.completeWorkload).toBe(true);
+ expect(p.hardware).toBe('');
+ expect([p.valid, p.completed, p.scheduled, p.failed]).toEqual([4, 4, 4, 0]);
+ }
+ expect(new Set(all.map((p) => p.group)).size).toBe(1);
+
+ const entry = videoHistoryEntry(stored(b), '2026-10-17T04:00:00Z');
+ expect(entry.sources).toHaveLength(1);
+ const source = entry.sources[0];
+ expect(source.error).toBeNull();
+ expect(source).toMatchObject({
+ execution: 'complete',
+ releaseQualified: false,
+ powerVerified: true,
+ observedAt: '2026-10-17T03:38:07.253472Z',
+ sourceSha: 'b'.repeat(40),
+ });
+ expect(source.observations[0]).toMatchObject({
+ cell: 'c1',
+ concurrency: 1,
+ status: 'complete',
+ valid: 4,
+ completed: 4,
+ scheduled: 4,
+ failed: 0,
+ samples: 4,
+ p50: 119,
+ p90: null,
+ clipsGpuHour: 120,
+ energyKj: 18.00025,
+ avgPowerW: 1201,
+ enforcedLimitW: null,
+ participating: 2,
+ allocated: 2,
+ replicas: null,
+ wallSeconds: 60,
+ durationSeconds: 4,
+ frameCount: 107,
+ server: { tp: 1, ulysses: 2, attention: null },
+ });
+ expect(source.observations[0].workloadKey).toEqual(expect.any(String));
+ });
+
+ it('names the hardware only from the site record or the CI runner', async () => {
+ expect(
+ nativeHardware({ site: { gpu_model: 'NVIDIA H200' }, ci: { runner_name: 'b200-x' } }),
+ ).toBe('NVIDIA H200');
+ expect(nativeHardware({ ci: { runner_name: 'h200-dgxc-gha-01' } })).toBe('H200');
+ expect(nativeHardware({ ci: { runner_name: 'gb200-nvl72-02' } })).toBe('GB200 NVL72');
+ expect(nativeHardware({ ci: { runner_name: 'runner-07' } })).toBe('');
+ expect(nativeHardware({ ci: { runner_name: null } })).toBe('');
+ expect(nativeHardware(null)).toBe('');
+ const b = await bundle();
+ set(at(b.ci, 'ci'), 'runner_name', 'h200-dgxc-gha-01');
+ const source = videoHistoryEntry(stored(b), null).sources[0];
+ expect(source.hardware).toBe('H200');
+ expect(source.observations.map((point) => point.hardware)).toEqual(['H200', 'H200', 'H200']);
+ });
+
+ it('renders invalid power as not measured and withholds the unverified cell', async () => {
+ const b = await bundle();
+ invalidatePower(b, 2);
+ const all = points(b);
+ expect(all).toHaveLength(3);
+ expect(all[1]).toMatchObject({ power: null, energy: null, powerWindow: null, samples: 0 });
+ expect(latencyValue(all[1], 'median')).toBeNull();
+ expect(all[1].rate).toBeNull();
+ expect(all[2]).toMatchObject({ power: 1201, energy: 18000.25 });
+ const source = videoHistoryEntry(stored(b), null).sources[0];
+ expect(source.error).toBeNull();
+ expect(source.powerVerified).toBe(false);
+ expect(source.observations[1]).toMatchObject({
+ status: 'complete',
+ valid: 4,
+ p50: null,
+ avgPowerW: null,
+ energyKj: null,
+ });
+ expect(source.observations[2].avgPowerW).toBe(1201);
+ });
+
+ it('renders a cell without a power document as not measured', async () => {
+ const b = await bundle();
+ const cell = cellOf(b, 1);
+ set(cell, 'power', null);
+ set(cell, 'verified', false);
+ set(b.documents.get('gpu/c1/gpu-job.json')!, 'measurement_verified', false);
+ b.documents.delete('gpu/c1/power.json');
+ b.checksums.delete('gpu/c1/power.json');
+ expect(servingCells(b)[0].power).toBeNull();
+ const observation = videoHistoryEntry(stored(b), null).sources[0].observations[0];
+ expect(observation).toMatchObject({ avgPowerW: null, energyKj: null, p50: null });
+ });
+
+ it('keeps the launcher contract and power seal strict', async () => {
+ const defects: [string, (b: Bundle) => void][] = [
+ [
+ 'legacy receipt',
+ (b) =>
+ set(b.documents.get('gpu/c1/gpu-job.json')!, 'bundle_type', 'controlled_serving_smoke'),
+ ],
+ [
+ 'receipt power seal',
+ (b) => set(at(b.documents.get('gpu/c1/gpu-job.json'), 'power'), 'sha256', '0'.repeat(64)),
+ ],
+ ['power verdict', (b) => set(b.documents.get('gpu/c1/power.json')!, 'valid', false)],
+ ['verified without power', (b) => set(cellOf(b, 1), 'power', null)],
+ [
+ 'matrix launcher',
+ (b) => set(b.documents.get('serving-smoke.json')!, 'evidence_kind', null),
+ ],
+ ['ci launcher', (b) => set(b.ci, 'evidence_kind', 'controlled_h3_gpu')],
+ ['summary median', (b) => set(at(cellOf(b, 1), 'metrics'), 'latency_median_seconds', 1)],
+ ['aggregate seal', (b) => set(at(cellOf(b, 1), 'aggregate'), 'sha256', '0'.repeat(64))],
+ [
+ 'client concurrency',
+ (b) => set(at(b.documents.get('gpu/c1/baseline/run.json'), 'serving'), 'concurrency', 2),
+ ],
+ ];
+ for (const [name, defect] of defects) {
+ const b = await bundle();
+ defect(b);
+ expect(() => servingCells(b), name).toThrow('Invalid H3 serving matrix:');
+ }
+ });
+
+ it('lets a dissenting InferenceX sidecar withhold energy or the whole power reading', async () => {
+ const b = await bundle();
+ set(b.documents.get('gpu/c4/benchmark_concurrency_4.json')!, 'energy_normalization', 'tokens');
+ set(b.documents.get('gpu/c2/aggregate.json')!, 'power_valid', 0);
+ const all = points(b);
+ expect(all[2]).toMatchObject({ power: 1201, energy: null });
+ expect(all[1]).toMatchObject({ power: null, energy: null });
+ expect(latencyValue(all[1], 'median')).toBe(119);
+ });
+});
diff --git a/packages/app/src/components/video-benchmark/serving.ts b/packages/app/src/components/video-benchmark/serving.ts
index b90b0b7c6..821f311b4 100644
--- a/packages/app/src/components/video-benchmark/serving.ts
+++ b/packages/app/src/components/video-benchmark/serving.ts
@@ -14,6 +14,27 @@ export interface ServingCell {
specPath: string;
}
+/** Evidence kind the native srt-slurm launcher stamps on its matrix, receipts and power documents. */
+export const NATIVE_EVIDENCE_KIND = 'srt_slurm_h3_service';
+
+/** Whether the bundle came from the native launcher rather than the controlled GPU supervisor. */
+export const isNativeH3 = (manifest: Json): boolean =>
+ at(manifest, 'evidence_kind') === NATIVE_EVIDENCE_KIND;
+
+/** Per-cell receipt contract. The supervisor cleaned the GPUs itself; srt-slurm tears the job down. */
+const RECEIPTS = {
+ legacy: {
+ bundleType: 'controlled_serving_smoke',
+ evidenceKind: 'controlled_h3_gpu',
+ cleanup: 'clean',
+ },
+ native: {
+ bundleType: 'srt_slurm_h3_service_receipt',
+ evidenceKind: NATIVE_EVIDENCE_KIND,
+ cleanup: 'srt_slurm_job_teardown',
+ },
+} as const;
+
function requireValue(condition: unknown, message: string): asserts condition {
if (!condition) throw new Error(`Invalid H3 serving matrix: ${message}`);
}
@@ -36,15 +57,25 @@ export function servingCells(
if (!documents.has('serving-smoke.json')) return [];
const matrix = documents.get('serving-smoke.json') ?? null;
const cells = at(matrix, 'cells');
+ const native = isNativeH3(manifest);
+ const receipt = native ? RECEIPTS.native : RECEIPTS.legacy;
requireValue(
at(matrix, 'schema_version') === '1.0.0' &&
at(matrix, 'bundle_type') === 'h3_serving_smoke_matrix' &&
['running', 'failed', 'complete'].includes(text(at(matrix, 'status'))) &&
Array.isArray(cells) &&
cells.length > 0 &&
- cells.length <= 3,
+ (native || cells.length <= 3),
'unsupported matrix contract',
);
+ // The launcher is declared once per document; a native receipt under a legacy
+ // manifest (or the reverse) is a spliced bundle, not a contract to accept.
+ requireValue(
+ (at(matrix, 'evidence_kind') === NATIVE_EVIDENCE_KIND) === native &&
+ (at(ci, 'evidence_kind') === NATIVE_EVIDENCE_KIND) === native &&
+ (!native || typeof at(matrix, 'power_verified') === 'boolean'),
+ 'launcher evidence kind is inconsistent',
+ );
requireValue(
at(manifest, 'mode') === 'serving-smoke' &&
at(ci, 'mode') === 'serving-smoke' &&
@@ -71,8 +102,13 @@ export function servingCells(
const seen = new Set();
return cells.map((cell): ServingCell => {
const concurrency = at(cell, 'concurrency');
+ // The supervisor matrix was fixed at C1/C2/C4; the native sweep takes any concurrency list.
requireValue(
- typeof concurrency === 'number' && [1, 2, 4].includes(concurrency) && !seen.has(concurrency),
+ typeof concurrency === 'number' &&
+ (native
+ ? Number.isSafeInteger(concurrency) && concurrency > 0
+ : [1, 2, 4].includes(concurrency)) &&
+ !seen.has(concurrency),
'invalid or duplicate concurrency',
);
seen.add(concurrency);
@@ -111,7 +147,8 @@ export function servingCells(
if (job) {
requireValue(
at(job, 'schema_version') === '0.1.0' &&
- at(job, 'bundle_type') === 'controlled_serving_smoke' &&
+ at(job, 'bundle_type') === receipt.bundleType &&
+ (!native || at(job, 'evidence_kind') === receipt.evidenceKind) &&
at(job, 'job_id') ===
`github-${text(at(manifest, 'run_id'))}-${text(at(manifest, 'run_attempt'))}-${id}` &&
spec &&
@@ -128,8 +165,9 @@ export function servingCells(
requireValue(
at(job, 'measurement_verified') === true &&
at(job, 'status') === 'complete' &&
- at(job, 'cleanup_status') === 'clean' &&
- at(job, 'evidence_kind') === 'controlled_h3_gpu',
+ at(job, 'cleanup_status') === receipt.cleanup &&
+ at(job, 'evidence_kind') === receipt.evidenceKind &&
+ (!native || at(job, 'power_verified') === true),
`${id} does not contain verified, complete GPU execution`,
);
}
@@ -139,15 +177,19 @@ export function servingCells(
at(job, 'roles', 'baseline', 'run_path') === 'baseline/run.json' &&
at(job, 'roles', 'baseline', 'run_sha256') === checksums.get(runPath) &&
at(run, 'bundle_type') === 'mvp_run' &&
- at(run, 'bundle_version') === '0.1.0' &&
- ['operator_endpoint', 'live_h3'].includes(text(at(run, 'evidence_kind'))) &&
canonical(at(run, 'plan')) === canonical(plan) &&
at(run, 'plan_sha256') === at(job, 'plan_sha256') &&
- at(run, 'configuration', 'runtime_revision') === at(matrix, 'runtime', 'revision') &&
- at(run, 'configuration', 'model_revision') === at(plan, 'model_revision') &&
at(run, 'measurement', 'boundary') === 'submit_to_downloaded_media' &&
at(run, 'measurement', 'concurrency') === concurrency &&
- at(run, 'configuration', 'serving', 'concurrency') === concurrency,
+ // The srt-client run record carries no bundle version, evidence kind or
+ // bound configuration; the receipt's spec seals the runtime instead.
+ (native
+ ? at(run, 'serving', 'concurrency') === concurrency
+ : at(run, 'bundle_version') === '0.1.0' &&
+ ['operator_endpoint', 'live_h3'].includes(text(at(run, 'evidence_kind'))) &&
+ at(run, 'configuration', 'runtime_revision') === at(matrix, 'runtime', 'revision') &&
+ at(run, 'configuration', 'model_revision') === at(plan, 'model_revision') &&
+ at(run, 'configuration', 'serving', 'concurrency') === concurrency),
`${id} request run does not match its execution`,
);
if (at(cell, 'verified') === true)
@@ -158,6 +200,9 @@ export function servingCells(
at(cell, 'metrics', 'client_ready_p50_seconds') &&
at(run, 'summary', 'valid_clips_per_second') ===
at(cell, 'metrics', 'valid_clips_per_second') &&
+ (!native ||
+ at(run, 'summary', 'latency_median_seconds') ===
+ at(cell, 'metrics', 'latency_median_seconds')) &&
['scheduled', 'completed', 'valid', 'failed'].every(
(key) => at(run, 'summary', key) === at(cell, 'completion', key),
),
@@ -177,9 +222,25 @@ export function servingCells(
if (power)
requireValue(
at(power, 'schema_version') === '1.0.0' &&
- canonical(at(power, 'phases')) === canonical(at(cell, 'power', 'phases')),
+ canonical(at(power, 'phases')) === canonical(at(cell, 'power', 'phases')) &&
+ // Native power is sealed into the receipt: same bytes, same verdict.
+ (!native ||
+ (at(power, 'bundle_type') === 'h3_native_power' &&
+ at(power, 'evidence_kind') === NATIVE_EVIDENCE_KIND &&
+ typeof at(power, 'valid') === 'boolean' &&
+ job !== null &&
+ at(job, 'power', 'path') === 'power.json' &&
+ at(job, 'power', 'sha256') === checksums.get(powerPath) &&
+ at(job, 'power', 'valid') === at(power, 'valid'))),
`${id} power summary does not match the recorded phases`,
);
+ if (native && at(cell, 'verified') === true)
+ requireValue(
+ power && at(power, 'valid') === true,
+ `${id} is verified without valid power telemetry`,
+ );
+ // InferenceX's per-cell aggregate rides along when the launcher produced one.
+ linked('aggregate', `${root}/aggregate.json`);
return { id, concurrency, cell, run, job, power, spec, runPath, jobPath, powerPath, specPath };
});
}
diff --git a/packages/app/src/components/video-benchmark/tradeoff.ts b/packages/app/src/components/video-benchmark/tradeoff.ts
index ffdaec7d3..e78aaf2e0 100644
--- a/packages/app/src/components/video-benchmark/tradeoff.ts
+++ b/packages/app/src/components/video-benchmark/tradeoff.ts
@@ -1,6 +1,7 @@
import { at, entries, number, ROLES, rows, text, type Bundle, type Json } from './bundle';
-import { servingCells } from './serving';
+import { isNativeH3, servingCells } from './serving';
import { allocatedGpus } from './allocation';
+import { nativeHardware } from './hardware';
import { powerLimitComparison } from './power-limit';
import { serverTimingSummary } from './server-timing';
@@ -108,6 +109,36 @@ function measurementInfo(
};
}
+/**
+ * The harness summary stands in for the per-request population only when the
+ * run recorded no client latency at all (srt-client records without timings).
+ * A partially recorded population still yields nothing, never a fast subset.
+ */
+function summaryMetrics(run: Json, complete: boolean) {
+ const records = rows(at(run, 'records')).filter((r) => at(r, 'phase') === 'measurement');
+ if (
+ !complete ||
+ records.length === 0 ||
+ records.some((r) => number(at(r, 'submit_to_media_seconds')) !== null)
+ )
+ return null;
+ const perSecond = positive(at(run, 'summary', 'valid_clips_per_second'));
+ return {
+ median: positive(at(run, 'summary', 'latency_median_seconds')),
+ rate: perSecond === null ? null : perSecond * 3600,
+ };
+}
+
+/** InferenceX's aggregate and window sidecars, when published, must not contradict the power document. */
+const agreesPowerValid = (document: Json) => {
+ const valid = at(document, 'power_valid');
+ return valid === null || valid === true || valid === 1;
+};
+const energyPerClip = (document: Json) => {
+ const normalization = at(document, 'energy_normalization');
+ return normalization === null || normalization === 'clips';
+};
+
function pairedTradeoffPoints(run: TradeoffRun) {
const b = run.bundle,
result = b.result;
@@ -119,6 +150,12 @@ function pairedTradeoffPoints(run: TradeoffRun) {
return ROLES.map((role) => {
const metrics = at(result, 'roles', role, 'metrics');
const phase = at(result, 'roles', role, 'power', 'phases', 'measurement');
+ const measurement = measurementInfo(
+ at(result, 'roles', role, 'records'),
+ at(metrics, 'completion'),
+ at(metrics, 'measurement'),
+ at(metrics, 'status') === 'valid',
+ );
const energy =
at(phase, 'valid') === true
? positive(at(phase, 'aggregate', 'joules_per_valid_clip'))
@@ -141,12 +178,9 @@ function pairedTradeoffPoints(run: TradeoffRun) {
boundary: at(metrics, 'measurement', 'boundary'),
mode: 'paired_serial',
}),
- ...measurementInfo(
- at(result, 'roles', role, 'records'),
- at(metrics, 'completion'),
- at(metrics, 'measurement'),
- at(metrics, 'status') === 'valid',
- ),
+ ...measurement,
+ medianSeconds: null,
+ samples: measurement.latencies.length,
sourceId: text(at(b.manifest, 'run_id')),
hardware: [...new Set(devices.map((d) => text(at(d, 'name'))).filter(Boolean))].join(', '),
revision: text(at(result, 'execution', 'runtime', role, 'revision')),
@@ -169,13 +203,16 @@ function pairedTradeoffPoints(run: TradeoffRun) {
function servingTradeoffPoints(run: TradeoffRun) {
const b = run.bundle;
if (!b.documents || !b.checksums) return [];
+ const documents = b.documents;
const cells = servingCells({
- documents: b.documents,
+ documents,
checksums: b.checksums,
manifest: b.manifest,
ci: b.ci ?? null,
});
+ const native = isNativeH3(b.manifest);
const allocated = allocatedGpus(b);
+ const recordedHardware = native ? nativeHardware(b.ci ?? null) : '';
return cells.map((item) => {
const measurement = at(item.run, 'measurement');
const server = at(item.spec, 'server');
@@ -191,9 +228,24 @@ function servingTradeoffPoints(run: TradeoffRun) {
measurement,
complete,
);
+ const summary = native ? summaryMetrics(item.run, complete) : null;
+ const latencies = complete ? metrics.latencies : [];
+ const median = summary?.median ?? null;
const phase = at(item.power, 'phases', 'measurement');
+ const aggregate = native ? (documents.get(`gpu/${item.id}/aggregate.json`) ?? null) : null;
+ const window = native
+ ? (documents.get(`gpu/${item.id}/benchmark_concurrency_${item.concurrency}.json`) ?? null)
+ : null;
+ // Native power carries its verdict in three places; any dissent reads as not measured.
const powerValid =
- complete && at(phase, 'valid') === true && number(at(phase, 'valid_clips')) === metrics.valid;
+ complete &&
+ at(phase, 'valid') === true &&
+ number(at(phase, 'valid_clips')) === metrics.valid &&
+ (!native ||
+ (at(item.power, 'valid') === true &&
+ at(item.job, 'power', 'valid') === true &&
+ agreesPowerValid(aggregate) &&
+ agreesPowerValid(window)));
const uuids = rows(at(item.spec, 'gpu_uuids')).map(text).filter(Boolean);
const devices = rows(at(item.job, 'roles', 'baseline', 'gpu_before', 'gpus')).filter((d) =>
uuids.includes(text(at(d, 'uuid'))),
@@ -221,21 +273,34 @@ function servingTradeoffPoints(run: TradeoffRun) {
run,
...info,
...metrics,
- latencies: complete ? metrics.latencies : [],
+ latencies,
+ medianSeconds: median,
+ rate: metrics.rate ?? summary?.rate ?? null,
+ // The summary median describes every valid clip, so that count is its sample size.
+ samples: latencies.length > 0 ? latencies.length : median === null ? 0 : (metrics.valid ?? 0),
completeWorkload:
info.completeWorkload &&
complete &&
mode === 'closed_loop' &&
boundary === 'submit_to_downloaded_media',
sourceId: text(at(b.manifest, 'run_id')),
- hardware: [...new Set(devices.map((d) => text(at(d, 'name'))).filter(Boolean))].join(', '),
- revision: text(at(item.run, 'configuration', 'runtime_revision')),
+ hardware:
+ [...new Set(devices.map((d) => text(at(d, 'name'))).filter(Boolean))].join(', ') ||
+ recordedHardware,
+ // The receipt's spec seals the served runtime; the client record names it only on the legacy path.
+ revision:
+ (native ? text(at(item.spec, 'baseline', 'revision')) : '') ||
+ text(at(item.run, 'configuration', 'runtime_revision')),
concurrency: item.concurrency,
boundary: text(boundary),
- allocated,
+ // srt-slurm plans telemetry for every GPU the job holds, so the expected count is the allocation.
+ allocated: allocated ?? (native ? positive(at(item.power, 'expected_gpu_count')) : null),
participating: uuids.length > 0 && new Set(uuids).size === uuids.length ? uuids.length : null,
replicas: positive(at(b.result, 'execution', 'deployment', 'replica_count')),
- energy: powerValid ? positive(at(phase, 'aggregate', 'joules_per_valid_clip')) : null,
+ energy:
+ powerValid && energyPerClip(aggregate) && energyPerClip(window)
+ ? positive(at(phase, 'aggregate', 'joules_per_valid_clip'))
+ : null,
power: powerValid ? number(at(phase, 'aggregate', 'avg_power_w')) : null,
powerWindow: powerValid ? number(at(phase, 'duration_seconds')) : null,
powerLimit: powerValid
@@ -296,7 +361,7 @@ export function latencyValue(point: TradeoffPoint, axis: LatencyAxis): number |
const a = point.latencies;
// Ten samples is a display floor, not statistical or release qualification.
if (axis === 'p90') return a.length >= 10 ? a[Math.ceil(a.length * 0.9) - 1] : null;
- if (a.length === 0) return null;
+ if (a.length === 0) return point.medianSeconds;
const middle = Math.floor(a.length / 2);
return a.length % 2 ? a[middle] : (a[middle - 1] + a[middle]) / 2;
}
diff --git a/packages/app/src/lib/api/api-route-catalog.ts b/packages/app/src/lib/api/api-route-catalog.ts
index 46e7a7d00..c1362b62d 100644
--- a/packages/app/src/lib/api/api-route-catalog.ts
+++ b/packages/app/src/lib/api/api-route-catalog.ts
@@ -1296,7 +1296,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/history.ts',
- sourceSha256: '4917bac6c0d272bda607697439322fd85e64683f4c63ad621e02101a8e923aae',
+ sourceSha256: 'a687e8dbe8eae18b40c472eb2e16aa57576dbffac366d806b2491189974a5593',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
From 0520af47e1c8bfc84f3f70f46e9b236af77bda2a Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Fri, 16 Oct 2026 22:40:28 -0700
Subject: [PATCH 096/104] feat: retain the native H200 run in the video fixture
and read hardware from the sealed cluster
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:视频 fixture 追加原生 srt-slurm H200 run 39002901777(fixture 未收录的导出按新条目追加,发布时间记为未知);原生产物包的硬件先取 site.gpu_model,再取 sealed aggregate 的 cluster,最后取 runner 名称;Compare 组件测试改为挂载仪表板 cells。
---
docs/videogenx-dashboard.md | 4 +-
.../cypress/component/video-compare.cy.tsx | 16 ++-
.../cypress/component/video-dashboard.cy.tsx | 9 +-
.../app/cypress/fixtures/api/_manifest.json | 8 +-
.../cypress/fixtures/api/video-history.json | 130 ++++++++++++++++++
.../scripts/build-video-history-fixture.ts | 13 +-
.../app/scripts/export-stored-artifact.ts | 28 ++++
.../video-benchmark/compare.test.ts | 6 +-
.../components/video-benchmark/hardware.ts | 11 +-
.../src/components/video-benchmark/history.ts | 11 +-
.../video-benchmark/native-serving.test.ts | 8 ++
.../components/video-benchmark/tradeoff.ts | 4 +-
packages/app/src/lib/api/api-route-catalog.ts | 2 +-
13 files changed, 223 insertions(+), 27 deletions(-)
create mode 100644 packages/app/scripts/export-stored-artifact.ts
diff --git a/docs/videogenx-dashboard.md b/docs/videogenx-dashboard.md
index 6aa93f838..f0f49a37d 100644
--- a/docs/videogenx-dashboard.md
+++ b/docs/videogenx-dashboard.md
@@ -40,7 +40,7 @@ The retained dashboard fixture has exactly one measured deployment per measured
- **One workload, real samples**: the additive `workloadKey` preserves the full canonical workload identity from the source, including prompts and seeds; the shortened workload label is display text only. Missing identity stays null and is isolated by original source manifest. Runtime revision remains a disclosed comparison variable. `dashboardCells` keeps only the workload measured on the most hardware and drops cells with fewer than ten valid clips (the P90 floor), so a smoke run of a shorter plan never becomes a point, a KPI lead or a Compare side; the Performance history list still shows it, and the Workload fact counts the hidden workloads.
- **Strings**: component-local `STRINGS = { en, zh }` via `useLocale()`; SKUs, units and identifiers stay English.
- **Native srt-slurm bundles**: the `h3-results--` artifacts of InferenceX #2916 (`evidence_kind: srt_slurm_h3_service`) feed the same projection; see [Video performance history](./video-history.md) for the contract. They record no GPU model, so a point joins the per-SKU chart, cards and Compare only when `ci.site.gpu_model` or the CI runner's name identifies the hardware; otherwise it stays in the Performance history list with an empty hardware. Invalid or missing power renders as not measured.
-- **Fixture**: `cypress/fixtures/api/video-history.json` is rebuilt from retained `StoredArtifact` exports with `bun run fixtures:video-history ` (`scripts/build-video-history-fixture.ts`); it is metadata only and registered in `_manifest.json`.
+- **Fixture**: `cypress/fixtures/api/video-history.json` is rebuilt from retained `StoredArtifact` exports with `bun run fixtures:video-history ` (`scripts/build-video-history-fixture.ts`); it is metadata only and registered in `_manifest.json`. Exports for runs the fixture does not list yet are appended as new entries with an unknown publication time. A downloaded `h3-results--` bundle becomes such an export with `bun scripts/export-stored-artifact.ts `; the retained native H200 run 39002901777 entered the fixture this way.
## 中文说明
@@ -53,3 +53,5 @@ The retained dashboard fixture has exactly one measured deployment per measured
InferenceX #2916 的原生 srt-slurm 产物包(`h3-results--`,`evidence_kind: srt_slurm_h3_service`)走同一条投影路径,契约见[视频性能历史](./video-history.md)。它们不记录 GPU 型号:只有在 `ci.site.gpu_model` 或 CI runner 名称能识别出硬件时,对应点才会进入按 SKU 划分的图表、KPI 卡和 Compare;否则只保留在性能历史列表中,硬件留空。功率无效或缺失时显示为未测得。
完整工作负载身份由附加字段 `workloadKey` 保存,包含 prompts 与 seeds;缩写标签只用于显示。身份缺失时保持 null,按原始 source manifest 隔离,不跨来源合并。runtime revision 作为比较变量单独披露。仪表板最多读取五页历史;公开 `/api/v1/views/video` 默认复用相同选择与计算逻辑,旧 API 视图仍可显式指定。
+
+`cypress/fixtures/api/video-history.json` 由保留的 `StoredArtifact` 导出通过 `bun run fixtures:video-history ` 重建,只含元数据,并登记在 `_manifest.json` 中。fixture 尚未收录的 run 会作为新条目追加在末尾,发布时间记为未知。下载的 `h3-results--` 产物包可用 `bun scripts/export-stored-artifact.ts ` 转成这种导出;保留的原生 H200 run 39002901777 就是这样进入 fixture 的。
diff --git a/packages/app/cypress/component/video-compare.cy.tsx b/packages/app/cypress/component/video-compare.cy.tsx
index 442ab96db..4f4987879 100644
--- a/packages/app/cypress/component/video-compare.cy.tsx
+++ b/packages/app/cypress/component/video-compare.cy.tsx
@@ -1,14 +1,16 @@
import { PathnameContext } from 'next/dist/shared/lib/hooks-client-context.shared-runtime';
import type { VideoHistoryPage } from '@/components/video-benchmark/history';
import type { MetricOptions, VideoPoint } from '@/components/video-benchmark/metrics';
-import { videoPoints } from '@/components/video-benchmark/points';
+import { dashboardCells, videoPoints } from '@/components/video-benchmark/points';
import VideoCompare from '@/components/video-benchmark/VideoCompare';
import history from '../fixtures/api/video-history.json';
import { servingArtifact } from '../support/video-artifacts';
// Retained H100/H200/B200 C1/C2/C4 observations; clips come from synthetic stored artifacts.
const points = videoPoints([history as unknown as VideoHistoryPage]);
-const c1 = (key: string) => points.find((p) => p.hardwareKey === key && p.concurrency === 1)!;
+// The dashboard hands Compare its cells, so the retained native H200 run under the sample floor never becomes a side.
+const cells = dashboardCells(points).cells;
+const c1 = (key: string) => cells.find((p) => p.hardwareKey === key && p.concurrency === 1)!;
const COLORS: Record = {
h100: 'rgb(10, 20, 30)',
h200: 'rgb(40, 50, 60)',
@@ -31,7 +33,7 @@ function media(point: VideoPoint, hardware: string, alias: string) {
function mount(
pathname = '/video',
search = '',
- data: VideoPoint[] = points,
+ data: VideoPoint[] = cells,
options: MetricOptions = OWNING,
beforeMount?: () => void,
) {
@@ -175,7 +177,7 @@ describe('Video compare panel (retained fixture)', () => {
cy.get('@h200.all').should('have.length', 1);
});
it('restores v_base and v_cand from the URL and reports a failed media read with a retry', () => {
- mount('/video', '?v_base=h200&v_cand=h100', points, OWNING, () => {
+ mount('/video', '?v_base=h200&v_cand=h100', cells, OWNING, () => {
cy.intercept('GET', mediaUrl(c1('h200')), { statusCode: 404, body: { error: 'gone' } }).as(
'missing',
);
@@ -189,7 +191,7 @@ describe('Video compare panel (retained fixture)', () => {
cy.contains('button', 'Retry').should('exist');
});
it('says when a run publishes no clips and keeps the metric deltas', () => {
- mount('/video', '', points, OWNING, () => {
+ mount('/video', '', cells, OWNING, () => {
cy.intercept('GET', mediaUrl(c1('b200')), { statusCode: 204 }).as('unpublished');
});
cy.wait(['@h100', '@unpublished']);
@@ -204,7 +206,7 @@ describe('Video compare panel (retained fixture)', () => {
mount(
'/video',
'',
- points.filter((p) => p.hardwareKey === 'h200'),
+ cells.filter((p) => p.hardwareKey === 'h200'),
);
cy.get('[data-testid="video-compare-controls"]').should('have.attr', 'disabled');
cy.get('[data-testid="video-compare"]').should(
@@ -214,7 +216,7 @@ describe('Video compare panel (retained fixture)', () => {
cy.get('[data-testid="video-compare-table"]').should('not.exist');
});
it('renders Chinese copy on /zh/video', () => {
- mount('/zh/video', '', points, { tier: 'r' });
+ mount('/zh/video', '', cells, { tier: 'r' });
cy.wait(['@h100', '@b200']);
cy.get('[data-testid="video-compare"]')
.should('contain', '基线')
diff --git a/packages/app/cypress/component/video-dashboard.cy.tsx b/packages/app/cypress/component/video-dashboard.cy.tsx
index c63964c8f..9efab7151 100644
--- a/packages/app/cypress/component/video-dashboard.cy.tsx
+++ b/packages/app/cypress/component/video-dashboard.cy.tsx
@@ -86,7 +86,8 @@ describe('Video hardware dashboard (retained fixture)', () => {
cy.get('[data-testid="video-config-fact"]').should(($facts) => {
expect([...$facts].map((el) => el.textContent)).to.deep.equal([
'ModelMiniMaxAI/MiniMax-H3 @ 42ed227ee7df',
- 'Workload1344 × 768 · 8 s · 24 fps · 50 steps',
+ // The native H200 run (#39002901777) measures a 4 s plan with four clips per cell, so it stays a hidden workload.
+ 'Workload1344 × 768 · 8 s · 24 fps · 50 steps (1 other workloads hidden)',
'Deployment4 GPU · TP2 × Ulysses 2',
]);
});
@@ -322,11 +323,13 @@ describe('Video hardware dashboard (retained fixture)', () => {
,
);
cy.wait('@verdicts');
- cy.get('[data-testid="video-history-entry"]').should('have.length', 6);
+ cy.get('[data-testid="video-history-entry"]').should('have.length', 7);
cy.get('[data-testid="video-history-power"]').should(($verdicts) => {
expect([...$verdicts].map((el) => el.textContent?.trim())).to.deep.equal([
'· GPU power: Measured',
'· GPU power: Not measured',
+ // The retained native H200 run records its own verdict.
+ '· GPU power: Measured',
]);
});
});
@@ -351,7 +354,7 @@ describe('Video hardware dashboard (retained fixture)', () => {
cy.get('[data-testid="video-config-fact"]').should(($facts) => {
expect([...$facts].map((el) => el.textContent)).to.deep.equal([
'模型MiniMaxAI/MiniMax-H3 @ 42ed227ee7df',
- '工作负载1344 × 768 · 8 s · 24 fps · 50 steps',
+ '工作负载1344 × 768 · 8 s · 24 fps · 50 steps(另有 1 个工作负载未显示)',
'部署4 张 GPU · TP2 × Ulysses 2',
]);
});
diff --git a/packages/app/cypress/fixtures/api/_manifest.json b/packages/app/cypress/fixtures/api/_manifest.json
index b7c1705bb..7f573b42d 100644
--- a/packages/app/cypress/fixtures/api/_manifest.json
+++ b/packages/app/cypress/fixtures/api/_manifest.json
@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
- "generatedAt": "2026-10-16T02:59:38.939Z",
+ "generatedAt": "2026-10-17T05:15:55.279Z",
"fixtures": {
"agentic-catalog": {
"bytes": 10027,
@@ -101,9 +101,9 @@
"topLevel": "object"
},
"video-history": {
- "bytes": 100442,
- "capturedAt": "2026-09-26T08:01:00.397Z",
- "sha256": "59dd1be0246da1f4702385399995ee9b2ea61fe40130e40fc751200a82a8a50a",
+ "bytes": 108039,
+ "capturedAt": "2026-10-17T05:15:55.279Z",
+ "sha256": "f27fbbcd2c6a8154b030939714501b8480b59fd3b0d5701007cd2e29e2a1559e",
"source": "Retained public H3 metadata replay from original runs via videoHistoryEntry (canonical workload identity, per-cell GPU counts, board power and server layout); publication time unavailable. No new benchmark or publication.",
"topLevel": "object"
}
diff --git a/packages/app/cypress/fixtures/api/video-history.json b/packages/app/cypress/fixtures/api/video-history.json
index 84dfaa020..dc973402f 100644
--- a/packages/app/cypress/fixtures/api/video-history.json
+++ b/packages/app/cypress/fixtures/api/video-history.json
@@ -481,6 +481,136 @@
}
],
"error": null
+ },
+ {
+ "id": "39002901777.12090362113",
+ "runId": "39002901777",
+ "artifact": {
+ "id": 12090362113,
+ "name": "h3-results-39002901777-1",
+ "expired": false,
+ "size_in_bytes": 9285861,
+ "stored": true
+ },
+ "publishedAt": null,
+ "sources": [
+ {
+ "id": "39002901777",
+ "sha256": "a17baa4e13b3f1de1f70796e892d411a6efd2bcb5314b55d3e2c01d868a4c6d1",
+ "sourceSha": "f7c7f581088468e0c4074836603d2f90fcd5986b",
+ "hardware": "H200",
+ "execution": "complete",
+ "observedAt": "2026-10-17T05:07:27.401208Z",
+ "kind": "observation",
+ "observations": [
+ {
+ "id": "a17baa4e13b3f1de1f70796e892d411a6efd2bcb5314b55d3e2c01d868a4c6d1:c1",
+ "cell": "c1",
+ "hardware": "H200",
+ "concurrency": 1,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 4 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11 · A single continuous medium shot of a drummer tapping a snare drum three times in",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"drum-taps\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":4,\"flow_shift\":12,\"fps\":24,\"frame_count\":107,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 4,
+ "completed": 4,
+ "scheduled": 4,
+ "failed": 0,
+ "samples": 4,
+ "p50": 117.06558148947079,
+ "p90": null,
+ "clipsGpuHour": 15.375335780450111,
+ "energyKj": 160.697757273,
+ "participating": 2,
+ "allocated": 2,
+ "replicas": null,
+ "wallSeconds": 468.2824559288565,
+ "durationSeconds": 4,
+ "frameCount": 107,
+ "avgPowerW": 1372.656654,
+ "enforcedLimitW": null,
+ "server": {
+ "tp": 1,
+ "ulysses": 2,
+ "attention": null
+ }
+ },
+ {
+ "id": "a17baa4e13b3f1de1f70796e892d411a6efd2bcb5314b55d3e2c01d868a4c6d1:c2",
+ "cell": "c2",
+ "hardware": "H200",
+ "concurrency": 2,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 4 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11 · A single continuous medium shot of a drummer tapping a snare drum three times in",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"drum-taps\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":4,\"flow_shift\":12,\"fps\":24,\"frame_count\":107,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 4,
+ "completed": 4,
+ "scheduled": 4,
+ "failed": 0,
+ "samples": 4,
+ "p50": 233.34144142945297,
+ "p90": null,
+ "clipsGpuHour": 15.409529105389542,
+ "energyKj": 160.78275492999998,
+ "participating": 2,
+ "allocated": 2,
+ "replicas": null,
+ "wallSeconds": 467.2433499270119,
+ "durationSeconds": 4,
+ "frameCount": 107,
+ "avgPowerW": 1376.436968,
+ "enforcedLimitW": null,
+ "server": {
+ "tp": 1,
+ "ulysses": 2,
+ "attention": null
+ }
+ },
+ {
+ "id": "a17baa4e13b3f1de1f70796e892d411a6efd2bcb5314b55d3e2c01d868a4c6d1:c4",
+ "cell": "c4",
+ "hardware": "H200",
+ "concurrency": 4,
+ "runtime": "71de97b264b04dcd514cf904003028aefe9775c8",
+ "workload": "1344 × 768 · 4 s · 24 fps · 50 steps · MiniMaxAI/MiniMax-H3 @ 42ed227ee7df · seed 11 · A single continuous medium shot of a drummer tapping a snare drum three times in",
+ "workloadKey": "{\"plan\":{\"cases\":[{\"case_id\":\"drum-taps\",\"prompt\":\"A single continuous medium shot of a drummer tapping a snare drum three times in a quiet rehearsal room. The drumsticks visibly contact the drumhead on each tap. The three crisp snare hits and the natural room ambience are audible. The camera remains still. No music, speech, subtitles, or scene cuts.\",\"requires_motion\":true,\"requires_sound\":true,\"seed\":11}],\"generation\":{\"aspect_ratio\":\"16:9\",\"audio_channels\":2,\"audio_flow_shift\":3,\"audio_sample_rate_hz\":32000,\"duration_seconds\":4,\"flow_shift\":12,\"fps\":24,\"frame_count\":107,\"height\":768,\"num_inference_steps\":50,\"width\":1344},\"model_id\":\"MiniMaxAI/MiniMax-H3\",\"model_revision\":\"42ed227ee7df40d41602854ae760620d6eb651fe\"},\"semantics\":{\"boundary\":\"submit_to_downloaded_media\",\"mode\":\"closed_loop\",\"server\":{\"performance_mode\":\"speed\"}}}",
+ "model": "MiniMaxAI/MiniMax-H3",
+ "status": "complete",
+ "valid": 4,
+ "completed": 4,
+ "scheduled": 4,
+ "failed": 0,
+ "samples": 4,
+ "p50": 292.02532795863226,
+ "p90": null,
+ "clipsGpuHour": 15.409334407778596,
+ "energyKj": 160.502909006,
+ "participating": 2,
+ "allocated": 2,
+ "replicas": null,
+ "wallSeconds": 467.24925356707536,
+ "durationSeconds": 4,
+ "frameCount": 107,
+ "avgPowerW": 1374.023888,
+ "enforcedLimitW": null,
+ "server": {
+ "tp": 1,
+ "ulysses": 2,
+ "attention": null
+ }
+ }
+ ],
+ "fidelity": null,
+ "calibration": null,
+ "releaseQualified": false,
+ "powerVerified": true,
+ "error": null
+ }
+ ],
+ "error": null
}
],
"nextPage": null
diff --git a/packages/app/scripts/build-video-history-fixture.ts b/packages/app/scripts/build-video-history-fixture.ts
index 3f5402da8..e094cf935 100644
--- a/packages/app/scripts/build-video-history-fixture.ts
+++ b/packages/app/scripts/build-video-history-fixture.ts
@@ -6,6 +6,8 @@
*
* Usage:
* bun scripts/build-video-history-fixture.ts .json>
+ *
+ * Exports for runs the fixture does not list yet are added as new entries.
*/
import { readdir, readFile, writeFile } from 'node:fs/promises';
@@ -42,6 +44,7 @@ for (const file of files.filter((name) => /^\d+\.json$/u.test(name))) {
}
let rebuilt = 0;
+const known = new Set(current.entries.map((entry) => entry.id));
const entries: VideoHistoryEntry[] = current.entries.map((entry) => {
const saved = exports.get(entry.id);
if (!saved) return entry;
@@ -50,6 +53,12 @@ const entries: VideoHistoryEntry[] = current.entries.map((entry) => {
// The existing fixture already carries the artifact identity (size, digest); keep it.
return { ...next, artifact: { ...next.artifact, ...entry.artifact } };
});
+// An export the fixture has not seen becomes a new entry after the existing ones: an export
+// is not a publication, so its publication time stays unknown and it sorts after dated entries.
+const added = [...exports.values()].filter(
+ (saved) => !known.has(`${saved.runId}.${saved.artifact.id}`),
+);
+entries.push(...added.map((saved) => videoHistoryEntry(saved, null)));
const page: VideoHistoryPage = { schemaVersion: 1, entries, nextPage: current.nextPage };
assertFixtureContent(FIXTURE_NAME, page);
const body = `${JSON.stringify(page, null, 2)}\n`;
@@ -68,4 +77,6 @@ manifest.fixtures[FIXTURE_NAME] = {
};
manifest.generatedAt = capturedAt;
await writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
-console.log(`Wrote ${entries.length} entries; ${rebuilt} rebuilt from ${exports.size} exports`);
+console.log(
+ `Wrote ${entries.length} entries; ${rebuilt} rebuilt and ${added.length} added from ${exports.size} exports`,
+);
diff --git a/packages/app/scripts/export-stored-artifact.ts b/packages/app/scripts/export-stored-artifact.ts
new file mode 100644
index 000000000..05419516c
--- /dev/null
+++ b/packages/app/scripts/export-stored-artifact.ts
@@ -0,0 +1,28 @@
+// Export a downloaded h3-results bundle directory as a storageVersion 1 StoredArtifact JSON,
+// the frontend's retained form of a CI artifact. Usage:
+// bun export-stored-artifact.ts
+import { readFile, writeFile } from 'node:fs/promises';
+import { join } from 'node:path';
+import { loadBundle } from '@/components/video-benchmark/bundle';
+import type { StoredArtifact } from '@/components/video-benchmark/stored';
+
+const [dir, runId, artifactId, name, size, out] = process.argv.slice(2);
+if (!dir || !runId || !artifactId || !name || !size || !out)
+ throw new Error('six arguments required');
+const bundle = await loadBundle(async (path) => new Blob([await readFile(join(dir, path))]));
+const stored: StoredArtifact = {
+ storageVersion: 1,
+ runId,
+ artifact: { id: Number(artifactId), name, expired: false, size_in_bytes: Number(size) },
+ sources: [
+ {
+ id: runId,
+ documents: [...bundle.documents],
+ checksums: [...bundle.checksums],
+ assets: [],
+ texts: [],
+ },
+ ],
+};
+await writeFile(out, `${JSON.stringify(stored)}\n`);
+console.log(`wrote ${out}: ${bundle.documents.size} documents, ${bundle.checksums.size} checksums`);
diff --git a/packages/app/src/components/video-benchmark/compare.test.ts b/packages/app/src/components/video-benchmark/compare.test.ts
index 8c9ac4a0d..247616404 100644
--- a/packages/app/src/components/video-benchmark/compare.test.ts
+++ b/packages/app/src/components/video-benchmark/compare.test.ts
@@ -11,14 +11,16 @@ import {
type CaseRecord,
} from './compare';
import type { VideoHistoryPage } from './history';
-import { videoPoints } from './points';
+import { dashboardCells, videoPoints } from './points';
import { servingCells } from './serving';
import { servingFixture } from './serving.fixture';
import type { StoredArtifact, StoredSource } from './stored';
// Retained H100/H200/B200 C1/C2/C4 observations of the 2026-09-09 campaign.
const points = videoPoints([history as unknown as VideoHistoryPage]);
-const c1 = (key: string) => comparablePoints(points).find((p) => p.hardwareKey === key)!;
+// Compare reads the dashboard's cells, so a retained smoke run under the sample floor never becomes a side.
+const c1 = (key: string) =>
+ comparablePoints(dashboardCells(points).cells).find((p) => p.hardwareKey === key)!;
const opts = { tier: 'h' } as const;
const row = (rows: ReturnType, id: string) =>
rows.find((item) => item.id === id)!;
diff --git a/packages/app/src/components/video-benchmark/hardware.ts b/packages/app/src/components/video-benchmark/hardware.ts
index b2624b684..81b03e265 100644
--- a/packages/app/src/components/video-benchmark/hardware.ts
+++ b/packages/app/src/components/video-benchmark/hardware.ts
@@ -22,14 +22,15 @@ export const hardwareLabel = (key: string): string => HW_REGISTRY[key]?.label ??
/**
* Hardware a native srt-slurm bundle names. Its producer records no GPU model
- * and no device inventory, so the site record is honoured when present, else
- * the SKU the CI runner's name carries (`h200-dgxc-…` → H200). Nothing
- * recognisable reads as empty, never as a guess.
+ * and no device inventory, so the site record is honoured when present, then
+ * the cluster the sealed per-cell aggregate identifies (`h200-dgxc` → H200),
+ * then the SKU the CI runner's name carries. Nothing recognisable reads as
+ * empty, never as a guess.
*/
-export function nativeHardware(ci: Json): string {
+export function nativeHardware(ci: Json, cluster = ''): string {
const site = text(at(ci, 'site', 'gpu_model'));
if (site) return site;
- const key = hardwareKey(text(at(ci, 'ci', 'runner_name')));
+ const key = hardwareKey(cluster) ?? hardwareKey(text(at(ci, 'ci', 'runner_name')));
return key === null ? '' : hardwareLabel(key);
}
diff --git a/packages/app/src/components/video-benchmark/history.ts b/packages/app/src/components/video-benchmark/history.ts
index 2a7b29fb3..cb818090a 100644
--- a/packages/app/src/components/video-benchmark/history.ts
+++ b/packages/app/src/components/video-benchmark/history.ts
@@ -1,4 +1,4 @@
-import { at, number, text } from './bundle';
+import { at, type Json, number, text } from './bundle';
import type { CIArtifact } from './archive';
import { nativeHardware } from './hardware';
import { storedBundle, storedFidelityBundle, type StoredArtifact } from './stored';
@@ -74,6 +74,13 @@ export interface VideoHistoryPage {
}
/** A read-only projection of published H3 artifacts, not a new benchmark result contract. */
+/** Cluster the first sealed per-cell aggregate of a native bundle names; '' when none is sealed. */
+function sealedCluster(documents: ReadonlyMap): string {
+ for (const [path, document] of documents)
+ if (/^gpu\/c\d+\/aggregate\.json$/u.test(path)) return text(at(document, 'cluster'));
+ return '';
+}
+
export function videoHistoryEntry(
saved: StoredArtifact,
publishedAt: string | null,
@@ -110,7 +117,7 @@ export function videoHistoryEntry(
result.sourceSha = text(at(bundle.manifest, 'git_commit'));
result.observedAt = text(at(bundle.ci, 'started_at')) || null;
result.hardware = isNativeH3(bundle.manifest)
- ? nativeHardware(bundle.ci)
+ ? nativeHardware(bundle.ci, sealedCluster(bundle.documents))
: text(at(bundle.ci, 'site', 'gpu_model'));
result.execution = text(at(bundle.ci, 'phase'));
result.fidelity = text(at(bundle.result, 'paired_fidelity', 'overall_status')) || null;
diff --git a/packages/app/src/components/video-benchmark/native-serving.test.ts b/packages/app/src/components/video-benchmark/native-serving.test.ts
index 516a21126..7e99c6477 100644
--- a/packages/app/src/components/video-benchmark/native-serving.test.ts
+++ b/packages/app/src/components/video-benchmark/native-serving.test.ts
@@ -146,6 +146,9 @@ describe('native srt-slurm H3 bundle', () => {
nativeHardware({ site: { gpu_model: 'NVIDIA H200' }, ci: { runner_name: 'b200-x' } }),
).toBe('NVIDIA H200');
expect(nativeHardware({ ci: { runner_name: 'h200-dgxc-gha-01' } })).toBe('H200');
+ // The sealed aggregate's cluster outranks the runner's name.
+ expect(nativeHardware({ ci: { runner_name: 'runner-07' } }, 'b200-nscale')).toBe('B200');
+ expect(nativeHardware({ ci: { runner_name: 'h200-dgxc-gha-01' } }, 'b200-nscale')).toBe('B200');
expect(nativeHardware({ ci: { runner_name: 'gb200-nvl72-02' } })).toBe('GB200 NVL72');
expect(nativeHardware({ ci: { runner_name: 'runner-07' } })).toBe('');
expect(nativeHardware({ ci: { runner_name: null } })).toBe('');
@@ -155,6 +158,11 @@ describe('native srt-slurm H3 bundle', () => {
const source = videoHistoryEntry(stored(b), null).sources[0];
expect(source.hardware).toBe('H200');
expect(source.observations.map((point) => point.hardware)).toEqual(['H200', 'H200', 'H200']);
+ for (const concurrency of [1, 2, 4])
+ set(b.documents.get(`gpu/c${concurrency}/aggregate.json`)!, 'cluster', 'b200-nscale');
+ const sealed = videoHistoryEntry(stored(b), null).sources[0];
+ expect(sealed.hardware).toBe('B200');
+ expect(sealed.observations.map((point) => point.hardware)).toEqual(['B200', 'B200', 'B200']);
});
it('renders invalid power as not measured and withholds the unverified cell', async () => {
diff --git a/packages/app/src/components/video-benchmark/tradeoff.ts b/packages/app/src/components/video-benchmark/tradeoff.ts
index e78aaf2e0..b4366bc0b 100644
--- a/packages/app/src/components/video-benchmark/tradeoff.ts
+++ b/packages/app/src/components/video-benchmark/tradeoff.ts
@@ -212,7 +212,6 @@ function servingTradeoffPoints(run: TradeoffRun) {
});
const native = isNativeH3(b.manifest);
const allocated = allocatedGpus(b);
- const recordedHardware = native ? nativeHardware(b.ci ?? null) : '';
return cells.map((item) => {
const measurement = at(item.run, 'measurement');
const server = at(item.spec, 'server');
@@ -233,6 +232,9 @@ function servingTradeoffPoints(run: TradeoffRun) {
const median = summary?.median ?? null;
const phase = at(item.power, 'phases', 'measurement');
const aggregate = native ? (documents.get(`gpu/${item.id}/aggregate.json`) ?? null) : null;
+ const recordedHardware = native
+ ? nativeHardware(b.ci ?? null, text(at(aggregate, 'cluster')))
+ : '';
const window = native
? (documents.get(`gpu/${item.id}/benchmark_concurrency_${item.concurrency}.json`) ?? null)
: null;
diff --git a/packages/app/src/lib/api/api-route-catalog.ts b/packages/app/src/lib/api/api-route-catalog.ts
index c1362b62d..f793ad8b4 100644
--- a/packages/app/src/lib/api/api-route-catalog.ts
+++ b/packages/app/src/lib/api/api-route-catalog.ts
@@ -1296,7 +1296,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/history.ts',
- sourceSha256: 'a687e8dbe8eae18b40c472eb2e16aa57576dbffac366d806b2491189974a5593',
+ sourceSha256: 'c57714065521100046c4d9e452f1890b41ba73d1f857aa12e7f8903dba46d778',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
From c9a10873a74a3006b0c223ae6428dcdc535cc058 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Fri, 16 Oct 2026 22:46:41 -0700
Subject: [PATCH 097/104] fix: read published clips in Compare and keep its
URL-restored sides distinct
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Compare requested format=media, which falls through to a GitHub artifact download when no stored blob exists; it now reads format=published like the views API. A URL whose one side names the other side's default resolved both sides to one hardware; restore now moves the defaulted side like choosing it in the panel does.
中文:Compare 面板改为按 format=published 读取已发布视频,不再触发 GitHub 产物下载;URL 恢复时若两侧解析到同一硬件,按面板选择时的交换规则把默认一侧移到另一默认值,并补充单测。
---
.../cypress/component/video-compare.cy.tsx | 2 +-
.../video-benchmark/VideoCompare.tsx | 2 +-
.../video-benchmark/compare-url-state.test.ts | 24 +++++++++++++++++++
.../video-benchmark/compare-url-state.ts | 23 ++++++++++++++----
.../src/components/video-benchmark/compare.ts | 2 +-
packages/app/src/lib/api/api-route-catalog.ts | 4 ++--
6 files changed, 47 insertions(+), 10 deletions(-)
diff --git a/packages/app/cypress/component/video-compare.cy.tsx b/packages/app/cypress/component/video-compare.cy.tsx
index 4f4987879..70bd25561 100644
--- a/packages/app/cypress/component/video-compare.cy.tsx
+++ b/packages/app/cypress/component/video-compare.cy.tsx
@@ -20,7 +20,7 @@ const colorFor = (key: string) => COLORS[key] ?? 'rgb(0, 0, 0)';
const OWNING: MetricOptions = { tier: 'h' };
const mediaUrl = (point: VideoPoint) =>
- `/api/video-runs?run=${point.runId}&artifact=${point.artifactId}&format=media`;
+ `/api/video-runs?run=${point.runId}&artifact=${point.artifactId}&format=published`;
function media(point: VideoPoint, hardware: string, alias: string) {
cy.intercept(
'GET',
diff --git a/packages/app/src/components/video-benchmark/VideoCompare.tsx b/packages/app/src/components/video-benchmark/VideoCompare.tsx
index 1b0a99110..9ff3abb8b 100644
--- a/packages/app/src/components/video-benchmark/VideoCompare.tsx
+++ b/packages/app/src/components/video-benchmark/VideoCompare.tsx
@@ -125,7 +125,7 @@ const CHIP = {
/** The stored artifact of one side, or null when the deployment publishes no media (HTTP 204). */
async function fetchSide(point: VideoPoint, signal: AbortSignal): Promise {
const response = await fetch(
- `/api/video-runs?run=${encodeURIComponent(point.runId)}&artifact=${encodeURIComponent(String(point.artifactId))}&format=media`,
+ `/api/video-runs?run=${encodeURIComponent(point.runId)}&artifact=${encodeURIComponent(String(point.artifactId))}&format=published`,
{ signal },
);
if (response.status === 204) return null;
diff --git a/packages/app/src/components/video-benchmark/compare-url-state.test.ts b/packages/app/src/components/video-benchmark/compare-url-state.test.ts
index 4898d0216..8fb8e39b5 100644
--- a/packages/app/src/components/video-benchmark/compare-url-state.test.ts
+++ b/packages/app/src/components/video-benchmark/compare-url-state.test.ts
@@ -12,6 +12,11 @@ import { videoPoints } from './points';
const points = videoPoints([history as unknown as VideoHistoryPage]);
+const keys = (resolved: ReturnType) => [
+ resolved.baseline?.hardwareKey,
+ resolved.candidate?.hardwareKey,
+];
+
describe('video compare URL selection', () => {
it('defaults to the slowest measured C1 hardware as baseline and the fastest as candidate', () => {
expect(defaultComparePair(points)).toEqual({ baseline: 'h100', candidate: 'b200' });
@@ -53,6 +58,25 @@ describe('video compare URL selection', () => {
caseIndex: 0,
});
});
+ it('keeps the two sides distinct when the URL lands both on one hardware', () => {
+ // v_cand on the default baseline swaps the sides, as choosing it in the panel does.
+ expect(
+ keys(resolveCompareSelection({ baseline: null, candidate: 'h100', caseIndex: 0 }, points)),
+ ).toEqual(['b200', 'h100']);
+ // v_base on the default candidate moves the candidate to the default baseline.
+ expect(
+ keys(resolveCompareSelection({ baseline: 'b200', candidate: null, caseIndex: 0 }, points)),
+ ).toEqual(['b200', 'h100']);
+ // Two explicit equal sides keep the baseline and take the default candidate.
+ expect(
+ keys(resolveCompareSelection({ baseline: 'h200', candidate: 'h200', caseIndex: 0 }, points)),
+ ).toEqual(['h200', 'b200']);
+ // Only the shared hardware left: the candidate becomes the first other measured hardware.
+ const twoFast = points.filter((p) => p.hardwareKey !== 'h100');
+ expect(
+ keys(resolveCompareSelection({ baseline: 'b200', candidate: 'b200', caseIndex: 0 }, twoFast)),
+ ).toEqual(['b200', 'h200']);
+ });
it('writes only non-default params, keeps unrelated params and leaves the input alone', () => {
const defaults = defaultComparePair(points);
const url = new URL('https://x.test/video?v_tier=r&run=1');
diff --git a/packages/app/src/components/video-benchmark/compare-url-state.ts b/packages/app/src/components/video-benchmark/compare-url-state.ts
index f1f0e3888..27d04fbf6 100644
--- a/packages/app/src/components/video-benchmark/compare-url-state.ts
+++ b/packages/app/src/components/video-benchmark/compare-url-state.ts
@@ -57,11 +57,24 @@ export function resolveCompareSelection(
const defaults = defaultComparePair(points);
const find = (key: string | null) =>
key === null ? null : (measured.find((point) => point.hardwareKey === key) ?? null);
- return {
- baseline: find(selection.baseline) ?? find(defaults.baseline),
- candidate: find(selection.candidate) ?? find(defaults.candidate),
- caseIndex: selection.caseIndex,
- };
+ const chosen = { baseline: find(selection.baseline), candidate: find(selection.candidate) };
+ let baseline = chosen.baseline ?? find(defaults.baseline);
+ let candidate = chosen.candidate ?? find(defaults.candidate);
+ if (baseline && candidate && baseline.hardwareKey === candidate.hardwareKey) {
+ // Choosing the other side's hardware in the panel swaps the two sides, so a side that
+ // defaulted onto the chosen hardware moves to the other default; two equal explicit sides
+ // keep the baseline. Any still-equal pair takes the first other measured hardware.
+ const shared = baseline.hardwareKey;
+ const differing = (point: VideoPoint | null) =>
+ point && point.hardwareKey !== shared ? point : null;
+ const other = measured.find((point) => point.hardwareKey !== shared) ?? null;
+ if (chosen.candidate && !chosen.baseline)
+ baseline = differing(find(defaults.candidate)) ?? other;
+ else
+ candidate =
+ differing(find(defaults.candidate)) ?? differing(find(defaults.baseline)) ?? other;
+ }
+ return { baseline, candidate, caseIndex: selection.caseIndex };
}
/** Returns a new URL with defaults omitted; the input URL is not mutated. */
diff --git a/packages/app/src/components/video-benchmark/compare.ts b/packages/app/src/components/video-benchmark/compare.ts
index 4d7cbe1b1..6c8ef6031 100644
--- a/packages/app/src/components/video-benchmark/compare.ts
+++ b/packages/app/src/components/video-benchmark/compare.ts
@@ -215,7 +215,7 @@ function sourceSide(
}
/**
- * Resolve a dashboard point inside its stored artifact (`format=media`): the
+ * Resolve a dashboard point inside its stored artifact (`format=media` or `format=published`): the
* observation source whose manifest SHA the point id names, else the first
* source that publishes the point's cell. A malformed source is skipped so a
* readable sibling still resolves (as `videoHistoryEntry` isolates sources);
diff --git a/packages/app/src/lib/api/api-route-catalog.ts b/packages/app/src/lib/api/api-route-catalog.ts
index f793ad8b4..6afc4cc32 100644
--- a/packages/app/src/lib/api/api-route-catalog.ts
+++ b/packages/app/src/lib/api/api-route-catalog.ts
@@ -1344,7 +1344,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/compare.ts',
- sourceSha256: 'c95658b12f6d249ff13ad9b897a9e9f63983c1b210350437403da8c3b6245a38',
+ sourceSha256: '3ae75e6a93dd6db966a4a3b0d36caadc36178db28b766921759d0f26a3c2b073',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
@@ -1352,7 +1352,7 @@ export const apiContractSourceDigests = [
},
{
source: 'src/components/video-benchmark/compare-url-state.ts',
- sourceSha256: '00ef527aee602e29cfec6d187d7643e2f7b7bab50e73ed67c073b4ec170e1c74',
+ sourceSha256: 'ba33d95eab86de143ab08ea661908168c00ef0b6f9470bc49dab1c9d9d04f732',
reviewArea: {
en: 'VideoGenX public dashboard selectors, source identity and shared numerical projection.',
zh: 'VideoGenX 公开仪表板的选择项、来源身份与共享数值投影。',
From 6bcd1b852ba2922d45a1fe6d704d9f31ba9b7784 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Fri, 16 Oct 2026 22:49:27 -0700
Subject: [PATCH 098/104] docs: state that compare sides stay distinct in the
views API reference
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
中文:views API 参考中 v_base 与 v_cand 的说明补充“两侧始终为不同硬件”的解析规则。
---
packages/app/src/lib/views-api/docs/extensions.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/app/src/lib/views-api/docs/extensions.ts b/packages/app/src/lib/views-api/docs/extensions.ts
index 9599c0fd3..9d8103933 100644
--- a/packages/app/src/lib/views-api/docs/extensions.ts
+++ b/packages/app/src/lib/views-api/docs/extensions.ts
@@ -402,12 +402,12 @@ const PARAMETER_NOTES: Record = {
'以逗号分隔的隐藏硬件键,仅接受视频硬件列表中的键;默认空,排序去重,忽略未知键。只筛选图表和表格,不改变 KPI、Compare 或 Evidence。',
],
v_base: [
- 'Baseline hardware key; unavailable/invalid selection resolves to the UI default (slowest eligible lead deployment).',
- '基线硬件键;无效或无可用测量时回退到界面默认值(符合条件的代表部署中最慢的一种)。',
+ 'Baseline hardware key; unavailable/invalid selection resolves to the UI default (slowest eligible lead deployment). The two sides stay distinct: a side that would match the other moves to the other default.',
+ '基线硬件键;无效或无可用测量时回退到界面默认值(符合条件的代表部署中最慢的一种)。两侧始终为不同硬件:若一侧与另一侧相同,则改用另一侧的默认值。',
],
v_cand: [
- 'Candidate hardware key; unavailable/invalid selection resolves to the UI default (fastest eligible lead deployment).',
- '候选硬件键;无效或无可用测量时回退到界面默认值(符合条件的代表部署中最快的一种)。',
+ 'Candidate hardware key; unavailable/invalid selection resolves to the UI default (fastest eligible lead deployment). The two sides stay distinct: a side that would match the other moves to the other default.',
+ '候选硬件键;无效或无可用测量时回退到界面默认值(符合条件的代表部署中最快的一种)。两侧始终为不同硬件:若一侧与另一侧相同,则改用另一侧的默认值。',
],
v_case: [
'Zero-based matched-case index, 0–9999 (default 0). view=compare clamps it to the available pairs and returns cases.resolvedCaseIndex; dashboard leaves media not-requested.',
From d18d5c28b2659a25db36e655009e589fa5405cef Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Fri, 16 Oct 2026 23:04:05 -0700
Subject: [PATCH 099/104] fix: start every Compare change from the pair on
screen
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
A side repaired on URL restore (or by a collision) stayed implicit in state, so the next change re-resolved it to the default and the visible baseline moved under the user.
中文:Compare 面板每次变更都以当前显示的一对硬件为起点;URL 恢复或冲突修正后的一侧不再在下次变更时回退到默认值,并补充组件测试。
---
.../cypress/component/video-compare.cy.tsx | 13 +++++++++
.../video-benchmark/VideoCompare.tsx | 28 +++++++++++--------
2 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/packages/app/cypress/component/video-compare.cy.tsx b/packages/app/cypress/component/video-compare.cy.tsx
index 70bd25561..15bc2b84a 100644
--- a/packages/app/cypress/component/video-compare.cy.tsx
+++ b/packages/app/cypress/component/video-compare.cy.tsx
@@ -190,6 +190,19 @@ describe('Video compare panel (retained fixture)', () => {
.and('contain', 'HTTP 404');
cy.contains('button', 'Retry').should('exist');
});
+ it('keeps a restored, repaired pair when one side changes', () => {
+ // v_cand on the default baseline makes restore swap the baseline to B200; that repair must
+ // stay explicit, so a later candidate change cannot re-default the baseline to H100.
+ mount('/video', '?v_cand=h100');
+ cy.wait(['@b200', '@h100']);
+ cy.get('[data-testid="video-compare-baseline"]').should('contain', 'B200');
+ cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H100');
+ pick('Candidate', 'H200');
+ cy.wait('@h200');
+ cy.get('[data-testid="video-compare-baseline"]').should('contain', 'B200');
+ cy.get('[data-testid="video-compare-candidate"]').should('contain', 'H200');
+ cy.location('search').should('contain', 'v_base=b200').and('contain', 'v_cand=h200');
+ });
it('says when a run publishes no clips and keeps the metric deltas', () => {
mount('/video', '', cells, OWNING, () => {
cy.intercept('GET', mediaUrl(c1('b200')), { statusCode: 204 }).as('unpublished');
diff --git a/packages/app/src/components/video-benchmark/VideoCompare.tsx b/packages/app/src/components/video-benchmark/VideoCompare.tsx
index 9ff3abb8b..30f057c9f 100644
--- a/packages/app/src/components/video-benchmark/VideoCompare.tsx
+++ b/packages/app/src/components/video-benchmark/VideoCompare.tsx
@@ -250,21 +250,27 @@ export default function VideoCompare({
const paneColor = (role: Role) => colorFor(sideOf[role]?.hardwareKey ?? '');
const update = (patch: Partial) => {
- const next = { ...selection, ...patch };
+ // Start from the pair on screen, not the stored selection: a side repaired on restore or by
+ // a collision is explicit from then on, as the URL already records it.
+ const resolved = resolveCompareSelection(
+ {
+ baseline: baseline?.hardwareKey ?? null,
+ candidate: candidate?.hardwareKey ?? null,
+ caseIndex,
+ ...patch,
+ },
+ points,
+ );
+ const next = {
+ baseline: resolved.baseline?.hardwareKey ?? null,
+ candidate: resolved.candidate?.hardwareKey ?? null,
+ caseIndex: resolved.caseIndex,
+ };
setSelection(next);
- const resolved = resolveCompareSelection(next, points);
history.replaceState(
null,
'',
- writeVideoCompareSelection(
- new URL(location.href),
- {
- baseline: resolved.baseline?.hardwareKey ?? null,
- candidate: resolved.candidate?.hardwareKey ?? null,
- caseIndex: next.caseIndex,
- },
- defaults,
- ),
+ writeVideoCompareSelection(new URL(location.href), next, defaults),
);
};
const choose = (side: Role, hardware: string) => {
From cf1540ae8d5308d0e2b3a6ea30f017d46c3c6999 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sun, 18 Oct 2026 01:16:14 -0700
Subject: [PATCH 100/104] fix: publish every native video sweep artifact
---
.github/workflows/h3-media.yml | 4 +-
docs/video-history.md | 10 +++
packages/app/scripts/warm-video-results.ts | 23 +++----
.../app/src/app/api/video-runs/route.test.ts | 24 ++++++-
packages/app/src/app/api/video-runs/route.ts | 38 +++++++----
.../video-benchmark/archive.test.ts | 24 +++++++
.../src/components/video-benchmark/archive.ts | 16 +++--
.../video-benchmark/artifact-identity.ts | 8 +++
packages/app/src/lib/api/api-route-catalog.ts | 6 +-
.../src/lib/video/video-publication.test.ts | 59 ++++++++++++++++
.../app/src/lib/video/video-publication.ts | 68 +++++++++++++++++++
.../app/src/lib/video/video-storage.test.ts | 25 ++++++-
packages/app/src/lib/video/video-storage.ts | 11 ++-
.../app/src/lib/views-api/docs/extensions.ts | 4 +-
.../skills/inferencex-api/integrity.json | 2 +-
.../references/dashboard-views.md | 2 +-
16 files changed, 276 insertions(+), 48 deletions(-)
create mode 100644 packages/app/src/components/video-benchmark/artifact-identity.ts
create mode 100644 packages/app/src/lib/video/video-publication.test.ts
create mode 100644 packages/app/src/lib/video/video-publication.ts
diff --git a/.github/workflows/h3-media.yml b/.github/workflows/h3-media.yml
index 5c02a85d4..5a8adfdae 100644
--- a/.github/workflows/h3-media.yml
+++ b/.github/workflows/h3-media.yml
@@ -1,6 +1,8 @@
name: 'Publish H3 media'
on:
+ repository_dispatch:
+ types: [publish-video-results]
schedule:
- cron: '*/15 * * * *'
workflow_dispatch:
@@ -31,5 +33,5 @@ jobs:
bun-version-file: package.json
- name: Persist completed H3 artifacts
env:
- H3_RUN_ID: ${{ inputs.run_id }}
+ H3_RUN_ID: ${{ inputs.run_id || github.event.client_payload.source_run_id }}
run: bun packages/app/scripts/warm-video-results.ts
diff --git a/docs/video-history.md b/docs/video-history.md
index 3f9a7cb05..ea0b48b8e 100644
--- a/docs/video-history.md
+++ b/docs/video-history.md
@@ -12,6 +12,12 @@ Two launchers produce the serving matrix, and `serving.ts` keys the contract on
Each observation also carries the cell's participating and allocated GPU counts, measurement wall seconds, clip duration and frame count, summed mean board watts, summed recorded enforced limits (null when no limit snapshot exists), the configured `tp_size` / `ulysses_degree` / `attention_backend` and the endpoint's replica count (`execution.deployment.replica_count`, null for bundles that predate it). The nullable `workloadKey` carries the full canonical workload identity when complete; prompts and seeds cannot be replaced by the shortened display label. These are additive, nullable fields under the same `schemaVersion: 1`; the hardware dashboard reads at most five pages and derives every displayed metric from them, so the browser never parses an artifact bundle for the chart.
+## Publication and discovery
+
+The `publish-video-results` repository dispatch starts publication for its `source_run_id`; scheduled and manual catch-up use the same job. The publication job follows every catalog `nextPage`, including empty filtered pages, and deduplicates run/artifact IDs. Each per-run lookup reads all GitHub artifact pages. Standard `run-sweep.yml` runs join legacy H3 workflows in discovery; a sweep with no video artifact remains empty. An explicit `H3_RUN_ID` limits catch-up to one run. Failed artifacts do not prevent later artifacts from being attempted, but the job still fails; timeout or failure is not proof that the catalog was fully processed.
+
+Native matrix artifacts use `h3-results---` while legacy names remain readable. The sealed `artifact_name`, run/attempt, and `ci.head_sha` bind a new artifact to GitHub metadata. The actual benchmark checkout remains `git_commit`, which may differ from the Actions head when CI tests a merge commit. Publishing still writes immutable objects before the index; history and Compare only read published indexes. Low-sample and failed sources remain history entries, without changing chart admission.
+
## Evidence boundaries
- Only descriptive observations are shown: this version has no selected matched baseline and computes no before/after delta.
@@ -26,6 +32,10 @@ Each observation also carries the cell's participating and allocated GPU counts,
## 中文说明
+`publish-video-results` repository dispatch 为指定 `source_run_id` 启动发布;定时任务和手动补发布复用同一任务。发布任务跟随所有 `nextPage`,包括筛选后为空的页面,并对运行和产物 ID 去重。单次运行会读取 GitHub 产物列表的全部分页;标准 `run-sweep.yml` 也进入发现列表,没有视频产物的 sweep 保持为空。`H3_RUN_ID` 可将补发布限定到一个运行。某个产物失败后仍尝试后续产物,但任务最终报告失败;超时或失败不代表完整处理了目录。
+
+原生矩阵采用 `h3-results---`,旧名称仍可读取。封存的 `artifact_name`、run/attempt 和 `ci.head_sha` 对应 GitHub 元数据;实际 benchmark checkout 仍单独记录为 `git_commit`,测试 merge commit 时它可以不同于 Actions head。发布继续先写不可变对象、最后写索引;历史和 Compare 只读已发布索引。失败或低样本来源保留在历史中,不降低图表门槛。
+
`/video` 与 `/zh/video` 首屏为跨硬件仪表板(见 [VideoGenX 仪表板](./videogenx-dashboard.md));本文描述的“性能历史”列表位于其下方可展开的区块,URL 带有 `history-*` 筛选参数(`history-hardware`、`history-concurrency`、`history-query`)时自动展开。每条记录链接到原始 GitHub Actions 运行。原有的按运行查看结果、trade-off 图表与 CI 运行浏览已随仪表板重建移除;视频对比由仪表板的 Compare 面板提供。
历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。每个 cell 另附参与/已分配 GPU 数、测量窗口秒数、视频时长与帧数、板卡平均功率之和、记录的生效功率上限之和(无快照时为 null)、配置的 `tp_size` / `ulysses_degree` / `attention_backend`,以及端点的副本数(`execution.deployment.replica_count`,早于该记录的产物包为 null);`workloadKey` 在信息完整时保留完整工作负载身份,prompts 与 seeds 不能由缩写显示标签替代。这些都是同一 `schemaVersion: 1` 下可为空的附加字段,硬件仪表板最多读取五页,并据此推导全部指标,浏览器不再解析产物包。
diff --git a/packages/app/scripts/warm-video-results.ts b/packages/app/scripts/warm-video-results.ts
index 9c4c54cb8..60a727082 100644
--- a/packages/app/scripts/warm-video-results.ts
+++ b/packages/app/scripts/warm-video-results.ts
@@ -1,4 +1,5 @@
import { env } from 'node:process';
+import { publishVideoResults } from '../src/lib/video/video-publication';
const productionOrigin = 'https://inferencex.semianalysis.com';
async function get(path: string) {
const response = await fetch(`${productionOrigin}/api/video-runs${path}`, {
@@ -9,18 +10,10 @@ async function get(path: string) {
throw new Error('BLOB_READ_WRITE_TOKEN is not configured on the frontend');
return response.json();
}
-const runId = env.H3_RUN_ID;
-if (runId && !/^[1-9]\d*$/u.test(runId)) throw new Error('Invalid H3_RUN_ID');
-const catalog = runId ? { runs: [{ id: runId }] } : await get('?page=1');
-const runs: { id: number | string }[] = catalog.runs;
-for (const run of runs) {
- const data = await get(`?run=${run.id}`);
- for (const artifact of data.artifacts) {
- if (artifact.stored || artifact.expired) continue;
- const result = await get(`?run=${run.id}&artifact=${artifact.id}&format=media`);
- if (result.storageVersion !== 1) throw new Error('Unexpected H3 storage response');
- console.log(
- `Stored H3 run ${run.id}, artifact ${artifact.id}, ${result.sources.length} executions`,
- );
- }
-}
+await publishVideoResults({
+ get,
+ runId: env.H3_RUN_ID,
+ onStored: (run, artifact, sources) => {
+ console.log(`Stored video run ${run}, artifact ${artifact}, ${sources} executions`);
+ },
+});
diff --git a/packages/app/src/app/api/video-runs/route.test.ts b/packages/app/src/app/api/video-runs/route.test.ts
index 2b0a70ebd..9e46dd58a 100644
--- a/packages/app/src/app/api/video-runs/route.test.ts
+++ b/packages/app/src/app/api/video-runs/route.test.ts
@@ -51,12 +51,13 @@ describe('H3 CI artifact access', () => {
{ id: 2, name: 'Test H3 Video', path: '.github/workflows/test-h3-video.yml' },
{ id: 3, name: 'H3 Video Smoke', path: '.github/workflows/h3-video.yml' },
{ id: 4, name: 'H3 retained-media fidelity', path: '.github/workflows/h3-fidelity.yml' },
+ { id: 5, name: 'InferenceX Sweep', path: '.github/workflows/run-sweep.yml' },
],
}),
);
const result = await GET(request());
const data = await result.json();
- expect(data.runs.map((r: { id: number }) => r.id)).toEqual([1, 3, 4]);
+ expect(data.runs.map((r: { id: number }) => r.id)).toEqual([1, 3, 4, 5]);
expect(result.headers.get('cache-control')).toContain('no-store');
});
it('refuses a private repository before reading any artifacts', async () => {
@@ -92,7 +93,7 @@ describe('H3 CI artifact access', () => {
.mockResolvedValueOnce(response({ private: false }))
.mockResolvedValueOnce(
response({
- name: 'h3-results-10-1',
+ name: 'h3-results-10-1-h3-sglang-h200-bf16',
workflow_run: { id: 10 },
size_in_bytes: 4,
archive_download_url: 'https://evil.example',
@@ -132,6 +133,25 @@ describe('H3 CI artifact access', () => {
artifacts: [],
});
});
+ it('discovers native row artifacts beyond the first run page without duplicating overlapping IDs', async () => {
+ const native = { id: 120, name: `h3-results-10-2-${'a'.repeat(64)}` };
+ fetchMock
+ .mockResolvedValueOnce(response({ private: false }))
+ .mockResolvedValueOnce(response({ id: 10, conclusion: 'failure' }))
+ .mockResolvedValueOnce(
+ response({
+ artifacts: Array.from({ length: 100 }, (_, id) => ({ id, name: 'unrelated' })),
+ }),
+ )
+ .mockResolvedValueOnce(
+ response({ artifacts: [native, native, { id: 121, name: 'h3-results-11-1' }] }),
+ );
+ const result = await GET(request('?run=10'));
+ const data = await result.json();
+ expect(data.artifacts).toEqual([native]);
+ expect(String(fetchMock.mock.calls[3][0])).toContain('artifacts?per_page=100&page=2');
+ expect(storeVideoArtifact).not.toHaveBeenCalled();
+ });
it('falls back to the CI ZIP when object storage is not configured', async () => {
fetchMock.mockResolvedValueOnce(response({ private: false }));
const result = await GET(request('?run=10&artifact=20&format=media'));
diff --git a/packages/app/src/app/api/video-runs/route.ts b/packages/app/src/app/api/video-runs/route.ts
index 87a4e89e2..e8a55c482 100644
--- a/packages/app/src/app/api/video-runs/route.ts
+++ b/packages/app/src/app/api/video-runs/route.ts
@@ -1,3 +1,5 @@
+import { videoArtifactIdentity } from '@/components/video-benchmark/artifact-identity';
+import type { CIArtifact } from '@/components/video-benchmark/archive';
import { type NextRequest, NextResponse } from 'next/server';
import {
GITHUB_API_BASE,
@@ -22,7 +24,6 @@ const ROOT = `${GITHUB_API_BASE}/repos/${GITHUB_OWNER}/${GITHUB_REPO}`;
const MAX_BYTES = 256 * 1024 ** 2;
const headers = { 'Cache-Control': 'private, no-store' };
const id = (value: string) => /^[1-9]\d{0,19}$/u.test(value);
-const artifactName = /^h3-(?:results|video|fidelity)-(?\d+)-(?\d+)$/u;
function github(path: string, signal = AbortSignal.timeout(30000)) {
const token = getGithubToken();
@@ -48,7 +49,8 @@ export async function GET(request: NextRequest) {
(runId && !id(runId)) ||
(artifactId && (!runId || !id(artifactId))) ||
!id(page) ||
- (history && (runId || artifactId || !Number.isSafeInteger(Number(page))))
+ !Number.isSafeInteger(Number(page)) ||
+ (history && (runId || artifactId))
)
return NextResponse.json(
{ error: 'Invalid CI run, artifact or page' },
@@ -137,8 +139,8 @@ export async function GET(request: NextRequest) {
{ status: metaResponse.status, headers },
);
const artifact = await metaResponse.json();
- const name = artifactName.exec(artifact.name ?? '');
- if (!name || name.groups?.runId !== runId || String(artifact.workflow_run?.id) !== runId)
+ const name = videoArtifactIdentity(artifact.name ?? '');
+ if (!name || name.run !== runId || String(artifact.workflow_run?.id) !== runId)
return NextResponse.json(
{ error: 'Artifact does not belong to this H3 run' },
{ status: 404, headers },
@@ -181,7 +183,7 @@ export async function GET(request: NextRequest) {
return new Response(stream, { headers: { ...headers, 'Content-Type': 'application/zip' } });
}
if (runId) {
- const [runResponse, artifactsResponse, saved] = await Promise.all([
+ const [runResponse, firstArtifactsResponse, saved] = await Promise.all([
github(`/actions/runs/${runId}`),
github(`/actions/runs/${runId}/artifacts?per_page=100`),
storedArtifacts(runId).catch(() => []),
@@ -191,13 +193,24 @@ export async function GET(request: NextRequest) {
{ error: 'CI run unavailable' },
{ status: runResponse.status, headers },
);
- if (!artifactsResponse.ok)
- return NextResponse.json({ error: 'Cannot list CI artifacts' }, { status: 502, headers });
- const data = await artifactsResponse.json();
- const artifacts = (data.artifacts ?? []).filter((a: { name: string }) => {
- const match = artifactName.exec(a.name);
- return match?.groups?.runId === runId;
- });
+ const artifacts: CIArtifact[] = [];
+ const seen = new Set();
+ let artifactsResponse = firstArtifactsResponse;
+ for (let artifactPage = 1; ; artifactPage++) {
+ if (!artifactsResponse.ok)
+ return NextResponse.json({ error: 'Cannot list CI artifacts' }, { status: 502, headers });
+ const data: { artifacts: CIArtifact[] } = await artifactsResponse.json();
+ for (const artifact of data.artifacts ?? []) {
+ if (videoArtifactIdentity(artifact.name)?.run !== runId || seen.has(artifact.id))
+ continue;
+ seen.add(artifact.id);
+ artifacts.push(artifact);
+ }
+ if ((data.artifacts?.length ?? 0) < 100) break;
+ artifactsResponse = await github(
+ `/actions/runs/${runId}/artifacts?per_page=100&page=${artifactPage + 1}`,
+ );
+ }
for (const stored of saved) {
const index = artifacts.findIndex((a: { id: number }) => a.id === stored.id);
if (index === -1) artifacts.push(stored);
@@ -218,6 +231,7 @@ export async function GET(request: NextRequest) {
runs: runs.filter(
(run: { name: string; display_title: string; path: string }) =>
(run.path === '.github/workflows/e2e-tests.yml' && /\bh3\b/iu.test(run.name)) ||
+ run.path === '.github/workflows/run-sweep.yml' ||
run.path === '.github/workflows/h3-video.yml' ||
run.path === '.github/workflows/h3-fidelity.yml',
),
diff --git a/packages/app/src/components/video-benchmark/archive.test.ts b/packages/app/src/components/video-benchmark/archive.test.ts
index 94f70b438..c77404b17 100644
--- a/packages/app/src/components/video-benchmark/archive.test.ts
+++ b/packages/app/src/components/video-benchmark/archive.test.ts
@@ -28,6 +28,30 @@ describe('CI ZIP import', () => {
const bundle = await loadBundle(source.read);
expect(bundle.manifestSha256).toBe(hash(manifest));
});
+ it('binds each native matrix artifact to its sealed name, run attempt and workflow revision', async () => {
+ const name = `h3-results-10-2-${'c'.repeat(64)}`;
+ const manifest = JSON.stringify({
+ run_id: '10',
+ run_attempt: '2',
+ git_commit: 'd'.repeat(40),
+ artifact_name: name,
+ ci: { head_sha: 'a'.repeat(40) },
+ });
+ const blob = archive({
+ 'manifest.json': manifest,
+ SHA256SUMS: `${hash(manifest)} manifest.json`,
+ });
+ const native = { ...artifact, name, workflow_run: { id: 10, head_sha: 'a'.repeat(40) } };
+ const sources = await archiveSources(blob, native);
+ expect(sources[0].id).toBe('10');
+ for (const altered of [
+ { ...native, name: name.replace('-2-', '-1-') },
+ { ...native, name: name.replace('c'.repeat(64), 'd'.repeat(64)) },
+ { ...native, workflow_run: { id: 10, head_sha: 'b'.repeat(40) } },
+ { ...native, workflow_run: { id: 11, head_sha: 'a'.repeat(40) } },
+ ])
+ await expect(archiveSources(blob, altered)).rejects.toThrow();
+ });
it('preserves original execution identities in an exported archive', async () => {
const index = JSON.stringify({
schema_version: '1.0.0',
diff --git a/packages/app/src/components/video-benchmark/archive.ts b/packages/app/src/components/video-benchmark/archive.ts
index de1e785d9..e6d4f2cb0 100644
--- a/packages/app/src/components/video-benchmark/archive.ts
+++ b/packages/app/src/components/video-benchmark/archive.ts
@@ -1,3 +1,4 @@
+import { videoArtifactIdentity } from './artifact-identity';
import { at, rows, safePath, sha256, text, type Json } from './bundle';
export interface CIArtifact {
@@ -66,9 +67,7 @@ export async function archiveSources(blob: Blob, artifact: CIArtifact) {
)
throw new Error('Missing verified archive entry point');
const index: Json = files['index.json'] ? JSON.parse(await read('index.json').text()) : null;
- const identity = /^h3-(?:video|results|fidelity)-(?\d+)-(?\d+)$/u.exec(
- artifact.name,
- )?.groups;
+ const identity = videoArtifactIdentity(artifact.name);
if (!identity) throw new Error('Invalid H3 artifact identity');
if (fidelity) {
const comparison: Json = JSON.parse(await read('comparison.json').text());
@@ -117,7 +116,16 @@ export async function archiveSources(blob: Blob, artifact: CIArtifact) {
};
});
const manifest: Json = JSON.parse(await read('manifest.json').text());
- if (at(manifest, 'run_id') !== identity.run || at(manifest, 'run_attempt') !== identity.attempt)
+ if (
+ at(manifest, 'run_id') !== identity.run ||
+ at(manifest, 'run_attempt') !== identity.attempt ||
+ ((identity.configuration || at(manifest, 'artifact_name') !== null) &&
+ at(manifest, 'artifact_name') !== artifact.name) ||
+ (artifact.workflow_run !== undefined &&
+ (String(artifact.workflow_run.id) !== identity.run ||
+ ((identity.configuration || at(manifest, 'ci', 'head_sha') !== null) &&
+ artifact.workflow_run.head_sha !== at(manifest, 'ci', 'head_sha'))))
+ )
throw new Error('Manifest and GitHub artifact identify different runs');
return [
{ id: text(at(manifest, 'run_id')), read: (path: string) => Promise.resolve(read(path)) },
diff --git a/packages/app/src/components/video-benchmark/artifact-identity.ts b/packages/app/src/components/video-benchmark/artifact-identity.ts
new file mode 100644
index 000000000..f00576a87
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/artifact-identity.ts
@@ -0,0 +1,8 @@
+/** Legacy names and native matrix names share the same CI identity. */
+export function videoArtifactIdentity(name: string) {
+ return (
+ /^h3-(?:results|video|fidelity)-(?[1-9]\d*)-(?[1-9]\d*)(?:-(?[a-z0-9]+(?:-[a-z0-9]+)*))?$/u.exec(
+ name,
+ )?.groups ?? null
+ );
+}
diff --git a/packages/app/src/lib/api/api-route-catalog.ts b/packages/app/src/lib/api/api-route-catalog.ts
index eae6b464b..7d0dd3071 100644
--- a/packages/app/src/lib/api/api-route-catalog.ts
+++ b/packages/app/src/lib/api/api-route-catalog.ts
@@ -615,10 +615,10 @@ export const apiRouteCatalog = [
method: 'GET',
classification: 'ui-artifact-read',
exclusionReason: {
- en: 'Hidden H3 viewer transport for live public CI runs, checksum-verified artifact ZIPs, and read-only published history (format=history). History projects existing immutable indexes without publishing media; these UI contracts are not a public data API.',
- zh: '供隐藏的 H3 查看器读取公开 CI 运行、校验和已验证的产物 ZIP,以及只读的已发布历史(format=history)。历史视图从既有不可变索引生成,不发布媒体;这些界面契约不作为公开数据 API。',
+ en: 'Hidden H3 viewer transport for live public CI runs, checksum-verified artifact ZIPs, and read-only published history (format=history). Discovery includes standard sweeps and paginates their artifacts; publication admits checksum-verified legacy and uniquely named native artifacts. History and format=published read existing immutable indexes without publishing media; these UI contracts are not a public data API.',
+ zh: '供隐藏的 H3 查看器读取公开 CI 运行、校验和已验证的产物 ZIP,以及只读的已发布历史(format=history)。发现列表包含标准 sweep,并读取运行的全部产物分页;发布流程接收校验通过的旧产物和唯一命名的原生产物。历史视图和 format=published 从既有不可变索引读取,不发布媒体;这些界面契约不作为公开数据 API。',
},
- sourceSha256: '0ae586743620bbd78125d9a5326d132b51258d73cab6bbb91f59df13440ac52b',
+ sourceSha256: '27f071ac4da20035dddbe1751fa2461ead409548e6cb0ff9653febe6586c5f58',
},
{
source: 'src/app/api/unofficial-run/route.ts',
diff --git a/packages/app/src/lib/video/video-publication.test.ts b/packages/app/src/lib/video/video-publication.test.ts
new file mode 100644
index 000000000..6d3441028
--- /dev/null
+++ b/packages/app/src/lib/video/video-publication.test.ts
@@ -0,0 +1,59 @@
+import { describe, expect, it, vi } from 'vitest';
+import type { Json } from '@/components/video-benchmark/bundle';
+import { publishVideoResults } from './video-publication';
+
+describe('video publication job', () => {
+ it('continues through empty and repeated pages, deduplicates artifacts, and retries only missing publications', async () => {
+ const stored = new Set();
+ const published = vi.fn();
+ const respond = (query: string): Json => {
+ if (query === '?page=1') return { runs: [], nextPage: 2 };
+ if (query === '?page=2') return { runs: [{ id: 10 }], nextPage: 3 };
+ if (query === '?page=3') return { runs: [{ id: 10 }, { id: 11 }], nextPage: null };
+ const run = query.includes('run=10') ? '10' : '11';
+ if (!query.includes('artifact='))
+ return {
+ artifacts: [
+ { id: 20, stored: stored.has(run) },
+ { id: 20, stored: stored.has(run) },
+ { id: 21, expired: true },
+ ],
+ };
+ stored.add(run);
+ return { storageVersion: 1, runId: run, artifact: { id: 20 }, sources: [] };
+ };
+ const get = vi.fn((query: string) => Promise.resolve(respond(query)));
+ await publishVideoResults({ get, onStored: published });
+ expect(published.mock.calls).toEqual([
+ ['10', '20', 0],
+ ['11', '20', 0],
+ ]);
+ expect(get.mock.calls.filter(([query]) => query === '?run=10')).toHaveLength(1);
+ await publishVideoResults({ get, onStored: published });
+ expect(published).toHaveBeenCalledTimes(2);
+ expect(get.mock.calls.filter(([query]) => query.includes('format=media'))).toHaveLength(2);
+ });
+
+ it('keeps processing later artifacts after a rejected publication and reports the failed job', async () => {
+ const get = vi
+ .fn<(query: string) => Promise>()
+ .mockResolvedValueOnce({ artifacts: [{ id: 20 }, { id: 21 }] })
+ .mockRejectedValueOnce(new Error('checksum mismatch'))
+ .mockResolvedValueOnce({ storageVersion: 1, runId: '10', artifact: { id: 21 }, sources: [] });
+ const onStored = vi.fn();
+ await expect(publishVideoResults({ get, runId: '10', onStored })).rejects.toThrow(
+ '1 video publications failed',
+ );
+ expect(onStored).toHaveBeenCalledWith('10', '21', 0);
+ expect(get).not.toHaveBeenCalledWith('?page=1');
+ });
+
+ it('rejects a looping cursor instead of silently reporting complete coverage', async () => {
+ await expect(
+ publishVideoResults({
+ get: () => Promise.resolve({ runs: [], nextPage: 1 }),
+ onStored: vi.fn(),
+ }),
+ ).rejects.toThrow('pagination');
+ });
+});
diff --git a/packages/app/src/lib/video/video-publication.ts b/packages/app/src/lib/video/video-publication.ts
new file mode 100644
index 000000000..090651862
--- /dev/null
+++ b/packages/app/src/lib/video/video-publication.ts
@@ -0,0 +1,68 @@
+import { at, number, rows, text, type Json } from '@/components/video-benchmark/bundle';
+
+/** The publication job may write; every dashboard/media read remains published-only. */
+export async function publishVideoResults({
+ get,
+ runId,
+ onStored,
+}: {
+ get: (query: string) => Promise;
+ runId?: string;
+ onStored: (run: string, artifact: string, sources: number) => void;
+}) {
+ if (runId && !/^[1-9]\d*$/u.test(runId)) throw new Error('Invalid H3_RUN_ID');
+ const seenRuns = new Set();
+ const failures: unknown[] = [];
+ let page: number | null = 1;
+ while (page !== null) {
+ const catalog: Json = runId
+ ? { runs: [{ id: runId }], nextPage: null }
+ : await get(`?page=${page}`);
+ if (!Array.isArray(at(catalog, 'runs'))) throw new Error('Invalid video run catalog');
+ for (const run of rows(at(catalog, 'runs'))) {
+ const id = String(at(run, 'id'));
+ if (!/^[1-9]\d*$/u.test(id)) throw new Error('Invalid catalog run identity');
+ if (seenRuns.has(id)) continue;
+ seenRuns.add(id);
+ try {
+ const data = await get(`?run=${id}`);
+ if (!Array.isArray(at(data, 'artifacts')))
+ throw new Error('Invalid video artifact catalog');
+ const seenArtifacts = new Set();
+ for (const artifact of rows(at(data, 'artifacts'))) {
+ const artifactId = String(at(artifact, 'id'));
+ if (!/^[1-9]\d*$/u.test(artifactId)) throw new Error('Invalid artifact identity');
+ if (
+ seenArtifacts.has(artifactId) ||
+ at(artifact, 'stored') === true ||
+ at(artifact, 'expired') === true
+ )
+ continue;
+ seenArtifacts.add(artifactId);
+ try {
+ const result = await get(`?run=${id}&artifact=${artifactId}&format=media`);
+ if (
+ at(result, 'storageVersion') !== 1 ||
+ text(at(result, 'runId')) !== id ||
+ String(at(result, 'artifact', 'id')) !== artifactId ||
+ !Array.isArray(at(result, 'sources'))
+ )
+ throw new Error('Unexpected video storage response');
+ onStored(id, artifactId, rows(at(result, 'sources')).length);
+ } catch (error) {
+ failures.push(error);
+ }
+ }
+ } catch (error) {
+ failures.push(error);
+ }
+ }
+ const next = at(catalog, 'nextPage');
+ const nextPage = number(next);
+ if (next !== null && (nextPage === null || !Number.isSafeInteger(nextPage) || nextPage <= page))
+ throw new Error('Invalid video catalog pagination');
+ page = nextPage;
+ }
+ if (failures.length > 0)
+ throw new AggregateError(failures, `${failures.length} video publications failed`);
+}
diff --git a/packages/app/src/lib/video/video-storage.test.ts b/packages/app/src/lib/video/video-storage.test.ts
index 62a7c32a3..faf4267cb 100644
--- a/packages/app/src/lib/video/video-storage.test.ts
+++ b/packages/app/src/lib/video/video-storage.test.ts
@@ -3,7 +3,12 @@ import { strToU8, zipSync } from 'fflate';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { head, put, list } from '@vercel/blob';
import type * as BlobSdk from '@vercel/blob';
-import { publishedVideoHistory, readStoredArtifact, storeVideoArtifact } from './video-storage';
+import {
+ publishedVideoHistory,
+ readStoredArtifact,
+ storeVideoArtifact,
+ storedArtifacts,
+} from './video-storage';
import { storedBundle, storedFidelityBundle } from '@/components/video-benchmark/stored';
import { fidelityFixture } from '@/components/video-benchmark/fidelity.fixture';
@@ -263,6 +268,24 @@ const blob = (id: number) => ({
});
describe('published video history catalog', () => {
+ it('keeps suffixed native matrix indexes discoverable and rejects a different run in the name', async () => {
+ vi.stubEnv('BLOB_READ_WRITE_TOKEN', 'synthetic-test-token');
+ const name = `h3-results-10-2-${'a'.repeat(64)}`;
+ const native = { ...blob(10), pathname: `h3-video-media/v1/runs/10/${name}_20.json` };
+ const wrong = { ...native, pathname: native.pathname.replace('results-10', 'results-11') };
+ vi.mocked(list).mockResolvedValue({
+ blobs: [native, wrong],
+ hasMore: false,
+ cursor: undefined,
+ });
+ const saved = { storageVersion: 1, runId: '10', artifact: { id: 20, name }, sources: [] };
+ vi.spyOn(globalThis, 'fetch').mockResolvedValue(Response.json(saved));
+ const artifacts = await storedArtifacts('10');
+ expect(artifacts.map((item) => item.name)).toEqual([name]);
+ const history = await publishedVideoHistory(1);
+ expect(history.entries.map((entry) => entry.artifact.name)).toEqual([name]);
+ expect(put).not.toHaveBeenCalled();
+ });
it('lists every index page, orders by publication date, and reads only ten indexes without media writes', async () => {
vi.stubEnv('BLOB_READ_WRITE_TOKEN', 'synthetic-test-token');
vi.mocked(list)
diff --git a/packages/app/src/lib/video/video-storage.ts b/packages/app/src/lib/video/video-storage.ts
index 8a5e5ab05..c0dd6f5fc 100644
--- a/packages/app/src/lib/video/video-storage.ts
+++ b/packages/app/src/lib/video/video-storage.ts
@@ -1,3 +1,4 @@
+import { videoArtifactIdentity } from '@/components/video-benchmark/artifact-identity';
import { head, list, put, BlobNotFoundError } from '@vercel/blob';
import { archiveSources, type CIArtifact } from '@/components/video-benchmark/archive';
import {
@@ -37,10 +38,8 @@ export async function storedArtifacts(runId: string): Promise {
do {
const page = await list({ prefix: runPrefix(runId), cursor });
for (const blob of page.blobs) {
- const match = /\/(?h3-(?:results|video|fidelity)-\d+-\d+)_(?\d+)\.json$/u.exec(
- blob.pathname,
- );
- if (match?.groups)
+ const match = /\/(?[^/]+)_(?[1-9]\d*)\.json$/u.exec(blob.pathname);
+ if (match?.groups && videoArtifactIdentity(match.groups.name)?.run === runId)
result.push({
id: Number(match.groups.id),
name: match.groups.name,
@@ -259,10 +258,10 @@ export async function publishedVideoHistory(page: number): Promise[1-9]\d*)\/(?h3-(?:results|video|fidelity)-(?[1-9]\d*)-[1-9]\d*)_(?[1-9]\d*)\.json$/u.exec(
+ /^h3-video-media\/v1\/runs\/(?[1-9]\d*)\/(?[^/]+)_(?[1-9]\d*)\.json$/u.exec(
blob.pathname,
)?.groups;
- if (!match || match.run !== match.producer) continue;
+ if (!match || videoArtifactIdentity(match.name)?.run !== match.run) continue;
indexes.push({
runId: match.run,
publishedAt: blob.uploadedAt.toISOString(),
diff --git a/packages/app/src/lib/views-api/docs/extensions.ts b/packages/app/src/lib/views-api/docs/extensions.ts
index 9d8103933..7be5a3d43 100644
--- a/packages/app/src/lib/views-api/docs/extensions.ts
+++ b/packages/app/src/lib/views-api/docs/extensions.ts
@@ -582,7 +582,7 @@ export const operations: ApiOperation[] = Object.entries(NEW_VIEWS).map(
description: text(
`Read-only ${en.toLowerCase()} using the dashboard's source handlers and calculation helpers. Unknown and repeated query keys return 400. The response includes resolved params and preserves missing evidence. Renderer-only styling is not an API parameter.${
view === 'video'
- ? ' Default dashboard mode reuses published history → videoPoints → dashboardCells → metrics/plot/compare/evidence. It reads at most the same first five history pages as the UI, reports coverage/truncation, selects one canonical workload and keeps the shared sample floor. v_hidden affects chart/table only. view=compare additionally reads at most two already-published media artifacts, pairs cases with the UI helper and returns relative media paths without asset URLs; missing/failed media remains explicit. run/artifact or explicit discovery/results/tradeoff preserve the legacy contract. No date range, full-catalog completeness, power/quality qualification or causal bottleneck claim is implied. Local bundles and arbitrary URLs are excluded. Responses are no-store.'
+ ? ' Default dashboard mode reuses published history → videoPoints → dashboardCells → metrics/plot/compare/evidence. It reads at most the same first five history pages as the UI, reports coverage/truncation, selects one canonical workload and keeps the shared sample floor. v_hidden affects chart/table only. view=compare additionally reads at most two already-published media artifacts, pairs cases with the UI helper and returns relative media paths without asset URLs; missing/failed media remains explicit. run/artifact or explicit discovery/results/tradeoff preserve the legacy contract. Discovery includes standard run-sweep runs; these may have no video artifacts. Run artifact listings cover all GitHub pages and retain legacy and unique native matrix names. No date range, full-catalog completeness, power/quality qualification or causal bottleneck claim is implied. Local bundles and arbitrary URLs are excluded. Responses are no-store.'
: view === 'current-inferencex-image'
? ' ageSummary is the nearest-rank p90 of current filtered row submission ages at asOf (future-dated rows excluded). includeHistory=true adds 90 daily ageHistory points reconstructed from successful image-bearing submissions with the current active catalog. Each displayed configuration has one vote; repeated submissions reset its age even if the image tag is unchanged. Neither metric measures container build age.'
: view === 'gpu-metrics'
@@ -591,7 +591,7 @@ export const operations: ApiOperation[] = Object.entries(NEW_VIEWS).map(
}`,
`只读${zh},使用仪表板的数据读取和计算函数。未知或重复查询键返回 400;响应包含解析后的参数,保留缺失数据。仅影响样式的控件不作为 API 参数。${
view === 'video'
- ? ' 默认 dashboard 模式复用已发布历史 → videoPoints → dashboardCells → metrics/plot/compare/evidence。与界面一样最多读取前五页历史,返回覆盖范围和截断状态,选择一个 canonical workload 并应用相同样本门槛。v_hidden 只影响图表和表格。view=compare 额外读取最多两份已发布媒体产物,复用界面配对函数,仅返回相对媒体路径,不返回 asset URL;媒体缺失或读取失败会明确标记。run/artifact 或显式 discovery/results/tradeoff 保留原有契约。不代表日期区间、完整历史、功率/质量验收或瓶颈因果判断。不读取本地数据包或任意 URL。响应不缓存。'
+ ? ' 默认 dashboard 模式复用已发布历史 → videoPoints → dashboardCells → metrics/plot/compare/evidence。与界面一样最多读取前五页历史,返回覆盖范围和截断状态,选择一个 canonical workload 并应用相同样本门槛。v_hidden 只影响图表和表格。view=compare 额外读取最多两份已发布媒体产物,复用界面配对函数,仅返回相对媒体路径,不返回 asset URL;媒体缺失或读取失败会明确标记。run/artifact 或显式 discovery/results/tradeoff 保留原有契约。发现列表包括标准 run-sweep 运行,其中可能没有视频产物。单次运行的产物列表读取 GitHub 全部分页,兼容旧名称和原生矩阵的唯一名称。不代表日期区间、完整历史、功率/质量验收或瓶颈因果判断。不读取本地数据包或任意 URL。响应不缓存。'
: view === 'current-inferencex-image'
? ' ageSummary 按最近秩法计算当前筛选行在 asOf 的提交年龄 P90(排除未来日期行)。includeHistory=true 基于带镜像的成功提交和当前有效模型目录重建 90 个每日 ageHistory 点。每个展示配置计一次;即使镜像标签未变,重新提交仍会重置年龄。两项指标均不代表镜像构建年龄。'
: view === 'gpu-metrics'
diff --git a/packages/skills/skills/inferencex-api/integrity.json b/packages/skills/skills/inferencex-api/integrity.json
index f93da9e58..157474962 100644
--- a/packages/skills/skills/inferencex-api/integrity.json
+++ b/packages/skills/skills/inferencex-api/integrity.json
@@ -8,7 +8,7 @@
"references/cli-contract.md": "fa44faa38d889b4fbdee5ba42752b47758ee3706fab150513bd4e6db87a86cb0",
"references/cli.md": "96b228f34cb3600f4548f4dc84df8506531747286763c56ca834c77bee05e1eb",
"references/collectivex.md": "f79cf8e2779a9289ab69f79f4a4b338e0b9a5f76a3750a3e969f33a744e726a1",
- "references/dashboard-views.md": "34468e4b9367482c283ad77f4162e65809544843aa2472325660873dc1b021d0",
+ "references/dashboard-views.md": "b52705479e528cf33662d78138cd4c8c8969b6094708040cc62c5e6b6a2a6556",
"references/offline-exports.md": "95aa565dcd4c9e592159baa560a9a58217bc61e395de1c6daf0576795c7f4ec9",
"references/pareto.md": "1b4d2d163f982e3f2d97addce310789eae9c1e5badd82dd7501708c9e0385027",
"references/powerx.md": "5af5527d54a7e6191a5769080c122638b333b1ceb59e19fdee7df662a5cd3c8f",
diff --git a/packages/skills/skills/inferencex-api/references/dashboard-views.md b/packages/skills/skills/inferencex-api/references/dashboard-views.md
index 9d7ed385a..695dda74e 100644
--- a/packages/skills/skills/inferencex-api/references/dashboard-views.md
+++ b/packages/skills/skills/inferencex-api/references/dashboard-views.md
@@ -179,7 +179,7 @@ use the same defaults as the UI. Unknown/repeated query names still return 400.
`ready` means both artifacts were read, not that a matched case exists: always
inspect `count` and `selected` (they can be 0 and null).
Returned media paths are relative; private asset URLs and raw bundles are omitted.
-- Use `view=discovery&page=1` for the prior CI listing. `run=…&artifact=…` retains
+- Use `view=discovery&page=1` for the CI listing, including standard `run-sweep` runs; follow `nextPage` even when a page contains no video runs. Runs may have no video artifacts. Per-run listings include all artifact pages and legacy or uniquely named native matrix artifacts. `run=…&artifact=…` retains
the legacy result/serving/fidelity contract; `view=results|tradeoff` is explicit.
Legacy selectors and `v_*` selectors cannot be mixed. Legacy missing artifacts
return 204; dashboard mode returns its empty/partial projection and coverage.
From cb2f31d0fba649135edd13bf03efcbf0de55405b Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sun, 18 Oct 2026 01:16:14 -0700
Subject: [PATCH 101/104] fix: publish every native video sweep artifact
---
.github/workflows/h3-media.yml | 4 +-
docs/video-history.md | 10 +++
packages/app/scripts/warm-video-results.ts | 23 +++----
.../app/src/app/api/video-runs/route.test.ts | 24 ++++++-
packages/app/src/app/api/video-runs/route.ts | 38 +++++++----
.../video-benchmark/archive.test.ts | 24 +++++++
.../src/components/video-benchmark/archive.ts | 16 +++--
.../video-benchmark/artifact-identity.ts | 7 ++
packages/app/src/lib/api/api-route-catalog.ts | 6 +-
.../src/lib/video/video-publication.test.ts | 59 ++++++++++++++++
.../app/src/lib/video/video-publication.ts | 67 +++++++++++++++++++
.../app/src/lib/video/video-storage.test.ts | 25 ++++++-
packages/app/src/lib/video/video-storage.ts | 11 ++-
.../app/src/lib/views-api/docs/extensions.ts | 4 +-
.../skills/inferencex-api/integrity.json | 2 +-
.../references/dashboard-views.md | 2 +-
16 files changed, 274 insertions(+), 48 deletions(-)
create mode 100644 packages/app/src/components/video-benchmark/artifact-identity.ts
create mode 100644 packages/app/src/lib/video/video-publication.test.ts
create mode 100644 packages/app/src/lib/video/video-publication.ts
diff --git a/.github/workflows/h3-media.yml b/.github/workflows/h3-media.yml
index 5c02a85d4..5a8adfdae 100644
--- a/.github/workflows/h3-media.yml
+++ b/.github/workflows/h3-media.yml
@@ -1,6 +1,8 @@
name: 'Publish H3 media'
on:
+ repository_dispatch:
+ types: [publish-video-results]
schedule:
- cron: '*/15 * * * *'
workflow_dispatch:
@@ -31,5 +33,5 @@ jobs:
bun-version-file: package.json
- name: Persist completed H3 artifacts
env:
- H3_RUN_ID: ${{ inputs.run_id }}
+ H3_RUN_ID: ${{ inputs.run_id || github.event.client_payload.source_run_id }}
run: bun packages/app/scripts/warm-video-results.ts
diff --git a/docs/video-history.md b/docs/video-history.md
index 3f9a7cb05..ea0b48b8e 100644
--- a/docs/video-history.md
+++ b/docs/video-history.md
@@ -12,6 +12,12 @@ Two launchers produce the serving matrix, and `serving.ts` keys the contract on
Each observation also carries the cell's participating and allocated GPU counts, measurement wall seconds, clip duration and frame count, summed mean board watts, summed recorded enforced limits (null when no limit snapshot exists), the configured `tp_size` / `ulysses_degree` / `attention_backend` and the endpoint's replica count (`execution.deployment.replica_count`, null for bundles that predate it). The nullable `workloadKey` carries the full canonical workload identity when complete; prompts and seeds cannot be replaced by the shortened display label. These are additive, nullable fields under the same `schemaVersion: 1`; the hardware dashboard reads at most five pages and derives every displayed metric from them, so the browser never parses an artifact bundle for the chart.
+## Publication and discovery
+
+The `publish-video-results` repository dispatch starts publication for its `source_run_id`; scheduled and manual catch-up use the same job. The publication job follows every catalog `nextPage`, including empty filtered pages, and deduplicates run/artifact IDs. Each per-run lookup reads all GitHub artifact pages. Standard `run-sweep.yml` runs join legacy H3 workflows in discovery; a sweep with no video artifact remains empty. An explicit `H3_RUN_ID` limits catch-up to one run. Failed artifacts do not prevent later artifacts from being attempted, but the job still fails; timeout or failure is not proof that the catalog was fully processed.
+
+Native matrix artifacts use `h3-results---` while legacy names remain readable. The sealed `artifact_name`, run/attempt, and `ci.head_sha` bind a new artifact to GitHub metadata. The actual benchmark checkout remains `git_commit`, which may differ from the Actions head when CI tests a merge commit. Publishing still writes immutable objects before the index; history and Compare only read published indexes. Low-sample and failed sources remain history entries, without changing chart admission.
+
## Evidence boundaries
- Only descriptive observations are shown: this version has no selected matched baseline and computes no before/after delta.
@@ -26,6 +32,10 @@ Each observation also carries the cell's participating and allocated GPU counts,
## 中文说明
+`publish-video-results` repository dispatch 为指定 `source_run_id` 启动发布;定时任务和手动补发布复用同一任务。发布任务跟随所有 `nextPage`,包括筛选后为空的页面,并对运行和产物 ID 去重。单次运行会读取 GitHub 产物列表的全部分页;标准 `run-sweep.yml` 也进入发现列表,没有视频产物的 sweep 保持为空。`H3_RUN_ID` 可将补发布限定到一个运行。某个产物失败后仍尝试后续产物,但任务最终报告失败;超时或失败不代表完整处理了目录。
+
+原生矩阵采用 `h3-results---`,旧名称仍可读取。封存的 `artifact_name`、run/attempt 和 `ci.head_sha` 对应 GitHub 元数据;实际 benchmark checkout 仍单独记录为 `git_commit`,测试 merge commit 时它可以不同于 Actions head。发布继续先写不可变对象、最后写索引;历史和 Compare 只读已发布索引。失败或低样本来源保留在历史中,不降低图表门槛。
+
`/video` 与 `/zh/video` 首屏为跨硬件仪表板(见 [VideoGenX 仪表板](./videogenx-dashboard.md));本文描述的“性能历史”列表位于其下方可展开的区块,URL 带有 `history-*` 筛选参数(`history-hardware`、`history-concurrency`、`history-query`)时自动展开。每条记录链接到原始 GitHub Actions 运行。原有的按运行查看结果、trade-off 图表与 CI 运行浏览已随仪表板重建移除;视频对比由仪表板的 Compare 面板提供。
历史读取只列举既有发布索引的元数据,按索引发布时间排序,每页最多读取十份完整索引;不下载或发布媒体。原始执行时间取自 `ci.started_at`,与发布时间、重新导出的时间分开。索引无效时保留错误记录,缺失指标保留 null。每个 cell 另附参与/已分配 GPU 数、测量窗口秒数、视频时长与帧数、板卡平均功率之和、记录的生效功率上限之和(无快照时为 null)、配置的 `tp_size` / `ulysses_degree` / `attention_backend`,以及端点的副本数(`execution.deployment.replica_count`,早于该记录的产物包为 null);`workloadKey` 在信息完整时保留完整工作负载身份,prompts 与 seeds 不能由缩写显示标签替代。这些都是同一 `schemaVersion: 1` 下可为空的附加字段,硬件仪表板最多读取五页,并据此推导全部指标,浏览器不再解析产物包。
diff --git a/packages/app/scripts/warm-video-results.ts b/packages/app/scripts/warm-video-results.ts
index 9c4c54cb8..60a727082 100644
--- a/packages/app/scripts/warm-video-results.ts
+++ b/packages/app/scripts/warm-video-results.ts
@@ -1,4 +1,5 @@
import { env } from 'node:process';
+import { publishVideoResults } from '../src/lib/video/video-publication';
const productionOrigin = 'https://inferencex.semianalysis.com';
async function get(path: string) {
const response = await fetch(`${productionOrigin}/api/video-runs${path}`, {
@@ -9,18 +10,10 @@ async function get(path: string) {
throw new Error('BLOB_READ_WRITE_TOKEN is not configured on the frontend');
return response.json();
}
-const runId = env.H3_RUN_ID;
-if (runId && !/^[1-9]\d*$/u.test(runId)) throw new Error('Invalid H3_RUN_ID');
-const catalog = runId ? { runs: [{ id: runId }] } : await get('?page=1');
-const runs: { id: number | string }[] = catalog.runs;
-for (const run of runs) {
- const data = await get(`?run=${run.id}`);
- for (const artifact of data.artifacts) {
- if (artifact.stored || artifact.expired) continue;
- const result = await get(`?run=${run.id}&artifact=${artifact.id}&format=media`);
- if (result.storageVersion !== 1) throw new Error('Unexpected H3 storage response');
- console.log(
- `Stored H3 run ${run.id}, artifact ${artifact.id}, ${result.sources.length} executions`,
- );
- }
-}
+await publishVideoResults({
+ get,
+ runId: env.H3_RUN_ID,
+ onStored: (run, artifact, sources) => {
+ console.log(`Stored video run ${run}, artifact ${artifact}, ${sources} executions`);
+ },
+});
diff --git a/packages/app/src/app/api/video-runs/route.test.ts b/packages/app/src/app/api/video-runs/route.test.ts
index 2b0a70ebd..9e46dd58a 100644
--- a/packages/app/src/app/api/video-runs/route.test.ts
+++ b/packages/app/src/app/api/video-runs/route.test.ts
@@ -51,12 +51,13 @@ describe('H3 CI artifact access', () => {
{ id: 2, name: 'Test H3 Video', path: '.github/workflows/test-h3-video.yml' },
{ id: 3, name: 'H3 Video Smoke', path: '.github/workflows/h3-video.yml' },
{ id: 4, name: 'H3 retained-media fidelity', path: '.github/workflows/h3-fidelity.yml' },
+ { id: 5, name: 'InferenceX Sweep', path: '.github/workflows/run-sweep.yml' },
],
}),
);
const result = await GET(request());
const data = await result.json();
- expect(data.runs.map((r: { id: number }) => r.id)).toEqual([1, 3, 4]);
+ expect(data.runs.map((r: { id: number }) => r.id)).toEqual([1, 3, 4, 5]);
expect(result.headers.get('cache-control')).toContain('no-store');
});
it('refuses a private repository before reading any artifacts', async () => {
@@ -92,7 +93,7 @@ describe('H3 CI artifact access', () => {
.mockResolvedValueOnce(response({ private: false }))
.mockResolvedValueOnce(
response({
- name: 'h3-results-10-1',
+ name: 'h3-results-10-1-h3-sglang-h200-bf16',
workflow_run: { id: 10 },
size_in_bytes: 4,
archive_download_url: 'https://evil.example',
@@ -132,6 +133,25 @@ describe('H3 CI artifact access', () => {
artifacts: [],
});
});
+ it('discovers native row artifacts beyond the first run page without duplicating overlapping IDs', async () => {
+ const native = { id: 120, name: `h3-results-10-2-${'a'.repeat(64)}` };
+ fetchMock
+ .mockResolvedValueOnce(response({ private: false }))
+ .mockResolvedValueOnce(response({ id: 10, conclusion: 'failure' }))
+ .mockResolvedValueOnce(
+ response({
+ artifacts: Array.from({ length: 100 }, (_, id) => ({ id, name: 'unrelated' })),
+ }),
+ )
+ .mockResolvedValueOnce(
+ response({ artifacts: [native, native, { id: 121, name: 'h3-results-11-1' }] }),
+ );
+ const result = await GET(request('?run=10'));
+ const data = await result.json();
+ expect(data.artifacts).toEqual([native]);
+ expect(String(fetchMock.mock.calls[3][0])).toContain('artifacts?per_page=100&page=2');
+ expect(storeVideoArtifact).not.toHaveBeenCalled();
+ });
it('falls back to the CI ZIP when object storage is not configured', async () => {
fetchMock.mockResolvedValueOnce(response({ private: false }));
const result = await GET(request('?run=10&artifact=20&format=media'));
diff --git a/packages/app/src/app/api/video-runs/route.ts b/packages/app/src/app/api/video-runs/route.ts
index 87a4e89e2..e8a55c482 100644
--- a/packages/app/src/app/api/video-runs/route.ts
+++ b/packages/app/src/app/api/video-runs/route.ts
@@ -1,3 +1,5 @@
+import { videoArtifactIdentity } from '@/components/video-benchmark/artifact-identity';
+import type { CIArtifact } from '@/components/video-benchmark/archive';
import { type NextRequest, NextResponse } from 'next/server';
import {
GITHUB_API_BASE,
@@ -22,7 +24,6 @@ const ROOT = `${GITHUB_API_BASE}/repos/${GITHUB_OWNER}/${GITHUB_REPO}`;
const MAX_BYTES = 256 * 1024 ** 2;
const headers = { 'Cache-Control': 'private, no-store' };
const id = (value: string) => /^[1-9]\d{0,19}$/u.test(value);
-const artifactName = /^h3-(?:results|video|fidelity)-(?\d+)-(?\d+)$/u;
function github(path: string, signal = AbortSignal.timeout(30000)) {
const token = getGithubToken();
@@ -48,7 +49,8 @@ export async function GET(request: NextRequest) {
(runId && !id(runId)) ||
(artifactId && (!runId || !id(artifactId))) ||
!id(page) ||
- (history && (runId || artifactId || !Number.isSafeInteger(Number(page))))
+ !Number.isSafeInteger(Number(page)) ||
+ (history && (runId || artifactId))
)
return NextResponse.json(
{ error: 'Invalid CI run, artifact or page' },
@@ -137,8 +139,8 @@ export async function GET(request: NextRequest) {
{ status: metaResponse.status, headers },
);
const artifact = await metaResponse.json();
- const name = artifactName.exec(artifact.name ?? '');
- if (!name || name.groups?.runId !== runId || String(artifact.workflow_run?.id) !== runId)
+ const name = videoArtifactIdentity(artifact.name ?? '');
+ if (!name || name.run !== runId || String(artifact.workflow_run?.id) !== runId)
return NextResponse.json(
{ error: 'Artifact does not belong to this H3 run' },
{ status: 404, headers },
@@ -181,7 +183,7 @@ export async function GET(request: NextRequest) {
return new Response(stream, { headers: { ...headers, 'Content-Type': 'application/zip' } });
}
if (runId) {
- const [runResponse, artifactsResponse, saved] = await Promise.all([
+ const [runResponse, firstArtifactsResponse, saved] = await Promise.all([
github(`/actions/runs/${runId}`),
github(`/actions/runs/${runId}/artifacts?per_page=100`),
storedArtifacts(runId).catch(() => []),
@@ -191,13 +193,24 @@ export async function GET(request: NextRequest) {
{ error: 'CI run unavailable' },
{ status: runResponse.status, headers },
);
- if (!artifactsResponse.ok)
- return NextResponse.json({ error: 'Cannot list CI artifacts' }, { status: 502, headers });
- const data = await artifactsResponse.json();
- const artifacts = (data.artifacts ?? []).filter((a: { name: string }) => {
- const match = artifactName.exec(a.name);
- return match?.groups?.runId === runId;
- });
+ const artifacts: CIArtifact[] = [];
+ const seen = new Set();
+ let artifactsResponse = firstArtifactsResponse;
+ for (let artifactPage = 1; ; artifactPage++) {
+ if (!artifactsResponse.ok)
+ return NextResponse.json({ error: 'Cannot list CI artifacts' }, { status: 502, headers });
+ const data: { artifacts: CIArtifact[] } = await artifactsResponse.json();
+ for (const artifact of data.artifacts ?? []) {
+ if (videoArtifactIdentity(artifact.name)?.run !== runId || seen.has(artifact.id))
+ continue;
+ seen.add(artifact.id);
+ artifacts.push(artifact);
+ }
+ if ((data.artifacts?.length ?? 0) < 100) break;
+ artifactsResponse = await github(
+ `/actions/runs/${runId}/artifacts?per_page=100&page=${artifactPage + 1}`,
+ );
+ }
for (const stored of saved) {
const index = artifacts.findIndex((a: { id: number }) => a.id === stored.id);
if (index === -1) artifacts.push(stored);
@@ -218,6 +231,7 @@ export async function GET(request: NextRequest) {
runs: runs.filter(
(run: { name: string; display_title: string; path: string }) =>
(run.path === '.github/workflows/e2e-tests.yml' && /\bh3\b/iu.test(run.name)) ||
+ run.path === '.github/workflows/run-sweep.yml' ||
run.path === '.github/workflows/h3-video.yml' ||
run.path === '.github/workflows/h3-fidelity.yml',
),
diff --git a/packages/app/src/components/video-benchmark/archive.test.ts b/packages/app/src/components/video-benchmark/archive.test.ts
index 94f70b438..c77404b17 100644
--- a/packages/app/src/components/video-benchmark/archive.test.ts
+++ b/packages/app/src/components/video-benchmark/archive.test.ts
@@ -28,6 +28,30 @@ describe('CI ZIP import', () => {
const bundle = await loadBundle(source.read);
expect(bundle.manifestSha256).toBe(hash(manifest));
});
+ it('binds each native matrix artifact to its sealed name, run attempt and workflow revision', async () => {
+ const name = `h3-results-10-2-${'c'.repeat(64)}`;
+ const manifest = JSON.stringify({
+ run_id: '10',
+ run_attempt: '2',
+ git_commit: 'd'.repeat(40),
+ artifact_name: name,
+ ci: { head_sha: 'a'.repeat(40) },
+ });
+ const blob = archive({
+ 'manifest.json': manifest,
+ SHA256SUMS: `${hash(manifest)} manifest.json`,
+ });
+ const native = { ...artifact, name, workflow_run: { id: 10, head_sha: 'a'.repeat(40) } };
+ const sources = await archiveSources(blob, native);
+ expect(sources[0].id).toBe('10');
+ for (const altered of [
+ { ...native, name: name.replace('-2-', '-1-') },
+ { ...native, name: name.replace('c'.repeat(64), 'd'.repeat(64)) },
+ { ...native, workflow_run: { id: 10, head_sha: 'b'.repeat(40) } },
+ { ...native, workflow_run: { id: 11, head_sha: 'a'.repeat(40) } },
+ ])
+ await expect(archiveSources(blob, altered)).rejects.toThrow();
+ });
it('preserves original execution identities in an exported archive', async () => {
const index = JSON.stringify({
schema_version: '1.0.0',
diff --git a/packages/app/src/components/video-benchmark/archive.ts b/packages/app/src/components/video-benchmark/archive.ts
index de1e785d9..e6d4f2cb0 100644
--- a/packages/app/src/components/video-benchmark/archive.ts
+++ b/packages/app/src/components/video-benchmark/archive.ts
@@ -1,3 +1,4 @@
+import { videoArtifactIdentity } from './artifact-identity';
import { at, rows, safePath, sha256, text, type Json } from './bundle';
export interface CIArtifact {
@@ -66,9 +67,7 @@ export async function archiveSources(blob: Blob, artifact: CIArtifact) {
)
throw new Error('Missing verified archive entry point');
const index: Json = files['index.json'] ? JSON.parse(await read('index.json').text()) : null;
- const identity = /^h3-(?:video|results|fidelity)-(?\d+)-(?\d+)$/u.exec(
- artifact.name,
- )?.groups;
+ const identity = videoArtifactIdentity(artifact.name);
if (!identity) throw new Error('Invalid H3 artifact identity');
if (fidelity) {
const comparison: Json = JSON.parse(await read('comparison.json').text());
@@ -117,7 +116,16 @@ export async function archiveSources(blob: Blob, artifact: CIArtifact) {
};
});
const manifest: Json = JSON.parse(await read('manifest.json').text());
- if (at(manifest, 'run_id') !== identity.run || at(manifest, 'run_attempt') !== identity.attempt)
+ if (
+ at(manifest, 'run_id') !== identity.run ||
+ at(manifest, 'run_attempt') !== identity.attempt ||
+ ((identity.configuration || at(manifest, 'artifact_name') !== null) &&
+ at(manifest, 'artifact_name') !== artifact.name) ||
+ (artifact.workflow_run !== undefined &&
+ (String(artifact.workflow_run.id) !== identity.run ||
+ ((identity.configuration || at(manifest, 'ci', 'head_sha') !== null) &&
+ artifact.workflow_run.head_sha !== at(manifest, 'ci', 'head_sha'))))
+ )
throw new Error('Manifest and GitHub artifact identify different runs');
return [
{ id: text(at(manifest, 'run_id')), read: (path: string) => Promise.resolve(read(path)) },
diff --git a/packages/app/src/components/video-benchmark/artifact-identity.ts b/packages/app/src/components/video-benchmark/artifact-identity.ts
new file mode 100644
index 000000000..3c06a4dab
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/artifact-identity.ts
@@ -0,0 +1,7 @@
+export function videoArtifactIdentity(name: string) {
+ return (
+ /^h3-(?:results|video|fidelity)-(?[1-9]\d*)-(?[1-9]\d*)(?:-(?[a-z0-9]+(?:-[a-z0-9]+)*))?$/u.exec(
+ name,
+ )?.groups ?? null
+ );
+}
diff --git a/packages/app/src/lib/api/api-route-catalog.ts b/packages/app/src/lib/api/api-route-catalog.ts
index eae6b464b..7d0dd3071 100644
--- a/packages/app/src/lib/api/api-route-catalog.ts
+++ b/packages/app/src/lib/api/api-route-catalog.ts
@@ -615,10 +615,10 @@ export const apiRouteCatalog = [
method: 'GET',
classification: 'ui-artifact-read',
exclusionReason: {
- en: 'Hidden H3 viewer transport for live public CI runs, checksum-verified artifact ZIPs, and read-only published history (format=history). History projects existing immutable indexes without publishing media; these UI contracts are not a public data API.',
- zh: '供隐藏的 H3 查看器读取公开 CI 运行、校验和已验证的产物 ZIP,以及只读的已发布历史(format=history)。历史视图从既有不可变索引生成,不发布媒体;这些界面契约不作为公开数据 API。',
+ en: 'Hidden H3 viewer transport for live public CI runs, checksum-verified artifact ZIPs, and read-only published history (format=history). Discovery includes standard sweeps and paginates their artifacts; publication admits checksum-verified legacy and uniquely named native artifacts. History and format=published read existing immutable indexes without publishing media; these UI contracts are not a public data API.',
+ zh: '供隐藏的 H3 查看器读取公开 CI 运行、校验和已验证的产物 ZIP,以及只读的已发布历史(format=history)。发现列表包含标准 sweep,并读取运行的全部产物分页;发布流程接收校验通过的旧产物和唯一命名的原生产物。历史视图和 format=published 从既有不可变索引读取,不发布媒体;这些界面契约不作为公开数据 API。',
},
- sourceSha256: '0ae586743620bbd78125d9a5326d132b51258d73cab6bbb91f59df13440ac52b',
+ sourceSha256: '27f071ac4da20035dddbe1751fa2461ead409548e6cb0ff9653febe6586c5f58',
},
{
source: 'src/app/api/unofficial-run/route.ts',
diff --git a/packages/app/src/lib/video/video-publication.test.ts b/packages/app/src/lib/video/video-publication.test.ts
new file mode 100644
index 000000000..6d3441028
--- /dev/null
+++ b/packages/app/src/lib/video/video-publication.test.ts
@@ -0,0 +1,59 @@
+import { describe, expect, it, vi } from 'vitest';
+import type { Json } from '@/components/video-benchmark/bundle';
+import { publishVideoResults } from './video-publication';
+
+describe('video publication job', () => {
+ it('continues through empty and repeated pages, deduplicates artifacts, and retries only missing publications', async () => {
+ const stored = new Set();
+ const published = vi.fn();
+ const respond = (query: string): Json => {
+ if (query === '?page=1') return { runs: [], nextPage: 2 };
+ if (query === '?page=2') return { runs: [{ id: 10 }], nextPage: 3 };
+ if (query === '?page=3') return { runs: [{ id: 10 }, { id: 11 }], nextPage: null };
+ const run = query.includes('run=10') ? '10' : '11';
+ if (!query.includes('artifact='))
+ return {
+ artifacts: [
+ { id: 20, stored: stored.has(run) },
+ { id: 20, stored: stored.has(run) },
+ { id: 21, expired: true },
+ ],
+ };
+ stored.add(run);
+ return { storageVersion: 1, runId: run, artifact: { id: 20 }, sources: [] };
+ };
+ const get = vi.fn((query: string) => Promise.resolve(respond(query)));
+ await publishVideoResults({ get, onStored: published });
+ expect(published.mock.calls).toEqual([
+ ['10', '20', 0],
+ ['11', '20', 0],
+ ]);
+ expect(get.mock.calls.filter(([query]) => query === '?run=10')).toHaveLength(1);
+ await publishVideoResults({ get, onStored: published });
+ expect(published).toHaveBeenCalledTimes(2);
+ expect(get.mock.calls.filter(([query]) => query.includes('format=media'))).toHaveLength(2);
+ });
+
+ it('keeps processing later artifacts after a rejected publication and reports the failed job', async () => {
+ const get = vi
+ .fn<(query: string) => Promise>()
+ .mockResolvedValueOnce({ artifacts: [{ id: 20 }, { id: 21 }] })
+ .mockRejectedValueOnce(new Error('checksum mismatch'))
+ .mockResolvedValueOnce({ storageVersion: 1, runId: '10', artifact: { id: 21 }, sources: [] });
+ const onStored = vi.fn();
+ await expect(publishVideoResults({ get, runId: '10', onStored })).rejects.toThrow(
+ '1 video publications failed',
+ );
+ expect(onStored).toHaveBeenCalledWith('10', '21', 0);
+ expect(get).not.toHaveBeenCalledWith('?page=1');
+ });
+
+ it('rejects a looping cursor instead of silently reporting complete coverage', async () => {
+ await expect(
+ publishVideoResults({
+ get: () => Promise.resolve({ runs: [], nextPage: 1 }),
+ onStored: vi.fn(),
+ }),
+ ).rejects.toThrow('pagination');
+ });
+});
diff --git a/packages/app/src/lib/video/video-publication.ts b/packages/app/src/lib/video/video-publication.ts
new file mode 100644
index 000000000..23b824a12
--- /dev/null
+++ b/packages/app/src/lib/video/video-publication.ts
@@ -0,0 +1,67 @@
+import { at, number, rows, text, type Json } from '@/components/video-benchmark/bundle';
+
+export async function publishVideoResults({
+ get,
+ runId,
+ onStored,
+}: {
+ get: (query: string) => Promise;
+ runId?: string;
+ onStored: (run: string, artifact: string, sources: number) => void;
+}) {
+ if (runId && !/^[1-9]\d*$/u.test(runId)) throw new Error('Invalid H3_RUN_ID');
+ const seenRuns = new Set();
+ const failures: unknown[] = [];
+ let page: number | null = 1;
+ while (page !== null) {
+ const catalog: Json = runId
+ ? { runs: [{ id: runId }], nextPage: null }
+ : await get(`?page=${page}`);
+ if (!Array.isArray(at(catalog, 'runs'))) throw new Error('Invalid video run catalog');
+ for (const run of rows(at(catalog, 'runs'))) {
+ const id = String(at(run, 'id'));
+ if (!/^[1-9]\d*$/u.test(id)) throw new Error('Invalid catalog run identity');
+ if (seenRuns.has(id)) continue;
+ seenRuns.add(id);
+ try {
+ const data = await get(`?run=${id}`);
+ if (!Array.isArray(at(data, 'artifacts')))
+ throw new Error('Invalid video artifact catalog');
+ const seenArtifacts = new Set();
+ for (const artifact of rows(at(data, 'artifacts'))) {
+ const artifactId = String(at(artifact, 'id'));
+ if (!/^[1-9]\d*$/u.test(artifactId)) throw new Error('Invalid artifact identity');
+ if (
+ seenArtifacts.has(artifactId) ||
+ at(artifact, 'stored') === true ||
+ at(artifact, 'expired') === true
+ )
+ continue;
+ seenArtifacts.add(artifactId);
+ try {
+ const result = await get(`?run=${id}&artifact=${artifactId}&format=media`);
+ if (
+ at(result, 'storageVersion') !== 1 ||
+ text(at(result, 'runId')) !== id ||
+ String(at(result, 'artifact', 'id')) !== artifactId ||
+ !Array.isArray(at(result, 'sources'))
+ )
+ throw new Error('Unexpected video storage response');
+ onStored(id, artifactId, rows(at(result, 'sources')).length);
+ } catch (error) {
+ failures.push(error);
+ }
+ }
+ } catch (error) {
+ failures.push(error);
+ }
+ }
+ const next = at(catalog, 'nextPage');
+ const nextPage = number(next);
+ if (next !== null && (nextPage === null || !Number.isSafeInteger(nextPage) || nextPage <= page))
+ throw new Error('Invalid video catalog pagination');
+ page = nextPage;
+ }
+ if (failures.length > 0)
+ throw new AggregateError(failures, `${failures.length} video publications failed`);
+}
diff --git a/packages/app/src/lib/video/video-storage.test.ts b/packages/app/src/lib/video/video-storage.test.ts
index 62a7c32a3..faf4267cb 100644
--- a/packages/app/src/lib/video/video-storage.test.ts
+++ b/packages/app/src/lib/video/video-storage.test.ts
@@ -3,7 +3,12 @@ import { strToU8, zipSync } from 'fflate';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { head, put, list } from '@vercel/blob';
import type * as BlobSdk from '@vercel/blob';
-import { publishedVideoHistory, readStoredArtifact, storeVideoArtifact } from './video-storage';
+import {
+ publishedVideoHistory,
+ readStoredArtifact,
+ storeVideoArtifact,
+ storedArtifacts,
+} from './video-storage';
import { storedBundle, storedFidelityBundle } from '@/components/video-benchmark/stored';
import { fidelityFixture } from '@/components/video-benchmark/fidelity.fixture';
@@ -263,6 +268,24 @@ const blob = (id: number) => ({
});
describe('published video history catalog', () => {
+ it('keeps suffixed native matrix indexes discoverable and rejects a different run in the name', async () => {
+ vi.stubEnv('BLOB_READ_WRITE_TOKEN', 'synthetic-test-token');
+ const name = `h3-results-10-2-${'a'.repeat(64)}`;
+ const native = { ...blob(10), pathname: `h3-video-media/v1/runs/10/${name}_20.json` };
+ const wrong = { ...native, pathname: native.pathname.replace('results-10', 'results-11') };
+ vi.mocked(list).mockResolvedValue({
+ blobs: [native, wrong],
+ hasMore: false,
+ cursor: undefined,
+ });
+ const saved = { storageVersion: 1, runId: '10', artifact: { id: 20, name }, sources: [] };
+ vi.spyOn(globalThis, 'fetch').mockResolvedValue(Response.json(saved));
+ const artifacts = await storedArtifacts('10');
+ expect(artifacts.map((item) => item.name)).toEqual([name]);
+ const history = await publishedVideoHistory(1);
+ expect(history.entries.map((entry) => entry.artifact.name)).toEqual([name]);
+ expect(put).not.toHaveBeenCalled();
+ });
it('lists every index page, orders by publication date, and reads only ten indexes without media writes', async () => {
vi.stubEnv('BLOB_READ_WRITE_TOKEN', 'synthetic-test-token');
vi.mocked(list)
diff --git a/packages/app/src/lib/video/video-storage.ts b/packages/app/src/lib/video/video-storage.ts
index 8a5e5ab05..c0dd6f5fc 100644
--- a/packages/app/src/lib/video/video-storage.ts
+++ b/packages/app/src/lib/video/video-storage.ts
@@ -1,3 +1,4 @@
+import { videoArtifactIdentity } from '@/components/video-benchmark/artifact-identity';
import { head, list, put, BlobNotFoundError } from '@vercel/blob';
import { archiveSources, type CIArtifact } from '@/components/video-benchmark/archive';
import {
@@ -37,10 +38,8 @@ export async function storedArtifacts(runId: string): Promise {
do {
const page = await list({ prefix: runPrefix(runId), cursor });
for (const blob of page.blobs) {
- const match = /\/(?h3-(?:results|video|fidelity)-\d+-\d+)_(?\d+)\.json$/u.exec(
- blob.pathname,
- );
- if (match?.groups)
+ const match = /\/(?[^/]+)_(?[1-9]\d*)\.json$/u.exec(blob.pathname);
+ if (match?.groups && videoArtifactIdentity(match.groups.name)?.run === runId)
result.push({
id: Number(match.groups.id),
name: match.groups.name,
@@ -259,10 +258,10 @@ export async function publishedVideoHistory(page: number): Promise[1-9]\d*)\/(?h3-(?:results|video|fidelity)-(?[1-9]\d*)-[1-9]\d*)_(?[1-9]\d*)\.json$/u.exec(
+ /^h3-video-media\/v1\/runs\/(?[1-9]\d*)\/(?[^/]+)_(?[1-9]\d*)\.json$/u.exec(
blob.pathname,
)?.groups;
- if (!match || match.run !== match.producer) continue;
+ if (!match || videoArtifactIdentity(match.name)?.run !== match.run) continue;
indexes.push({
runId: match.run,
publishedAt: blob.uploadedAt.toISOString(),
diff --git a/packages/app/src/lib/views-api/docs/extensions.ts b/packages/app/src/lib/views-api/docs/extensions.ts
index 9d8103933..7be5a3d43 100644
--- a/packages/app/src/lib/views-api/docs/extensions.ts
+++ b/packages/app/src/lib/views-api/docs/extensions.ts
@@ -582,7 +582,7 @@ export const operations: ApiOperation[] = Object.entries(NEW_VIEWS).map(
description: text(
`Read-only ${en.toLowerCase()} using the dashboard's source handlers and calculation helpers. Unknown and repeated query keys return 400. The response includes resolved params and preserves missing evidence. Renderer-only styling is not an API parameter.${
view === 'video'
- ? ' Default dashboard mode reuses published history → videoPoints → dashboardCells → metrics/plot/compare/evidence. It reads at most the same first five history pages as the UI, reports coverage/truncation, selects one canonical workload and keeps the shared sample floor. v_hidden affects chart/table only. view=compare additionally reads at most two already-published media artifacts, pairs cases with the UI helper and returns relative media paths without asset URLs; missing/failed media remains explicit. run/artifact or explicit discovery/results/tradeoff preserve the legacy contract. No date range, full-catalog completeness, power/quality qualification or causal bottleneck claim is implied. Local bundles and arbitrary URLs are excluded. Responses are no-store.'
+ ? ' Default dashboard mode reuses published history → videoPoints → dashboardCells → metrics/plot/compare/evidence. It reads at most the same first five history pages as the UI, reports coverage/truncation, selects one canonical workload and keeps the shared sample floor. v_hidden affects chart/table only. view=compare additionally reads at most two already-published media artifacts, pairs cases with the UI helper and returns relative media paths without asset URLs; missing/failed media remains explicit. run/artifact or explicit discovery/results/tradeoff preserve the legacy contract. Discovery includes standard run-sweep runs; these may have no video artifacts. Run artifact listings cover all GitHub pages and retain legacy and unique native matrix names. No date range, full-catalog completeness, power/quality qualification or causal bottleneck claim is implied. Local bundles and arbitrary URLs are excluded. Responses are no-store.'
: view === 'current-inferencex-image'
? ' ageSummary is the nearest-rank p90 of current filtered row submission ages at asOf (future-dated rows excluded). includeHistory=true adds 90 daily ageHistory points reconstructed from successful image-bearing submissions with the current active catalog. Each displayed configuration has one vote; repeated submissions reset its age even if the image tag is unchanged. Neither metric measures container build age.'
: view === 'gpu-metrics'
@@ -591,7 +591,7 @@ export const operations: ApiOperation[] = Object.entries(NEW_VIEWS).map(
}`,
`只读${zh},使用仪表板的数据读取和计算函数。未知或重复查询键返回 400;响应包含解析后的参数,保留缺失数据。仅影响样式的控件不作为 API 参数。${
view === 'video'
- ? ' 默认 dashboard 模式复用已发布历史 → videoPoints → dashboardCells → metrics/plot/compare/evidence。与界面一样最多读取前五页历史,返回覆盖范围和截断状态,选择一个 canonical workload 并应用相同样本门槛。v_hidden 只影响图表和表格。view=compare 额外读取最多两份已发布媒体产物,复用界面配对函数,仅返回相对媒体路径,不返回 asset URL;媒体缺失或读取失败会明确标记。run/artifact 或显式 discovery/results/tradeoff 保留原有契约。不代表日期区间、完整历史、功率/质量验收或瓶颈因果判断。不读取本地数据包或任意 URL。响应不缓存。'
+ ? ' 默认 dashboard 模式复用已发布历史 → videoPoints → dashboardCells → metrics/plot/compare/evidence。与界面一样最多读取前五页历史,返回覆盖范围和截断状态,选择一个 canonical workload 并应用相同样本门槛。v_hidden 只影响图表和表格。view=compare 额外读取最多两份已发布媒体产物,复用界面配对函数,仅返回相对媒体路径,不返回 asset URL;媒体缺失或读取失败会明确标记。run/artifact 或显式 discovery/results/tradeoff 保留原有契约。发现列表包括标准 run-sweep 运行,其中可能没有视频产物。单次运行的产物列表读取 GitHub 全部分页,兼容旧名称和原生矩阵的唯一名称。不代表日期区间、完整历史、功率/质量验收或瓶颈因果判断。不读取本地数据包或任意 URL。响应不缓存。'
: view === 'current-inferencex-image'
? ' ageSummary 按最近秩法计算当前筛选行在 asOf 的提交年龄 P90(排除未来日期行)。includeHistory=true 基于带镜像的成功提交和当前有效模型目录重建 90 个每日 ageHistory 点。每个展示配置计一次;即使镜像标签未变,重新提交仍会重置年龄。两项指标均不代表镜像构建年龄。'
: view === 'gpu-metrics'
diff --git a/packages/skills/skills/inferencex-api/integrity.json b/packages/skills/skills/inferencex-api/integrity.json
index f93da9e58..157474962 100644
--- a/packages/skills/skills/inferencex-api/integrity.json
+++ b/packages/skills/skills/inferencex-api/integrity.json
@@ -8,7 +8,7 @@
"references/cli-contract.md": "fa44faa38d889b4fbdee5ba42752b47758ee3706fab150513bd4e6db87a86cb0",
"references/cli.md": "96b228f34cb3600f4548f4dc84df8506531747286763c56ca834c77bee05e1eb",
"references/collectivex.md": "f79cf8e2779a9289ab69f79f4a4b338e0b9a5f76a3750a3e969f33a744e726a1",
- "references/dashboard-views.md": "34468e4b9367482c283ad77f4162e65809544843aa2472325660873dc1b021d0",
+ "references/dashboard-views.md": "b52705479e528cf33662d78138cd4c8c8969b6094708040cc62c5e6b6a2a6556",
"references/offline-exports.md": "95aa565dcd4c9e592159baa560a9a58217bc61e395de1c6daf0576795c7f4ec9",
"references/pareto.md": "1b4d2d163f982e3f2d97addce310789eae9c1e5badd82dd7501708c9e0385027",
"references/powerx.md": "5af5527d54a7e6191a5769080c122638b333b1ceb59e19fdee7df662a5cd3c8f",
diff --git a/packages/skills/skills/inferencex-api/references/dashboard-views.md b/packages/skills/skills/inferencex-api/references/dashboard-views.md
index 9d7ed385a..695dda74e 100644
--- a/packages/skills/skills/inferencex-api/references/dashboard-views.md
+++ b/packages/skills/skills/inferencex-api/references/dashboard-views.md
@@ -179,7 +179,7 @@ use the same defaults as the UI. Unknown/repeated query names still return 400.
`ready` means both artifacts were read, not that a matched case exists: always
inspect `count` and `selected` (they can be 0 and null).
Returned media paths are relative; private asset URLs and raw bundles are omitted.
-- Use `view=discovery&page=1` for the prior CI listing. `run=…&artifact=…` retains
+- Use `view=discovery&page=1` for the CI listing, including standard `run-sweep` runs; follow `nextPage` even when a page contains no video runs. Runs may have no video artifacts. Per-run listings include all artifact pages and legacy or uniquely named native matrix artifacts. `run=…&artifact=…` retains
the legacy result/serving/fidelity contract; `view=results|tradeoff` is explicit.
Legacy selectors and `v_*` selectors cannot be mixed. Legacy missing artifacts
return 204; dashboard mode returns its empty/partial projection and coverage.
From e4840655f7f125cb138396aeaada95597dc51fc8 Mon Sep 17 00:00:00 2001
From: Wenyao Gao
Date: Sun, 18 Oct 2026 02:17:00 -0700
Subject: [PATCH 102/104] test: cover selected native video writer artifacts
---
.../fixtures/native-selected/README.md | 20 ++++
.../fixtures/native-selected/h3-sglang.zip | Bin 0 -> 47361 bytes
.../fixtures/native-selected/h3-vllm-omni.zip | Bin 0 -> 47408 bytes
.../fixtures/native-selected/wan-sglang.zip | Bin 0 -> 45262 bytes
.../native-selected/wan-vllm-omni.zip | Bin 0 -> 44399 bytes
.../video-benchmark/native-selected.test.ts | 98 ++++++++++++++++++
6 files changed, 118 insertions(+)
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-selected/README.md
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-selected/h3-sglang.zip
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-selected/h3-vllm-omni.zip
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-selected/wan-sglang.zip
create mode 100644 packages/app/src/components/video-benchmark/fixtures/native-selected/wan-vllm-omni.zip
create mode 100644 packages/app/src/components/video-benchmark/native-selected.test.ts
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-selected/README.md b/packages/app/src/components/video-benchmark/fixtures/native-selected/README.md
new file mode 100644
index 000000000..7b1805250
--- /dev/null
+++ b/packages/app/src/components/video-benchmark/fixtures/native-selected/README.md
@@ -0,0 +1,20 @@
+Synthetic selected-YAML writer replays, not GPU measurements or published runs.
+
+These archives were generated by the InferenceX `mvp_srt_selected.serve`,
+`run_matrix` / `mvp_runner.run_plan`, and `mvp_srt_bundle.build_bundle` implementations:
+
+| Fixtures | Producer commit |
+| ------------------------ | ------------------------------------------ |
+| H3 SGLang and vLLM-Omni | `3f9839c6826a9b530281e948ad240ea1a9e82702` |
+| Wan SGLang and vLLM-Omni | `4bfb66cae86cf7402fa466712ebf28c5e766c003` |
+
+Each uses its model's `release-v1` YAML selection at C1 with 20 measured slots and
+one warmup. GPU discovery, process execution, HTTP transport, media decoding and
+power inputs were replaced with synthetic collaborators; no model server ran.
+The clip bytes are deliberately not encoded video. The real writers emitted the
+request records, execution spec, receipts, manifest and checksums.
+
+Preserve the ZIP contents byte for byte. The regression opens these archives
+through the production importer and History projection. Before the selected
+server wrote its execution spec, the same writer input was rejected with
+`c1 verified evidence is missing`.
diff --git a/packages/app/src/components/video-benchmark/fixtures/native-selected/h3-sglang.zip b/packages/app/src/components/video-benchmark/fixtures/native-selected/h3-sglang.zip
new file mode 100644
index 0000000000000000000000000000000000000000..db9ea080861787c5284f17761490ab8083a8b033
GIT binary patch
literal 47361
zcmc$`Q*>aDaby+qToOZ6_Vuw%zI2R)-z)OE3P{+Iyd|zje+S>tg0&
z-c&N4`TX9hx2hs50Stl+00001F#bVa%X3gkKN$=FU>FSm0P6j%f+!yY6SIPnl)`}O
zsWnz3+)G!{A+#ZiP;6Y5F}_ggk9pP>>92Y=KG7Cvr_<{|uQe9PQd-1wvHd>^uZqKT
zoRHUMBN*2*+sU~jj6Q{pdqRXBwc&PuFYo~^MzKMsw}UM8PXQQlOVGpk58
z(ci5aoj0@$tbY)0xGa{^bcGT!ASKW@#(6zk3qEMN3tw;R*d6Ml-&i@iskZ9qZ1<7$
zaO2oBz}3N%E}ZV`P1eE7UU|c5SO-l!_g_Bqr*z?)Ys23XPMDzFL`}hzfR7?-N?f0Oema;GjewEWcnfxs#6l4
z&d_$djOM&kAr(3oTpYoCL6k33Gx6e4eB-zp3~xi`!NrO5k*iw&DWG{=eJOzvfK^=W
zY<@*DnZ2+jX}$KwKOae9rGmu9$$HNt=J~UR$3y$$kPev0rKI&Jm7|7~L3CgyRGVC*
zpxprdK)P6dgwp&nv#?Pp!|~l1k5B!{d`qEuStUUo^Ve98yYC8s)yn6fXp9!~^EER<
z15%PAYgRG3x{oi*MbA?jozGKXPZ)CsjkGQOGmQq8m93eVZAC&24P(?jg@Uq$8Ot0E
zsPe()Oy{0N<{ddvYr&`^-7#*DifPFEX4(S%rkiK=RjZl$jFy%^DisTWkygk1^C;?S;s=91EyN2Jr
z9uQA9qNac74@|aUwViM5V$PCx42rU?k=kK(THC~2lvpRFxu>cQE(E^{NP3L^iFx4?
zK1`M-ef~3;jo>MoV){1`EjT{&?_c6i{Qbp=7jTfvgfgS}ni?Gi_&Z_D4XX8oYVbl{
zi;8#rOSSn!>DI-%`#-xS8#98lRchCLNoLFQKa{u#BSBlcXzcBq*b)Bb*0GgKhukA(
zm#zV;{mrb^axf)%v#$KBG1Dqj(5fP(_Uv{ia=K$1EDG#x9=4@hzw=S`9^)3RYnBV4
zLUo%3oa&*v67Y|?TGGMTHfvLCdB*?GCf)3vGPRbk0q;kW$lz%(eDPCKSXEpA*Yq
zW76)9ZDa5&*@7#)cQlWVr8*2u&CltPWB0
zn`W~_D`ZIR<;#o&yz@h${XV?vnYV=*E6
zXmuiUOSKNJz{|Ko^!(@VNsJgWRd@3xYCwpe2-GcVd+P#lF@VL4fh?m|Q2@x-I>+TS
z(`@7L^?D$kIS4zexhbF}h&nF#6>0llYI>OhA
zu+#-X+hM}1Soz|`JrRZ`99V$VEtF2UbwpQbxi;kTZg*)s{_Y&!M|vhkJ6~gzO+;j{
zSc4KBzYT4ApW!vjrhKsALc8MLSB)X6Z~ok6x5!z!fp>a+U{gGFa_ZQ-@%DNuvEm?F
ziIFE?04oFq)&NPBdbm=U!VV)Dq_2Ni1FaXf9T5k%2Ydacs=XTz-iPxcac8CZTbk`e
zH$DbqG|)HFRpEnrZ}&Q1^QEC;QnXmDhCsGj_C7$|-_k0tF7WA#hS8ASs1YLPrUCurka8woAJQ=?O|5$y
zl(YDOK19J5Gu)e9keh3B?DFQ~@y=-O4M_GcNS0nmgE7
z7b;5GWY8gW9HDkDo3lu0VU*XGz)0T6_jM@3$eO64a}g}XU~*U9=?ws8CBq=Tf@tC
z#hY~bpzoibABvYul~U%OdQRgEKYFpuAM{?2l((7L#k$hYn;pA6Vs;XJ@
zUKzDv1qxbMA4;8|>Q>7=gobjM!b-5pe2gQMDF1Zu!Qy5LGv@Q+IwJH%xnmd~__*SrK)=*+I7(0jn65|F
z8KWX^4u4-6o=fATWXDsQ7Y987Z2Tcin(lC(i)YLhC5KU@0bd&%jsI6)p^^0%xEJpW&g&hW2}{^?&Go$+5Co#|g4o%vrK
zo#kI0o%LTGo$cQoou2Mr9sOU;I{JS#>*)X0tfT)|vyT2>%{uyjHS6gA)vTlcSF?`(
zU(Gs(|Cd=u{(qd;x#-zjIoZl5YR_
zj^o2Z=@Fvzye^%OWZe)W?GH3O)BfqZRW6IVCyy>ZcMcA|OrFc~^6H#oMFmtrr`S8I
zuNTTCtz=mjV9>Qe_H(FKYXyQ*q>4*rf{?K+?H`XzcL}$lEfTmVqrj~uxN3(fETEK<
zq|}l*$G*0j8m_Q-X&B@kD{0740xW(@95*76h_i~nX+L^WPoyA>kBy&;%~+%Od^E8Y
zV|-)azi};1@@hO_)v1Z?P4={DU#ZN=k?Z3>sSWo
ziaP+Y!}jj=)I~I1ZJ^!BZ?})El}>LcG`ySJ`+h4|kEiSHCYkJZ&P)xa|F90-SS+h!
zwBI`z1Q3aKEj2?~{etRCCWJ)A32`W3s6;u=b#Z{sDgyo%a%+xA?WY8y&&es`V}}t_
zYuUK?FC?V5c6-Y#46HTcMRcY*IvzD3Z-|47NE`d)ryWl|LIeu(K#c%@kYFvhD
z`%U%mJToHR)#cmKqeNnpAxo^sHDfC;xTmp7i-^a>o@)}vS`wWu&(ctpqFD52=9C~KK<#31CRMRJvyk8Cj2IR%(kHYAPZJQDi<`d
zG*|+BpOMh=C#yWoW$eoa7%Kofg#v3aYi90?Ly&!NEW$zGc=Qi88>W%4sCo<3K+s8I
z#GI%1i@S~!#!-D@z2#1sZg^9_*{(6j?a~6zF`A{ig>o$
zHIhzd`Ss*k%o9Z@6M9(LN*m$?RAo5zXh*t7zhG9SGk=8CzU5jwUrU=!8{#^u%F(q$
z-!2@{5mH!w=(aq!BSQ6`*Rr%{p2q+OzM>PzRFc+xW15u=&k$j#*M8yZldI4a-tfM^
zSRuSnat33+H+r*j>l;~ma828{jdxP|;oCKz&j>p&O%D^6-nRPSeN^L$rwh`BZ!^y2
z6+mtrn1VA;nQ@1TUXqg*^#i%ZUU$Op@kO}RaC9lQqZmlmoLNt({ox{M_3V5?31pKk
zsY8`I0h5f~Ip7S(B`pca-{&6VIu^h-FzPmCV2%9|AE+WqFwDE*wE~Ts{Dlp``6Rxo
zLhX@+$H(A!V@+b|0x&~c!ix)xEWDb6T1yj)gohEZx6xezhoTi%C6
z#2fo#S3q{0@L3M4YmV24wrseCs^F#vYmKeL@+t}xj1lUxnZ!a$M708xG%YpT(z1e4
zL^U~`#F8-ZOt9Cy1LhV<_W~8gmYBqCjLY`qJVAB0DFy!g^Ypm5+K;Yk1;j#xpSPvr
z_X;J`sKFeYk$d45l6wge&8ZR|ULL=)-V^ag2ixK1lqWVTR=@V}c|myj@}Je#Tlw$?
zf6}a?Y2AtU&Y*1qAA9?pdM#KJ>3VG@0>0Wt^w1}sm@V2bylj=P`-!ykIkFLwLHiy&(xMmY5u=TKcXlQbXJ$
zryr+3uUQ;L);#4$v}m2#=+0Il^hB1g#Zw8{wsVI;yZZHdFGIt*VuTOba1zZvKet
zi4cOY+Tp32UNX%F?GqY^k#X&VCxzo!iKJ3%P@@iN2NymP_+^xe{@WMue_i0;S;9u*
zqXGbMwF3ZP|2H+k$oajU;P6W^usqF_aM)pu8#;fYK;}+v-~|d5StHfIYfVm_)x^e!
zY-FkkR!Jyrb$&r{%c%g8$nsl>$7m&|S*x-E%Q~u}=XIXir<&E({fY9