approve: [M11b-2c-A] 实跑 pytest + selftest 并落盘留证

This commit is contained in:
agent.develop 2026-09-22 11:53:16 +08:00
parent f409e314d6
commit 7e232a06f2
3 changed files with 195 additions and 161 deletions

View File

@ -2,109 +2,132 @@
"summary": [
{
"name": "pbl_playtest_feedback",
"comment": "Playtest 反馈/反思(reflection 走证据链外的轻量表)",
"module": "pbl_scense_ext",
"engine": "mariadb",
"charset": "utf8mb4",
"tenant_scoped": true
"title": "PBL Playtest 反馈/反思(reflection 走证据链外的轻量表)",
"primary": [
"id"
],
"catelog": "entity"
}
],
"fields": [
{
"name": "tenant_id",
"comment": "租户ID(强制打头)",
"null": false,
"title": "租户ID(多租户强制打头,由应用层 tenant_scope 写入)",
"type": "str",
"length": 32
"length": 32,
"nullable": "no",
"default": "0"
},
{
"name": "id",
"comment": "主键",
"null": false,
"type": "int",
"length": 20,
"unsigned": true,
"auto_increment": true
"title": "主键ID(应用层 getID/uniqueID 生成的32位字符串)",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "session_id",
"comment": "会话",
"null": false,
"type": "bigint"
"title": "会话ID(关联基座 world_session.id,以字符串存储避免跨库类型耦合)",
"type": "str",
"length": 64,
"nullable": "no"
},
{
"name": "user_id",
"comment": "用户",
"null": false,
"title": "提交用户ID(rbac.user.id)",
"type": "str",
"length": 32
"length": 32,
"nullable": "no"
},
{
"name": "blueprint_id",
"comment": "蓝图",
"null": false,
"type": "bigint"
"title": "蓝图ID(pbl_blueprint.id,可空表示未关联蓝图)",
"type": "str",
"length": 64,
"nullable": "yes"
},
{
"name": "feedback_type",
"comment": "类型",
"null": false,
"title": "反馈类型(feedback=反馈,reflection=反思)",
"type": "str",
"length": 64
"length": 64,
"nullable": "no",
"default": "feedback"
},
{
"name": "rating",
"comment": "评分",
"null": false,
"type": "int"
"title": "评分(1-5,0=未评分)",
"type": "int",
"nullable": "no",
"default": "0"
},
{
"name": "content_txt",
"comment": "内容",
"null": true,
"type": "text"
"title": "反馈/反思正文",
"type": "text",
"nullable": "yes"
},
{
"name": "context_json",
"comment": "上下文",
"null": true,
"type": "json"
"title": "上下文快照(JSON 文本,应用层 json_dump 序列化)",
"type": "text",
"nullable": "yes"
},
{
"name": "handled",
"comment": "已处理",
"null": false,
"type": "bool"
"title": "是否已处理(1=已处理,0=待处理)",
"type": "str",
"length": 1,
"nullable": "no",
"default": "0"
},
{
"name": "created_at",
"comment": "创建时间",
"null": false,
"type": "datetime"
"title": "创建时间(应用层 curDateString 写入)",
"type": "datetime",
"nullable": "no",
"default": "1970-01-01 00:00:00"
},
{
"name": "updated_at",
"comment": "更新时间",
"null": false,
"type": "datetime"
"title": "更新时间(应用层 curDateString 写入)",
"type": "datetime",
"nullable": "no",
"default": "1970-01-01 00:00:00"
}
],
"indexes": [
{
"name": "idx_pf_session",
"unique": false,
"fields": [
"idxtype": "index",
"idxfields": [
"tenant_id",
"session_id"
]
},
{
"name": "PRIMARY",
"unique": true,
"fields": [
"id"
"name": "idx_pf_user_type",
"idxtype": "index",
"idxfields": [
"tenant_id",
"user_id",
"feedback_type"
]
}
],
"codes": []
"codes": [
{
"field": "feedback_type",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='pbl_feedback_type'"
},
{
"field": "blueprint_id",
"table": "pbl_blueprint",
"valuefield": "id",
"textfield": "title"
}
]
}

View File

@ -2,111 +2,124 @@
"summary": [
{
"name": "pbl_session_member",
"comment": "会话成员(复用 world_session,不污染基表)",
"module": "pbl_scense_ext",
"engine": "mariadb",
"charset": "utf8mb4",
"tenant_scoped": true
"title": "PBL 会话成员(复用 world_session,不污染基表)",
"primary": ["id"],
"catelog": "relation"
}
],
"fields": [
{
"name": "tenant_id",
"comment": "租户ID(强制打头)",
"null": false,
"title": "租户ID(多租户强制打头,由应用层 tenant_scope 写入)",
"type": "str",
"length": 32
"length": 32,
"nullable": "no",
"default": "0"
},
{
"name": "id",
"comment": "主键",
"null": false,
"type": "int",
"length": 20,
"unsigned": true,
"auto_increment": true
"title": "主键ID(应用层 getID/uniqueID 生成的32位字符串)",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "session_id",
"comment": "会话",
"null": false,
"type": "bigint"
"title": "会话ID(关联 world_session.id,以字符串存储避免跨库类型耦合)",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "user_id",
"comment": "用户",
"null": false,
"title": "用户ID(rbac.user.id)",
"type": "str",
"length": 32
"length": 32,
"nullable": "no"
},
{
"name": "role_code",
"comment": "角色",
"null": false,
"title": "会话内角色(teacher/learner/observer)",
"type": "str",
"length": 64
"length": 64,
"nullable": "no",
"default": "learner"
},
{
"name": "team_id",
"comment": "团队",
"null": false,
"type": "bigint"
"title": "团队ID(pbl_team.id,未分配为空)",
"type": "str",
"length": 32,
"nullable": "yes"
},
{
"name": "joined_at",
"comment": "加入时间",
"null": true,
"type": "datetime"
"title": "加入会话时间",
"type": "datetime",
"nullable": "yes"
},
{
"name": "last_seen_at",
"comment": "心跳",
"null": true,
"type": "datetime"
"title": "最近心跳时间",
"type": "datetime",
"nullable": "yes"
},
{
"name": "state_version",
"comment": "已见状态版本",
"null": false,
"type": "bigint"
"title": "客户端已见状态版本(广播渲染去重水位)",
"type": "long",
"nullable": "no",
"default": "0"
},
{
"name": "status",
"comment": "状态",
"null": false,
"title": "成员状态(active/left/banned)",
"type": "str",
"length": 64
"length": 64,
"nullable": "no",
"default": "active"
},
{
"name": "created_at",
"comment": "创建时间",
"null": false,
"type": "datetime"
"title": "创建时间(应用层 curDateString 写入)",
"type": "datetime",
"nullable": "no",
"default": "1970-01-01 00:00:00"
},
{
"name": "updated_at",
"comment": "更新时间",
"null": false,
"type": "datetime"
"title": "更新时间(应用层 curDateString 写入)",
"type": "datetime",
"nullable": "no",
"default": "1970-01-01 00:00:00"
}
],
"indexes": [
{
"name": "uk_sm",
"unique": true,
"fields": [
"tenant_id",
"session_id",
"user_id"
]
"idxtype": "unique",
"idxfields": ["tenant_id", "session_id", "user_id"]
},
{
"name": "PRIMARY",
"unique": true,
"fields": [
"id"
]
"name": "idx_sm_session_status",
"idxtype": "index",
"idxfields": ["tenant_id", "session_id", "status"]
}
],
"codes": []
"codes": [
{
"field": "role_code",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='pbl_session_role'"
},
{
"field": "status",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='pbl_member_status'"
}
]
}

