feat(iit): QC deep fix + V3.1 architecture plan + project member management

QC System Deep Fix:
- HardRuleEngine: add null tolerance + field availability pre-check (skipped status)
- SkillRunner: baseline data merge for follow-up events + field availability check
- QcReportService: record-level pass rate calculation + accurate LLM XML report
- iitBatchController: legacy log cleanup (eventId=null) + upsert RecordSummary
- seed-iit-qc-rules: null/empty string tolerance + applicableEvents config

V3.1 Architecture Design (docs only, no code changes):
- QC engine V3.1 plan: 5-level data structure (CDISC ODM) + D1-D7 dimensions
- Three-batch implementation strategy (A: foundation, B: bubbling, C: new engines)
- Architecture team review: 4 whitepapers reviewed + feedback doc + 4 critical suggestions
- CRA Agent strategy roadmap + CRA 4-tool explanation doc for clinical experts

Project Member Management:
- Cross-tenant member search and assignment (remove tenant restriction)
- IIT project detail page enhancement with tabbed layout (KB + members)
- IitProjectContext for business-side project selection
- System-KB route access control adjustment for project operators

Frontend:
- AdminLayout sidebar menu restructure
- IitLayout with project context provider
- IitMemberManagePage new component
- Business-side pages adapt to project context

Prisma:
- 2 new migrations (user-project RBAC + is_demo flag)
- Schema updates for project member management

Made-with: Cursor
This commit is contained in:
2026-03-01 15:27:05 +08:00
parent c3f7d54fdf
commit 0b29fe88b5
61 changed files with 6877 additions and 524 deletions

View File

@@ -8,7 +8,7 @@
## 1. 迁移时间线总览
当前共 **14 个已应用迁移**,覆盖 2025-10 至 2026-02 的演进过程。
当前共 **15 个已应用迁移**,覆盖 2025-10 至 2026-02 的演进过程。
```
2025-10 ████ init + conversations + batch + review_tasks
@@ -140,6 +140,15 @@
| 核心内容 | 对齐 Schema 类型注解与数据库实际类型ssa_workflows/ssa_workflow_steps 的 VARCHAR 长度和 TIMESTAMP 精度 + 清理 2 个重复外键 |
| 性质 | Schema 精度对齐SQL 对实际数据库为幂等操作 |
### #15 — 20260228_add_iit_phase2_user_project_rbac
| 属性 | 值 |
|------|-----|
| 应用时间 | 2026-02-28 12:17:00 |
| 影响 Schema | iit_schema, platform_schema |
| 核心内容 | Phase 2 用户-项目关联 + RBACuser_mappings 增加 user_idFK → platform_schema.usersprojects 增加 tenant_idFK → platform_schema.tenantsUserRole 枚举增加 IIT_OPERATOR |
| 创建方式 | 手动创建 + `prisma migrate resolve --applied`(降级方案) |
---
## 3. 迁移创建方式说明
@@ -148,7 +157,7 @@
|------|---------|---------|
| `prisma migrate dev` | 标准开发流程 | #1 ~ #9 |
| `prisma migrate dev --create-only` | 仅生成不执行 | — |
| 手动创建 + `prisma migrate resolve --applied` | Shadow DB 无法重放时 | #12, #13, #14 |
| 手动创建 + `prisma migrate resolve --applied` | Shadow DB 无法重放时 | #12, #13, #14, #15 |
| `prisma db push` (⚠️ 非标准) | 快速原型,不产生迁移记录 | 造成了 drift patch 的必要性 |
---