Commit Graph
14 Commits
Author SHA1 Message Date
xstudio agentandClaude Code 2e35c10177 chg_0013(T2): 5 件套 fixture 对齐 + e2e dth_mpq.test.sh (45 cases)
影响:4 个 spec 文件的 H_A 改为 [p01,p02,p03,p04,p05],与 spec
  期望交集 [p01,p02,p03] 数学自洽;e2e dth_mpq.test.sh 新增 449 行,
  10 cases / 45 sub-assertions 一次跑过 (pass=45 fail=0 elapsed=5s)。

改动:
- openspec/changes/chg_0013_medical_privacy_query/spec.md:30
  H_A 修正
- openspec/changes/chg_0013_medical_privacy_query/testcases.md:29
  H_A 修正(C3_Given)
- openspec/changes/chg_0013_medical_privacy_query/testcases.map.yaml:58
  hospital_fixture.h_a 修正
- docs/dth/mpq/scenario.md:94 S3a fixture + :197 C4 forbidden list
- tests/e2e/dth_mpq.test.sh 新增(449 行):S1→S9 9 步跑全 19 算子
  中 6 个(did-identity / psi / tee-inference / paillier-he /
  abac-policy / compliance-audit),含 PHI 不出域断言(C4/C7/C9)

设计:
- T1 提交时 H_A 用 [p01,p02,p04,p05,p06],缺 p03 → A∩B∩C 数学上
  不能等于 [p01,p02,p03](p03 仅在 H_B/H_C);本次把 H_A 改为
  [p01,p02,p03,p04,p05],5 件套 4 个文件 + 注释同时更新,避免
  跑 e2e 时还要"先调 fixture 再跑"
- e2e 实际数组早就用了正确版本,仅注释块的"旧 fixture 记录 +
  替换原因"误导;本次把注释对齐到与 spec 完全一致,删去
  "We replace p06 in H_A with p03"的偏差说明
- 与 chg_0010_frc.test.sh / chg_0011_vc.test.sh 同模式(沿用同
  一套 admin token + curl + assert helper),不引入新依赖

Co-Authored-By: Claude Code <[email protected]>
2026-10-02 16:49:51 +08:00
xstudio agent c1c1bf650e chg_0012(T2): LMS v1 重建 + v2 多场景 + 4 scene + FRC 模板 + e2e
后端:
- lms_course_scene 表 + lms_enrollment.progress_scene_ids JSONB 列
- lms-v2.service.ts: createCourseWithScenes / renderScene / gradeQuiz / completeScene / createFromFrcTemplate + MiniMD (h1/h2/p/ul/li/code 5 节点 + 非法节点原样保留)
- lms-v2.controller.ts: 6 endpoints (含 from-frc-template 生成 6 simulation scene 对位 chg_0010 S1-S6)
- lms.module.ts: 注册 v2 controller + service
- 6 不变量: 409 DUPLICATE_COURSE_CODE / 422 INVALID_SCENE_TYPE / 400 INVALID_EMBED_URL / 501 PBL 占位 + append-only idempotent / scene 严格 4 类 enum

前端:
- api/lms/client.ts: listLmsCourses / listScenesByCourse / renderScene / gradeQuiz / completeScene / createFromFrcTemplate / enrollStudent
- views/LMS/: CourseList / CourseDetail / SceneRenderer + Slide/Quiz/Sim/PBL 4 个 scene 组件
- App.tsx: 注册 /lms / /lms/:courseId / /lms/:courseId/:sceneId 3 个 ProtectedRoute
- 0 新依赖

e2e:
- tests/e2e/dth_lms_v2.test.sh: 10 case (45 sub-assertion) 覆盖 S1-S10
  - C1 LMS v1 数据模型 / C2 scene_type enum / C3 多场景 + FRC 模板 / C4 选课 + 进度 append-only
  - C5 Slide MiniMD / C6 Quiz 判分 / C7 Sim embed_url / C8 FRC 6 scene 对位 chg_0010 S1-S6
  - C9 E2E 完整流程 / C10 PBL 501 占位文案一致性

注意: chg_0006 LMS v1 schema/seed 已在盘存在(CLAUDE.md F-2 路径索引有误,应为 src/backend/src/lms/ 非 dth/lms/),未重建;v2 在 v1 之上增量扩展。
Co-Authored-By: Claude <[email protected]>
2026-09-29 16:15:28 +08:00
xstudio agent ed4254b01d chg_0011(T2): tests/e2e/dth_vc.test.sh — 10 case e2e 串 6 算子(32% 复用) 2026-09-29 15:57:41 +08:00
xstudio agent a97c8bf111 test(dth:frc): T3 12/0 PASS(2.4s)+ spec 输入修正(交集 [f01,f02,f03]) 2026-09-29 06:52:36 +08:00
xstudio agent a3b1c7bb67 test(dth:frc): T2 12 case e2e — 3 银行反欺诈场景(did+tds+psi+paillier+threshold+abac+watermark+audit) 2026-09-29 06:49:24 +08:00
xstudio agent 2082df948f test(dth:sp1-more): fix BSD wc whitespace in TDS token 3-parts assertion
BSD `wc -l` pads count with leading spaces on macOS (e.g. "       3"),
which made `[ '       3' = '3' ]` always false.

