[core] QuickJS terminal hook drain drops hook_disposed when a later same-token hook is also disposed before return
Los mantenedores suelen responder en 1 día
@akasakariko ya está trabajando en esto.
Desde el 29/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
- Área
- backend, distributed-systems
Línea de trabajo
Start by tracing the QuickJS completion drain and the hook event persistence path; the issue does not name files or tests. Reproduce with WORKFLOW_VM=quickjs using two disposed hooks with the same token in the final turn, then compare the persisted event order with the default Node VM. Done means the earlier hook_disposed is persisted before the later hook_created and the token conflict is avoided.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the Bug
When running on the QuickJS engine (WORKFLOW_VM=quickjs), if a workflow disposes a hook and then creates and disposes another hook with the same token in the final turn before returning (for example, using block-scoped or function-scoped using hook = createHook({ token })), the runtime omits the hook_disposed event for the earlier hook while still writing hook_created for the second hook. As a result, the second hook's creation conflicts with the first hook on the same token at workflow completion instead of succeeding like on the default Node VM engine.
Steps to Reproduce
- Enable the QuickJS runtime (
WORKFLOW_VM=quickjs). - Run a workflow that registers a hook with token
'shared', suspends and resumes, disposes that hook, and then in the final turn declaresusing hook2 = createHook({ token: 'shared' })(or callshook2.dispose()) before returning. - Inspect the run's persisted events: the first hook's
hook_disposedevent is skipped during the completion drain, and the second hook'shook_createdevent conflicts with the still-active token.
Expected Behavior
The first hook's hook_disposed event should still be persisted before the second hook's hook_created event whenever a later uncommitted hook with the same token is drained at workflow completion, even if that second hook was also disposed before the workflow returned.
Environment
@workflow/core:5.2.3(main commit 9d0f748)- Runtime: QuickJS (
WORKFLOW_VM=quickjs) - Node.js: v24.22.1
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.5k
- Forks
- 401
- Merge medio
- 1 d 21 h
- PR fusionados (30 d)
- 201
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vercel/workflow
-
getPortLazy re-runs OS port discovery on every call when it finds no portPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
node-module-esbuild-plugin: getImportedIdentifier only checks the first named import when locating a violationPosiblemente ocupada @div-cowboy la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
vercel/workflow#5057 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
code-transform.mdx §ID Generation omits the package-shipped `name@version` ID formPosiblemente ocupada @Mohith26 la tomó hace 114 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
Todos los issues de vercel/workflow
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
solidjs/solid-docs#1716 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Progress indicated by console logs is off by onePosiblemente ocupada @marceliwac la tomó hoy. Abiertobug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
aws-samples/aws-cdk-examples#1336 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
melgarafael/DeskcommCRM#4999 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días