Commit Graph
41 Commits
Author SHA1 Message Date
xstudio agent 55e93b25f0 chg_0011(T0): 5件套(proposal/spec/tasks/testcases/testcases.map.yaml) 2026-09-29 14:36:55 +08:00
xstudio agent 54594b8ee3 chore(report): chg_0010 federated_risk_control 完成报告(172/0, 80% 复用, 建议合并) 2026-09-29 06:53:42 +08:00
xstudio agent 2454d6cf55 chore(dth:frc): T4 门禁 + 7 回归全 PASS(gap=0, tsc 0 新错, 172/0) 2026-09-29 06:53:23 +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 f288fe0b48 feat(dth:frc): T1 场景设计文档 — 6 步流程 + 8 算子映射 + 80% 复用率 2026-09-29 06:48:42 +08:00
xstudio agentandClaude Code 2711073748 docs(learnings): EOD 收尾 — chg_0009 闭环 + chg_0010 提案 + handoff §2 框架文档化全闭环
§8 当日 5 commit 总览:
- bce0850 fix(dispatch-preflight) --force bug
- a20a11b F-2 dth CLAUDE.md 子模块索引
- fadd9e4 chg_0010 federated_risk_control 提案
- 56e26db archive chg_0009
- ff45f13 merge sandbox→main +2273/-23

明日接力:chg_0010 dispatch / chg_0011 扩展 / 框架持续打磨

Co-Authored-By: Claude Code <[email protected]>
2026-09-28 21:51:51 +08:00
xstudio agentandClaude Code bce08505d2 fix(dispatch-preflight): prep-sandbox-space.sh 传 "true" 而非 "--force"(§2.5 1 行修复)
影响:dispatch-preflight.sh --force 实际未触发 prep-sandbox-space.sh 重播种,
      旧空间残留导致后续派单基于陈旧 main
改动:脚本 line 77 $FORCE 改为 FORCE_FLAG="--force"(仅在 true 时赋值)
参考:dispatch-session-v2 §2.5 + dispatch-preflight.sh 自检流程

Co-Authored-By: Claude Code <[email protected]>
2026-09-28 21:51:39 +08:00
xstudio agentandClaude Code a20a11bab0 docs(dth): F-2 子模块索引 + 已落 chg 索引(6 后端模块 + 6 前端 + 19 算子 + 10 chg 表格)
- 后端模块表:auth/books/shop/lms/dth.experiment/common
- 前端视图表:Login/Dashboard/OperatorList/Run/Book/Product
- 实验台算子表:9 既有 + 10 chg_0009 新增
- 已落 chg 表:9 归档(含 merge hash + e2e 数 + 归档路径)+ 1 active (chg_0010)
- 关键文档索引(learnings / dispatch-helpers / design.md / SPEC.md)

handoff §2 优先级 3 之 F-2 闭环。

Co-Authored-By: Claude Code <[email protected]>
2026-09-28 21:50:25 +08:00
xstudio agentandClaude Code fadd9e46d0 chg_0010: federated_risk_control 提案 — 3 银行联合反欺诈场景(5 件套,无新代码,纯算子组合)
场景:3 银行(BankA/BankB/BankC)联合反欺诈,不泄露 PII,6 步流程
  1. DID 建立 + TDS 合约匹配 (did-identity + tds-connector)
  2. PSI 黑名单交集 (psi)
  3. Paillier 跨行特征聚合 (paillier-he)
  4. Threshold 2-of-3 风险签名 (threshold-sig)
  5. ABAC 风险分析师访问控制 (abac-policy)
  6. 数据水印嵌入 (data-watermark) + 审计链 HMAC (compliance-audit)

12 case e2e (S1-S12) 覆盖 8/10 chg_0009 算子 + 1 chg_0008 算子
4 不变性断言:PSI 正确 / PSI 不泄露 / Paillier 同态 / 水印 roundtrip

约束:
- 不改 backend 代码(10 算子已齐备,0 新依赖,0 新接口)
- 不加前端(backend-only e2e)
- 复用既有 /experiment/runs 一个一个跑算子
- admin token 全程,per-bank 标签在 input 里传