Verified: dth_sp1_more.test.sh 27/27 PASS on host after fix.
2026-09-28 21:10:05 +08:00
xstudio agent 113d76b4bc test(dth:sp1-more): T4 12 case e2e + operator 微调 2026-09-28 20:53:44 +08:00
xstudio agentandClaude Code 66d21a5415 merge sandbox/fe93ee4: chg_0008 operator_real_algorithms — 6 算子真算法仿真(crypto-js + secret-share + Box-Muller + HMAC, 15+27+33+17+16=108 e2e PASS)
Co-Authored-By: Claude Code <[email protected]>
2026-09-28 18:40:35 +08:00
xstudio agentandClaude Code df62c960f0 merge sandbox/edd39ac: chg_0007 lite_demo_restore — 补回 lite-react book/shop demo (TypeORM-free, 33+17+16=66 e2e PASS)
Co-Authored-By: Claude Code <[email protected]>
2026-09-28 17:03:01 +08:00
xstudio agentandClaude Code 5c27b0fd39 merge sandbox/f0cf2f4: chg_0006 LMS bootstrap (3 子系统 + 5 S 场景 + 6 cases)
Co-Authored-By: Claude Code <[email protected]>
2026-09-28 16:46:52 +08:00
xstudio agentandClaude Opus 4.8 f1a15c44f4 merge sandbox/d42537c: chg_0005 experiment_platform_extend — 6 new operators + registration + 8 e2e cases (gate PASS)
- 6 new operators: scql (secure sum) / horizontal-fedavg (FedAvg mean) / secure-mlp (sigmoid + Laplace DP) / tee-inference (sha256 attestation) / prompt-defense (keyword classifier) / compliance-audit (uuid trail)
- OperatorsService + experiment.module 注册追加(不替换 chg_0002 的 3 算子)
- tests/e2e/dth_experiment_extend.test.sh: 8 case 覆盖 S7-S12 + list ≥9
- docs/dth/experiment-platform/operators-design.md: T1 架构
- openspec/changes/chg_0005_experiment_platform_extend/{5 工件}

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 15:11:02 +08:00
xstudio agentandClaude Opus 4.8 10acc8114d merge sandbox/7975338+28c26c5+cd2cfc4: chg_0004 experiment_platform_frontend — React SPA 4 views + 5 components + Vite proxy + 14 e2e cases (gate PASS)
- docs/dth/experiment-platform/web-design.md: T1 架构设计
- src/frontend/src/main.tsx + App.tsx: 入口 + 路由
- src/frontend/src/api/{auth,operators,runs,client}.ts: 4 文件
- src/frontend/src/components/{AuthContext,ProtectedRoute,OperatorCard,RunResult,Radar}.tsx: 5 组件(Radar SVG 自绘 139 行)
- src/frontend/src/views/{Login,Dashboard,OperatorList,Run}.tsx: 4 页
- src/frontend/src/styles.css: 159 行(< 200 预算,无 UI 库)
- src/frontend/vite.config.ts: proxy /api → :30000
- tests/e2e/dth_frontend.test.sh: 14 case (5 API + 4 routes + 2 static + 3 list)
- openspec/changes/chg_0004_experiment_platform_frontend/{5 工件}
- package-lock.json: +react/react-dom/react-router-dom/axios + vite/typescript

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 11:42:47 +08:00
xstudio agentandClaude Opus 4.8 a94f40e42e merge sandbox/dd24a29: chg_0003 dispatch_helpers — A1 prep + A2 setup + A3 wait scripts (3 host tools, 8 cases, gate PASS)
- scripts/prep-sandbox-skills.sh: A1 host-side skill 拷贝 (跳过 symlink/template-boot-jnpf/JNPF_*)
- scripts/setup-xstudio-ai.sh: A2 host-side ai-config writer (python3 merge 不覆盖已有 providers)
- scripts/wait-for-task.sh: A3 host-side completion poller (轮询 /tmp/xstudio-sandbox/*/space/.xstudio-report.md)
- tests/e2e/dispatch_helpers.test.sh: 6 case 自检
- openspec/changes/chg_0003_dispatch_helpers/{5 工件}

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 11:18:36 +08:00
xstudio agent c1cf6f54e5 merge sandbox/ai-1790562657-0EF743: chg_0001 dth scaffold + chg_0002 experiment_platform MVP
- chg_0001_dth_scaffold (skip_coverage): openspec framework + NestJS+React+PGlite scaffold
- chg_0002_sp1_experiment_platform_mvp: 6 scenarios S1-S6 + 21 perm-smoke + 16 e2e + 3 demo operators (hello-mpc/pir/vertical-lr)

Sandbox task exit 0. Independent verification: check_spec_coverage.sh gap=0 PASS.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 10:54:34 +08:00