Skip to content

Commit 2667936

Browse files
committed
test: retarget first-directory-only case onto LS_LoadSegformerModel
#14489 de-registered the QwenVL family from MODEL_NODE_MAPPINGS, which fixed the reported symptom but left the underlying bug class untouched: the asset browser still resolves a node type to exactly one category and queries only that directory. Retargets the it.fails case onto LS_LoadSegformerModel (3 registered directories, the worst remaining case) so the test dies honestly when the bug is actually fixed, rather than documenting an example that no longer exists in the product. Verified failing for the right reason: include_tags resolves to 'models,segformer_b2_clothes', so segformer_b3_clothes and segformer_b3_fashion are unreachable. Still live on main as of 2026-08-03 for 5 node/input pairs; see the comment block for the full list. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 24e67f5 commit 2667936

1 file changed

Lines changed: 33 additions & 6 deletions

File tree

src/platform/assets/services/assetService.test.ts

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ vi.mock('@/stores/modelToNodeStore', () => {
4444
const nodeTypeCategories: Record<string, string> = {
4545
CheckpointLoaderSimple: 'checkpoints',
4646
LoraLoader: 'loras',
47-
AILab_QwenVL: 'LLM/Qwen-VL/Qwen2.5-VL-3B-Instruct'
47+
// First of the three `segformer_*` directories registered for this node in
48+
// MODEL_NODE_MAPPINGS. The store resolves a node type to a single category,
49+
// so the other two are unreachable — see the `it.fails` case below.
50+
LS_LoadSegformerModel: 'segformer_b2_clothes'
4851
}
4952
return {
5053
useModelToNodeStore: vi.fn(() => ({
@@ -1173,17 +1176,41 @@ describe(assetService.getAssetsPageForNodeType, () => {
11731176
expect(params.has('after')).toBe(false)
11741177
})
11751178

1176-
describe('QwenVL model directories', () => {
1177-
it.fails('lists models from every registered QwenVL directory, not just the first one (Qwen3-VL-8B-Instruct is currently unreachable in the dropdown)', async () => {
1179+
describe('nodes registered against multiple model directories', () => {
1180+
// KNOWN BUG (BE-5071 / FE-1080 / FE-1181). A node type can be registered
1181+
// against several model directories in MODEL_NODE_MAPPINGS, but the asset
1182+
// browser resolves a node type to exactly ONE category and queries only
1183+
// that directory. Every other directory is unreachable from the widget.
1184+
//
1185+
// Originally written against AILab_QwenVL (10 directories, of which only
1186+
// LLM/Qwen-VL/Qwen2.5-VL-3B-Instruct was reachable — the reported symptom
1187+
// in BE-5071). #14489 de-registered the QwenVL family entirely so those
1188+
// widgets fall back to the node's own combo, which fixed the *symptom*.
1189+
// The *bug class* is untouched: as of 2026-08-03 it is still live on main
1190+
// for five node/input pairs. Retargeted onto LS_LoadSegformerModel, the
1191+
// worst remaining case at three directories:
1192+
//
1193+
// LS_LoadSegformerModel.model_name segformer_b2_clothes,
1194+
// segformer_b3_clothes,
1195+
// segformer_b3_fashion
1196+
// UpscaleModelLoader.model_name upscale_models, onnx
1197+
// CLIPVisionLoader.clip_name clip_vision, clip
1198+
// FlashVSRNode (auto) FlashVSR, FlashVSR-v1.1
1199+
// UltralyticsDetectorProvider.model_name ultralytics/bbox,
1200+
// ultralytics/segm
1201+
//
1202+
// Expected to fail until FE-1177 (query model_type: rather than a single
1203+
// directory) or FE-1181 (generate the mapping from object_info) lands.
1204+
it.fails('lists models from every registered directory, not just the first one (segformer_b3_* are currently unreachable in the dropdown)', async () => {
11781205
fetchApiMock.mockResolvedValueOnce(
1179-
buildAssetListResponse([validAsset({ id: 'qwen3-vl-8b-instruct' })])
1206+
buildAssetListResponse([validAsset({ id: 'segformer-b3-fashion' })])
11801207
)
11811208

1182-
await assetService.getAssetsPageForNodeType('AILab_QwenVL')
1209+
await assetService.getAssetsPageForNodeType('LS_LoadSegformerModel')
11831210

11841211
const requestedUrl = fetchApiMock.mock.calls[0]?.[0] as string
11851212
const params = new URL(requestedUrl, 'http://localhost').searchParams
1186-
expect(params.get('include_tags')).toContain('Qwen3-VL-8B-Instruct')
1213+
expect(params.get('include_tags')).toContain('segformer_b3_fashion')
11871214
})
11881215
})
11891216
})

0 commit comments

Comments
 (0)