Refuse to replay a run stamped above core's SPEC_VERSION_MAX_SUPPORTED on every World

未关闭
#4,407 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

Start in @workflow/core's runtime and trace replay handling alongside requiresNewerWorld in world-local and world-postgres. Verify where run.specVersion is checked and how the existing error is raised. Done means every World rejects a run above core's SPEC_VERSION_MAX_SUPPORTED before replay, with coverage for the affected replay paths.

由索引模型根据 Issue 内容生成。

描述

From the formal-model review of #4327 / #4366 / vercel/workflow-server#1044 (vercel/workflow#4406, findings C4, E1 and W1).

requiresNewerWorld is only called in world-local and world-postgres, and it compares against the World package's SPEC_VERSION_MAX_SUPPORTED, not core's. On the Vercel path nothing refuses a run whose specVersion is above what the executing core can read. Such runs are reachable through:

  • an explicit start({ specVersion }), a same-deployment replay, or a CLI fallback stamp above the target's version (C4). The model shows an explicit 8 on a spec-7 or stable victim unlocks hook force-claim, and the victim's await hook is stranded.
  • a package skew where world-postgres is newer than core (W1).

Fix: in core's runtime, before replaying, fail closed (the same error requiresNewerWorld raises) when run.specVersion > SPEC_VERSION_MAX_SUPPORTED from @workflow/core's own view, on every World. This is one check, and it covers all of the above. (E1, where an executor attests more than it was validated for, is fixed separately in #4366.)

主要语言
TypeScript
星标
2.5k
派生
401
平均合并
1 天 21 小时
30 天内合并 PR
201

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

vercel/workflow 的其他 Issue

查看 vercel/workflow 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。