Files
railwaysystem/docs/issues-v1/03_dependency_graph.md
T

177 lines
6.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RailwaySystem Phase 3:Issue 依赖关系有向无环图 (Dependency DAG)
> **设计目标:** 明确各 Issue 之间的前后置依赖关系,清晰识别哪些任务必须串行推进、哪些任务可以无阻塞并行开发,指导团队实现资源利用率最大化。
---
## 1. Issue 全景依赖拓扑图 (Mermaid DAG)
```mermaid
flowchart TB
subgraph Wave0["Wave 0:基线支撑 (可立即无前置并行启动)"]
I1101["ISSUE-11-01<br/>RBAC权限体系"]
I1102["ISSUE-11-02<br/>字典配置方案"]
I0601["ISSUE-06-01<br/>外部Adapter SPI与Mock"]
end
subgraph Wave1["Wave 1:基础主数据与计划立项 (可立即并行启动)"]
I0101["ISSUE-01-01<br/>教师主数据"]
I0102["ISSUE-01-02<br/>学员主档与脱敏"]
I0103["ISSUE-01-03<br/>课程库资料"]
I0104["ISSUE-01-04<br/>空间资源:教室与场地"]
I0105["ISSUE-01-05<br/>宿舍房间与楼宇"]
I0201["ISSUE-02-01<br/>培训计划全生命周期"]
end
subgraph Wave2["Wave 2:计划配课、参训与排课"]
I0202["ISSUE-02-02<br/>本期课程引入"]
I0301["ISSUE-03-01<br/>本期参训名单维护"]
I0302["ISSUE-03-02<br/>名单Excel批量导入"]
I0401["ISSUE-04-01<br/>排课与四维冲突排他锁"]
I0402["ISSUE-04-02<br/>完整课表聚合VO"]
end
subgraph Wave3["Wave 3:住宿、门禁与报到"]
I0501["ISSUE-05-01<br/>批量住宿预分配防超卖"]
I0502["ISSUE-05-02<br/>调房走读管理"]
I0602["ISSUE-06-02<br/>门禁afterCommit解耦同步"]
I0503["ISSUE-05-03<br/>学员报到与时限控制"]
end
subgraph Wave4["Wave 4:课次考勤"]
I0701["ISSUE-07-01<br/>课次打卡与INV-01"]
I0702["ISSUE-07-02<br/>考勤名单与人工修正"]
end
subgraph Wave5["Wave 5:成绩与学习记录"]
I0801["ISSUE-08-01<br/>成绩项目配置与INV-04"]
I0802["ISSUE-08-02<br/>成绩录入台账INV-02/05"]
I0901["ISSUE-09-01<br/>学习记录接入与INV-03"]
end
subgraph Wave6["Wave 6:工作台与成效统计"]
I1001["ISSUE-10-01<br/>培训计划综合工作台"]
I1002["ISSUE-10-02<br/>计划成效统计概览"]
end
subgraph Wave7["Wave 7:全链路端到端验收"]
I1201["ISSUE-12-01<br/>P0主链路端到端集成验收"]
end
%% 跨模块依赖连线
I0103 --> I0202
I0201 --> I0202
I0102 --> I0301
I0201 --> I0301
I0301 --> I0302
I0202 --> I0401
I0101 --> I0401
I0104 --> I0401
I0401 --> I0402
I0301 --> I0501
I0105 --> I0501
I0501 --> I0502
I0501 --> I0602
I0601 --> I0602
I0301 --> I0503
I0401 --> I0701
I0301 --> I0701
I0503 --> I0701
I0701 --> I0702
I0202 --> I0801
I0801 --> I0802
I0301 --> I0802
I0301 --> I0901
I0202 --> I0901
I0601 --> I0901
I0201 --> I1001
I0301 --> I1001
I0401 --> I1001
I0503 --> I1001
I0503 --> I1002
I0701 --> I1002
I0802 --> I1002
I0901 --> I1002
I1001 --> I1201
I1002 --> I1201
I0702 --> I1201
I0502 --> I1201
I0602 --> I1201
style Wave0 fill:#f1f8e9,stroke:#8bc34a,stroke-width:1px
style Wave1 fill:#e0f7fa,stroke:#00bcd4,stroke-width:1px
style Wave2 fill:#e8eaf6,stroke:#3f51b5,stroke-width:1px
style Wave3 fill:#fce4ec,stroke:#e91e63,stroke-width:1px
style Wave4 fill:#fff3e0,stroke:#ff9800,stroke-width:1px
style Wave5 fill:#ede7f6,stroke:#673ab7,stroke-width:1px
style Wave6 fill:#f3e5f5,stroke:#9c27b0,stroke-width:1px
style Wave7 fill:#ffebee,stroke:#f44336,stroke-width:2px
```
---
## 2. 串行依赖关键路径 (Critical Path)
系统的**最短端到端主链路关键路径**(耗时最长、环环相扣的核心串行线)如下:
$$\begin{aligned}
\text{ISSUE-01-03 (课程库)} &\longrightarrow \text{ISSUE-02-01 (创建计划)} \\
&\longrightarrow \text{ISSUE-02-02 (配置本期课程)} \\
&\longrightarrow \text{ISSUE-04-01 (课次排课与冲突锁)} \\
&\longrightarrow \text{ISSUE-07-01 (课次考勤打卡)} \\
&\longrightarrow \text{ISSUE-10-02 (计划综合统计)} \\
&\longrightarrow \text{ISSUE-12-01 (端到端验收)}
\end{aligned}$$
同时并行的辅关键路径为参训与住宿线:
$$\text{ISSUE-01-02 (学员)} \longrightarrow \text{ISSUE-03-01 (名单)} \longrightarrow \text{ISSUE-05-01 (住宿)} \longrightarrow \text{ISSUE-05-03 (报到)} \longrightarrow \text{ISSUE-07-01 (考勤)}$$
---
## 3. 并行开发泳道分析
通过上述 DAG,可以清晰划分出以下 4 条高并发研发泳道:
### 泳道 A:基础设施与主数据泳道 (可完全自由推进)
- `ISSUE-11-01` (RBAC权限)
- `ISSUE-11-02` (字典配置方案)
- `ISSUE-06-01` (外部 Adapter SPI & Mock)
- `ISSUE-01-01` (教师主数据)
- `ISSUE-01-02` (学员主档与脱敏)
- `ISSUE-01-03` (课程库)
- `ISSUE-01-04` (教学空间资源)
- `ISSUE-01-05` (宿舍基础房间)
> **特征:** 相互之间完全解耦,可由多位开发者或 Gemini Flash 代理人并行同时开工,0 依赖等待。
### 泳道 B:排课教学线 (依赖课程与计划)
- `ISSUE-02-01` (计划立项)
- `ISSUE-02-02` (本期课程)
- `ISSUE-04-01` (排课与排他锁)
- `ISSUE-04-02` (完整课表聚合)
> **特征:** 教师与教室准备完毕后,沿开班排课主干顺畅推进。
### 泳道 C:学员生活与报到线 (依赖名单与宿舍)
- `ISSUE-03-01` (名单与档案)
- `ISSUE-03-02` (Excel批量导入)
- `ISSUE-05-01` (住宿智能预分配)
- `ISSUE-05-02` (调房与走读)
- `ISSUE-06-02` (门禁异步下发重试)
- `ISSUE-05-03` (学员报到确认)
> **特征:** 围绕 `enrollment_id` 展开,不依赖具体课次,主要管理学员个人生活保障。
### 泳道 D:成效考核与外部数据接入线
- `ISSUE-08-01` (成绩科目与权重)
- `ISSUE-08-02` (成绩录入与台账矩阵大表)
- `ISSUE-09-01` (外部自主学习记录接入)
> **特征:** 在学员名单和本期课程确定后即可独立推进,与排课考勤互不干扰。