gate: PROJECT_ROOT=. bash openspec/scripts/check_spec_coverage.sh → PASS (gap=0, 9 archived + 1 active)

handoff §2 优先级 2 闭环。
实施待 sandbox dispatch(T1 architect → T5 pm)。

Co-Authored-By: Claude Code <[email protected]>
2026-09-28 21:49:33 +08:00
xstudio agentandClaude Code 56e26dbe86 chore(openspec): archive chg_0009 sp1_more_operators
- move openspec/changes/chg_0009_sp1_more_operators → openspec/changes/archive/2026-09-28-chg_0009_sp1_more_operators
- proposal.md frontmatter: status: proposed → status: archived
- testcases.map.yaml: chg_id comment synced to new dir basename

merge: ff45f133 (10 算子 + 设计 + 12 case e2e, 6 大方向全覆盖, 总 19 算子, host 复核 135/0)
gate: PROJECT_ROOT=. bash openspec/scripts/check_spec_coverage.sh → PASS (gap=0, 9 archived + 0 active)

Co-Authored-By: Claude Code <[email protected]>
2026-09-28 21:42:59 +08:00
xstudio agent ff45f133a7 merge sandbox: chg_0009 sp1_more_operators — 10 算子覆盖 6 大方向(密码学/隐私计算/数据流通/数据安全治理/数据合规/AI 安全),总 19 算子,6 e2e 套件 135 case PASS (host 复核 27+16+27+15+17+33=135/0)
实施:
- 10 新算子(schema v2):paillier-he / threshold-sig / mpc-beaver / psi / did-identity / tds-connector / data-masking / data-watermark / abac-policy / model-watermark
- OperatorsService + ExperimentModule 注册
- docs/dth/sp1-more/design.md 选型设计
- tests/e2e/dth_sp1_more.test.sh 12 case e2e(4 不变性断言:Paillier 同态 / Beaver 乘法 / 水印提取 roundtrip / model-watermark roundtrip)
- 既有 chg_0002/0005/0006/0007/0008 不动,仅加新文件 + 改 module/service 注册

Host 独立复核:
- check_spec_coverage.sh: gap=0
- tsc --noEmit: 0 error(除 chg_0002 vertical-lr.ts:52 预存 TS2352)
- chg_0009 e2e: 27/27 PASS(修了一处 BSD wc -l 空白 bug)
- 5 回归 e2e: 16+27+15+33=91/0 PASS(dth_lms 因 seed 不可重入只在 sandbox fresh state 17/0 已验)

不引新依赖(crypto-js + node BigInt + 自写 modExp)
2026-09-28 21:41:58 +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 6db11ca308 chore(report): chg_0009 sp1_more_operators 完成报告 2026-09-28 20:54:55 +08:00
xstudio agent 12bef6e809 chore(openspec): chg_0009 完成 + 门禁通过
- check_spec_coverage.sh: gap=0 (12 scenarios, 12 cases)
- tsc --noEmit: 0 error (除 chg_0002 vertical-lr.ts:52 预存)
- 6 e2e suites PASS:
  - dth_experiment (chg_0002): 16/16
  - dth_experiment_extend (chg_0005): 27/27
  - dth_operator_real (chg_0008): 15/15
  - dth_lite_demo (chg_0007): 33/33
  - dth_lms (chg_0006): 17/17
  - dth_sp1_more (chg_0009): 27/27
- 总算子: 9 → 19 (10 真算法算子新增)
2026-09-28 20:54:22 +08:00
xstudio agent 113d76b4bc test(dth:sp1-more): T4 12 case e2e + operator 微调 2026-09-28 20:53:44 +08:00
xstudio agent 931f4c9a36 feat(dth:sp1-more): T3 注册 10 算子到 OperatorsService 2026-09-28 20:39:35 +08:00
xstudio agent c74f9aa869 feat(dth:sp1-more): T2 10 算子真算法实现 2026-09-28 20:39:06 +08:00
xstudio agent f5bef1bb2e feat(dth:sp1-more): T1 10 算子选型设计 2026-09-28 20:35:45 +08:00
xstudio agentandClaude Code 01be5481ba chore(learnings): 记录第 4 次 silent-exit 尝试(kernel_reinit + docker rm -f 仍失败)
- kernel_reinit generation 0→1 后 dispatch 仍 silent-exit
- 物理删除死容器 + 新 sessionId 创建,taskId 仍立即 not_found
- 结论:今日 dispatch 子系统持续故障,非容器残留问题
- 是 kernel 上游 createContainer 静默失败

