diff --git a/.gitignore b/.gitignore index 4b39a6d..494128a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,11 @@ notes/burnlists/ dist/ dashboard/dist/ node_modules/ +.oven-test-*/ .playwright-cli/ output/ build/ *.zip *.tgz *.log +ovens/**/*.ir.json diff --git a/bin/burnlist.mjs b/bin/burnlist.mjs index 7ed20be..5389018 100755 --- a/bin/burnlist.mjs +++ b/bin/burnlist.mjs @@ -44,12 +44,12 @@ if (args[0] === "install" || args[0] === "uninstall") { } if (args[0] === "differential-testing" && args[1] === "schema") { - console.log(resolve(packageRoot, "ovens", "differential-testing", "schema", "differential-testing-data.schema.json")); + console.log(resolve(packageRoot, "ovens", "differential-testing", "engine", "data.schema.json")); return; } if (args[0] === "differential-testing" && args[1] === "sdk") { - console.log(resolve(packageRoot, "ovens", "differential-testing", "engine", "differential-testing-adapter-sdk.mjs")); + console.log(resolve(packageRoot, "ovens", "differential-testing", "engine", "adapter-sdk.mjs")); return; } @@ -62,11 +62,11 @@ if (args[0] === "differential-testing" && ["validate", "validate-bundle"].includ const path = resolve(process.cwd(), args[2]); const document = JSON.parse(readFileSync(path, "utf8")); if (document?.schema === "burnlist-differential-testing-bundle@1") { - const { assertDifferentialTestingBundle } = await import("../ovens/differential-testing/engine/differential-testing-transport.mjs"); + const { assertDifferentialTestingBundle } = await import("../ovens/differential-testing/engine/transport.mjs"); const bundle = assertDifferentialTestingBundle(path); console.log(`Valid Differential Testing bundle: ${bundle.scenarios.length} scenarios; selected ${bundle.selectedScenarioId ?? "none"}.`); } else { - const { assertDifferentialTestingData } = await import("../ovens/differential-testing/engine/differential-testing-data-contract.mjs"); + const { assertDifferentialTestingData } = await import("../ovens/differential-testing/engine/data-contract.mjs"); assertDifferentialTestingData(document); const sampleCount = document.fields.reduce((total, field) => total + field.sampleCount, 0); console.log(`Valid Differential Testing data: ${document.fields.length} fields, ${sampleCount} samples, ${document.summary.frames.uniqueTicks} aligned ticks.`); diff --git a/dashboard/oven-ir-compile.mjs b/dashboard/oven-ir-compile.mjs new file mode 100644 index 0000000..f2a05dc --- /dev/null +++ b/dashboard/oven-ir-compile.mjs @@ -0,0 +1,21 @@ +import { readFileSync } from "node:fs"; +import { relative, resolve, sep } from "node:path"; +import { fileURLToPath } from "node:url"; +import { compileOven } from "../src/ovens/dsl/oven-compile.mjs"; + +const dashboardDir = fileURLToPath(new URL(".", import.meta.url)); +const repoRoot = resolve(dashboardDir, ".."); + +export function compileOvenIrForJsonPath(irJsonAbsPath) { + if (!irJsonAbsPath.endsWith(".ir.json")) { + throw new Error(`Expected an .ir.json path, got ${irJsonAbsPath}`); + } + + const ovenPath = `${irJsonAbsPath.slice(0, -".ir.json".length)}.oven`; + const file = relative(repoRoot, ovenPath).split(sep).join("/"); + const compiled = compileOven(readFileSync(ovenPath, "utf8"), { file }); + if (!compiled.ok) { + throw new Error(`Failed to compile ${file}: ${JSON.stringify(compiled.diagnostics)}`); + } + return compiled.ir; +} diff --git a/dashboard/src/App.tsx b/dashboard/src/App.tsx index 2513e60..488a6a7 100644 --- a/dashboard/src/App.tsx +++ b/dashboard/src/App.tsx @@ -1,6 +1,6 @@ import { useMemo, useState } from "react"; import { Clock3, ListChecks } from "lucide-react"; -import { AppHeader, ChecklistDashboard, DashboardError, DifferentialTestingPage, EmptyState, FILTERS, Filters, NewOvenPage, ProjectGroup, RunBurnPage, StreamingDiff, VisualParityPage } from "@components"; +import { AppHeader, ChecklistOvenView, CustomOvenView, DashboardError, DifferentialTestingOvenPage, EmptyState, FILTERS, Filters, NewOvenPage, PerformanceTracingOvenPage, ProjectGroup, RunBurnPage, StreamingDiff, VisualParityPage } from "@components"; import { useDashboardData } from "@hooks"; import { currentSection, filterFromUrl, selectedBurnlist } from "@lib"; import type { Filter } from "@lib"; @@ -24,10 +24,10 @@ export function App() { return (