- 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
68 lines
4.1 KiB
JSON
68 lines
4.1 KiB
JSON
{
|
||
"tblname": "pbl_game_definition",
|
||
"alias": "pbl_game_definition_list",
|
||
"title": "Game Definition 编译产物",
|
||
"_comment": "M3b 整改(QC #13):主键/外键类字段在 models/pbl_game_definition.json 中为 str(32),CRUD 渲染类型必须为 text;补齐 M3b 规则导出四件套 rules_json/rules_hash/rule_count/rules_manifest 与 compile_status/error_message。M3b 整改(QC #2 方案 A):params.editable 由「只有 get_data_url」补成规范要求的四 URL 齐备结构,三个写 URL 指向显式返回 Error 的只读拒绝端点,杜绝 xls2ui 回退生成默认 add_/update_/delete_pbl_game_definition.dspy 绕过 gd_rules_writer 唯一写入口。",
|
||
"params": {
|
||
"browserfields": {
|
||
"id": {"label": "ID", "type": "text", "list": true},
|
||
"tenant_id": {"label": "租户ID", "type": "text", "list": true},
|
||
"blueprint_id": {"label": "来源蓝图", "type": "text", "list": true},
|
||
"blueprint_version_no": {"label": "蓝图版本", "type": "number", "list": true},
|
||
"compiler_version_id": {"label": "编译版本", "type": "text", "list": true},
|
||
"content_fingerprint": {"label": "SHA-256 指纹", "type": "text", "list": true},
|
||
"rules_hash": {"label": "规则集合指纹", "type": "text", "list": true},
|
||
"rule_count": {"label": "规则条数", "type": "number", "list": true},
|
||
"compile_status": {"label": "编译结果状态", "type": "select", "list": true},
|
||
"quality_state": {"label": "编译时质量状态", "type": "select", "list": true},
|
||
"world_id": {"label": "落库 world", "type": "text", "list": true},
|
||
"scene_id": {"label": "落库 scene", "type": "text", "list": true},
|
||
"duration_ms": {"label": "耗时", "type": "number", "list": true},
|
||
"definition_json": {"label": "Game Definition 正文", "type": "text", "list": false},
|
||
"rules_json": {"label": "规则映射产物(script_type=1)", "type": "text", "list": false},
|
||
"rules_manifest": {"label": "规则溯源清单", "type": "text", "list": false},
|
||
"error_message": {"label": "失败原因", "type": "text", "list": false},
|
||
"created_at": {"label": "创建时间", "type": "text", "list": true}
|
||
},
|
||
"editable": {
|
||
"get_data_url": {
|
||
"url": "{{entire_url('/pbl_compiler/api/pbl_game_definition_get.dspy')}}"
|
||
},
|
||
"new_data_url": {
|
||
"url": "{{entire_url('/pbl_compiler/api/pbl_game_definition_create.dspy')}}"
|
||
},
|
||
"update_data_url": {
|
||
"url": "{{entire_url('/pbl_compiler/api/pbl_game_definition_update.dspy')}}"
|
||
},
|
||
"delete_data_url": {
|
||
"url": "{{entire_url('/pbl_compiler/api/pbl_game_definition_delete.dspy')}}"
|
||
}
|
||
},
|
||
"new_data_url": "{{entire_url('/pbl_compiler/api/pbl_game_definition_create.dspy')}}",
|
||
"update_data_url": "{{entire_url('/pbl_compiler/api/pbl_game_definition_update.dspy')}}",
|
||
"delete_data_url": "{{entire_url('/pbl_compiler/api/pbl_game_definition_delete.dspy')}}",
|
||
"editexclouded": [
|
||
"id",
|
||
"tenant_id",
|
||
"content_fingerprint",
|
||
"definition_json",
|
||
"rules_json",
|
||
"rules_hash",
|
||
"rule_count",
|
||
"rules_manifest",
|
||
"compile_status",
|
||
"quality_state",
|
||
"duration_ms",
|
||
"error_message",
|
||
"created_by",
|
||
"created_at",
|
||
"updated_by",
|
||
"updated_at",
|
||
"is_deleted"
|
||
],
|
||
"_crud_note": "只读产物表:pbl_game_definition 的正文(definition_json)与规则四件套(rules_json/rules_hash/rule_count/rules_manifest)只能由 pbl_compiler_compile 主流程经 gd_artifact_writer / gd_rules_writer 唯一写入口落库(29.6 确定性指纹 + rules_hash 收口)。为满足 crud-definition-spec「editable 必须齐备 new/update/delete_data_url」的格式硬要求,三个写 URL 指向 wwwroot/api/pbl_game_definition_{create,update,delete}.dspy —— 这三个端点一律返回 widgettype=Error(『编译产物只读,禁止手工增删改』),既不产生可写路径,也不允许 xls2ui 生成默认写包装。URL 同时写在 params 顶层(xls2ddl 从顶层读取,嵌套会被忽略并回退默认 add_ 端点)。",
|
||
"order_by": "id DESC",
|
||
"page_size": 20
|
||
}
|
||
}
|