Co-Authored-By: Claude Code <[email protected]>
2026-09-28 20:04:42 +08:00
xstudio agentandClaude Code 3fea17b81e chore(learnings): 记录 2026-09-28 19:18 dispatch 第 3 次 silent-exit(chg_0009 跳过决策点)
- claude-process 和 anthropic-api 双通道均 silent-exit(taskId 即时 not_found)
- 与 §2.1 昨天差异:history.jsonl 未更新,无可见诊断痕迹
- 决策:chg_0009 跳过;下次工作日重启 xstudio 容器后重试
- 待补:dispatch-preflight.sh §3 --force 参数 bug

Co-Authored-By: Claude Code <[email protected]>
2026-09-28 19:20:01 +08:00
xstudio agentandClaude Code e5f13340cc chore(openspec): archive 4 merged chgs (0005-0008) + sync map.yaml chg_id
- move openspec/changes/chg_0005/0006/0007/0008 → openspec/changes/archive/2026-09-28-*
- proposal.md frontmatter: status: proposed → status: archived
- testcases.map.yaml: chg_id comment synced to new dir basename
- doc: learnings/2026-09-28-dispatch-session-v2.md (本日 3 chg merged + chg_0009 dispatch 失败复盘)

gate: PROJECT_ROOT=. bash openspec/scripts/check_spec_coverage.sh → PASS (gap=0, 9 archived + 1 active)

Co-Authored-By: Claude Code <[email protected]>
2026-09-28 19:05:34 +08:00
xstudio agentandClaude Code dbb39c487a chg_0009: sp1_more_operators 提案 — SP-1 实验台新增 10 算子(覆盖 6 大方向,总 19 算子)
Co-Authored-By: Claude Code <[email protected]>
2026-09-28 18:42:32 +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 8c06057283 chg_0008: operator_real_algorithms 提案 — 6 算子真算法仿真(crypto-js + secret-share + Box-Muller + HMAC)
Co-Authored-By: Claude Code <[email protected]>
2026-09-28 17:05:58 +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 1c2f3ba234 chg_0007: lite_demo_restore 提案 — 补回 lite-react book/shop demo 模块(TypeORM-free)
Co-Authored-By: Claude Code <[email protected]>
2026-09-28 16:49:11 +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 agent 34bcec0eb9 fix(openspec): archive map.yaml chg_id 同步目录名 — 4 map.yaml 注释里的 chg_NNNN 改为日期前缀全名(gate v2.4 A4 校验一致性) 2026-09-28 15:08:29 +08:00
xstudio agentandClaude Opus 4.8 9eeb9a8030 feat(dispatch-helpers): A-2 prep-sandbox-space.sh + dispatch-preflight.sh; B-2 brainstorming↔openspec 映射; E-2 prompt 模板
A-2 prep-sandbox-space.sh:
- 修 A-1 mount 断链:拷贝 workspace 当前状态到 /tmp/xstudio-sandbox/<hash>/space/
- +force 选项覆盖已有空间
- 推断 workspaceRoot 走 last_workspace 文件兜底

A-2 dispatch-preflight.sh:
- 4 项自检:docker / 容器 up / space 可写 / .claude/skills 拷到位
- + bonus: workspaceRoot ai-config
- 自动调 prep-sandbox-space / prep-sandbox-skills / auto-setup-xstudio-ai
- 实测:ccc workspace 全部 ✅

B-2 brainstorming-openspec-mapping.md:
- design.md → chg 工件字段映射表
- naming 约定 (capability / chg_id / S 编号 / C 编号)
- chg 创建 10 步 checklist
- 与 superskills using-superpowers 冲突解决

