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
|
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 |
|
k88936
|
c0ad48798f
|
Merge remote-tracking branch 'origin/master' into fix/res-edit-error-handling
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m1s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m51s
Project CI / Backend tests (pull_request) Successful in 4m43s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m48s
Project CI / Frontend tests (pull_request) Successful in 2m19s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m26s
Project CI / Repository checks (pull_request) Successful in 2m53s
Project CI / Native shell tests (pull_request) Successful in 6m5s
|
2026-10-02 22:21:24 +08:00 |
|
k88936
|
cdccfa6cd5
|
发行包上传失败带出「哪一步」子枚举
新增 GamePackageUploadStep(ReadUploadState / UploadChunk / CompleteUpload)与 GamePackageUploadError { step, detail }
read_upload_state / upload_chunk / complete_upload 改返回 typed 错误,detail 只放服务端 message / code / HTTP {status}
步骤名由 step 枚举渲染,不再靠各调用点硬拼「读取上传状态失败」这类前缀
upload_staged_game_package 在三个远端调用点 .map_err(to_user_msg);本地错误与对外签名保持 String,两处调用方零改动
|
2026-10-02 22:19:27 +08:00 |
|
k88936
|
1a99a2f26b
|
发行包上传 HTTP 兜底先过滤 message 再退 code
read_upload_state / upload_chunk(retryable、fatal) / complete_upload 四处 .or(code).filter 顺序反了
空 message 会把服务端 code 一起吞掉,统一改成 filter(message).or_else(|| code.filter(...))
|
2026-10-02 22:09:02 +08:00 |
|
k88936
|
a0428da5d1
|
HTTP 错误兜底先过滤 message 再退 code,避免空 message 吞掉 code
game_distribution_publish response_data 的 message.or(code).filter 顺序反了,空 message 会连 code 一起丢掉
map_http_error 同类顺序问题一并修正(review 未列,属同一类 bug)
|
2026-10-02 22:08:53 +08:00 |
|
k88936
|
675dfe0c8f
|
account_api 抽出 error_field 消除 message/code 的重复解析
error_message / error_code 只差字段名,合并到 error_field(body, field)
调用点保留 error_message / error_code 两个薄封装
|
2026-10-02 22:08:44 +08:00 |
|
k88936
|
883bcb182d
|
HTTP 错误兜底优先服务端 code,叶子不再拼操作名前缀
game_package_upload 三处不再丢弃服务端 code,改成 message → code → HTTP {status}
去掉「读取上传状态失败(HTTP 503)」这类叶子里的操作名前缀,操作名交给调用方话术
game_distribution_publish response_data 用上被丢掉的 error.code
game_distribution_publish 封面任务终态兜底统一成「服务器未返回错误信息」
account_api envelope 分支补 error.code 兜底
|
2026-10-02 20:17:00 +08:00 |
|
k88936
|
14afd21d7e
|
资源编辑错误文案只认平台 error 原文,phaseDetail 只进诊断
RemoteResourceEditFailure / ResourceEditError 的 to_user_msg 只回平台 error 原文,平台没给时回「服务器未返回错误信息」
typed 错误新增 phaseDetail 字段,只随诊断 sidecar 序列化,不参与用户文案
远端轮询 failed 分支同时读取 error 与 phaseDetail
删除断言 to_user_msg 字面量的单测,只保留 typed 字段原样序列化进诊断的结构断言
canvas_generation 远端 failed 分支不再拿 phaseDetail 当用户文案
同步 decision-log 与 pitfalls
|
2026-10-02 20:16:47 +08:00 |
|
k88936
|
d62afe3275
|
图片生成远端失败不再兜底一句重复的「生成任务失败」
- canvas_generation 轮询到 status=failed 时,平台既没给 error 也没给 phaseDetail 的兜底由「生成任务失败」改为「服务器未返回错误信息」,不再和句首「平台图片生成任务失败:」重复
- decision-log 追加同类兜底决策,说明这条与资源编辑同属「缺省时要说清是服务器没给信息,而不是再喊一次失败」
|
2026-10-02 19:30:03 +08:00 |
|
k88936
|
a932c9635e
|
资源编辑 typed 错误只给事实,前缀交给使用方
- ResourceEditError::to_user_msg 不再拼「资源编辑生成失败」:远端终态只回平台 error 原文,平台没给时统一说「服务器未返回错误信息」
- 桌面命令面 derive/resume_local_project_resource 自己补「资源编辑生成失败:」前缀,桌面 UI 文案不变,前缀落在它真正的使用者这一层
- 单测:typed 错误断言原文逐字透传与缺省兜底;抠图远端失败测试同口径更新
- decision-log 追加「前缀归属」决策(工具面各用各的前缀、桌面面用资源编辑生成失败、叶子错误不写死总结),pitfalls 同步口径
|
2026-10-02 19:29:49 +08:00 |
|
k88936
|
44dd809e9a
|
工具错误不再写死「资源编辑生成失败」前缀
- RemoteResourceEditFailure::to_user_msg 只回平台 error 原文,平台没给时统一说「服务器未返回错误信息」,不再拼一句没有信息量的总结
- 前缀交给使用它的工具自己加:生成/派生侧「生成或派生资源失败:」、抠图侧「抠图失败:」,两侧文案回到各自工具的既有口径
- 载体仍是两个工具共用的 RemoteResourceEditFailure,平台原文照旧整段进诊断的 typed error
- 补单测:载体层断言原文逐字透传与缺省兜底,工具层断言各自前缀下的文案
|
2026-10-02 19:29:33 +08:00 |
|
k88936
|
cdccb7a06a
|
去掉抠图资源编辑调用上冗余的凭据 wrapper
- remove_background_payload 的恢复与派生两处不再套 with_direct_editor_api_credentials_as:整个 payload 已在 bridge_remove_background 的 with_direct_editor_api_credentials 作用域内,内层凭据解析只会命中 override
- 因此 ResourceEditError::Other 作为 credentials_error 的分支不可达,删掉以免误导(凭据失败仍按原路径落到 CredentialsUnavailable)
- 保留 Box::pin(资源编辑 future 体积问题不变),注释改为同时说明装箱原因与凭据作用域来源
|
2026-10-02 19:14:57 +08:00 |
|
k88936
|
d2a5bceaba
|
资源编辑远端失败原文透传到工具错误与诊断
Project CI / Backend tests (pull_request) Failing after 29s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m48s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 3m54s
Project CI / Repository checks (pull_request) Failing after 15s
Project CI / Frontend tests (pull_request) Successful in 2m50s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m28s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m55s
Project CI / Native shell tests (pull_request) Successful in 6m48s
- agent/tool/error.rs 新增共用载体 RemoteResourceEditFailure { serverMessage },两个工具的平台失败文案只写一份
- CreateOrDeriveResourceError 与 RemoveBackgroundError 各加 RemoteGenerationFailed(RemoteResourceEditFailure) 变体,远端终态失败不再压回字符串
- 两个工具各加显式 from_resource_edit_error 翻译,不用 impl From<ResourceEditError>;Other 仍落回各工具原有的「失败:<文案>」变体并留 TODO
- 桥里四个资源编辑调用点改用 typed 入口,并 Box::pin 后再 await:资源编辑 future 内联会顶穿 handle_direct_tool_bridge 状态机的调试测试线程栈
- assets.rs 新增 with_direct_editor_api_credentials_as,保留调用方 error 类型,凭据解析失败由调用方显式翻译成 ResourceEditError::Other,旧名与其余调用点零改动
- 工具错误模块补单测:平台原文进 message、进序列化的 typed 错误,无原文与未分类失败各自的文案
- decision-log 补工具层承载、凭据作用域错误类型、future 装箱三条决策与真实验证结果;pitfalls 补工具层原样透传口径
|
2026-10-02 18:43:07 +08:00 |
|
k88936
|
f68773db9a
|
资源编辑错误通道补 typed 错误并把平台失败原文带出
- 新增 project/resource_editor/error.rs:ResourceEditError 只有 RemoteGenerationFailed { server_message } 与 Other(String) 两个变体,to_user_msg 是唯一写「资源编辑生成失败:…」的地方,Other 上留 // TODO refactor string-typed
- 轮询到 status=failed 时读平台 error 原文装进 RemoteGenerationFailed 带出,账本仍只写 terminal_failure_code,原文不进账本
- 删掉轮询与提交期 HTTP 400 两处首句失败文案的 remote-terminal-failed 前缀;ensure_resource_edit_phase_resumable 里的三个 token 保留
- 两个入口拆成 typed 实现与 Result<_, String> 外观:derive_local_project_resource_typed / resume_local_project_resource_edit_typed,旧名映射 to_user_msg 供既有调用点与 Tauri 命令使用
- 不提供 impl From<String>,每处 String 错误显式 .map_err(ResourceEditError::Other)
- terminal_failure_code 加 // TODO clean unnecessary 并写明清理前置条件(字段无 skip_serializing_if、账本带 deny_unknown_fields)
- 测试:远端终态断言平台原文进文案且不进账本,抠图远端失败改用 typed 入口覆盖无 error 时的兜底
|
2026-10-02 18:42:41 +08:00 |
|
k88936
|
ccff6cdceb
|
记录资源编辑远端失败要带出平台原因的设计决策
- decision-log 新增 2026-10-02 条目:ResourceEditError 造型、不用 blanket From、不按 terminal_failure_code 分支、前缀去留、原文边界、Other 命名与 error.rs 落点
- 条目里写清 terminal_failure_code 的清理前置条件:字段无 skip_serializing_if 且账本是 deny_unknown_fields,清掉会影响每个已落盘账本
- pitfalls「远端资源编辑终态必须指出唯一出口」补上处理与验证口径:轮询终态把平台 error 原文装进 typed 错误带出、不再压成一句,断言同时要求原文进文案且不进账本
|
2026-10-02 17:50:00 +08:00 |
|