Developer and Claude Opus 4.8
93255c28dd
fix: TRUE/FALSE题型答案映射修复 — 纯文本答案转选项字母
...
问题: TRUE/FALSE题 stored as MULTIPLE_CHOICE, correctAnswer='TRUE'/'FALSE'
charCodeAt(0)-65 => 'T'=19, 超出选项范围(0-1)
从来没有任何TRUE/FALSE题被正确评分过
修复: 在assessment.service.ts中检测correctAnswer为纯文本(4字符以上)时
查找匹配的选项文本并转换为字母索引
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-17 14:18:36 +08:00
Developer and Claude Opus 4.8
de5c008306
test: 最终测试报告 + 补全最后2个端点覆盖(by-template/PUT review)
...
新增 G-11/G-12:
- by-template 按模板查询题库 ✅ 200
- PUT /:id/review 管理员复查 ✅ 200
最终统计: 110项全部通过, 覆盖7画面/24API端点/3角色
报告: docs/tests/AuraK-最终测试报告.md (8章完整报告)
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-17 13:11:06 +08:00
Developer and Claude Opus 4.8
d229946e07
test: 性能测试+鲁棒性测试 18项全部通过
...
性能测试(A-01~A-07):
- API响应时间: 登录351ms/模板26ms/题库27ms/题目49ms/启动207ms
- 20人并发创建用户: 328ms
- 10人并发启动考核: 10/10成功 平均376ms
鲁棒性测试(C-01~C-07):
- 恶意请求(超长/负数/100个假ID): 全部合理处理
- 重复操作幂等性: 通过
- 30秒空闲后恢复: state200/answer201
- 连续force-end: 幂等不崩溃
- 重复删除: 200→404 幂等
- 20次循环稳定性: 20/20 平均104ms
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-17 12:54:38 +08:00
Developer and Claude Opus 4.8
5be8ab39cc
test: 补全10个未覆盖API端点 — 雷达图/趋势/导出/验真/批量操作
...
新增G-01~G-10:
- stats/radar 雷达图 ✅ 200
- stats/trend 趋势图 ✅ 200
- export/excel 导出 ✅ 200
- export/pdf 导出 ✅ 200
- time-check 时间检查 ✅ 正常处理
- certificate/verify ✅ 200
- certificate/public ✅ 200
- batch-delete 批量删 ✅ 201
- batch-export 批量导 ✅ 201
- next-question 下一题 ✅ 正常处理
功能测试完成: 90/90 passed, API覆盖95%
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-17 11:22:56 +08:00
Developer
8b9806424f
test: 用户故事矩阵(53项) + 补全11项未覆盖故事测试
...
用户故事矩阵 docs/tests/user-story-matrix.md:
- 7画面 × 3类型(正常/异常/边界) = 53项
- 已覆盖35项, 补全后增至46项
- 附优先级/测试方案
新增11项测试(F-01~F-11):
F-01 非技术模板答题 F-07 题库空状态
F-02 提交确认弹窗 F-08 TA查看模板
F-03 空发送disabled F-09 空名称创建被拒
F-04 历史详情 F-10 无模板ID拒绝
F-05 TA访问统计 F-11 角色权限对比
F-06 USER查看题库
39/39 passed
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-17 10:49:01 +08:00
Developer
260459d37d
test: 补全E-02考生全流程测试 — 真实答题+追问+结果验证
...
E-02从仅截图→完整流程:
1. 创建考生+登录
2. 选择模板+开始评估
3. 出题等待+题型检测
4. 答题循环(MC选B确认/SA填写发送+追问)
5. 等待评分+结果验证
6. 证书弹窗交互(若出现)
7. 历史API验证
新增辅助函数: fillReactInput/clickSend/dismissModal/answerOneQuestion
修复D-03: 模板卡片hover操作按钮验证
28/28 passed
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-17 10:13:18 +08:00
Developer and Claude Opus 4.8
82337e5d51
test: 7画面全按钮测试 — 28项覆盖考核/统计/题库/模板
...
测试分布:
A. 考核评估(10项) — 模板选择/答题交互/进度导航/标记/证书/回顾
B. 评估统计(6项) — 统计面板/筛选/导出/USER权限
C. 题库管理(2项) — 页面渲染/关键流程
D. 测评模板(6项) — Tab/列表/维度配置/USER创建被拒
E. 用户故事(4项) — 管理员操作/考生流程/权限隔离
旧文件 tests/question-bank.e2e.spec.ts(33项)保留作为深度专项测试
新增 tests/assessment-all-screens.e2e.spec.ts(28项)作为快速全画面验证
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-17 09:56:14 +08:00
Developer and Claude Opus 4.8
7674b6063f
docs: 人才测评系统画面地图 — 7个画面/4个路由/10个测试脚本
...
画面清单:
1. 考核评估 /assessment — 答题/结果/证书/历史
2. 评估统计 /assessment-stats — 统计/雷达/趋势
3. 题库管理 /question-banks — 列表/详情/CRUD/AI生成/审核
4. 设置-测评模板 /settings — 模板/维度/P2配置
涵盖: 前端组件/后端API/路由/服务/测试脚本映射
发现: AssessmentStatsView + AssessmentTemplateManager 两个画面无测试覆盖
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-17 08:45:44 +08:00
Developer
3e39b9ddf4
test: 补全3个遗漏按钮测试(A03提交/A09重试/B09驳回) + 修复定位器bug
...
修复:
- A03: 创建抽屉提交按钮从仅检查enabled→实际填写+点击提交+API验证
- A08→A09: 新增搜索空状态+错误页面重试测试
- B09: 批量驳回从仅检查可见→实际选中+点击驳回+确认
- 定位器: input[placeholder]可能匹配搜索框,改为[class*=z-50]精准定位
33/33 all passed
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-17 08:24:21 +08:00
Developer and Claude Opus 4.8
214d8a4cb0
docs: 补充测试模板实战教训章节(从AI生成按钮bug中总结)
...
新增第六章「实战教训」:
- 「看见不等于测了」陷阱(B07案例分析)
- 弹窗测试的「红按钮」规则
- 「测试时绕过=上线时爆炸」警示
- 自我检查Checklist(3个问题)
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 17:13:43 +08:00
Developer and Claude Opus 4.8
ca76b74cdf
fix: AI生成弹窗传空内容bug + 补全B07测试覆盖
...
缺陷修复:
- openGenerateModal() knowledgeBaseContent 从 '' 改为从已有题目拼接
- 修复后点击AI生成→生成按钮不再报400
测试补充(B07b/B07c):
- 弹窗提交不报前端错误(UI验证)
- API级生成接口不返回400(API验证)
通过33/33全部通过
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 17:11:10 +08:00
Developer and Claude Opus 4.8
8bfbe7bece
test: 补全题库管理遗漏按钮测试 — 驳回/错误重试/编辑提交
...
新增3项(E01-E03):
- 单题驳回按钮(PENDING_REVIEW→REJECTED) — 实际点击+确认
- 错误状态重试按钮 — 无效ID触发错误→点重试
- 编辑弹窗完整流程 — 打开→修改文本→保存
按钮覆盖率提升:
存在性检查: 95%→100%
实际点击验证: 60%→85%
遗漏按钮: 4→0
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 15:45:08 +08:00
Developer and Claude Opus 4.8
92e0f56fe5
test: 题库管理全按钮UI测试(28项) + Playwright测试模板
...
题库管理测试(28项全部通过):
A. 列表页8项 — 标题/创建按钮/表单/筛选Tab/搜索/卡片/统计/重试
B. 详情页14项 — 返回/渲染/状态/统计/AI生成弹窗/全选/批量/添加/列表/操作按钮
C. 状态转换3项 — 创建题库→提交审核→发布 全流程UI
D. 单题操作3项 — 审批/删除 + API批量验证
新增 docs/tests/playwright-test-template.md:
- 页面UI测试架构模板
- 按钮覆盖Checklist(30+按钮类型)
- 三Agent使用流程
- 常见问题/定位器指南
- 案例对照
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 15:36:13 +08:00
Developer and Claude Opus 4.8
b13b68e188
test: 题库管理全面测试 — 25项覆盖CRUD/审核/权限/异常/边界
...
覆盖范围:
- 题库CRUD(创建/查询/删除/模板关联)
- 题目管理(MC+SA/编辑/删除/列表)
- 审核全流程(待审→审批通过→发布)
- 用户故事(USER只读/TA查看/级联删除)
- 异常路径(不存在ID/空标题)
- 边界值(超长文本)
- UI列表页验证
Agent应用: Playwright三Agent
Generator — UI定位器
Planner — 7模块25用例
Healer — retry+trace保障稳定性
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 15:20:34 +08:00
Developer and Claude Opus 4.8
6562af5e1a
chore: 清理不必要目录
...
删除:
- .codegraph/ (21MB 缓存)
- .github/ (Gitea 项目,不需要 GitHub workflows)
- openspec/ (旧规格文档)
- qa-dialogue/ (空目录)
- temp/ (空目录)
- ai人才育成/ (L1 资料,知识已导入题库)
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 14:37:49 +08:00
Developer and Claude Opus 4.8
e12d5aafbf
chore: 清理根目录冗余文件(旧文档/启动脚本/配置等)
...
删除: FEATURE_SUMMARY.md / QUICK_START.md / STARTUP.md
INTERNAL_DEPLOYMENT_GUIDE.md / INTERNAL_DEPLOYMENT_SUMMARY.md
start-server.bat / start-web.bat / .dockerignore
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 14:34:45 +08:00
Developer and Claude Opus 4.8
b21899055d
chore: 清理 docs 目录冗余文档(55个→9个)
...
删除:
- docs/1.0/ 全部22个(旧Simple KB文档,已被替代)
- docs/2.0/ 全部2个(空文件/过时)
- docs/design/ 全部4个(旧功能设计)
- docs/plans/ 旧版5个(保留v2.0设计文档)
- docs/superpowers/ 全部4个(飞书集成文档)
- docs/根目录杂项 8个(开发规范/快速参考/调试/飞书/Git设置)
- docs/3.0/knowledge_graph_analysis.md(不相关)
保留:
- docs/3.0/ 考核工作流设计 2个
- docs/plans/ v2.0设计文档 1个
- docs/tests/ 测试文档 6个
合计: 55个 → 9个
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 14:31:44 +08:00
Developer and Claude Opus 4.8
3d73618270
chore: 清理根目录冗余文件(翻译工具/旧脚本/调试文件/截图等)
...
删除约50个文件:
- 翻译/i18n工具 21个(cjk_*、extract_*、apply_*等)
- 部署脚本 3个(build_and_push、deploy)
- 诊断调试文件 15个(check_*、query_*、db_output等)
- 旧截图 1个
- 杂项配置文件 3个(.antigravityrules .cursorrules tm_schema.txt)
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 14:04:53 +08:00
Developer and Claude Opus 4.8
9330256e13
docs: 设计文档更新 v3.0 — 实施修正记录
...
新增第10章「实施修正记录」,涵盖9项修正:
1. 出题算法 Math.round→floor+remainder 修正
2. P0答题体验(题序导航/标记回头/提交确认)
3. P1题库增强(tags字段/跨模板复用表)
4. P2配置增强(attemptLimit/scheduled/reviewMode/shuffle)
5. 系统角色权限保护缺陷修复
6. GET /users/:id 端点缺失修复
7. 题库维度/评分标准/题量补充
8. 模板配置修正(20题+非技术模板)
9. 测试覆盖340+项
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 13:59:39 +08:00
Developer and Claude Opus 4.8
0e84e08115
docs: 完整测试报告 — 340+项测试·9章完整覆盖·14个缺陷记录
...
报告结构:
1. 测试概览 — 13个脚本总览 + 总体统计
2. 各Phase详细结果 — 0~5逐项展示
3. Playwright三Agent应用报告
4. 缺陷发现与修复清单(14个)
5. 题库与模板状态
6. 性能与并发数据
7. 测试覆盖矩阵
8. 执行命令速查
9. 结论
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 13:51:10 +08:00
Developer and Claude Opus 4.8
f97b8a818a
feat: Playwright三Agent深度应用 — 全流程测试覆盖知识库到证书展示
...
Agent应用:
Generator — codegen 录制UI交互 locator 模板
Planner — test.describe.serial 编排6阶段18用例
(前置/模板/题库/API考核/UI全流程/设置页)
Healer — trace on + retries 1 + screenshot on failure
测试覆盖:
0. 前置准备 — 模板存在性/题库容量/评分标准完整性
1. 考核模板 — 维度配置/attemptLimit/题数
2. 题库内容 — MC+SA/评分标准/各维度充足
3. API考核 — 创建考生/出题/答题/证书/历史记录
4. UI全流程 — 登录/选模板/答题(MC+SA+追问)/结果展示
5. 设置页 — 测评模板Tab可见性
结果: 15/18 passed (2.2min), 1 flaky(UI答题状态复用)
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 13:47:01 +08:00
Developer and Claude Opus 4.8
100aaa3880
feat: Playwright 三Agent应用 — Generator→Planner→Healer 完整流水线
...
三Agent流程:
1. Generator: codegen 录制操作生成测试代码草稿
2. Planner: @playwright/test 框架编排 8 个测试用例
- describe/test/expect 结构化
- playwright.config.ts 并行执行 + HTML 报告
3. Healer: trace + retries + screenshot 自动修复
- 失败自动重试 2 次
- 首次重试时保存 trace.zip
- 生成 playwright-report/ 可视化报告
测试结果: 8/8 passed (23秒)
产物: test-results/ 含 trace.zip, playwright-report/ HTML报告
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 11:03:21 +08:00
Developer and Claude Opus 4.8
07308cae99
docs: 完整测试框架文档 — 5个Phase + 272项测试索引 + 14个缺陷记录
...
涵盖:
- Phase 0-5 测试架构与详细用例清单
- 脚本索引(11个测试脚本)与执行策略
- 全部测试结果汇总(~314项 100%通过)
- 14个已修复缺陷跟踪表
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 10:55:42 +08:00
Developer and Claude Opus 4.8
3d41f0dfcb
test: 端到端全流程测试 + 烟雾测试 + 测试方案文档
...
新增:
1. test-e2e-assessment-full-flow.mjs — 完整端到端流程
登录→模板校验→题库校验→API考核→非技术模板→UI端到端
覆盖7个阶段29项检查,全部通过✅
2. test-assessment-smoke.mjs — 快速烟雾测试(29项)
3. docs/tests/assessment-test-plan.md — 完整测试方案文档
5个Phase: 核心流程/评分证书/权限隔离/压力异常/回归测试
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-16 10:51:09 +08:00
Developer
ce1a17b4f2
chore: 清理冗余测试数据(server/scripts + QA脚本 + 截图 + e2e产物)
2026-06-09 16:26:19 +08:00
Developer and Claude Opus 4.8
d15e881591
test: 全量回归测试52项覆盖未触及路径 + 完善P2字段映射
...
全量回归测试(test-full-coverage.mjs):
- A. 角色权限深度测试(新endpoint权限边界/跨用户隔离)
- B. 边界值测试(模板字段极值/角色名/密码边界)
- C. 异常路径测试(状态链/冲突/不存在Session/已删模板)
- D. 缺陷回归测试(系统角色保护/API Key / token即时变更/幂等)
- E. 跨功能交互测试(权限+考核/模板+角色/异常状态)
修复:
- assessment.service.ts templateData P2字段显式映射确认
测试结果: 52/52 ✅ + 系统测试 142/142 ✅ + P2专项 20/20 ✅
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 15:49:09 +08:00
Developer and Claude Opus 4.8
46a10ba091
P2全部完成: 尝试限制/预约时段/题目回顾/随机排序
...
后端:
- assessment-template entity: attemptLimit/scheduledStart/End/reviewMode/shuffleQuestions
- DTO 更新: 新增 P2 字段验证
- startSession: 尝试次数检查、预约时段检查、题目随机排序
- getSessionState: reviewMode 控制答案可见性
- 新增 GET /assessment/:id/review 回顾端点
前端:
- AssessmentTemplateManager: 新增尝试次数/答题回顾/题目排序/预约时段配置
- AssessmentView: 答题回顾按钮(完成页)+提交确认弹窗+标记回头功能
- types.ts: 新增 P2 字段类型
- assessmentService: 新增 getReview 方法
- 进度导航点: 可视化题序+标记状态
测试 20项全部通过 + 系统测试 142项全部通过 ✅
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 14:57:32 +08:00
Developer and Claude Opus 4.8
9fd503b42b
feat: 考核系统升级 P0+P1+P2 — 体验/题库/配置增强
...
P0 — 答题体验优化:
- 题序导航点:题目进度可视化,标记题目标记
- 标记回头检查: 点击🏷️ 按钮标记当前题,导航点变黄色
- 提交确认弹窗: 未答完时提交弹出确认对话框
P1 — 题库管理增强:
- QuestionBankItem 新增 tags 字段(多标签过滤)
- 新增 question_bank_templates 联表(题库跨模板复用)
P2 — 考试配置增强:
- AssessmentTemplate 新增字段:
- attemptLimit (尝试次数限制)
- scheduledStart/scheduledEnd (预约时段)
- reviewMode (回顾模式: none/after_completion/per_question)
- shuffleQuestions (每题随机排序)
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 14:25:29 +08:00
Developer
5bbab82e68
test: 并发考核性能实验(20人同时考核)
...
测试结果:
- Session ID 全部唯一: ✅ 20/20
- 异步出题完成: ✅ 20/20, 每题20题
- 维度分布正确: ✅ IDE:4/LLM:6/PROMPT:6/DEV_PATTERN:4
- 并发提交答案: ✅ 6人×4题全成功
- 题目重叠: ⚠️ 10.5%(题库仅~281题,20人需400槽位)
- 评分耗时: ⚠️ 15s不足以完成AI评分
结论: 并发场景下会话创建、出题、答题均正常,无数据竞争。
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 14:02:05 +08:00
Developer and Claude Opus 4.8
ebb8fbd298
docs: 统一 CLAUDE.md 和 README.md 文档体系
...
CLAUDE.md(AI 参考):
- 4 个 👉 AI 实现参考 标记,AI 可快速定位
- 完整的实体定义(TypeScript 代码块)
- 权限守卫流水线 + 解析链路
- 考核数据模型 + 出题算法伪代码
- API 认证流程 + 关键端点表
- 测试注意事项(React 受控输入/等待策略)
- 人可读用户指南(与 README 一致)
README.md(人可读):
- 顶部引用 CLAUDE.md — AI 阅读指引
- 功能亮点表格式呈现
- 步骤式操作指南(用户/权限/模板/考试/租户)
- 轻量内容,详细技术参考指向 CLAUDE.md
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 13:29:28 +08:00
Developer and Claude Opus 4.8
65ede9fcff
docs: 全面更新文档体系 — AI指南 + 人可读说明书
...
CLAUDE.md — AI 工作指南:
- 项目全景:目录结构/技术栈/端口
- 系统架构:前端路由/后端模块/认证流程
- 权限系统:三层角色/26项权限/守卫流水线/解析链路
- 考核系统:数据模型/出题算法/模板配置
- 测试脚本:7个Playwright测试说明
- 开发指南:启动/测试/重启/数据库管理
- 代码规范:TypeScript模式/权限装饰器/React约定
- Playwright测试技巧:React受控输入框/等待策略
README.md — 人可读英文说明书:
- 系统介绍 + 功能特性
- 完整使用指南(用户管理/权限管理/考核模板/组织考试)
- 核心流程说明(认证/出题/权限解析)
- 测试命令参考
- 项目结构 + 配置参考
README_ZH.md — 人可读中文说明书:
- 全面中文版本,包含所有新功能
- 步骤式操作指南,便于管理员使用
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 13:19:45 +08:00
Developer and Claude Opus 4.8
1aee7e0baf
fix: 出题分配算法重构 + 20题模板 + 非技术人员模板
...
问题修复:
- Math.round 导致合计偏差(3题→4题,5题→6题等)
- 补充轮次破坏维度权重比例
- 各维度无题型比例控制
修正方案:
- floor + remainder 分配法,保证合计永远 = count
- 按weight降序分配余数,权重高的优先
- 不足时仅补充轮,但仍保持维度优先
- 补充轮日志记录各维度实际分配数
新增功能:
- 技术人员模板 20题 (PROMPT:30/LLM:30/IDE:20/DEV_PATTERN:20)
- 非技术人员模板 10题 (PROMPT:50/LLM:30/WORK_CAPABILITY:20)
→ 面向非技术角色,不考核IDE和开发范式
- 模板支持任意维度组合,可灵活配置
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 11:24:32 +08:00
Developer and Claude Opus 4.8
c166d298b8
fix(ui): 批量修复字号/间距/弹窗/表格 UI 问题(接续)
...
- 密码修改弹窗: max-w-md→max-w-lg, py-3.5→py-3, text-[10px]→text-xs
- 角色选择按钮: flex-wrap + min-w-[100px] 防窄屏换行
- 用户表格: overflow-x-auto + min-w-[700px] 响应式
- 全部 42 处 text-[10px] → text-xs(标签/徽章/说明文字)
- PermissionSettingsView 剩余 2 处 text-[10px]→text-xs
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 10:39:48 +08:00
Developer and Claude Opus 4.8
ffe365201a
fix(ui): 统一设计语言——颜色、字号、间距、控件样式
...
UI 修正清单:
┌────────────────────────────────────────────────────────────┐
│ 问题 │ 修复 │
├──────────────────────────┼────────────────────────────────┤
│ 登录页 blue → 不一致 │ 统一改为 indigo 系 │
│ text-[10px] 标签难读 │ → text-xs (设置页所有标签) │
│ text-[9px] 徽章太小 │ → text-xs (角色/租户/权限) │
│ text-[14px] 输入框不统一 │ → text-sm (编辑弹窗) │
│ py-3 vs py-3.5 不一致 │ → py-3 统一 (所有输入框) │
│ 表格头 py-4 过大 │ → py-3 │
│ 编辑弹窗 max-w-md 太窄 │ → max-w-lg (更宽松) │
│ 操作列 opacity-0 隐藏 │ → opacity-60 始终可见 │
│ 原生 checkbox 不匹配 │ → 自定义圆角 checkbox + Check │
│ 登录页 rounded-lg │ → rounded-xl 统一 │
│ 登录按钮缺阴影 │ → 加 shadow-lg │
└────────────────────────────────────────────────────────────┘
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 10:28:49 +08:00
Developer and Claude Opus 4.8
7e741651db
test: 系统性测试142项全通过 + 修复GET /users/:id缺失
...
测试架构(10大类142项):
┌──────────────────────────────────────────────────────┐
│ 1. 环境准备 4项 环境可达性 + 残留清理 │
│ 2. 身份认证 15项 登录/错误密码/空/篡改JWT │
│ 3. 用户CRUD正常 11项 创建/查询/编辑/升降级/删除 │
│ 4. 用户CRUD异常 17项 重复/空/短密码/不存在/权限 │
│ 5. 边界测试 7项 并发/超长/空权限/幂等 │
│ 6. 权限矩阵RBAC 49项 3层角色权限/API校验/系统保护 │
│ 7. 租户隔离 1项 跨租户不可见 │
│ 8. 缺陷回归 5项 系统角色保护/幂等删除 │
│ 9. 前端UI一致 22项 登录/导航/Tab/弹窗/3角色 │
│ 10.用户故事完整 14项 SA/TA/USER闭环/升降级即时生效 │
└──────────────────────────────────────────────────────┘
发现并修复:
- 系统角色权限可被任意修改(isSystem 保护缺失)
- GET /users/:id 端点不存在
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 10:01:04 +08:00
Developer and Claude Opus 4.8
a7e7c85ff6
fix: 系统角色权限保护 + 全角色全场景 E2E 测试(94项)
...
缺陷修复:
- PermissionService.setRolePermissions 增加 isSystem 检查
系统角色的权限不可被修改(之前可被任意改写)
测试覆盖(94项全部通过):
- PHASE A: 身份认证(登录/错误密码/无效token/空凭据 8项)
- PHASE B: 三层角色权限边界(26/21/5 权限一致性 3项)
- PHASE C: 创建用户异常(重复/短密码/空字段/特殊字符 7项)
- PHASE D: 编辑&角色变更(改名/升降级/非法值/并发/跨角色 12项)
- PHASE E: 删除异常(删自己/admin/不存在/USER删/TA删 12项)
- PHASE F: 权限系统(角色CRUD/权限改/权限一致性/元数据 25项)
- PHASE G: 模块可达性(2项,非致命)
- PHASE H: 前端UI(admin/ta_admin/user1 三角色 22项)
- PHASE I: 边界缺陷(跨租户隔离/超长名 2项)
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 09:41:04 +08:00
Developer and Claude Opus 4.8
64771f10ed
test: 用户管理全生命周期测试(42项)覆盖异常case
...
覆盖场景:
- 创建用户异常:重复用户名、密码太短、空字段
- 权限边界:USER 不能创建/查看/删除用户
- 角色变更:USER↔TENANT_ADMIN 切换后权限实时生效
- 删除异常:删自己、删 admin、删不存在用户
- UI 验证:角色列、编辑弹窗、权限管理页、权限矩阵
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-09 09:00:23 +08:00
Developer and Claude Opus 4.8
9b4412792b
feat: 用户管理页加角色列和角色编辑弹窗
...
- 用户表新增「角色」列,显示超级管理员/管理员/用户徽章
- 编辑用户弹窗增加角色选择(USER/TENANT_ADMIN/SUPER_ADMIN)
- 角色选择时同步显示该角色的权限预览
- 保存时自动调用 PATCH /tenants/:id/members/:userId 更新角色
- 新增 test-permission-flow.mjs 三层用户权限测试脚本
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-08 23:37:13 +08:00
Developer and Claude Opus 4.8
ba33d517c1
feat: 分层 RBAC 权限管理系统
...
后端:
- 新增 Role / RolePermission 实体(自动 seed 系统角色)
- PermissionService——通过 isAdmin / TenantMember 链路解析用户权限
- @Permission() 装饰器 + PermissionsGuard 守卫
- /api/permissions 和 /api/roles REST API
- UserController 内联 role 检查迁移到 @Permission()
- PermissionModule 全局注册
前端:
- usePermissions hook——获取当前用户权限集
- PermissionGate 组件级门控
- PermissionSettingsView——角色列表+权限矩阵编辑页面
- SettingsView 新增「权限管理」Tab(仅 admin 可见)
- 权限预览(26 项,7 分类)
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-08 23:25:22 +08:00
Developer and Claude Opus 4.8
c57c3028e2
fix: shuffleArray bug + Playwright多轮对话测试 + 初学者考核脚本
...
- 修复 shuffleArray 返回新数组但调用处用 const 未接收返回值(3处)
- 新增 test-multiround.mjs Playwright 多轮对话测试(简答+追问全流程)
- 新增 do-assessment.mjs / check-result.mjs 考核体验脚本
- CLAUDE.md 增加 AI 工作流指令规则
- package.json 添加 playwright 依赖
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-08 22:34:04 +08:00
Developer
0b2c6563ba
Add IDE题库 50 questions + PROMPT/LLM/DEV_PATTERN 34 questions
2026-06-03 21:12:11 +08:00
Developer
6d9acd7252
fix: MC options display, question selection, timeout handling, and grading prompts
2026-06-03 20:58:19 +08:00
Developer and Claude Opus 4.8
a71bde3452
add IDE question bank seed script (50 questions for L1 IDE协作开发)
...
- Copilot: 12 questions (intelligent completion, Chat modes, CLI)
- Claude Code: 12 questions (interaction methods, model selection, CLI commands)
- OpenCode: 19 questions (overview, installation, Plan/Build, commands, models)
- Debug: 7 questions (/fix, /debug, /tests, /explain commands)
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-06-03 20:55:38 +08:00
Developer
6e569ff478
fix: skip content check when bank questions available, early generator return
2026-05-23 22:32:51 +08:00
Developer
a83de861dd
fix: replace PDF with HTML report (fontkit unavailable)
2026-05-21 16:30:36 +08:00
Developer
0b0da09d4b
fix: use pdf-lib embedFont with proper pagination for CJK PDF
2026-05-21 16:12:38 +08:00
Developer
d7cd5641d7
fix: rewrite PDF generator using pdf-lib native embedFont for CJK support
2026-05-21 15:59:01 +08:00
Developer
c53f26a07e
perf: trim grader prompts ~40% to reduce LLM latency
2026-05-21 15:52:33 +08:00
Developer
b15e821252
feat: enriched certificate with template name, dimension scores, question details + Modal UI
...
- generateCertificate: return templateName, questionDetails, dimensionScores
- Frontend: replace alert() with certificate Modal showing level, scores, dimensions, questions
- Status label: change from '已验证' to '合格'
2026-05-21 15:42:59 +08:00
Developer
990b8c7b83
fix: forward passed flag in SSE final events
2026-05-21 15:24:36 +08:00
Developer
f8df92c36b
fix: forward finalScore in submitAnswerStream final event
2026-05-21 15:19:10 +08:00
Developer
51f2a41cc3
fix: determineLevel uses 0-10 scale thresholds instead of 0-100
2026-05-21 15:07:23 +08:00
Developer
0a3a8a2e32
fix: send accumulated answers to LLM grader for follow-up context
...
- Grader now passes all rounds of user answers to LLM (tagged 第N轮回答)
- LLM can see what was already answered and avoid redundant follow-ups
- Updated all three language prompts with multi-round guidance
2026-05-21 14:41:57 +08:00
Developer
9303d7ac64
fix: auto-submit answer on timeout instead of blocking
...
- Timeout triggers forced submission of current answer (or empty)
- Prevents assessment from hanging when time expires
- autoSubmitted flag prevents duplicate submissions
2026-05-21 14:32:01 +08:00
Developer
02f4ab23f7
feat: LLM-generated adaptive follow-up questions
...
- Grader: LLM outputs follow_up_question targeting uncovered keyPoints
- Remove static followupHints usage in grading flow
- maxFollowUps sourced from question.maxFollowUps (hints.length)
- Clean answerKey: remove followupHints field
- Three-language prompt update with examples and bad examples
- Grader spec: add follow_up_question to mock responses
2026-05-21 14:18:14 +08:00
Developer
7fd2a4cda2
fix: option display + partial credit grading
...
- Option display: use slice(1) instead of regex to strip letter prefix
- Grader prompts: add explicit partial credit guidance (5-7 for partial, 0-2 only for off-target)
2026-05-21 13:13:21 +08:00
Developer
7b1103903f
fix: remove prefix from followup hint, use raw text
2026-05-21 13:00:03 +08:00
Developer
3cc3b28471
fix: broader regex to strip conditional prefix from followup hints
2026-05-21 12:57:04 +08:00
Developer
5c82c75a09
fix: strip option letter prefix in QuestionBankDetailView
...
Consistent with AssessmentView, now strips A./B./C./D. prefix
from option text before displaying alongside letter badge.
2026-05-21 12:48:35 +08:00
Developer
24ffc028e2
fix: shuffle choice options per session + clean followup hints
...
- Options shuffled with correctAnswer remapped at session creation
- Followup hints strip conditional prefix (如果只说了XX,追问:)
2026-05-21 12:42:52 +08:00
Developer
734c0129d8
chore: remove test artifact
2026-05-21 11:53:47 +08:00
Developer
1224a74e63
fix: natural follow-up conversation flow
...
- Grader: separate followup hint from scoring feedback
- Interviewer: use followup hint directly without prefix/suffix
- Restored standard and choice question presentation paths
2026-05-21 11:53:24 +08:00
Developer
c015ea3697
fix: shuffle bank questions + grader LLM error resilience
...
- selectQuestions: shuffle final result for random question order
- grader: wrap LLM invoke in try-catch, default score 5 on failure
- grader: inner try-catch for JSON parse errors, graceful fallback
2026-05-21 11:33:17 +08:00
Developer
240aea24aa
fix: linkedGroupIds null check in validateRequiredFields
...
null !== undefined was true, causing false validation failure on templates
without linked groups. Changed to != null check.
2026-05-21 11:17:45 +08:00
Developer
54762ca299
fix: passingScore scaling and dimensions propagation
...
- Frontend: divide by 10 on load, multiply by 10 on send (UI:0-10, DB:0-100)
- Backend: include template dimensions in session templateData snapshot
2026-05-21 11:07:07 +08:00
Developer
eba30517a6
fix: remove bank PUBLISHED guard from selectQuestions
...
selectQuestions now only checks item-level PUBLISHED status.
startSession already handles bank detection by counting published items.
This fixes assessment always falling back to LLM generation.
2026-05-21 10:26:19 +08:00
Developer
35b1c6c37d
feat: judgment-anchored grading and per-question results
...
- Grader: inject judgment as pass criteria anchor in LLM prompt
- Grader: use followupHints for follow-up direction (not generic text)
- Grader: follow-up limit from followupHints.length instead of hardcoded 2
- Session: correctAnswer/judgment stored in questions, stripped during assessment
- Frontend: per-question results panel with choice ✅ /❌ + judgment display
2026-05-21 10:18:15 +08:00
Developer
3993099907
feat: end-to-end choice question support in assessment pipeline
...
- Data pathway: flow options through questions, answerKey in graph state
- Interviewer: format MULTIPLE_CHOICE with A/B/C/D options
- Grader: instant choice scoring (zero LLM), compare correctAnswer
- AssessmentView: render choice buttons vs textarea based on questionType
- Security: sanitizeStateForClient strips correctAnswer/judgment/answerKey
- Bank detection: check PUBLISHED items (not PUBLISHED bank status)
- Batch UI: select all / batch approve / batch reject on detail view
2026-05-21 10:06:33 +08:00
Developer
57898f939c
fix: add status guards to prevent data loss
...
- create: auto-delete REJECTED→throw error; add tenantId filter
- remove: forbid PUBLISHED bank deletion
- removeItem: forbid PUBLISHED item deletion
- generateQuestions: restrict to DRAFT status only
- frontend: render MULTIPLE_CHOICE options/judgment/followupHints
- frontend: add judgment and followupHints to QuestionBankItem type
- add 12 service guard tests (109 total)
2026-05-21 08:55:35 +08:00
Developer
e782d180d7
feat: support choice+open dual question generation with judgment anchors
...
- Add judgment and followupHints fields to QuestionBankItem entity
- Rewrite generateQuestions prompt for 3:7 choice:open ratio
- Extract parseGeneratedQuestion function with type-aware parsing
- Add 29 unit tests: 14 prompt content + 15 parse logic
- Total: 97 tests passing (59 baseline + 38 new)
2026-05-21 01:04:08 +08:00
Developer
17ddfa83bf
Question generation: scenario-based 3-step prompt with technique labeling, key_points constrained to KB source, temperature 0.1. Generator node: two-step extraction prompt for assessment flow.
2026-05-20 17:33:28 +08:00
Developer
83483d8117
F1-F10: audit fixes (dimension normalize, passingScore scale, DB defaults, onDelete, item status filter, timeout event type, userId privacy) + generator.node.ts strict prompt rules (anti-hallucination)
2026-05-20 11:13:37 +08:00
Developer
29bac74b58
M3: console.log -> Logger + UI redesign (QuestionBank) + S7/A9/A10/A11/U11 bug fixes + #1/#2/#3/#4 enhancements + i18n for QuestionBank pages
2026-05-19 16:57:45 +08:00
Developer
5b5f14674d
fix: minor issues from code review
...
(M1) DTO: @IsObject({ each: true }) on dimensions array
(M2) audit log: add missing tenantId in submitAnswer
(M3) console.log -> this.logger in controller + service
2026-05-19 10:22:18 +08:00
Developer
82a9e75842
fix: code review — 7 issues resolved
...
(C1) Add dimensionScores/radarData/passed columns to AssessmentSession
(C2) Mock DataSource in service.spec.ts + app.e2e-spec.ts
(C3) Mock AuditLogService in controller.spec.ts
(C4) Rewrite deleteSession tests for dataSource.transaction
(I1) batchDeleteSessions uses transaction with certificate cleanup
(I2) extractDimensionScores reads from session property
(I3/I5) PDF generator supports multi-page + newline splitting
(I4) findOne inside transaction uses deleteCondition
2026-05-19 10:06:30 +08:00
Developer
7f8e7214b3
P3-02-03-04: audit log, batch ops, transactions
...
P3-02: audit-log.entity + service, manual logging in controller
(startSession, submitAnswer, deleteSession, review, forceEnd)
P3-03: POST batch-delete, POST batch-export endpoints + service methods
P3-04: DataSource.transaction for deleteSession + reviewAssessment,
graph state cleanup on session delete
2026-05-19 09:52:31 +08:00
Developer
eb0798de5b
P2-1: remove dead cost-control module (3 files)
...
P2-2: switch TypeORM to autoLoadEntities: true
Remove unused vision-pipeline-cost-aware.service.ts,
cost-control.service.ts and its orphan module.
Switch explicit entities[] list to autoLoadEntities.
2026-05-19 09:39:41 +08:00
Developer
33e48f6d4e
P1-3: grader/interviewer node unit tests (24 passing)
...
grader.node.spec.ts — 13 tests: LLM mock validation, breakout logic
(shorts/IDontKnow), error handling, scoring/indexing, zh/ja language support
interviewer.node.spec.ts — 11 tests: empty questions, index bounds,
standard presentation, follow-up mode, zh/ja/en localization
2026-05-19 09:30:19 +08:00
Developer
b139ae18b7
P1-2: certificate E2E integration tests + API verification
...
- Certificate lifecycle tests: create/verify/idempotency/level
- Public endpoint integration tests for verifyCertificate and getPublicCertificateInfo
- API verified: /public returns 200, /verify returns 200, auth endpoint returns 404 for missing
2026-05-19 09:26:34 +08:00
Developer
68371922ca
P0-1/P0-2/P1-1: dimensions form + E2E tests + PDF export
...
P0-1 Backend: dimensions column on template entity + validation
P0-1 Frontend: dimensions edit UI in TemplateManager
P0-2: routeAfterGrading unit tests (10 cases), service spec fix + certificate tests, jest-e2e.json
P1-1: proper PDF generation with embedded CJK font via pdf-lib low-level API
2026-05-19 08:42:03 +08:00
Developer
0b0a060967
fix: 全部TS错误修复(25->0) + 证书API 500修复 + i18n缺失key补全 + 类型定义修正
...
- 证书API 500修复: AssessmentCertificate实体注册到app.module.ts
- 前端TS错误25个清零: i18n key 17个, 类型定义8个
- i18n补全: 17个缺失key添加到zh/en/ja
- KnowledgeFile类型: 添加title, content字段
- importService: 改用apiClient.request替代raw fetch
- ModeSelector: 移除jsx prop
- questionBankService: .ok -> .status >= 400
- NotebookDetailView: .filter -> .items.filter
- ImportTasksDrawer: tasks.items提取
- API端点审计: 16/16通过
- 数据库Schema审计: 25表288列一致
- AGENTS.md更新
2026-05-18 08:30:59 +08:00
Developer
631e99c0e0
docs: 更新debugging-checklist v2.2 - 整合验证报告
2026-05-15 10:10:15 +08:00
Developer
7ee13b3499
fix: 整合验证修复9个代码缺口 - 历史限制3条、证书公开端点、题库默认DRAFT状态、Admin硬编码
2026-05-15 10:09:27 +08:00
Developer
97287b0fc4
fix: 题库创建唯一约束检查 + 前端错误消息透传
2026-05-15 10:02:32 +08:00
Developer
b70dc68a85
fix: 题库生成功能全面修复 - create方法templateId传参、异常改为BadRequest、前端错误消息透传
2026-05-15 09:55:03 +08:00
Developer
186423d172
fix: 修复10个TS类型错误 - ForbiddenException导入、sort字段、user.name、question.content、lines类型、status比较
2026-05-15 08:22:10 +08:00
Developer
6cc65f7776
docs: 添加Docker混合模式开发指南,修正Git配置地址
2026-05-14 14:01:40 +08:00
Developer
368eddfd75
fix: 代码整合修复 - Entity类型、题库生成、评估流程等14项修复
2026-05-14 09:55:07 +08:00
Developer
122ab5e96f
docs: 更新VERSION.md到v1.1.0
2026-05-13 23:15:18 +08:00
Developer
176fe2270f
feat: 添加历史管理和用户评估记录API
...
- GET /assessment/history: 获取用户评估历史(保留最近100条)
- cleanupOldSessions: 保持最多3条记录(在创建新session时自动清理)
- 复查记录保留完整历史(reviewHistory)
2026-05-13 23:12:03 +08:00
Developer
649844a657
feat: 添加复查功能和批量审核操作
...
- 复查功能: PUT /assessment/:id/review
* 支持调整最终总分
* 记录复查历史(reviewHistory)
* 保存原始分数(originalScore)
* 保留复查人、复查时间、复查意见
- 批量审核: POST /question-banks/:bankId/items/batch-review
* 支持批量通过/拒绝题目
* 可添加审核意见
- AssessmentSession实体: 添加复查相关字段
2026-05-13 23:06:40 +08:00
Developer
332b14454b
docs: 添加版本管理文档 VERSION.md
2026-05-13 22:10:28 +08:00
Developer
b2c17e3eca
feat: 题库管理功能完善
...
- QuestionBankView: 添加删除按钮、卡片点击跳转详情页
- QuestionBankDetailView: 新建题库详情页(题目CRUD/AI生成/审核)
- questionBankService: 添加generateQuestions方法
- index.tsx: 添加详情页路由
2026-05-13 21:51:33 +08:00
Developer
8686d101cd
Initial commit: AuraK人才测评系统基础框架
...
## 已实现功能
- 题库管理后端API完整实现
- 模板管理页面(Settings-测评模板)
- 评估统计页面
- 人才测评页面(AssessmentView)
- QuestionBank前端服务层
## 技术栈
- 后端: Node.js + NestJS + TypeORM
- 前端: React + TypeScript
- 容器化: Docker Compose
## 已知待完善
- 题库列表页缺少删除按钮
- 题库详情页未实现(题目管理/AI生成/审核)
2026-05-13 21:32:41 +08:00
Developer
0a9588abb7
feat: implement QuestionBank CRUD with pagination and template query
...
- Add pagination support to findAll (page, limit query params)
- Add findByTemplateId method to service
- Add GET /by-template/:templateId endpoint to controller
- Service already includes CRUD for QuestionBank and QuestionBankItem
2026-04-23 17:19:11 +08:00