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

Đang mở
#4,407 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
distributed-systems

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.)

Ngôn ngữ chính
TypeScript
Star
2.5k
Fork
401
Merge trung bình
1 ngày 21 giờ
Pull request đã merge (30 ngày)
201

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của vercel/workflow

Tất cả issue của vercel/workflow

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.