Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
b9a9ab3
feat(flashnext): read the chunk settings through the startup parser (…
devopsfortunato Nov 16, 2026
25de9d7
changelog: credit #3591 beside #3308
ashhart Nov 16, 2026
e9d6292
contract: every chip checks each chip's qwen27 control edit matches i…
cshintov Nov 7, 2026
b9fcb87
changelog: #3343 under Unreleased
cshintov Nov 14, 2026
2ab23ae
changelog: #3343 back under Unreleased after the 1.2.9 cut
cshintov Nov 16, 2026
b6c8cd3
changelog: #3343's line from lines/3343.txt in place of its own
ashhart Nov 17, 2026
c4761bc
hip flashnext: stage a tile's rows of q once in tf_fn_idx_scores and …
gilby Nov 16, 2026
fa2bfd6
changelog: #3601's line from lines/3601.txt in place of its own
ashhart Nov 17, 2026
dffa95b
nemotron hip: add within-path invariance checks for prompt cuts, deco…
gilby Nov 16, 2026
0afc96c
changelog: #3580 under Unreleased
gilby Nov 16, 2026
f0a54bd
changelog: #3580's line from lines/3580.txt in place of its own
ashhart Nov 17, 2026
dfc0e84
template: add the float filter
Nipale-ai Nov 16, 2026
ac54737
changelog: #3577 under Unreleased
ashhart Nov 17, 2026
a4fcf30
fix(studio): accept optional benchmark product families
garvrao80 Nov 3, 2026
5d96746
changelog: #2693 under Unreleased
ashhart Nov 17, 2026
4a848e4
fix(studio): open model picker from planning-only control
garvrao80 Nov 3, 2026
b23758e
changelog: #3357 under Unreleased
ashhart Nov 17, 2026
d9455a6
h3: read the transformer shards ahead of their Metal mappings
plotarmordev Nov 13, 2026
47a0eec
docs(h3): transformer read-ahead in the Metal recipe
plotarmordev Nov 13, 2026
53c518e
docs(h3): read-ahead receipt against main in the Metal recipe
plotarmordev Nov 15, 2026
a373d62
changelog: #2999 under Unreleased
ashhart Nov 17, 2026
004fba2
kolibri1: tree-attention cache offsets signed; a ring attach makes be…
jschmied Nov 16, 2026
3f1290f
changelog: #3561 under Unreleased
ashhart Nov 17, 2026
0a985a7
flash next metal: the scale index is the default, prompt gathers and …
ashhart Nov 10, 2026
873bda7
changelog and ledger: Flash Next's scale index by default (#2805)
ashhart Nov 10, 2026
9e52d73
glm metal: 8-bit routed experts read once a window by unique expert
ashhart Nov 16, 2026
c4c548f
changelog: #3631 under Unreleased
ashhart Nov 17, 2026
53f2674
lean: one-line comments
ashhart Nov 17, 2026
32c9a98
glm metal: MTP drafts through the layer's own LM head when stored
ashhart Nov 16, 2026
527eec9
changelog: #3632 under Unreleased
ashhart Nov 17, 2026
b8ac579
lean: one-line comments
ashhart Nov 17, 2026
bf1f5f5
tf-glm-run: GLM_PROMPT_NLL scores every prompt token through the prom…
ashhart Nov 17, 2026
5080c21
changelog: #3633 under Unreleased
ashhart Nov 17, 2026
ba39839
lean: one-line comments
ashhart Nov 17, 2026
15cce71
changelog: #3633 as a dev-tool loss check
ashhart Nov 17, 2026
f3307fb
changelog: drop nine Unreleased lines that came in with #2805's re-po…
ashhart Nov 17, 2026
7362520
metal row projection: windows of 4+ rows run 8 at a time, then 4, 2 a…
ashhart Nov 13, 2026
9b552c8
metal row projection: the 8-row step only on chips with tensor units;…
ashhart Nov 14, 2026
d445cb3
metal row projection: retain the narrow source on pre-tensor chips
ashhart Nov 15, 2026
5451292
metal row projection: the two pipeline-selection tests run only on macOS
ashhart Nov 15, 2026
7590927
changelog: #3129 under Unreleased
ashhart Nov 17, 2026
5f246fb
Add an opt-in Keenable provider for agent web tools
ilya-bogin-keenable Nov 10, 2026
2304ee9
app: install the DNS fixture in the Keenable search test
ashhart Nov 17, 2026
7d205e6
changelog: #3637 under Unreleased
ashhart Nov 17, 2026
b5755e5
fix(dsv41): plan the 32-row prefill program so the second streams buf…
sx4im Nov 14, 2026
3c88c1f
fix(dsv41): fold the prefill plan comment into one line
sx4im Nov 16, 2026
4d16dbd
dsv41: a host test sweeps prefill segments of 17 to 33 rows, full and…
ashhart Nov 17, 2026
09c5fd5
changelog: #3388 under Unreleased
ashhart Nov 17, 2026
57cc613
qwen3_5 cuda: rows on one shared page run read each key tile once acr…
ashhart Nov 17, 2026
46f80f3
changelog: #3653 under Unreleased
ashhart Nov 17, 2026
699094f
changelog: each line once under Unreleased
ashhart Nov 17, 2026
31dcf66
qwen3.5 metal: declare warm turns so a follow-up resumes the reply
EugeneClaw Nov 15, 2026
265b6da
qwen3.5 prefill: background passes yield at chunk boundaries and keep…
EugeneClaw Nov 16, 2026
d78bd11
qwen3.5 metal: keep warm ends only on usable cuts
EugeneClaw Nov 16, 2026
c5a40d6
changelog: #3662 under Unreleased
ashhart Nov 17, 2026
36e9238
docs: add native HIP section to Nemotron 3.5 Lightning recipe
gilby Nov 16, 2026
5632a24
docs: correct Nemotron HIP draft sizing and cap
ashhart Nov 16, 2026
5061254
changelog: #3560 under Unreleased
ashhart Nov 17, 2026
1c6dbc5
core lanes: a cut chance tail prices by the rule's rates, not as a me…
devopsfortunato Nov 12, 2026
1f45866
core lanes: preserve cached cut markers on allocation errors (#2870)
devopsfortunato Nov 16, 2026
c0557ef
changelog: #2979 under Unreleased
ashhart Nov 17, 2026
8ada7fa
server: keep tool markup quoted in Markdown code spans and fences as …
gilby Nov 16, 2026
9e76a98
changelog: #3588 under Unreleased
ashhart Nov 17, 2026
f12978f
qwen3_5 cuda: warm turns prefill the next turn's prompt and keep only…
devopsfortunato Nov 11, 2026
8b18f0c
server: warm passes use the same system cut as chat requests
devopsfortunato Nov 16, 2026
d2cce0c
changelog: #2824 under Unreleased
ashhart Nov 17, 2026
fa64b09
docs: GLM-5.3-Flash long agent sessions: reasoning the client sends b…
ashhart Nov 16, 2026
7586e74
changelog: #3576's line names its PR
ashhart Nov 16, 2026
22772ad
docs: use TensorFold from OpenClaw through the openclaw-tensorfold pl…
ashhart Nov 14, 2026
1f527b6
test: seeded schedule exploration for the lane host
ashhart Nov 13, 2026
a870f91
changelog: #3233 under Unreleased
ashhart Nov 17, 2026
c0b5848
xpu: Qwen3.8-27B's RoPE tables from core's rope_freq, transformers' w…
ashhart Nov 3, 2026
cf11ff1
xpu: the RoPE table test gets its own step, test-rope-xpu-host
ashhart Nov 12, 2026
6d87164
changelog: #2000 under Unreleased
ashhart Nov 17, 2026
6821eb4
server: a grammar over 512 KiB is refused before it is compiled
ashhart Nov 12, 2026
04d2387
server: tools count once against the grammar size limit, with a refus…
ashhart Nov 12, 2026
560978b
server: keep the merged grammar route within its module limit
ashhart Nov 14, 2026
9489c38
changelog: #3038 under Unreleased
ashhart Nov 17, 2026
d8f63c5
Merge remote-tracking branch 'upstream/main' into feat/77-merge-upstr…
plotarmordev Nov 17, 2026
43f6898
glm wide: the failed-compile count takes the two by-expert row kernel…
plotarmordev Nov 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,66 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel

## Unreleased

- Server: a grammar over 512 KiB is refused with HTTP 400 before it is compiled, so one oversized schema can no longer hold the grammar compiler for a minute (#3038).

- Qwen3.8-27B on XPU: the target's and the DFlash2 drafter's RoPE tables come from core's exact helper, so they hold the reference's fp32 words; 15 of 32 and 18 of 64 values move by 1 ulp (#2000, part of #1852).

- Tests: `zig build test-lane-explore-host` explores the lane host's schedules from a seed (arrivals, cancels at every stage, the backend's room for live lanes and memory pressure) around a fake target, so ordering bugs show up without hand-picked orders (#3233).

- Qwen3.5 on CUDA: `qwen3_5` and `qwen3_5_moe` declare warm turns, so the server prefills a follow-up's prompt in the background and the next turn resumes past the previous reply, with replies unchanged (#2824). Thanks to @devopsfortunato.

- Server: tool-call markup quoted in Markdown inline code spans and fenced code blocks stays prose, in whole replies and in streaming, instead of opening, hiding or running as a live tool call (#3588). Thanks to @gilby.

- Lanes: shared draft pricing prices a chain-cut, unmeasured tail by the rule's rates instead of as a measured zero, and the cache's cut marker survives allocation errors (#2979). Thanks to @devopsfortunato.

- Docs: the Nemotron 3.5 Lightning recipe gains a "Native HIP on a Strix Halo iGPU" section with its configuration, memory footprint, throughput, prefill and exactness checks, and the intro lists HIP beside Metal and CUDA (#3560). Thanks to @gilby.

- Qwen3.5-2B on Metal: the engine declares `warm_turns` from its prompt cache, so a follow-up that re-renders earlier rows resumes the reply instead of prefilling the whole conversation again (#3662, from #3457). Thanks to @EugeneClaw.

- DeepSeek V4.1 on CUDA: a prompt whose prefill segment is 18 to 32 rows no longer replies with repeated begin-of-sentence tokens, because the second streams buffer is now planned for 32 rows; replies at every other length are unchanged (#3366, #3388). Thanks to @sx4im for the fix, @laudney for the sweep test (#3529) and @BadAd84 for the trace and the GB10 pair receipts.

- App: the built-in agent's `web_search` and `web_fetch` accept `provider: "keenable"`, an opt-in Keenable provider with no account or key; only the query or URL goes to Keenable, and the defaults are unchanged (#3637, from #2752). Thanks to @ilya-bogin-keenable.

- Nemotron on Metal: row projections over windows of 4 or more rows run 8 rows at a time, then 4, 2 and 1, so each weight code is unpacked once for up to eight rows; every row's sum keeps its order, bit-equal to one row alone (#3129).

- Flash Next on Metal (M1 through M4): the scale index is now the default for 4-bit experts in groups of 32, and `TF_FLASHNEXT_SCALE_INDEX=0` turns it off. Prompt passes and grouped decode windows read each group's scale and bias through the index too, and the routed experts' stored scales and biases are released once indexed; every kernel gets the same values, so replies keep their tokens. On an M3 Ultra with the MLX 4-bit checkpoint, memory in use once loaded falls from 129.6 to 122.5 GiB, drafted decode on one stream is 2.0% to 4.2% faster (prose 138.6 to 142.0 tok/s, a copy-heavy edit 282.0 to 293.8), four streams are 2.6% faster (203.1 to 208.3 tok/s) and a cold prompt's first token arrives about 1% sooner; load takes about 0.7 s longer (#2805, part of #2751).









- Kolibri-1: the tree-attention cache offsets are signed, so a server with default flags no longer panics with an integer overflow on its first request when a cache sits below the origin (#3561). Thanks to @jschmied.

- H3 on Metal: `Model.load` reads every transformer shard ahead of its mappings and fails the load on a missing or short shard; `TF_LOAD_PREFETCH` sets the reader count and `0` turns read-ahead off (#2999). Thanks to @plotarmordev.

- App: an idle task's disabled Planning only control opens the model picker on Local, so a planning provider no longer strands the user; the ordinary model button still opens All (#3357). Thanks to @garvrao80.

- Studio: local benchmark receipts with the optional `hardware.form_factor` field are accepted, kept in saved history and exports, while unknown labels, raw product IDs and extra hardware keys are still rejected (#2693). Thanks to @garvrao80.

- Templates: the chat template compiler accepts Jinja's `float` filter, `float(value, default=0.0)`, instead of refusing the template, and reads text as ASCII only (#3577). Thanks to @Nipale-ai.

- Tests: `tf-nemotron-hip-test invariance` checks Nemotron-H within-path bit invariance on HIP (prompt chunk cuts with the single-row first-token head, decode window widths and multi-stream grouping, and served prompt-cache resume against fresh prefill) (#3580, refs #3409).

- Qwen3.8-Flash-Next on HIP: `tf_fn_idx_scores` exits inactive decode-graph tiles before synchronization and stages each tile's q rows once in LDS before walking the four key-position slots, cutting kernel time from 276.0 ms to 141.5 ms at 8K and 2,873.9 ms to 2,091.4 ms at 32K on gfx1151 with identical tokens (#3601).

- Tests: the kernel contract checks each qwen27 control's source edit on every chip, for both tensor-unit settings, so a run on a chip without tensor units fails on a stale M5 edit too (#3343, follow-up to #2106). Thanks to @cshintov.

- GLM-5.3-Flash on Metal: checkpoints whose routed experts are not 4/64 read each expert once a drafted window for every row that picked it, and the shared expert once; replies are unchanged, and on an M5 Ultra an 8-bit build's greedy decode goes from 50.0 to 53.0 tok/s and sampled from 46.5 to 48.8 (#3631).
- GLM-5.3-Flash on Metal: a checkpoint that stores `layers.45.shared_head.head` drafts MTP tokens through it on one Mac while `lm_head` verifies every token, so replies are unchanged (#3632).
- Tests: `tf-glm-run`'s `GLM_PROMPT_NLL` scores every prompt token through GLM-5.3-Flash's prompt path, the gate for prompt kernels that are not bit-identical (#3633).
- Tests: `tf-glm-run`'s `GLM_PROMPT_NLL` scores every prompt token's loss through GLM-5.3-Flash's prompt path, a dev-tool check for comparing builds whose weights differ (#3633).
- Qwen3.8-27B on CUDA: with paged KV and the shared prompt store, streams resumed from one prompt read each shared prefix key tile once a forward instead of once a stream, through join variants of the rows kernels that only such forwards take; on a GB10 at a 32K shared prefix, decode is 57% faster at eight streams and 28% at four with every reply equal to main's, and every other forward runs main's kernels byte for byte (#3653).
- Docs: `docs/openclaw.md` shows how to use TensorFold from OpenClaw through the [openclaw-tensorfold](https://github.com/ashhart/openclaw-tensorfold) plugin: OpenClaw starts `tensorfold serve` on demand through its local model service and stops it when OpenClaw exits or the server sits idle, or connects to a server you run; each model's context window, image input and reasoning efforts come from `/v1/models`. Checked on Metal with Nemotron 3.5 Lightning and Qwen3.8-27B (#3341).

- Docs: the GLM-5.3-Flash CUDA recipe's Verified copy drafts section lists, for one checkpoint at TP=2 with `--parallel 4`, the loads that `TF_GLM_COPIES=1` sped up and the ones it slowed, and says the default stays off (#3335). Thanks to @Bizuayeu.
- Tests: the Qwen 3.8 27B Metal residency fixtures compile again on macOS after the DFlash2 target became a value (#3572).
- Tests: the kernel contract's Llama `gemm_untransposed` control edits the `TF_GEMM_NAX_KERNEL` instance line again, so its planted fault fails as it should (#3157, thanks @gilby, who found and fixed it first).
- Docs: the GLM-5.3-Flash recipe covers long agent sessions: reasoning the client sends back was about 330K of a 494K-token omp session, the model repeats itself past about 300K, and omp's `replayReasoningContent: false` keeps the prompt to messages and tool results; 1.2.9 and later GLM builds gave byte-identical replies at 458K
- Docs: the GLM-5.3-Flash recipe covers long agent sessions: reasoning the client sends back was about 330K of a 494K-token omp session, the model repeats itself past about 300K, and omp's `replayReasoningContent: false` keeps the prompt to messages and tool results; 1.2.9 and later GLM builds gave byte-identical replies at 458K (#3576)

- Docs: the GLM-5.3-Flash recipe records the FP8 latent cache's diagnostics on FP4-Local at TP=2 on two GB10s, with its bytes a token and fixed per-stream state, and says it is not qualified (#3432). Thanks to @laudney.

Expand Down Expand Up @@ -63,6 +120,8 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel
- Nemotron on Metal: a new prompt is filled a chunk at a time between other streams' decode rounds, instead of stalling them for its whole prefill. Chunks are cut exactly as before, so replies are unchanged (#3054, part of #3021).
- Nemotron Metal keeps the prompt IDs and one queued chunk across consecutive prefill steps.
Cancellation publishes the landed prefix before keeping it and credits that work before retirement.
- Flash Next on CUDA: `TF_FLASHNEXT_CHUNK` and `TF_FLASHNEXT_CHUNK_SOLO` are checked by name when the engine loads, so a malformed value names the variable, the supplied text and the accepted range, and a value that is empty or only spaces and tabs now reads as unset like every other setting; valid values and defaults are unchanged (#3308, #3591).

- Ling-3.0-tiny on Metal: the KDA mixer uses Kimi's existing `k3_kda` kernel (full-width gate, D=128, 4 taps) wired to Ling-tiny's 16 heads. Host `mixF64` is checked against a float64 dump of `oracle/kda_inner.py` (a stdlib copy of `ling_forward.py` Model.kda from conv through y, r = identity; that file is not imported and is not edited) on 16 heads x 2 and 4 rows (worst 8.3e-10 and 1.1e-9). The copy equals Model.kda at worst abs 2.8e-14 on those shapes (fake Ckpt, r = identity, `oracle/kda_vs_model.py`). `k3_kda` versus the dump is 0.0102 at 2 rows and 0.0119 at 4 rows, gated at 2 x (2^-7 of the largest |y|); true bf16 steps at those magnitudes are about 1.3 and 1.5 (values in [1, 2) share one step of 2^-7). `k3_kda` versus the f32 mixer is 0.001953 at 2 and 4 rows (gated under 0.01). `mix`/`mixF64` return `error.KdaWidthTooWide` when W > 2048 (ReleaseFast-safe; the stack conv window is 3 x 2048). Fixture inputs regenerate byte-identical; committed y matches a regenerate to within one float64 ulp, so they are numerically reproducible, not hash-reproducible. Every check uses r = identity and a fake Ckpt. No new kernel (for #1247).
- Ling-3.0-tiny: a host KDA reference, and a Metal check that Kimi's `k3_kda` matches it at Ling-tiny's shape; nothing is served yet (part of #1247).
- GLM-5.3-Flash on CUDA loads NVFP4_NZ5 checkpoints, whose block-32 routed experts read E2M1's code 0b1000 as +5; every other recipe and mix is refused by name, and E2M1 checkpoints load exactly as before (#2894). Thanks to @Bizuayeu.
Expand Down
9 changes: 9 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ an opaque conversation ID across search, fetch and follow-up turns; a new chat g
after 20 seconds and stop when the owning run is cancelled. Fetches return excerpts rather
than a complete page; `max_chars` still caps the displayed text.

### Optional Keenable web research

Ask the built-in agent to “Use Keenable to search the web” or “Use Keenable to read this URL.”
The `web_search` and `web_fetch` tools accept `provider: "keenable"` for the
[Keenable API](https://docs.keenable.ai/api-reference): general web results with page text,
and pages as Markdown, with no account or API key. Anonymous use has service rate limits.
Queries and requested URLs, with the app name `TensorFold`, go to Keenable when this provider is selected.
The same defaults, permissions, local-only restrictions, 20-second timeout and cancellation apply as above.

### Browser demo mode

Open `http://localhost:5173` in a browser (no Electron) and TensorFold runs in **demo mode** with
Expand Down
19 changes: 17 additions & 2 deletions app/electron/agent/engine/benchmark/controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import { syntheticBenchmarkReceipt } from './fixtures'
import type { SavedModelBenchmark } from './storage'
import type { BenchmarkProcessResult } from './process'
import { BENCHMARK_ENGINE_VERSION } from './version'
import { parseBenchmarkReceipt, type BenchmarkFormFactor } from './receipt'

const input = { id: 'benchmark_synthetic_0001', model: 'example-org/synthetic-model' }
function fixture() {
function fixture(formFactor?: BenchmarkFormFactor | null) {
let records: SavedModelBenchmark[] = []
let valid = true; let missing = false; let saveFails = false; let listFails = false; let restoreFails = false
let pauses = 0; let restores = 0; let releases = 0; let processes = 0; let cleanups = 0
Expand All @@ -18,7 +19,12 @@ function fixture() {
reserve: async () => ({ previousModel: 'example-org/prior-model', pause: async () => { pauses++ }, restore: async () => { restores++; if (restoreFails) throw new Error('/private/operator/restore') }, release: () => { releases++ } }),
workspace: async () => ({ directory: '/private/synthetic-workspace', receiptPath: '/private/synthetic-workspace/receipt.json', remove: async () => { cleanups++ } }),
process: () => { processes++; return { done: new Promise<BenchmarkProcessResult>(resolve => { finish = resolve }), cancel: () => finish({ code: 130, cancelled: true, overflow: false, failed: false }) } },
readReceipt: async () => missing ? null : syntheticBenchmarkReceipt(input.model),
readReceipt: async () => {
if (missing) return null
const receipt = syntheticBenchmarkReceipt(input.model)
if (formFactor !== undefined) Object.assign(receipt.hardware, { form_factor: formFactor })
return receipt
},
store,
}
const controller = new ModelBenchmarks(deps)
Expand All @@ -29,6 +35,15 @@ async function running(f: ReturnType<typeof fixture>) {
throw new Error('Synthetic benchmark did not reach running')
}
const normal = fixture()
for (const family of [null, 'Mac mini', 'Mac Studio', 'MacBook Pro', 'MacBook Air', 'iMac', 'Mac Pro'] as const) {
const f = fixture(family)
await f.controller.start(input); await running(f); f.finish(); await f.controller.settle()
assert.equal((await f.controller.snapshot())?.state, 'complete', 'A known Mac family cannot break a finished local benchmark')
assert.equal(Reflect.get((await f.controller.snapshot())!.metadata!.hardware, 'form_factor'), family)
assert.equal(parseBenchmarkReceipt(JSON.stringify(await f.controller.receiptForExport(input.id))).hardware.form_factor, family)
const reopened = new ModelBenchmarks(f.deps)
assert.equal(parseBenchmarkReceipt(JSON.stringify(await reopened.receiptForExport(input.id))).hardware.form_factor, family, 'Saved controller history retains validated product families')
}
const first = await normal.controller.start(input)
assert.equal(first.state, 'preparing')
await assert.rejects(normal.controller.start({ ...input, id: 'benchmark_synthetic_0002' }), /current local benchmark/)
Expand Down
23 changes: 23 additions & 0 deletions app/electron/agent/engine/benchmark/receipt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,26 @@ assert.equal(benchmarkCells(parseBenchmarkReceipt(JSON.stringify(buffered)))[0].
const unknown = structuredClone(receipt); unknown.hardware.gpus = []; unknown.hardware.gpu_count = null; unknown.hardware.source = 'unavailable'
assert.equal(benchmarkProtocolComplete(parseBenchmarkReceipt(JSON.stringify(unknown))), false)
console.log('Benchmark strict receipt, privacy, exact samples, complete-only aggregates, earlyEOS, warmup errors and unknown metrics passed')

for (const family of [null, 'Mac mini', 'Mac Studio', 'MacBook Pro', 'MacBook Air', 'iMac', 'Mac Pro'] as const) {
const withFamily = structuredClone(receipt)
Object.assign(withFamily.hardware, { form_factor: family })
const result = parseBenchmarkReceipt(JSON.stringify(withFamily), { model: receipt.model.repo_id, serial: false })
assert.equal(result.hardware.form_factor, family)
assert.deepEqual(result, withFamily, 'The app preserves the accepted metadata for storage and export')
assert.deepEqual(benchmarkCells(result), benchmarkCells(parsed), 'A product family cannot alter measured benchmark cells')
assert.equal(benchmarkProtocolComplete(result), true)
}
assert.equal(Object.hasOwn(parsed.hardware, 'form_factor'), false, 'Old receipts keep the field absent')
for (const family of ['', 'Mac17,16', 'mac mini', 'Mac mini M5 Pro', 'Mac mini\n', true, 7, [], {}, ['Mac mini']]) {
const invalid = structuredClone(receipt) as any
invalid.hardware.form_factor = family
assert.throws(() => parseBenchmarkReceipt(JSON.stringify(invalid)), /invalid|unsupported/)
}
for (const formFactor of [undefined, null, 'Mac mini']) {
const invalid = structuredClone(receipt) as any
if (formFactor !== undefined) invalid.hardware.form_factor = formFactor
invalid.hardware.model_identifier = 'Mac17,16'
assert.throws(() => parseBenchmarkReceipt(JSON.stringify(invalid)), /invalid|unsupported/, 'The optional key cannot admit unrelated hardware fields')
}
console.log('Studio accepts absent, null and six coarse product families, preserves metadata and rejects raw IDs, extra keys and invalid values.')
Loading