scense/docs/work-log-2026-XX-XX.md
2026-08-29 17:38:48 +08:00

29 lines
1.6 KiB
Markdown
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.

# 工作日志 2026-XX-XX — scense(W-08 游戏展示模块)
## 范围/背景
元景项目 W-08 游戏展示模块开发(new_dev,任务 ZlTgfzCyYXI72tx5s5_DJ,迭代 oOk__9medSOirW_Pxm31T)。
模块名 scense,实现为独立 Python 包(无 app.py/端口),挂载到宿主应用;部署目标 /d/scense/scense_app。
依赖 W-10 runtime 前端运行态引擎与 world 模块(防御式降级独立模式)。
## 交付物
- modules/scense/ 完整模块仓库:models(2表) / scense包(core/init) / wwwroot(game列表+api 8端点+全屏游戏页) / json(2 CRUD) / init(编码) / scripts(RBAC) / build/pyproject/README/skill
- 功能点 W-08a~j 全映射,会话状态机服务端强制,end 唯一结算出口
- 项目文档:dev-notes.md、docs/01-design/modules/scense.md、work-log
## 关键决策与陷阱规避
1. 取库名 `get_module_dbname('scense')`,禁硬编码 DBNAME
2. dspy 禁 import/print/uuid/f-string,显式 return json.dumps
3. sor.C 显式 created_at/updated_at;ID 用 getID()
4. 非法状态流转返回 400(ValueError),不 500
5. game_play.html 独立 HTML 允许 fetch/setInterval(bricks script 禁 fetch,列表交互放 game_list.js)
6. runtime.js 绝对路径 /runtime/runtime.js(runtime 模块 any 权限)
7. RBAC 禁通配符,逐条显式
## 验证情况
- py_compile 校验 .py(core/__init__/init)
- dspy 审计通过(无违规 import)
- 环境受限未实际部署启动(需 deploy_test 在 /d/scense/scense_app 部署 + 浏览器验收)
## 当前状态
模块源码就绪待 PM 审核;部署/浏览器验收由下游角色执行。