Workflow execution repeats #1091: cross-model CEL expression validation fails for unresolved types
Opened by stack72 · 4/7/2026· GitHub #1114
Description
The workflow execution path in execution_service.ts has the same bug that #1091 fixed for validateSingle() — it only resolves the target step's model type before validation, but cross-model CEL expressions reference types that haven't been resolved yet.
#1092 fixed this for validateSingle() in src/libswamp/models/validate.ts by resolving all model types before validation. The workflow execution path at src/domain/workflows/execution_service.ts:254-264 was not updated.
Steps to Reproduce
- Model
dedup(@keeb/mms/dedup) has globalArgs with CEL:${{ model.llm.definition.globalArguments.ollamaUrl }} - Model
llmis type@keeb/ollama(different extension type) swamp model validate dedup→ passes (fixed by #1092)swamp model method run dedup filter→ passes (resolves types on demand)swamp workflow run discover-and-download→ fails:Unknown model type "@keeb/ollama" for model "llm"
Root Cause
execution_service.ts line 254 calls resolveModelType(modelType, ...) for the step's model only. Line 260 then calls validateModel() which evaluates CEL expressions referencing other models. Those models' types are not in the registry.
Fix
Apply the same pattern as #1092: resolve all model types in the repo before running per-step validation. Or resolve types on-demand during expression evaluation.
Affected Code
src/domain/workflows/execution_service.tslines 253-264- PR #1092 fixed the equivalent path in
src/libswamp/models/validate.ts
Automoved by swampadmin from GitHub issue #1114
Closed
No activity in this phase yet.
stack72 commented 4/17/2026, 8:42:54 PM
Closing as already fixed by #1166 (commit 82a9115e, 2026-04-11).
Rather than duplicating the #1092 pattern into execution_service.ts, #1166 fixed the root cause one level deeper — in DefaultModelValidationService.validateModelPathReference (src/domain/models/validation_service.ts:706):
await modelRegistry.ensureTypeLoaded(result.type);
const targetDefinition = modelRegistry.get(result.type);The real problem was lazy-registered types from #1063: modelRegistry.has() returned true while get() returned undefined. Since execution_service.ts:270 calls the same validationService.validateModel, the workflow-run path picked up the fix for free — no per-call-site resolve loop needed.
Verified on c709f0fc (v20260417.185838.0): built a minimal repro with two models of different extension types and a cross-model CEL ref (${{ model.llm.definition.globalArguments.... }}). swamp model validate passes; swamp workflow run succeeds and resolves the expression — no Unknown model type error.
Sign in to post a ripple.