From dd83d34b8e42bf23b278ec1d0bc134dcd47a20fb Mon Sep 17 00:00:00 2001 From: Codeman maintainer Date: Sun, 8 Nov 2026 09:35:55 +0100 Subject: [PATCH] test(local-model): every catalogue model id passes each offered harness's launch check The new GGUF rows carry lowercase quantization tags (`-q4_k_m`); pin that the launch path's model id test (`cliAcceptsCustomModelId()`) accepts every stock id for every harness the catalogue offers, so a row the chooser shows can always be started. Co-Authored-By: Claude Opus 5.5 --- test/local-model-harness-facts.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/local-model-harness-facts.test.ts b/test/local-model-harness-facts.test.ts index ae476753..cd38a78e 100644 --- a/test/local-model-harness-facts.test.ts +++ b/test/local-model-harness-facts.test.ts @@ -29,6 +29,7 @@ import { } from '../src/local-model/harness-facts.js'; import { stockInstallCommand } from '../src/cli-install-runner.js'; import { getCli, registryFilePath, reloadCliRegistry } from '../src/config/cli-registry/registry.js'; +import { getLocalModelCatalog } from '../src/config/local-model-catalog.js'; import type { CliEntry } from '../src/config/cli-registry/types.js'; import type { LocalModelCatalog } from '../src/types.js'; @@ -106,6 +107,15 @@ describe('cliAcceptsCustomModelId (the launch path’s model id test, on the sto } }); + it('accepts every model id of the stock catalogue for every harness the catalogue offers', () => { + const catalog = getLocalModelCatalog(); + for (const harness of catalog.harnesses.filter((row) => !row.gated)) { + for (const model of catalog.models) { + expect(cliAcceptsCustomModelId(stockEntry(harness.cli), model.id), `${harness.cli} ${model.id}`).toBe(true); + } + } + }); + it('refuses a colon for a CLI whose `--model` pattern has none, and accepts the same CLI without it', () => { const omp = stockEntry('omp'); expect(cliAcceptsCustomModelId(omp, 'qwen3.5:9b')).toBe(false);