Skip to content

Commit cc6680b

Browse files
docs(models): clarify manifest test policy
1 parent 0c617a9 commit cc6680b

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

‎apps/server/src/provider/ClaudeModelCatalog.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ import {
1111
resolveClaudeModelSlug,
1212
} from "./ClaudeModelCatalog.ts";
1313

14+
/**
15+
* Test policy: adding or changing a real Claude model in model-manifest.json
16+
* must not add or update tests here. These synthetic fixtures cover resolver
17+
* behavior once. Add a test only when Claude adapter semantics change, such
18+
* as introducing a new compatibility rule or dispatch mapping type.
19+
*/
20+
1421
const manifest = (): ModelManifestData => ({
1522
version: 1,
1623
currentModels: {},

‎apps/server/src/provider/ModelManifest.test.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ import {
1515
type ModelManifestData,
1616
} from "./ModelManifest.ts";
1717

18+
/**
19+
* Test policy: this file covers manifest machinery, not manifest contents.
20+
* Do not add assertions for real model slugs, names, status, aliases, or
21+
* profiles when editing model-manifest.json. Add tests only when fetch/cache
22+
* behavior or the provider-neutral resolver semantics change, and use
23+
* synthetic models for resolver coverage.
24+
*/
25+
1826
const CODEX = ProviderDriverKind.make("codex");
1927
const model = (overrides: Partial<ServerProviderModel>): ServerProviderModel => ({
2028
slug: "gpt-test",

‎docs/internals/model-manifest.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,18 @@ Claude model entries support:
2222
- `aliases`, `status`, `badge`, and `profile` for client presentation and selection.
2323
- `adapter.claudeCode.minVersion` and `maxVersionExclusive` for installed-runtime compatibility.
2424
- Profile-level effort mappings, model suffixes, and context-window metadata for dispatch.
25+
26+
## Test policy
27+
28+
Changing model data does not require tests. Do not add or update tests for a model slug, display
29+
name, alias, legacy status, version boundary, badge, or profile assignment. The bundled manifest is
30+
configuration and is validated by its schema when imported.
31+
32+
Add tests only when implementation behavior changes:
33+
34+
- Fetching, caching, fallback, or schema-version handling changes in the manifest service.
35+
- Provider-neutral profile resolution gains new semantics.
36+
- A provider adapter gains a new compatibility or dispatch mapping type.
37+
38+
Resolver tests must use synthetic providers and model names so normal JSON edits never create test
39+
churn.

0 commit comments

Comments
 (0)