b6de637905c2a5ee403d84c870b34be9f9cf1756
普查(客户库只读):1079 条活跃规则归型——多规则同实体 303/345(角色 OR 88%)、 多条件 op 串联 117、type 分布 CURRENTUSERORGID 323/OWNNERPROJECT 165/CURRENTUSERDEPARTID 27、 SPECIALDEPART/ORG 客户零用;OwnProjectWhere SysConfig 实际值取证。 实测(本地 eip4m0,可写):bootstrap-multidim.sql 构造 7 受控实体 + 规则矩阵, MultiDimPrivilegeRunner + ParityCli --multidim 多维 ctx 驱动引擎过滤 vs JDBC 等价 WHERE 逐行对拍——14 形态 100% 一致(39 行)+ 7/7 负例被拒。覆盖部门/组织/SPECIALDEPART/ OWNNERPROJECT 单维、op=AND 串联、多规则角色 OR 三态、建筑三维 OWNER×部门×项目。 客户库抽测(只读,P2-1 口径):DM_FILE(299)/SYS_USER(806)组织维 count+行级 MATCH + 负例被拒。 测试通道:EntityController 加 asDepart/asOrg(与 asUser 同性质,不传零回归), 使引擎可解析 CURRENTUSERDEPARTID/CURRENTUSERORGID 维度。 单测:MultiDimDataPrivilegeTest 9 测(getWhereClause 拼接矩阵,FakePOInfo 模式)。 全模块 test + ArchUnit 绿。手册新增 §5.34/§5.35。 R1 判定:引擎多维隔离语义成立,不构成 P2 阻塞;缺口(OWNNERPROJECT 客户库直拍/ 生产 ctx 注入/SPECIALDEPART 无真实样本)如实登记跟踪。未触发决策会 S1。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
eip4-platform
EIP4 平台正式工程(路线 A'):双层制模块化单体——保真层供奉,现代层生长。
架构依据:docs/架构设计.md(必读);坑位台账:docs/迁移手册.md。
模块
| 模块 | 职责 | 纪律 |
|---|---|---|
| platform-legacy-core | 保真层:移植引擎原样,包名 com.dsasp.* 不动 |
不重写、不改包名,与 framework 源码 diff 最小;对拍=完成定义 |
| platform-metadata | 现代层 REST API/DTO/OpenAPI(com.eip4.*) |
新代码须评审+单测 |
| platform-auth | 数据权限真实现(C2 已替换桩)+ P2 组织/权限 | |
| platform-converter | 模板转换器(P4) | 可独立 CLI 跑批 |
| platform-flow-gateway | P3 占位:Flowable 网关 | |
| platform-ai | P5 占位:MCP Server | |
| platform-parity | C1 对拍框架:录制/重放/RowDiff/自对拍 CLI | P1 一级交付物 |
| platform-app | Boot 启动器,组装全部模块 | ArchUnit 规则在此模块测试里 |
边界纪律(ArchUnit 强制):com.eip4.* 可调 com.dsasp.*,反向禁止。
常用命令
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
mvn test # 全模块测试(含 ArchUnit)
mvn spring-boot:run -pl platform-app -Dspring-boot.run.profiles=local # 本地库(5433/eip4m0)
mvn spring-boot:run -pl platform-app # 客户库副本(5435,只读使用)
# 对拍(详见 platform-parity/C1实测报告.md)
CP="platform-parity/target/classes:$(mvn -q org.apache.maven.plugins:maven-dependency-plugin:build-classpath -pl platform-parity -Dmdep.outputFile=/dev/stdout -o | tail -1)"
java -cp "$CP" com.eip4.platform.parity.selfcheck.ParityCli --all # 本地全量
java -cp "$CP" com.eip4.platform.parity.selfcheck.ParityCli --privilege # C2 数据权限样本
# 客户库:--jdbc=... --user=... --pass=... [--sampleRows=N --perPage=N]
tools/
tools/s3_rewriter/— C4 S3 脚本正则改写器(真实库自动化率 81.2%,P4 facade 扩容种子);run_eval.py --from-db连客户库复测tools/loadtest/load_p95.py— C3 压测 harness(零依赖)
本地自举
空库重建:platform-parity/src/main/resources/bootstrap/bootstrap-sys.sql + bootstrap-privilege.sql,
再 ParityCli --seed --all 建 21 个测试实体并灌数。
Description
Languages
Java
77.7%
Groovy
17%
Python
3.8%
Shell
1.3%
JavaScript
0.1%