Relationships
#2926 Worker dispatch rebuilds the definition with Definition.create, so a legacy-named model cannot run on a worker
Opened by hammz · 10/1/2026· Shipped 10/2/2026
Description
src/worker/exec_dispatch.ts (around line 178) reconstructs the definition from the remote execution envelope with Definition.create, which applies the strict new-definition name rule (lowercase alphanumeric with hyphens/underscores, max 64 chars, from bf0320ef / #2177). Definitions created before that rule may carry non-conforming names (for example uppercase) and still load and run locally through the permissive DefinitionSchema / fromData path. method_execution_service.ts copies currentDefinition.name into definitionMeta.name, so dispatching such a definition to a worker should make Definition.create throw a ZodError on the worker and fail the dispatch.
Found by code reading while triaging swamp-club#2923; not yet reproduced end to end.
Steps to reproduce (expected)
- Have a model definition whose name predates the strict rule (e.g. hand-edit a definition YAML to name MyServer).
- Run one of its methods with worker placement so it dispatches to a worker.
Expected
The worker reconstructs the definition with the permissive path (Definition.fromData or equivalent), as local execution does, and the method runs.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.