评审两条 Important:迁移连带清掉指向身份的两张配置表;治理台收件人为空时出声

节点负责人(排在轮值之前)与触发器确认人都是无 FK 的裸 staff id,而 reset-runs 按设计
不碰配置表 —— 切换后留着就是「把单派给不存在的人」与「命中的单没人点头全进死信」。
governanceStaff 在全新安装(还没人以 admin 登录过)时是空集,而调用方是死信通知:
收件人为空原本会静默丢掉「出事了」这件事,现在留一条说清怎么办的话。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015kAzS35kMnZNt4YGgJXtfw
This commit is contained in:
xcs
2026-08-25 17:57:21 +08:00
co-authored by Claude Opus 5
parent dd31b91829
commit 8dc71db9d8
2 changed files with 23 additions and 2 deletions
+8
View File
@@ -25,3 +25,11 @@ create table if not exists sys.role_access (
-- 他们名下的运行数据由 `reset-runs` 清(迁移不碰运行表)。
delete from sys.work_group;
delete from sys.staff;
-- 身份没了,指着身份的**配置**也不能留:
-- `sys.node_owner.staff_id` 是运营配的节点负责人,它排在轮值**之前** —— 留着就是把单派给一个不存在的人;
-- `sys.trigger.confirm_staff_id` 是起单确认人,留下 stale id + confirm_required=true,
-- 正是「命中的单没人点头、全进死信」那个状态(那也是 setTriggerConfirm 不允许人手工造出来的状态)。
-- 这两张是**配置**表,`reset-runs` 按设计不碰(见 reset-runs.ts 的注释),所以只能在这里收拾。
delete from sys.node_owner;
update sys.trigger set confirm_required = false, confirm_staff_id = null where confirm_staff_id is not null;