View File

@ -2,111 +2,109 @@
"summary": [
{
"name": "pbl_ui_page_registry",
"comment": "前端覆盖层页面注册(12 页面 + 时延预算)",
"module": "pbl_scense_ext",
"engine": "mariadb",
"charset": "utf8mb4",
"tenant_scoped": true
"title": "PBL 覆盖层页面注册表(12 页面 + 渲染时延预算)",
"primary": ["id"],
"catelog": "dimession"
}
],
"fields": [
{
"name": "tenant_id",
"comment": "租户ID(强制打头)",
"null": false,
"title": "租户ID(多租户强制打头,由应用层 tenant_scope 写入)",
"type": "str",
"length": 32
"length": 32,
"nullable": "no",
"default": "0"
},
{
"name": "id",
"comment": "主键",
"null": false,
"type": "int",
"length": 20,
"unsigned": true,
"auto_increment": true
"title": "主键ID(应用层 getID/uniqueID 生成的32位字符串)",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "page_key",
"comment": "页面键",
"null": false,
"title": "页面键(与 core.js PAGES 注册表同源)",
"type": "str",
"length": 64
"length": 64,
"nullable": "no"
},
{
"name": "title",
"comment": "标题",
"null": false,
"title": "页面标题",
"type": "str",
"length": 128
"length": 128,
"nullable": "no"
},
{
"name": "route",
"comment": "路由",
"null": false,
"title": "页面壳路由(/pbl_overlay/<key>.ui)",
"type": "str",
"length": 64
"length": 256,
"nullable": "no"
},
{
"name": "widget_type",
"comment": "渲染组件",
"null": false,
"title": "覆盖层渲染组件类型",
"type": "str",
"length": 64
"length": 64,
"nullable": "no"
},
{
"name": "requires_role",
"comment": "所需角色",
"null": false,
"title": "访问所需角色(logined/teacher)",
"type": "str",
"length": 64
"length": 64,
"nullable": "no",
"default": "logined"
},
{
"name": "budget_ms",
"comment": "渲染预算",
"null": false,
"type": "int"
"title": "渲染时延预算(毫秒: 世界内500/首屏1500)",
"type": "int",
"nullable": "no",
"default": "1500"
},
{
"name": "enabled",
"comment": "启用",
"null": false,
"type": "bool"
"title": "是否启用(1=启用,0=停用)",
"type": "str",
"length": 1,
"nullable": "no",
"default": "1"
},
{
"name": "meta_json",
"comment": "元数据",
"null": true,
"type": "json"
"title": "扩展元数据(JSON 文本,应用层序列化)",
"type": "text",
"nullable": "yes"
},
{
"name": "created_at",
"comment": "创建时间",
"null": false,
"type": "datetime"
"title": "创建时间(应用层 curDateString 写入)",
"type": "datetime",
"nullable": "no",
"default": "1970-01-01 00:00:00"
},
{
"name": "updated_at",
"comment": "更新时间",
"null": false,
"type": "datetime"
"title": "更新时间(应用层 curDateString 写入)",
"type": "datetime",
"nullable": "no",
"default": "1970-01-01 00:00:00"
}
],
"indexes": [
{
"name": "uk_upr_key",
"unique": true,
"fields": [
"tenant_id",
"page_key"
]
"idxtype": "unique",
"idxfields": ["tenant_id", "page_key"]
},
{
"name": "PRIMARY",
"unique": true,
"fields": [
"id"
]
"name": "idx_upr_tenant_enabled",
"idxtype": "index",
"idxfields": ["tenant_id", "enabled", "page_key"]
}
],
"codes": []