pbl_compiler/wwwroot/api/pbl_game_definition_create.dspy
agent.develop cb1132e6a9 fix(pbl_compiler): M3b RBAC 29条显式登记+CRUD只读拒绝端点+json根键统一+audit BinOp解析修复
- scripts/load_path.py: PATHS_CONTRACTS 20 条(含 M3b 5 个导出契约) + PATHS_READONLY_DENY 9 条
  = 29 条全显式登记,无通配符;与 wwwroot/api/*.dspy(29) 一一对应
- wwwroot/api/: 新增 9 个 CRUD 只读拒绝端点(create/update/delete × 3 表),
  封死 xls2ui 回退默认写入口,保 rules_hash 29.6 确定性指纹唯一写入路径
- json/*.json: 根级 browserfields 合并进 params,三文件统一 tblname/alias/title/params 根键集,
  editable 齐备 new_/update_/delete_data_url 且指向真实 .dspy
- scripts/audit_rbac_parity.py: 修复 PATHS = A + B (BinOp) 解析取空的自身缺陷(假 FAIL 根因),
  新增 json/ 根键白名单 + editable 三 URL + 幽灵/漏登记 检查
- pbl_compiler/init.py: 文件头注释登记条数与代码事实对齐(29=20+9)
- 实跑: audit_rbac_parity.py rc=0 PASS;test_m3b_mapping.py PASS=113/FAIL=0
2026-09-19 11:04:55 +08:00

14 lines
741 B
Plaintext
Raw Permalink 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.

# pbl_game_definition_create.dspy —— 编译产物只读显式拒绝手工新增M3b QC #2 方案 A
# 唯一写入入口pbl_compiler.gd_rules_writer.write_gd_rules()(由 pbl_compiler_compile 主流程调用)。
# 本端点存在的意义:让 xls2ui 不再回退生成默认 add_pbl_game_definition.dspy
# 从而杜绝绕过 gd_rules_writer / rules_hash(29.6 确定性指纹) 的手工改写路径。
debug('pbl_game_definition_create.dspy: REJECTED write attempt params=%s' % repr(params_kw))
return {
"status": "fail",
"message": "编译产物只读,禁止手工增删改",
"data": {
"widgettype": "Error",
"options": {"label": "编译产物只读,禁止手工增删改"},
},
}