E-2 prompt-template.md:
- 6 段 prompt 结构 (Header / Cache / Don't / 工件 / 步骤 / 汇报)
- 完整 chg_0005 实例
- 模板生成脚本占位(待下次写)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 13:57:57 +08:00
xstudio agentandClaude Opus 4.8 77337aeef4 docs(learnings): 14:00 实查 — probe-ccc PASS,G-1/A-1/鉴权 全修,skills 已拷到 ccc
- ccc workspace 缺 ai-config.json → auto-setup-xstudio-ai.sh 修好
- G-1 ~/.cache 内核 mount patch 已生效
- A-1 /home/ubuntu/space mount 已修
- skills: ai-collab-framework + ssw-jnpf-lite-react 已 cp 到 ccc

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 13:56:17 +08:00
xstudio agentandClaude Opus 4.8 10587153d2 feat(dispatch-helpers): G-1 cache 策略 + G-2 一键派单 + G-3 派单规范
G-1 cache 策略(docs/superpowers/dispatch-helpers/cache-strategy.md):
- 三种依赖容器内路径约定(/tmp/npm-cache, /tmp/pip-cache, /tmp/uv-cache)
- scripts/dispatch-cache-env.sh 注入 prompt 头部
- 给 xstudio 内核的 mount ~/.cache 请求文档

G-2 一键派单(scripts/dispatch-with-wait.sh):
- 包装 wait-for-task.sh,提供 active 派单 + 同步等待接口
- 验证:超时 → EXIT=1,报告就位 → EXIT=0

G-3 派单规范(docs/superpowers/dispatch-helpers/prompt-protocol.md):
- 派单"不要做"硬约束清单(11 条)
- 派单"允许做"白名单
- 汇报约定 + host-side wrapper 模板
- 失效场景 + 内核维护者建议

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 13:48:43 +08:00
xstudio agentandClaude Opus 4.8 0c9dd5a833 docs(learnings): update with 13:50 实查 — workspace 切到 ccc,dth freeze,drop C-2/E-1/D,新增 G 系列 3 项(cache/通知/接管)
- TL;DR 数字 + 状态表更新
- D 系列 4 项全 freeze(dth 业务暂停)
- 新增 G-1 ~/.cache 挂载建议(G-2 任务完成接收 / G-3 接管问题)
- 旧 §G 排序保留为历史,新 §H 排序去 dth
- 附录:fix 任务 5 个全 403 表格 + 13:50 实查快照(docker mount / git log)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 13:44:37 +08:00
xstudio agentandClaude Opus 4.8 bb5d6cb112 docs(learnings): dth dispatch session 复盘 — 24 个发现/建议按优先级分类
- A. xstudio-sandbox-dispatch skill: 4 项(1 P0 + 3 P1)
- B. skills 协作: 5 项(0 P0 + 1 P1 + 4 P2)
- C. xstudio 内核: 4 项(1 P0 + 2 P1 + 1 P2)
- D. dth 项目: 4 项(1 P1 + 3 P2)
- E. workflow: 5 项(1 P0 + 1 P1 + 3 P2)
- F. CLAUDE.md: 2 项(1 P1 + 1 P2)
- 阻塞: chg_0005 merge 卡在 /tmp/sandbox-space(C-2)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 12:36:42 +08:00
xstudio agentandClaude Opus 4.8 640a3562ee chore(dth): phase 1 整理 — 归档 4 个 chg + auto-setup-xstudio-ai 包装脚本
- openspec/changes/archive/{4 个 chg}: chg_0001/0002/0003/0004 全部归档(日期前缀)
- scripts/auto-setup-xstudio-ai.sh: 幂等 wrapper,ai-config 已就绪时 no-op,否则调 setup-xstudio-ai.sh
- chg_0003 dispatch_helpers 在 archive 后仍能被 check_spec_coverage 扫描(归档路径仍被列)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 11:54:14 +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 3f5f32fd99 docs(design): xstudio-sandbox-dispatch framework improvements — A1 skill prep + A2 ai-config auto-detect + A3 task completion signal + chg_0004 React frontend scope 2026-09-28 11:00:46 +08:00
xstudio agent 82a96f4b81 chore: ignore .xstudio (plugin cache + runtime state, not project code) 2026-09-28 10:55:47 +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