diff --git a/src/app/(home)/_components/benchmark-results.tsx b/src/app/(home)/_components/benchmark-results.tsx index d472793..e7442c9 100644 --- a/src/app/(home)/_components/benchmark-results.tsx +++ b/src/app/(home)/_components/benchmark-results.tsx @@ -2,6 +2,27 @@ import Link from "next/link"; // Published runs: content/docs/memory-benchmark/{beam,index,longmemeval}.mdx. // Keep sample sizes beside the scores; these are separate benchmark protocols. +// Owner-approved homepage figures only. Full tables live on /docs/network/results. +const GAINS = [ + { + value: "1.77x", + label: "One Kimetsu brain", + detail: + "Better answers than no memory (+77%; Qwen 7B on LoCoMo, 40.3 vs 22.8).", + }, + { + value: "22% to 65%", + label: "As a network", + detail: + "Each agent answers better with merged memory than with only its own (Qwen 7B and 0.5B, LoCoMo and LongMemEval).", + }, + { + value: "about 99%", + label: "Over QUIC between machines", + detail: "Of the gain kept (7B LoCoMo 40.1 vs 40.3).", + }, +] as const; + export function BenchmarkResults() { return (
+
+

+ What Kimetsu adds +

+
+ {GAINS.map((gain) => ( +
+

+ {gain.value} +

+

+ {gain.label} +

+

+ {gain.detail} +

+
+ ))} +
+

+ Token F1 on LoCoMo (answerable questions) and LongMemEval (proxy F1, + not the official judge). QUIC measured on one machine over loopback.{" "} + + Tables and caveats + +

+
); } diff --git a/src/app/(home)/_components/network-section.tsx b/src/app/(home)/_components/network-section.tsx index 13f003e..652aa2b 100644 --- a/src/app/(home)/_components/network-section.tsx +++ b/src/app/(home)/_components/network-section.tsx @@ -1,27 +1,6 @@ import Link from "next/link"; import { NetworkDiagram } from "./network-diagram"; -// Owner-approved homepage figures only. Full tables live on /docs/network/results. -const GAINS = [ - { - value: "1.77x", - label: "One Kimetsu brain", - detail: - "Better answers than no memory (+77%; Qwen 7B on LoCoMo, 40.3 vs 22.8).", - }, - { - value: "22% to 65%", - label: "As a network", - detail: - "Each agent answers better with merged memory than with only its own (Qwen 7B and 0.5B, LoCoMo and LongMemEval).", - }, - { - value: "about 99%", - label: "Over QUIC between machines", - detail: "Of the gain kept (7B LoCoMo 40.1 vs 40.3).", - }, -] as const; - const FLOW = [ { title: "Invite", @@ -98,37 +77,6 @@ export function NetworkSection() { ))} -
-

- What Kimetsu adds -

-
- {GAINS.map((gain) => ( -
-

- {gain.value} -

-

- {gain.label} -

-

- {gain.detail} -

-
- ))} -
-

- Token F1 on LoCoMo (answerable questions) and LongMemEval (proxy F1, - not the official judge). QUIC measured on one machine over loopback.{" "} - - Tables and caveats - -

-
-

Install commands in Get started diff --git a/tests/homepage-network.test.mjs b/tests/homepage-network.test.mjs index 5f2296c..43ceda2 100644 --- a/tests/homepage-network.test.mjs +++ b/tests/homepage-network.test.mjs @@ -6,6 +6,13 @@ const section = await readFile( new URL("../src/app/(home)/_components/network-section.tsx", import.meta.url), "utf8", ); +const benchmarks = await readFile( + new URL( + "../src/app/(home)/_components/benchmark-results.tsx", + import.meta.url, + ), + "utf8", +); const page = await readFile( new URL("../src/app/(home)/page.tsx", import.meta.url), "utf8", @@ -32,18 +39,38 @@ test("places the network section under the hero and before benchmarks", () => { assert.match(section, /href="\/docs\/network"/); }); -test("uses only the three approved homepage figures", () => { - assert.match(section, /1\.77x/); - assert.match(section, /\+77%/); - assert.match(section, /40\.3 vs 22\.8/); - assert.match(section, /22% to 65%/); - assert.match(section, /about 99%/); - assert.match(section, /40\.1 vs 40\.3/); +test("renders the three network figures inside benchmarks, not the network section", () => { + const start = benchmarks.indexOf('id="benchmarks"'); + const end = benchmarks.indexOf("", start); + assert.ok(start >= 0 && end > start); + const block = benchmarks.slice(start, end); + const h2 = block.indexOf("Benchmark results"); + const singleBrain = block.indexOf("BEAM 100K"); + const networkLabel = block.search(/>\s*What Kimetsu adds\s*= 0 && + singleBrain > h2 && + networkLabel > singleBrain && + gainsMap > networkLabel, + ); + assert.match(block, /]*>\s*Benchmark results\s*<\/h2>/); + assert.match(block, /]*>\s*What Kimetsu adds\s*<\/h3>/); + for (const figure of ["1.77x", "22% to 65%", "about 99%"]) { + assert.equal(benchmarks.split(figure).length - 1, 1, figure); + assert.equal(section.includes(figure), false, figure); + } + assert.match(benchmarks, /\+77%/); + assert.match(benchmarks, /40\.3 vs 22\.8/); + assert.match(benchmarks, /40\.1 vs 40\.3/); assert.match( - section, + block, /Token F1 on LoCoMo \(answerable questions\) and LongMemEval \(proxy F1,\s+not the official judge\)\. QUIC measured on one machine over loopback\./, ); - assert.match(section, /href="\/docs\/network\/results"/); + assert.match(block, /href="\/docs\/network\/results"/); + assert.match(block, /Tables and caveats/); + assert.equal(section.includes("Tables and caveats"), false); + assert.equal(section.includes('href="/docs/network/results"'), false); for (const banned of [ "+17.5", "+13.6", @@ -57,6 +84,7 @@ test("uses only the three approved homepage figures", () => { "31.8", "38.9", ]) { + assert.equal(block.includes(banned), false, banned); assert.equal(section.includes(banned), false, banned); } });