Skip to content

fix(pm2): add generation-safe fleet shutdown protocol - #599

Draft
xiaoxueSunn wants to merge 4 commits into
deepcoldy:masterfrom
xiaoxueSunn:split/pm2-fleet-shutdown
Draft

fix(pm2): add generation-safe fleet shutdown protocol#599
xiaoxueSunn wants to merge 4 commits into
deepcoldy:masterfrom
xiaoxueSunn:split/pm2-fleet-shutdown

Conversation

@xiaoxueSunn

@xiaoxueSunn xiaoxueSunn commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Extract the PM2 fleet stop/start work from the original mixed PR into a dedicated stacked PR.

This PR:

  • adds generation-safe PM2 fleet shutdown and restart intent tracking
  • introduces supervisor prepare/commit/abort handshakes and loopback IPC
  • verifies exact PM2 descriptors before acting on a process
  • adds startup budgeting and first-upgrade compatibility fences
  • reports per-instance shutdown/restart outcomes without conflating stale generations

Stack

#596 has merged. This PR still depends on #598 and remains Draft until #598 merges.

Validation

Latest master merge-state validation:

  • mutation gate + RIFF focused regression: 7 files, 125 tests passed
  • PM2 fleet / descriptor / exact-start / preflight / capability / start-transaction / supervisor IPC / cleanup: 16 files, 218 tests passed
  • combined focused result: 343 tests passed
  • concurrency stress on gate + RIFF shutdown + fleet shutdown + PM2 start transaction + worker retirement: 125 tests × 10 rounds = 1,250 passed
  • TypeScript typecheck (tsc --noEmit)
  • git diff --check

Earlier complete stacked unit suite:

  • 699 files, 10,757 passed, 34 skipped
  • production build passed

Validation did not restart daemon, PM2, or RIFF runtime processes.

deepcoldy added a commit that referenced this pull request Jul 26, 2026
双人独立复审通过(Claude + Codex),申晗拍板合入。

- 首审→codex 抓到并发自锁→作者 78a5e1d 修复→双人复审确认修复正确
- 纯新增 gate 基础原语,零 runtime importer,运行时行为不变
- build + 23/23 测试绿;codex 原始死锁探针翻绿;作者回归测试 discriminating(旧码 30s 死锁/新码通过)
- 后续 #597/#598/#599 消费者 PR 将各自单独 review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant