pbl_runtime_ext/init/rbac_seed.json
agent.develop b54ff004af fix(M11b-3/4): rbac_seed traceability 改为 grep 实测函数名/所在文件(响应 QC #20)
- 8 条 permissions[].traceability 原声称 pbl_runtime_ext/api.py::api_<契约名>,
  实测 grep -rn 'api_pbl_' --include=*.py . 零命中:api.py 内函数无 api_ 前缀
- 逐条改写为「契约名 → pbl_runtime_ext/<实际文件>::<实际函数名>(行号)→ load_path.py PATHS[i]」
- broadcast_pull/stats 两条落 m11b_api.py:45/:83(api.py:265 经 from .m11b_api import 再导出)
- 顺手修 --check 成功行 print 中误写的 '%%'(非 % 格式化上下文,原样打出双百分号)
- 回归:python3 scripts/m11b34_rbac_seed.py --check rc=0(permissions=8 errors=0)
2026-09-22 19:28:05 +08:00

101 lines
5.1 KiB
JSON
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.

{
"module": "pbl_runtime_ext",
"milestone": "M11b-3 / M11b-4",
"note": "PBL 运行时广播/轮询端点 RBAC 权限种子清单(逐条显式登记,禁止 % / * 通配符)。由 scripts/m11b34_rbac_seed.py 导入 permission/rolepermission,并把 scripts/load_path.py --check 收敛到 rc=0。traceability 中的函数名与所在文件均为 grep 实测值(响应 QC #20)。",
"default_role": "logined",
"permissions": [
{
"name": "pbl_runtime_event_append",
"path": "/pbl_runtime_ext/api/pbl_runtime_event_append.dspy",
"method": "POST",
"role": "logined",
"endpoint": "wwwroot/api/pbl_runtime_event_append.dspy",
"milestone": "M11b-2",
"title": "运行时事件追加(单事务事件+状态写入)",
"traceability": "契约 pbl_runtime_event_append → pbl_runtime_ext/api.py::pbl_runtime_event_append(api.py:44)→ scripts/load_path.py PATHS[0]"
},
{
"name": "pbl_runtime_event_poll",
"path": "/pbl_runtime_ext/api/pbl_runtime_event_poll.dspy",
"method": "POST",
"role": "logined",
"endpoint": "wwwroot/api/pbl_runtime_event_poll.dspy",
"milestone": "M11b-4",
"title": "运行时事件 3s 轮询兜底拉取",
"traceability": "契约 pbl_runtime_event_poll → pbl_runtime_ext/api.py::pbl_runtime_event_poll(api.py:74)→ scripts/load_path.py PATHS[1]"
},
{
"name": "pbl_entity_state_get",
"path": "/pbl_runtime_ext/api/pbl_entity_state_get.dspy",
"method": "POST",
"role": "logined",
"endpoint": "wwwroot/api/pbl_entity_state_get.dspy",
"milestone": "M11b-4",
"title": "实体状态读取(服务端权威 state_version)",
"traceability": "契约 pbl_entity_state_get → pbl_runtime_ext/api.py::pbl_entity_state_get(api.py:90)→ scripts/load_path.py PATHS[2]"
},
{
"name": "pbl_entity_state_apply",
"path": "/pbl_runtime_ext/api/pbl_entity_state_apply.dspy",
"method": "POST",
"role": "logined",
"endpoint": "wwwroot/api/pbl_entity_state_apply.dspy",
"milestone": "M11b-2",
"title": "实体状态变更申请(客户端禁写 state_version)",
"traceability": "契约 pbl_entity_state_apply → pbl_runtime_ext/api.py::pbl_entity_state_apply(api.py:111)→ scripts/load_path.py PATHS[3]"
},
{
"name": "pbl_world_broadcast",
"path": "/pbl_runtime_ext/api/pbl_world_broadcast.dspy",
"method": "POST",
"role": "logined",
"endpoint": "wwwroot/api/pbl_world_broadcast.dspy",
"milestone": "M11b-3",
"title": "服务端世界广播(提交后广播 ≤300ms)",
"traceability": "契约 pbl_world_broadcast → pbl_runtime_ext/api.py::pbl_world_broadcast(api.py:175)→ scripts/load_path.py PATHS[4]"
},
{
"name": "pbl_session_member_add",
"path": "/pbl_runtime_ext/api/pbl_session_member_add.dspy",
"method": "POST",
"role": "logined",
"endpoint": "wwwroot/api/pbl_session_member_add.dspy",
"milestone": "M11b-3",
"title": "会话成员加入(广播订阅名单维护)",
"traceability": "契约 pbl_session_member_add → pbl_runtime_ext/api.py::pbl_session_member_add(api.py:211)→ scripts/load_path.py PATHS[5]"
},
{
"name": "pbl_runtime_broadcast_pull",
"path": "/pbl_runtime_ext/api/pbl_runtime_broadcast_pull.dspy",
"method": "POST",
"role": "logined",
"endpoint": "wwwroot/api/pbl_runtime_broadcast_pull.dspy",
"milestone": "M11b-4",
"title": "广播增量拉取(3s 轮询兜底)",
"traceability": "契约 pbl_runtime_broadcast_pull → pbl_runtime_ext/m11b_api.py::pbl_runtime_broadcast_pull(m11b_api.py:45,由 api.py:265 经 _m11b 导入再导出)→ scripts/load_path.py PATHS[6]"
},
{
"name": "pbl_runtime_broadcast_stats",
"path": "/pbl_runtime_ext/api/pbl_runtime_broadcast_stats.dspy",
"method": "POST",
"role": "logined",
"endpoint": "wwwroot/api/pbl_runtime_broadcast_stats.dspy",
"milestone": "M11b-4",
"title": "广播时延统计(裁决/广播/端到端指标)",
"traceability": "契约 pbl_runtime_broadcast_stats → pbl_runtime_ext/m11b_api.py::pbl_runtime_broadcast_stats(m11b_api.py:83,由 api.py:265 经 _m11b 导入再导出)→ scripts/load_path.py PATHS[7]"
}
],
"role_grants": {
"logined": [
"pbl_runtime_event_append",
"pbl_runtime_event_poll",
"pbl_entity_state_get",
"pbl_entity_state_apply",
"pbl_world_broadcast",
"pbl_session_member_add",
"pbl_runtime_broadcast_pull",
"pbl_runtime_broadcast_stats"
]
}
}