mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-29 07:20:43 +00:00
lib/data/zen.json is @zenlm/models read through lib/upstream at prebuild (scripts/zen.mjs); no page or client chunk imports the package. The Flash command finds its files by quantization, so no loader name ships. Co-authored-by: Hanzo Dev <[email protected]>
51 lines
2.3 KiB
TypeScript
51 lines
2.3 KiB
TypeScript
import { test, expect } from '@playwright/test'
|
|
import { allModels } from '@zenlm/models'
|
|
import zen from '../../lib/data/zen.json' with { type: 'json' }
|
|
import { NAMED, bare, said } from '../../lib/upstream'
|
|
import { RUNS, CELLS, RUNS_URL } from '../../lib/engine'
|
|
|
|
/**
|
|
* THE ZEN CATALOGUE A PAGE IMPORTS NAMES NOTHING ZEN DESCENDS FROM.
|
|
*
|
|
* lib/data/zen.json is @zenlm/models as scripts/zen.mjs writes it, and it is
|
|
* the only Zen catalogue a page or a client chunk reads. A push that changes
|
|
* only the data imports nothing a spec's dependency graph already knew, so the
|
|
* file is read here as well as in the export (e2e/gates/names.spec.ts).
|
|
*/
|
|
|
|
const LINEAGE = /repackag|re-?host|fine-?tun|lineage/i
|
|
|
|
test('the catalogue a page reads names no upstream checkpoint and tells no lineage', () => {
|
|
const text = JSON.stringify(zen)
|
|
expect(text.search(NAMED)).toBe(-1)
|
|
expect(text.search(LINEAGE)).toBe(-1)
|
|
})
|
|
|
|
test('the catalogue is the installed package, read through bare and said', () => {
|
|
expect(zen.map((m) => m.id)).toEqual(allModels.map((m) => m.id))
|
|
for (const m of allModels) {
|
|
const row = zen.find((z) => z.id === m.id)!
|
|
expect(row.description, m.id).toBe(bare(m.description))
|
|
expect(row.features, m.id).toEqual(m.features.filter(said))
|
|
}
|
|
})
|
|
|
|
test('a description keeps what the model is and loses where it came from', () => {
|
|
expect(bare('Compact 8B dense text model. Open-weight repackage of Qwen/Qwen3-8B (Apache-2.0).')).toBe('Compact 8B dense text model.')
|
|
expect(
|
|
bare('Speech-recognition model, ~1.7B, 24-layer audio encoder feeding a Qwen3 decoder; 30 languages. Fine-tuned from Qwen/Qwen3-ASR-1.7B (Apache-2.0).'),
|
|
).toBe('Speech-recognition model, ~1.7B; 30 languages.')
|
|
expect(bare('Text-to-video diffusion endpoint. Served via API, billed per unit; related open weights: zen-video-i2v (Wan2.2).')).toBe(
|
|
'Text-to-video diffusion endpoint. Served via API, billed per unit.',
|
|
)
|
|
expect(said('IQ2XXS GGUF re-host')).toBe(false)
|
|
expect(said('1M context')).toBe(true)
|
|
})
|
|
|
|
test('the engine board carries no file family in a run, a model or a link', () => {
|
|
const text = JSON.stringify({ RUNS, CELLS, RUNS_URL })
|
|
expect(RUNS.length).toBeGreaterThan(0)
|
|
expect(text.search(NAMED)).toBe(-1)
|
|
expect(RUNS_URL).toMatch(/\/bench-runs$/)
|
|
})
|