docs(r5): 三张跨产线表迁归属审计报告落盘(第2~5轮全量:提交链/隐性依赖/权限清理/冒烟实测/坏下拉修复/表治理清单)
This commit is contained in:
parent
00eb2e4292
commit
6e2eea96ab
100
docs/ownership-migration-audit-20260910.md
Normal file
100
docs/ownership-migration-audit-20260910.md
Normal file
@ -0,0 +1,100 @@
|
||||
# 三张跨产线表迁归属审计报告(第2~5轮)
|
||||
|
||||
日期:2026-09-10
|
||||
范围:sd_projects / sd_project_role_models / pipeline_deliverables 三表自 pipeline-sdlc 迁入 pipeline-core,
|
||||
配套路径切换、RBAC 重注册、坏下拉修复、表治理清单。全部变更已部署测试机并实测验证。
|
||||
|
||||
## 一、迁归属(第2轮)
|
||||
|
||||
### 提交链(四仓)
|
||||
|
||||
| 仓 | 提交 | 内容 |
|
||||
|---|---|---|
|
||||
| pipeline-core | 4b2fd4c | 迁入 3 models JSON + 2 CRUD json + 15 api dspy + 手写角色模型页整目录 + 4 组字典入 init/data.json |
|
||||
| pipeline-sdlc | 0a339a2 | 源侧全删不留副本(42 文件 -1443 行);清两处死双源:wwwroot/json/ 整目录(零消费方)、sd_project_list/index.ui 死占位页(零菜单引用) |
|
||||
| pipeline-app | b2e1017 | build.sh created_by 修补路径改 /pipeline_core/(sd_iterations 分支保留);load_path.py 删 2 条旧注册 + 补 3 条新注册 |
|
||||
| pipeline-service | 92cdafd | 项目/模型配置弹窗 URL 改 /pipeline_core/** |
|
||||
|
||||
### 交接清单之外补全的 4 处隐性依赖(不改必炸)
|
||||
|
||||
1. **15 个 api dspy 必须随页面迁**:页面用 `entire_url('../api/...')` 相对解析,
|
||||
页面挪到 /pipeline_core/ 后相对路径指向 core 的 api 目录,API 不迁则全部 404。
|
||||
2. **sdlc 留存页面(迭代/部署/特性)对 get_project_options.dspy 的引用改绝对路径**
|
||||
`/pipeline_core/api/**`;反向 core 的 sd_project_list subtables(迭代/仓库子表)改绝对路径
|
||||
`/pipeline-sdlc/**`。跨模块引用一律绝对路径,杜绝再次迁移时连锁断链。
|
||||
3. **cockpit_cards.dspy**(sdlc 驾驶舱卡片)项目管理弹窗 URL 同步改 /pipeline_core/。
|
||||
4. **全平台旧路径残留扫描 = 0**(含单双引号/Jinja 各种形态,实测)。
|
||||
|
||||
## 二、路径切换 + RBAC(第3轮)
|
||||
|
||||
- 新注册 3 条:/pipeline_core/sd_projects/**、/pipeline_core/sd_project_role_models/**、
|
||||
/pipeline_core/pipeline_deliverables/**(另有 /pipeline_core/** logined 通配兜底,实测挂
|
||||
logined + owner.superuser)。
|
||||
- 旧权限行清理:精确清单 20 条删除(连带 rolepermission 22 条);另揪出 3 条历史变体
|
||||
(末尾斜杠 / `**` 通配形态)一并删除。**保留 perm_sd_project_repos**——指向未迁移的
|
||||
仓库列表页,误删=403。
|
||||
- 备份:测试机与本地 /tmp/old_perms_backup.json(20 条被删权限全量)。
|
||||
- redis FLUSHDB -n 0(清 RBAC 双层缓存 TTL600s)+ restart-pipeline.sh 重启,进程存活确认。
|
||||
- import_init 幂等重跑:4 组字典(sd_project_status=5 / sd_project_type=8 /
|
||||
deliverable_type=4 / review_status=3)落库实测。
|
||||
|
||||
### 登录态 HTTP 冒烟(重启后实测,全绿)
|
||||
|
||||
| 组 | 路径 | 期望 | 实测 |
|
||||
|---|---|---|---|
|
||||
| 新 | /pipeline_core/sd_projects/index.ui | 200 | 200 (12483B) |
|
||||
| 新 | /pipeline_core/sd_project_role_models/index.ui | 200 | 200 (5900B) |
|
||||
| 新 | /pipeline_core/pipeline_deliverables/index.ui | 200 | 200 (10507B) |
|
||||
| 新 | /pipeline_core/api/get_{project,role,model}_options.dspy | 200 | 200 |
|
||||
| 旧 | /pipeline-sdlc/sd_projects/index.ui 等 4 条 | 不可达 | 500 invalid path(文件已删,非权限层) |
|
||||
| 回归 | /pipeline-sdlc/sd_iteration_list、sd_iterations、sd_deploy_env_list、index.ui、/pipeline_ops/index.ui | 200 | 全 200 |
|
||||
|
||||
注:冒烟登录路径是 /rbac/user/up_login.dspy(conf/rp.json any 白名单带 /rbac 前缀,
|
||||
直连 /user/up_login.dspy 会 401——不是 bug)。旧路径 500 语义 = url2file 找不到文件的
|
||||
"invalid path" 异常,等效不可达。
|
||||
|
||||
## 三、坏下拉修复(第4轮)
|
||||
|
||||
pipeline-core 提交 889b450:
|
||||
|
||||
| 坏点 | 根因 | 修复 |
|
||||
|---|---|---|
|
||||
| role 下拉 | models codes 指 appcodes_kv parentid='sd_role',但该字典组全平台不存在 | init/data.json 补 sd_role 字典组 8 项(与 get_role_options.dspy 硬编码 8 角色逐项对齐:agent.pm/requirement/design/develop/deploy_test/test/deploy_prod/qc) |
|
||||
| model_name 下拉 | codes 指旧 llm 表(8 行残留数据,已停用) | 改指 llm_model,cond="status='active'"(active=15 / disabled=5,停用模型不再出现) |
|
||||
|
||||
同时 model_name 字段 title 由 "llm.name" 改 "llm_model.name"。
|
||||
|
||||
事实澄清:线上手写页(wwwroot/sd_project_role_models/index.ui,git 跟踪)下拉走
|
||||
get_role_options.dspy / get_model_options.dspy(API 动态),本来就是好的;坏的是
|
||||
models JSON 的 codes 段——影响 xls2ui 生成链与工具链一致性,且 role codes 指向不存在
|
||||
的字典组属于潜伏缺陷。修复后双轨一致。
|
||||
|
||||
实测(登录态):get_role_options 返回 8 角色;get_model_options 返回缺省项 + 15 个
|
||||
active 模型(t2t/i2t/m2t 会话能力过滤生效)。sd_role 字典 8 项落库确认。
|
||||
|
||||
## 四、表治理清单(第5轮,记入 core README)
|
||||
|
||||
| 表 | 状态 | 证据 | 待办 |
|
||||
|---|---|---|---|
|
||||
| pipeline_conversations | **孤儿表**:有真实读写但无 models 定义 | 395 行,最新写入 2026-09-10 14:11(agent_loop_v2 sor.C 落盘);驾驶舱 v2 历史加载 SELECT;全平台 0 个 models JSON | 补 models 定义(归属 pipeline-service 或 core 待定);新库部署会缺表 |
|
||||
| sd_conversations | **死表**:有 models 定义但零写 | 32 行,全部停在 2026-08-01(驾驶舱 v2 上线前);现存引用仅 SELECT/DELETE/孤儿巡检 | 待删除决议(DROP + 删 models + 清 project_capability 引用) |
|
||||
|
||||
## 五、README / 技能同步(第5轮)
|
||||
|
||||
- pipeline-core/README.md:数据表补 3 行迁入表;新增"跨产线共享资源"与"表治理清单"章节。
|
||||
- pipeline-sdlc/README.md:数据表移除 sd_projects;补迁出说明与绝对路径消费约定。
|
||||
- module-migration 技能:已含本轮全部新经验(相对路径跟随页面迁移、权限变体 LIKE 扫、
|
||||
codes/手写页下拉双轨、import_init 吞错验证、aiomysql LIKE %% 转义、FLUSHDB+重启、
|
||||
/rbac 前缀登录冒烟法)。
|
||||
|
||||
## 六、遗留观察(非阻塞)
|
||||
|
||||
1. 生产部署须走 Nuitka 编译二进制门禁(铁律),本次仅测试机。
|
||||
2. pipeline-core 仓有一处未提交改动:skills_library/pipelines/platform_general/common/
|
||||
model-onboarding/SKILL.md(M 状态,非本任务产物,属并行工作,未动)。
|
||||
3. pipeline-app 有未跟踪文件 deploy/migrations/m0021_llm_usage_drop_token_cols.json
|
||||
(并行会话产物,未动)。
|
||||
4. 旧 llm 表(8 行残留)与 sd_project_repos 未迁移页面:属后续批次。
|
||||
5. 生产上线顺序:四仓 push(已完成)→ 生产 git pull + pip install(pipeline-service
|
||||
非 editable 必须 install)→ xls2ui 重跑 → import_init → 权限切换(备份→删旧→注册新)
|
||||
→ FLUSHDB -n 0 → 重启 → 同款冒烟。
|
||||
Loading…
x
Reference in New Issue
Block a user