Commit Graph

5638 Commits

Author SHA1 Message Date
kdletters 8aee5db84e 统一 Claude Code 与 Codex 错误分类
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 5m46s
Project CI / AI game creator shell Rust crates (push) Successful in 3m18s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 5m5s
Project CI / Frontend tests (push) Successful in 4m36s
Project CI / Backend tests (push) Failing after 5m40s
Project CI / Repository checks (push) Failing after 4m32s
Project CI / AI game creator shell web tests (push) Successful in 2m54s
Project CI / Native shell tests (push) Successful in 8m37s
保留 Claude Code 的上游 HTTP 状态、超时、空响应和无效 JSON 语义

补充状态摘要、重试建议、定向回归测试与排障记录
2026-10-03 18:08:14 +08:00
suzmii 0b03d563c2 Merge pull request '修复 AGC 栏目画布上传素材落「待归类」(#359)' (#596) from fix/agc-asset-upload-category into master
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Reviewed-on: #596
2026-10-03 17:58:02 +08:00
suzmii 86e74867ae review 反馈:补齐 targetCategory 的文档与注释口径(#359)
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m27s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m37s
Project CI / Backend tests (pull_request) Failing after 31s
Project CI / Repository checks (pull_request) Failing after 28s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m54s
Project CI / Frontend tests (pull_request) Successful in 3m18s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m28s
Project CI / Native shell tests (pull_request) Successful in 7m28s
- 实施计划合同补上「GUI 上传与图片类生成同一 targetCategory 口径,不传时仍按内容证据派生 kind」
- 栏目画布底部工具栏入口矩阵 §1 一句话补上「带当前栏目 targetCategory」
- 工具栏模型里上传入口的类型注释写明入口栏目与「待归类」的因果
- 修正占位落点 effect 里陈旧的示例:普通图片只在 Agent / Direct 不传 targetCategory 时才落「待归类」
2026-10-03 17:42:50 +08:00
suzmii 7e96b369c1 Merge pull request '修复 Web 预检浏览器失败恢复' (#591) from fix/web-preflight-browser-recovery into master
Project CI / AI game creator shell Rust crates (push) Successful in 2m40s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 4m51s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 4m24s
Project CI / Backend tests (push) Failing after 3m56s
Project CI / Frontend tests (push) Successful in 3m5s
Project CI / AI game creator shell web tests (push) Successful in 2m56s
Project CI / Repository checks (push) Failing after 4m3s
Project CI / Native shell tests (push) Successful in 6m54s
Reviewed-on: #591
2026-10-03 17:33:22 +08:00
kdletters d3750b1846 Merge pull request '新增支付服务接入与订单收银台' (#597) from codex/payment-service-20261003 into master
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Reviewed-on: #597
2026-10-03 17:27:32 +08:00
kdletters 4b529a8952 新增支付服务接入与订单收银台
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m59s
Project CI / Backend tests (pull_request) Failing after 4m8s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m9s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m20s
Project CI / Frontend tests (pull_request) Successful in 3m17s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m48s
Project CI / Repository checks (pull_request) Failing after 4m15s
Project CI / Native shell tests (pull_request) Successful in 6m52s
新增支付应用、API Key 与外部产品订单接口

接入微信 Native 下单、二维码收银台与支付结果回调

新增后台支付订单与回调投递页面

补齐 SpacetimeDB 支付表、生成绑定、OpenAPI 与使用说明
2026-10-03 17:18:13 +08:00
suzmii 372b7d3a00 修复 AGC 栏目画布上传素材落「待归类」(Issue 359)
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m17s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 3m59s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m8s
Project CI / Backend tests (pull_request) Successful in 6m24s
Project CI / Frontend tests (pull_request) Successful in 3m24s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m34s
Project CI / Native shell tests (pull_request) Successful in 6m49s
Project CI / Repository checks (pull_request) Successful in 5m38s
- AGC Rust `upload_local_asset` 新增可选 `targetCategory`,登记改走 `register_local_asset_entry_with_category`(非法值失败关闭,不回退 kind 派生);`upload_local_asset_at` 委托新的 `upload_local_asset_at_with_category`,既有调用点与单测不动
- 前端 `uploadProjectAssetFilesAndReadSnapshot` 透传 `targetCategory`;栏目画布底部工具栏上传带上工具栏自己的栏目,与生成入口的 `targetCategory` 同一口径
- 新增 Rust 单测 `upload_registers_into_the_explicit_entry_category`(显式栏目 → character / 不传 → unclassified / 非法 version 失败关闭且不新增登记)与 appSurface 用例(在「角色与对象」上传图片,载荷必须带 `targetCategory: 'character'`)
- 同步 PRD §3.10、`docs/technical/【AGC】栏目画布底部工具栏入口矩阵-2026-09-13.md` §4 载荷表、V3 验收用例 S11a、decision-log 与 pitfalls
2026-10-03 16:59:22 +08:00
suzmii c7d70ba893 Merge remote-tracking branch 'origin/master' into fix/web-preflight-browser-recovery
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m3s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m56s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m4s
Project CI / Backend tests (pull_request) Successful in 5m59s
Project CI / Frontend tests (pull_request) Successful in 2m52s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m5s
Project CI / Native shell tests (pull_request) Successful in 6m37s
Project CI / Repository checks (pull_request) Successful in 6m24s
2026-10-03 16:35:17 +08:00
suzmii b6a3e8d506 修复浏览器进程归属与清理诊断
固定 Windows 浏览器 root 与子进程启动身份,Job 绑定失败时回收完整进程树并拒绝 PID 复用。

保留 Web 预检 shutdown 的结构化清理诊断,补充身份不匹配回归测试。
2026-10-03 16:31:40 +08:00
k88936 633355952b Merge pull request 'Refactor/整理项目对话错误相关代码' (#593) from refactor/turn-error-to-explicit-struct into master
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 5m10s
Project CI / AI game creator shell Rust crates (push) Successful in 2m48s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 5m5s
Project CI / Backend tests (push) Successful in 5m27s
Project CI / Frontend tests (push) Successful in 3m8s
Project CI / AI game creator shell web tests (push) Successful in 2m22s
Project CI / Native shell tests (push) Successful in 6m43s
Project CI / Repository checks (push) Successful in 5m8s
Reviewed-on: #593
2026-10-03 15:58:20 +08:00
k88936 0e313405d6 修复:生成绑定校验不再用 prettier 改写生成文件
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m54s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m36s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m44s
Project CI / Backend tests (pull_request) Successful in 5m46s
Project CI / Frontend tests (pull_request) Successful in 2m50s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m41s
Project CI / Native shell tests (pull_request) Successful in 6m39s
Project CI / Repository checks (pull_request) Successful in 6m12s
- scripts/check-generated-bindings.mjs:删掉生成后的 prettier 归一化,直接逐字节比较 ts-rs 原始输出
- .prettierignore 与 .eslintrc.cjs:四个 ts-rs 生成目录统一排除,禁止格式化工具二次改写
- .prettierrc.json:删除 contracts/generated 的 printWidth / singleQuote 覆盖
- .gitattributes:生成目录标 linguist-generated 并豁免 trailing-space,保证 git diff --check 通过
- 重新生成 AGC chat/generated 与 services/generated 的 51 个绑定,改为提交 ts-rs 原始输出(纯格式,语义不变)
- docs/project-memory:记录生成绑定不再经 prettier 的口径,修正旧流程说明
2026-10-03 15:40:21 +08:00
k88936 141e59c971 Merge remote-tracking branch 'origin/master' into refactor/turn-error-to-explicit-struct
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m0s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 2m45s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m52s
Project CI / Frontend tests (pull_request) Successful in 2m30s
Project CI / Backend tests (pull_request) Successful in 4m54s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m0s
Project CI / Native shell tests (pull_request) Successful in 7m38s
Project CI / Repository checks (pull_request) Successful in 6m34s
2026-10-03 14:50:04 +08:00
lhk229 ae2d1a3a21 修复 AGC 生成准备依赖全量素材库的问题 (#592)
Project CI / AI game creator shell Rust crates (push) Successful in 1m47s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 5m1s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 5m18s
Project CI / Frontend tests (push) Successful in 2m27s
Project CI / Backend tests (push) Successful in 5m49s
Project CI / Native shell tests (push) Successful in 6m21s
Project CI / Repository checks (push) Successful in 3m36s
Project CI / AI game creator shell web tests (push) Successful in 2m54s
修复已有项目和素材目录绑定时,AGC 生成准备仍读取完整账户素材库、导致无关素材读取失败阻断生成的问题。

- 新增站内与 External v1 的单目录 GET,按主键读取并校验账号归属;复用目录 DTO,不读取素材列表或创建默认目录。
- 已有 binding 和 partial 恢复改为确认目标目录;首次建绑直接沿用稳定幂等创建,不再读取全库。
- 目录缺失、越权、超时、响应身份不符或会话切换时停止,保留恢复证据,不自动重建、不换键重发生成;已有生成账本继续沿用冻结快照恢复。
- 既有素材库与目录创建、修改、删除 API 合同保持不变,持久化表结构不变。同步 OpenAPI、生成绑定及技术文档。

验证:
- AGC Rust:目录绑定 7 项、生成 94 项、资源编辑 60 项、抠图 5 项通过(目录绑定用例包含在生成组中)。
- api-server:External Editor 30 项、受保护路由矩阵 3 项通过。
- 真实隔离 SpacetimeDB:目录读取成功、空目录、缺失、越权、删除后缺失、只读不变,以及既有幂等/并发/孤儿检查通过。
- smoke 脚本测试 4 项通过;module 编译、生成绑定、87 张表 schema guard、DDD、编码、文档索引、定向 Rust 格式与 diff 检查通过。
- 已比较 OpenAPI:除新增单目录 GET 外,原有定义逐项保持一致。

验证限制:未完成独立 API `/healthz` 联调,本地隔离数据库与授权配置未就绪;启动尝试已停止并清理。未运行全量测试或真实付费生成。

发布顺序:先发布后端模块与 API,再发布新客户端;不提供全库回退。#574 的素材分页、筛选及按素材 ID 读取不在本 PR 范围内。

Closes #550

Reviewed-on: #592
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-10-03 14:48:54 +08:00
k88936 47da90ab84 重构:终态判定不再为控制流留兜底分支
- turn_completion.rs 的 turn_terminal 两处 ShouldContinue 分支由 debug_assert + 回落账本终态 / host_dropped 改为 unreachable:控制流在返修循环与终态投影处已被过滤
- 同步收紧 turn_terminal 的文档说明,明确控制流不该也不能进入终态判定
2026-10-03 14:47:28 +08:00
k88936 84cbe9b1a6 修复:封口复核的控制流不再被吞成 HostDropped
- direct_runtime 返修循环接住 chat 侧返回的 TurnError::RepairRequired(app-server 封口复核),写回 prompt 继续一轮,流式与非流式两条分支都补上
- 删除 thread_manager/dispatch.rs 的 finish_turn_failure:它的 ShouldContinue 静默分支正是控制流漏到收口后、被 Drop 兜成 HostDropped 的入口
- 两处回合失败收口改为就地对 classify 结果显式分流:ShouldStop 写失败终态,ShouldContinue 视为上游缺陷直接 unreachable
2026-10-03 14:32:31 +08:00
k88936 6550e9a4bb 测试:补回入队被拒消息不落盘、不重放的断言
- home.suite.ts 的入队被拒用例恢复 persistedMessages 桩,并让历史切片返回它
- 增加断言:被拒消息不落历史条目、不被乐观渲染成用户气泡、不写本地历史
- 增加 cleanup + 重挂载断言:重进项目不重放被拒消息与拒绝文案,且不自动重试
2026-10-03 14:16:18 +08:00
k88936 3ab313a11a 修复:生成绑定校验在 Windows 上无法执行 npx.cmd
- check-generated-bindings.mjs:run() 的 spawnSync 增加 shell: process.platform === 'win32'
- Windows 上不带 shell 无法执行 .cmd/.bat(Node 修 CVE-2024-27980 后报 EINVAL),npxCommand 特意换成 npx.cmd 只把 ENOENT 换成了 EINVAL,prettier 这一步仍然跑不起来
- 与 scripts/database-backup-to-oss.mjs、lint-staged-rustfmt.mjs 等既有脚本的写法保持一致
- Linux 侧已跑 check:generated-bindings 验证;Windows 路径本机无法实测
2026-10-03 13:47:43 +08:00
k88936 6a4bcf4f31 重构:生成绑定校验不再依赖 readdirSync 的 recursive 选项
- check-generated-bindings.mjs:snapshot() 改用普通 fs.readdirSync(absolute)
- recursive 选项要 Node 18.17 / 20.1 才有;仓库没有 engines 约束,旧版本会静默退化成只读顶层,反而削弱嵌套目录的覆盖
- 四个生成目录都是平铺的(ts-rs 的 export_to 直接落文件),去掉后行为不变,已跑 check:generated-bindings 验证
2026-10-03 13:47:21 +08:00
k88936 7fb4dabb55 修复:生成绑定校验在目录缺失时不再静默通过
- check-generated-bindings.mjs:snapshot() 遇到目标目录不存在时由 console.warn + 返回空 Map 改为抛出错误
- 旧实现下,若 export_to 路径被改名或生成文件被整体删除,前后快照都是空 Map,diff 报不出任何问题,校验以"0 个文件"静默通过
- 现在目录缺失会立即失败并指出是哪个目录,不再给假绿
2026-10-03 13:47:02 +08:00
kdletters b62e32946b 修复 cc 反馈回复的 DirectProject 条目冲突
Project CI / AI game creator shell Rust crates (push) Successful in 1m41s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 4m23s
Project CI / Backend tests (push) Successful in 4m50s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 5m9s
Project CI / Frontend tests (push) Successful in 2m25s
Project CI / AI game creator shell web tests (push) Successful in 2m29s
Project CI / Native shell tests (push) Successful in 5m59s
Project CI / Repository checks (push) Successful in 3m0s
同一 client turn 的反馈回复冲突时生成独立 assistant item ID

保持相同回复幂等并补充回归测试与排障记录
2026-10-03 13:45:02 +08:00
k88936 d07f894bf6 修复:Bearer 引号值脱敏正则只匹配到第一个空格,密钥尾部漏出
- directThreadSanitize.ts:BEARER_VALUE 的引号分支由 \\.?["'] 改为 \\?["'],与同文件 SENSITIVE_ASSIGNMENT 的写法一致
- 原写法要求引号前必须有一个字面反斜杠,导致 Bearer "abc def" 走不到引号分支,退化到裸 token 分支后只遮到第一个空格,示例会输出 Bearer [redacted-secret] def"
- 修正后引号内的整段值都被遮掉;JSON 转义的 \"abc def\" 仍然匹配
- 同步在 directThreadSanitize.test.ts 增加带引号 Bearer 的用例(修复前该用例失败)
2026-10-03 13:42:40 +08:00
k88936 0a16d5d574 修复:入队命令的真 Error 不再被包装,失败文案不再变成 {}
- directTurnEnqueueFailure.ts:invokeTurnEnqueue 的 catch 先判断 error instanceof Error,是则原样抛出
- JSON.stringify(new Error(...)) 得到 {}(message/stack 不可枚举),包进 EnqueueFailureWrapper 后控制器读 error.message 只能拿到 {},真实失败文案丢失
- 结构化拒绝是普通对象,不受影响;真 Error 交回调用方既有的 instanceof 分界,与类注释口径一致
2026-10-03 13:41:30 +08:00
k88936 2fe651c845 修复:入队失败提示对缺失字段容错,不再抛 Cannot read properties
- directTurnEnqueueFailure.ts:permissionRejected.policyDetail / inputRejected.detail 改用可选链再 trim
- 跨 IPC 载荷没有运行时校验,字段理论上可能是 null/undefined;原实现会在 runTurn 的 catch 里抛错,用户看到的是裸 TypeError、草稿还被清掉
- 缺失字段现在与空串同档:返回 null,按"没有提示"处理,保留草稿并走上报通道
2026-10-03 13:41:00 +08:00
k88936 bc115002d4 重构:去掉终态判定里多余的 TurnError clone
- turn_completion.rs:collect_outcome 按值匹配,Err(error) 已是 owned,Some(error.clone()) 改为 Some(error),省掉一次整份错误载荷的克隆
- 行为不变:host_failure 那一支仍是 &TurnError,需要 clone 的保留
2026-10-03 13:40:15 +08:00
k88936 d7d09f310c 合并:把 origin/master 并入回合错误重构分支并保留双方行为
- 解决 direct_runtime/mod.rs 冲突:保留本分支 typed 回合错误重构(TurnError/EnqueueError 与 record_direct_codex_failure_facts 拆分),接入 master 的诊断 v3 口径(persist_agent_runtime_error 新签名 + typed error 字段)、prompt 反馈改截断不脱敏、项目写锁改名
- 解决 thread_manager/dispatch.rs 冲突:保留本分支 TurnError/TurnCompletion 换代与 finish_turn_failure 分类层,接住 master 的 tt= 日志改名与 cc 执行器整轮成功后补写 completed 终态
- 解决 direct_tools_mcp.rs 冲突:采用 master 版(本分支唯一改动是 external MCP 容量测试读 body,master 已有等价实现)
- 处理 direct_turn_failure.rs 删除/修改冲突:维持本分支删除,把 completed() 语义迁进 TurnCompletion::Completed 并补回对应测试
- 处理 runtime_driver/entrypoints.rs 修改/删除冲突:接受 master 退役自建 Agent Runtime 的删除(本分支只在该文件做 direct_now_ms 改名)
- 合并 decision-log.md:双方条目都保留
- 修复 auto-merge 漏掉的语义冲突:claude_code_cli.rs 的 direct_now_ms() 改名 now_ms();诊断测试改为断言 AGENT_RUNTIME_ERROR_SCHEMA_VERSION、detail 字段改 message;record_direct_codex_failure_facts 新增 typed_error 入参(TurnError 不序列化,落盘用 classify 投影出的 TurnFailure)
2026-10-03 13:12:10 +08:00
suzmii e7530d0c8e Merge remote-tracking branch 'origin/master' into fix/web-preflight-browser-recovery
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m50s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m16s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m45s
Project CI / Backend tests (pull_request) Successful in 4m53s
Project CI / Frontend tests (pull_request) Successful in 2m26s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m18s
Project CI / Native shell tests (pull_request) Successful in 5m46s
Project CI / Repository checks (pull_request) Successful in 3m35s
2026-10-03 12:51:42 +08:00
suzmii c833e30d73 修复 Web 预检浏览器恢复与安全收束
Project CI / Backend tests (pull_request) Failing after 28s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
修复 Windows Job 绑定窗口内子树未纳入的问题,无法确认时收束并 fail-closed。

使用 CommandLineToArgvW 校验含空格 Profile,补充 Job 子树与 Profile 回归测试。

补齐清理失败安全诊断和浏览器环境错误码契约。
2026-10-03 12:50:18 +08:00
k88936 10436a641c 注释:补充 ShouldContinue 变体的字符串类型设计说明 2026-10-03 12:21:39 +08:00
k88936 a8948f27bb 文档:记录回合错误分类层与线程条目脱敏边界
- decision-log 增加 2026-10-03 条目:TurnError::classify / TurnErrorClassified 取代 terminal_failure
- 记录 ThreadManager 不再做字段级脱敏与限长、脱敏搬到前端 directThreadSanitize,失败载荷脱敏保留在 classify
2026-10-03 12:08:25 +08:00
k88936 3aef44c54a 文档:同步错误投影点改名与逐 delta 脱敏退役现状
- ADR 与 decision-log 里的 TurnError::terminal_failure 改成 TurnError::classify
- pitfalls 的「逐 delta 脱敏吃掉段尾换行」补一条现状:Rust 逐 delta 脱敏已退役,脱敏搬到前端 directThreadSanitize
2026-10-03 12:07:42 +08:00
k88936 549915a2be 重构:线程条目脱敏改由前端统一做
- 新增 directThreadSanitize:项目内路径归一成相对路径,绝对路径 / 密钥 / 敏感赋值 / Bearer / 配置文件 / 私钥块 / 敏感开关统一换成占位符,只遮挡不截断
- 订阅 hook 在 bootstrap / consume / 历史切片进入聊天状态之前统一过脱敏,复用已有的 projectPath
- 新增 12 条单测:项目内外路径、密钥前缀与 JWT、Bearer、.env、私钥块、多行换行保留、条目与增量事件
2026-10-03 12:06:40 +08:00
k88936 500479b4aa 文档:同步 ThreadItem 与 TurnFailure 的生成绑定注释
- ThreadItem 注记改为"原样投影、脱敏在前端"
- TurnFailure 注记改为 TurnError::classify / TurnErrorClassified::ShouldContinue
2026-10-03 12:00:00 +08:00
k88936 68cb41e332 重构:ThreadManager 停止对线程条目脱敏与限长,改为原样透传
- 删除 wire/items.rs 的 bounded / detail_text / sanitize_detail_text / relativize_project_root_paths / thread_delta_text 与三个字符上限常量
- thread_item_from_value / thread_items_from_history / 运行态条目 / 流式增量签名去掉 root,字段原样透传,脱敏交给事件进前端状态时统一做
- dispatch.rs 写历史失败不再预脱敏,原文交给 classify 投影成失败载荷时统一脱敏 + 截断
- 用例改为"原样透传"口径,删除已无对象的流式脱敏用例
- 失败载荷(错误文案)的脱敏保留
2026-10-03 11:53:01 +08:00
kdletters 25beb3ad59 修复 cc 回复只在重进项目时才可见:补下发 item.completed 事件
Project CI / AI game creator shell Rust crates (push) Successful in 1m16s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 4m50s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 4m33s
Project CI / Backend tests (push) Successful in 4m1s
Project CI / Frontend tests (push) Successful in 2m31s
Project CI / AI game creator shell web tests (push) Successful in 1m55s
Project CI / Repository checks (push) Successful in 2m49s
Project CI / Native shell tests (push) Successful in 5m9s
- claude_code_cli.rs 在 cc 解析成功、回复落盘之后,用同一个条目 id 下发 ThreadEvent::item_completed(ThreadItem::Message{role:"assistant"}),聊天区按事件流投影即可实时显示本轮回复
- 之前只落盘 project.jsonl、不下发条目事件,用户看到的是"用户气泡 + 本轮结束于 … · 耗时",回复要重进项目才从历史读出来
- pitfalls.md 补记第四条根因与 CDP + DOM 断言验收证据
2026-10-03 11:42:52 +08:00
k88936 11e98a3cae 重构:回合错误的处置分类层取代 Option,并合并 SessionOutcome
- TurnError::terminal_failure 的 Option<TurnFailure> 换成 TurnError::classify -> TurnErrorClassified{ShouldStop, ShouldContinue},控制流不再借 None 表达
- dispatch.rs 两处 .expect("回合失败必可投影成失败载荷") 改为按分类层 match,收到 ShouldContinue 不写终态、不伪造失败
- turn_terminal 不再用 and_then 压平;ShouldContinue 显式认账并落到账本正常终态
- 并掉 private SessionOutcome,收尾 status 解析直接产出 TurnCompletion
- TurnFailure 补 // TODO badnaming,同步更新相关文档注释
2026-10-03 11:42:48 +08:00
k88936 c7e51266c8 Merge pull request 'fix/资源编辑错误通道补 typed 错误并把平台失败原文带出' (#589) from fix/res-edit-error-handling into master
Project CI / AI game creator shell Rust crates (push) Successful in 1m56s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 4m14s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 4m40s
Project CI / Backend tests (push) Successful in 4m37s
Project CI / Frontend tests (push) Successful in 2m27s
Project CI / AI game creator shell web tests (push) Successful in 2m19s
Project CI / Native shell tests (push) Successful in 5m30s
Project CI / Repository checks (push) Successful in 2m52s
Reviewed-on: #589
2026-10-03 11:32:40 +08:00
kdletters 3f0895fa41 修复 cc 回合"模型已回复却报宿主任务提前结束",并放行宿主 MCP 工具
Project CI / AI game creator shell Rust crates (push) Successful in 1m45s
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
- thread_manager/dispatch.rs 在放行成功出口补写 DirectTurnTerminal::completed():cc 执行器没有 codex app-server 那条深层终态出口,否则占用对象兜底会把已拿到回复的回合收成 HostDropped
- direct_turn_failure.rs 新增 completed() 终态(status=completed、无失败载荷)与对应单测
- claude_code_cli.rs 在 cc 解析成功后把回复按 response_item/assistant 落进 .agent/conversations/project.jsonl(id=direct-codex:<clientTurnId>:assistant),落盘失败按回合失败收口
- agent-sidecar 按 mcp__<server> 前缀放行请求声明的 MCP 服务器,避免 dontAsk 模式下宿主工具被直接拒绝
- dispatch.rs 的 host_dropped / panic 诊断字段改用 tt=,不再被日志脱敏整行吃掉(原 turnToken= 命中凭据标记)
- pitfalls.md 记录三条根因、现行口径、诊断口径与 CDP 注入验收证据
2026-10-03 11:28:07 +08:00
k88936 bb446553fd Merge remote-tracking branch 'origin/master' into fix/res-edit-error-handling
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m43s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m4s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m9s
Project CI / Backend tests (pull_request) Successful in 4m39s
Project CI / Frontend tests (pull_request) Successful in 2m19s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m20s
Project CI / Repository checks (pull_request) Successful in 3m2s
Project CI / Native shell tests (pull_request) Successful in 5m37s
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
2026-10-03 11:21:20 +08:00
k88936 2dbbf72450 修复:模型调用失败改按 typed kind 判定通道断开
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m39s
Project CI / Backend tests (pull_request) Failing after 16s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 3m14s
Project CI / Frontend tests (pull_request) Successful in 2m4s
Project CI / Repository checks (pull_request) Failing after 22s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m46s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m14s
Project CI / Native shell tests (pull_request) Successful in 6m20s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 12m24s
- direct_codex_error_code 原来对 ModelCallFailed 一律按宿主原文子串分类,ModelCallKind::TransportBroken 只有在原文恰好含 transport closed / 连接已关闭 时才会标成 transport-closed
- 改为先看 payload.kind:TransportBroken 直接给 transport-closed,其余 kind 仍按原文兜底(TODO 文本判据)
- 补用例 model_call_transport_broken_is_classified_from_the_typed_kind:原文不含任何分类标记,也只可能由 typed kind 得出该 code
2026-10-03 10:59:28 +08:00
k88936 40b79bb1ec 重构:turn.completed 的 status 由自由字符串收成 typed 枚举
- 新增 TurnCompletedStatus(completed / interrupted / aborted / failed),作为 turn.rs 里 status 字段的类型
- 新增只作构造参数的 TurnOutcome(completed / interrupted / aborted):turn_completed 拿不到 Failed,"failed 但没有失败载荷"在构造层就写不出来
- turn_completed_failed 固定写 TurnCompletedStatus::Failed,载荷与状态在同一条构造路径上
- 内部状态比较与用例断言改为比较枚举取值;线上 JSON 形状、字段名与前端契约不变
- 重新生成绑定:新增 TurnCompletedStatus.ts,ThreadEvent.ts 的 status 由 string 收成字面量联合
2026-10-03 10:55:04 +08:00
k88936 fb80c7d5e4 发行包上传用 From 收敛结构化错误,替换重复的 map_err
- 为 GamePackageUploadError 实现 From<GamePackageUploadError> for String
- upload_staged_game_package 中三处 .map_err(|e| e.to_user_msg()) 改为 ?,Fatal 分支改为 error.into()
2026-10-03 10:54:29 +08:00
k88936 b4bbd08414 发行包上传错误 detail 去掉与步骤标签重复的前缀
- 读取响应/分片响应/完成响应失败改为直接给原始 error,步骤由 GamePackageUploadStep 标签提供
- JSON 解析与缺字段的 detail 去掉「上传状态响应」「分片响应」「完成响应」等重复主语
2026-10-03 10:52:32 +08:00
k88936 b3ed1c0f80 发行包上传抽 server_error_detail,统一 message/code/兜底顺序
- game_package_upload.rs 新增 pub(crate) server_error_detail,统一先取非空 message 再退非空 code 的顺序
- runtime.rs 五处 HTTP 错误分支改用该 helper,删除各自复制的过滤逻辑
- game_distribution_publish.rs 的 response_data 与 map_http_error 共用同一 helper
- FORBIDDEN 分支改用 helper,补上此前缺失的空 message trim 过滤
2026-10-03 10:51:29 +08:00
suzmii 64ef6d7428 Merge remote-tracking branch 'origin/master' into fix/web-preflight-browser-recovery 2026-10-03 10:29:10 +08:00
k88936 d90f4fdfdc Merge pull request 'style/优化聊天历史页' (#590) from feat/smoother-dialog-history into master
Project CI / AI game creator shell Rust crates (push) Successful in 1m55s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 4m12s
Project CI / Backend tests (push) Successful in 4m51s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 5m11s
Project CI / Frontend tests (push) Successful in 2m22s
Project CI / Native shell tests (push) Successful in 5m36s
Project CI / AI game creator shell web tests (push) Successful in 2m34s
Project CI / Repository checks (push) Successful in 3m3s
Reviewed-on: #590
2026-10-02 23:22:32 +08:00
k88936 1874a6e9ec 注释:为会话滚动锚点的全表量测补 TODO 性能分析
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m55s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 4m18s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m33s
Project CI / Backend tests (pull_request) Successful in 3m58s
Project CI / Repository checks (pull_request) Successful in 3m4s
Project CI / Frontend tests (pull_request) Successful in 3m25s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m14s
Project CI / Native shell tests (pull_request) Successful in 5m49s
- conversationScrollAnchor.ts 的 readTopVisibleTurnAnchor 循环上方新增 // TODO(perf): 注释,仅注释、无行为变化
- 记录量测口径:最坏 O(锚点之前的块数) 次 getBoundingClientRect,同帧首次调用后布局已干净、后续不再各自触发 reflow,属 low,不是振荡源
- 记录 rAF 节流与「只在补偿前才读」都省不掉这次遍历,故不采纳
- 记录二分 / 续扫被收起 <details> 的 0 矩形打断单调性,需先定「隐藏块怎么参与」
- 首选后续方向:缓存上次命中的块身份并从附近续扫,不破坏单调性假设

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-02 22:34:07 +08:00
k88936 adcf3b9730 修复:回合失败载荷 stage 未知时不再渲染 undefined
- turn.completed.failure 跨 IPC 没有运行时校验,superErrorFromStringPlusStage 的 stage 缺失或为更新后端新增的取值时,查表得到 undefined 会被拼进用户可见文案
- 查不到标签时回落到通用句"执行失败,请稍后重试",只有已知阶段才带"请检查项目诊断"
2026-10-02 22:31:52 +08:00
k88936 1ba9ac848f 修复:回合失败载荷缺 kind 时不再让失败文案抛错
- turn.completed.failure 跨 IPC 没有运行时校验,modelCallFailed 载荷缺 kind 时 directModelCallText 会解引用 undefined 抛错,整个事件订阅被打断
- directModelCallText 参数放宽为 ModelCallKind | null | undefined,缺分类时回落到通用句"智能服务执行失败,请稍后重试"
2026-10-02 22:31:36 +08:00
k88936 fc10b2359e 修复:线程条目投影的上游字符串统一走脱敏与限长
- FunctionCall.name 原来既不脱敏也不截断,改为走 detail_text(脱敏 + THREAD_DETAIL_MAX_CHARS)
- McpToolCall.tool 原来只脱敏不截断,改为 detail_text
- CommandExecution.status、McpToolCall.status、ThreadItem::Other.raw_type、ThreadFileChange.kind 原来原样拷贝,统一按 THREAD_DETAIL_MAX_CHARS 限长,避免单条事件突破声明的事件通道预算
2026-10-02 22:31:05 +08:00
k88936 80afa2a139 修复:生成绑定校验不再因首个目标失败就中止
- 原来每个目标里直接 process.exit,第一个目标(shared-contracts)失败时 AGC 目标根本不会被检查,得反复重跑才知道还有哪些绑定陈旧
- 改为记录 failed 后 continue,跑完全部目标再统一退出 1,两个绑定集的错误一次报齐
2026-10-02 22:31:02 +08:00