Commit Graph

2108 Commits

Author SHA1 Message Date
k88936 e4b15d3bbf Merge remote-tracking branch 'origin/master' into fix/wrong-report
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m25s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 53s
Project CI / Backend tests (pull_request) Failing after 21s
Project CI / Frontend tests (pull_request) Successful in 2m25s
Project CI / Repository checks (pull_request) Failing after 14s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m45s
Project CI / Native shell tests (pull_request) Successful in 5m48s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 10m34s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 11m18s
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
#	docs/project-memory/shared-memory/pitfalls.md
2026-10-02 12:19:13 +08:00
k88936 d518bb2ceb 文档:系统类失败载荷保留原始错误
- 命令错误结构化 ADR:本机 IO / 网络客户端构建失败的原始 detail 留在载荷(调用方分流与报告诊断用),界面只用固定文案,路径交给报告侧 sanitize
- 认证失败 JS 侧载体 ADR:带 detail 的本机失败是例外,不把原始错误文本贴到界面上
- 决策记录:追加 2026-10-02 口径,取代上一轮"本机 IO 失败不进载荷"
2026-10-02 12:06:03 +08:00
k88936 8edbab9f3e 文档:本机IO失败去掉detail载荷
- 命令错误结构化 ADR:本机凭据/运行时会话 IO 失败不再把原始错误文本放进载荷,原始 error 只写本地日志
- 认证失败 JS 侧载体 ADR 与决策记录同步去掉 detail 口径,并追加 2026-10-02 的变体改无字段决定
2026-10-02 11:51:43 +08:00
k88936 f8c32e6346 文档:登录路由429归业务变体
- 命令错误结构化 ADR 补 429 按路由判定的口径:发码是频控、登录是验证码次数耗尽、其余才落未识别拒绝
- 决策记录同步追加 2026-10-02 的 429 归类
2026-10-02 11:50:34 +08:00
k88936 62f1a80e87 文档:认证失败载体把载荷序列化进message
- 更新 JS 侧载体 ADR:ClientAuthErrorWrapper 构造时把整份载荷 JSON.stringify 进 Error.message,上报事件拿到变体名与载荷,事件指纹按变体区分
- 记录 Tauri 缺陷抛真 Error 时序列化只有 {},但上报链路对真 Error 优先用其自身 message/stack
- 同步决策记录与技术方案的载体口径,不再写 Error.message 留空
2026-10-02 11:07:03 +08:00
lhk229 f2127a6489 修复 AGC 文件列举被无关临时锁删除打断(#552) (#580)
Project CI / AI game creator shell Rust smoke (push) Successful in 2m6s
Project CI / AI game creator shell Rust crates (push) Successful in 1m10s
Project CI / Backend tests (push) Successful in 4m15s
Project CI / Native shell tests (push) Successful in 6m43s
Project CI / Frontend tests (push) Successful in 2m54s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 11m2s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 10m12s
Project CI / AI game creator shell web tests (push) Successful in 2m23s
Project CI / Repository checks (push) Successful in 3m14s
列举 `assets` 时,原实现先递归扫描整个项目,再过滤范围;`.agent/project.lock` 在枚举与读取元数据之间正常删除会使整次查询失败。

现在在读取条目元数据前裁剪目标范围与受保护路径,只遍历目标子树及必要祖先。枚举后消失的文件/目录仅跳过 `NotFound`,其余权限与 IO 错误仍返回;进入排队目录前复核符号链接与 Windows 重解析点。通用文件树保留原有可见范围,Agent 结果继续过滤、排序后分页。

通过通道协调真实项目写锁释放,确定性覆盖全量扫描的 TOCTOU 及定向 `assets` 扫描;另覆盖目录消失/类型变化、权限错误、私有路径、链接、引擎目录和分页。同步更新 AGC 契约与共享排障记录。

验证:

- 15 条定向 Rust 测试通过:`cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml --bin genarrative-ai-game-creator-shell -- --test-threads=1 project_file_listing generic_file_tools local_project_file_commands external_listing`
- 生产 Rust 检查通过:`cargo check --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml --bin genarrative-ai-game-creator-shell`
- `npm run check:encoding`、`npm run check:doc-index`、`git diff --check` 通过。
- 本地验证在 Linux 执行,未运行 Windows 专属运行时验证;分页仍是实时观察,不承诺跨请求快照一致性。

Fixes #552

Reviewed-on: #580
2026-10-02 10:55:47 +08:00
lhk229 89d40c0836 修复素材导入与资源提交的项目锁争用 (#581)
Project CI / AI game creator shell Rust lane 1/2 (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
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust smoke (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
修复 #551:本地素材导入、账户素材提交和资源编辑提交在 conversation.write 短暂持有项目锁时会立即失败。现在复用既有约 10 秒有界等待,并将同步取锁与提交放入阻塞线程池,等待期间异步 runtime 继续响应。

- 项目锁先于账号身份租约,等待后重新验证账号身份、导入权限及原 WritePermit;保留跨进程互斥、权限分类和持锁方诊断。
- 资源资产/版本提交和已完成结果清理保留 operation/project guard,取消异步等待不会提前释放仍在执行的提交互斥。超时保留原 operation、幂等键与 staging,恢复不重复远端生成。
- Runtime 素材导入与 UI workflow 切图登记也接入阻塞池,避免共享导入函数新增等待后阻塞这些调用方。同步更新 AGC 行为规范及共享记忆。

验证:163 项 Rust 定向测试通过,覆盖导入与资源编辑、Direct bridge、Runtime 导入、UI workflow、项目锁恢复和失败分类。包含同进程争用、单线程 runtime 心跳、并行 manifest/revision、账号切换、许可取消、完整超时后原 operation 恢复及取消后的 guard 生命周期。

```sh
cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml --bin genarrative-ai-game-creator-shell -- resource_editor:: commands::agent_asset_import_tests agent::direct_tool_bridge::tests tests::project_lock_recovery project::write_lock agent::runtime_tools::context::asset_import_input_tests ui_editor::agent_tools --test-threads=1
npm run check:rustfmt
npm run check:encoding
npm run check:doc-index
git diff --check
```

全部上述检查通过。Linux 本地未执行 Windows 专属删除挂起行为测试;未调用真实付费 Provider,远端链路使用既有 mock 测试和已下载账本恢复测试验证。没有 API/DTO/schema 变更或数据迁移。

Closes #551

Reviewed-on: #581
Co-authored-by: lhk <ink29535@proton.me>
Co-committed-by: lhk <ink29535@proton.me>
2026-10-02 10:55:29 +08:00
k88936 9fe692ba87 文档:AGC认证错误改为顶层类别加类型化reason
- 更新 AGC 命令错误结构化 ADR:顶层只放调用方要分流的类别,可枚举细分收进类型化枚举 reason 字段,不再拆成几十个顶层变体、也不用字符串
- 更新 AGC 认证失败 JS 侧载体 ADR:带载荷分支先 as 取具名类型,reason 是枚举时再 switch(payload.reason),两处 default 都用 expectNever
- 同步错误报告技术方案、README 索引、决策记录与踩坑的拍平变体口径
2026-10-02 02:42:15 +08:00
k88936 47392d13b8 文档:AGC认证错误收敛为拍平变体
- 更新 AGC 命令错误结构化 ADR:变体拍平不嵌套,无字段变体生成 { type },有字段变体生成 { type } & 载荷类型
- 记录本地前置校验拿不到细分事实时不编字段,phoneNumberInvalid 保持无字段
- 更新 AGC 认证失败 JS 侧载体 ADR:无字段分支用固定文案,带载荷分支先 as 再读 serverMessage/status/detail
- 更新错误报告技术方案与 README 索引,同步拍平变体与去 reason 口径
- 同步决策记录与踩坑:ts-rs 只写不删,变体改成无字段时要手动清孤立载荷文件
2026-10-02 02:23:51 +08:00
k88936 3a4ccb1861 文档:决策记录影响范围同步载体文件新名
- 第一轮影响范围里的 clientActionError.ts 改为 clientAuthErrorWrapper.ts
2026-10-02 01:40:28 +08:00
k88936 2a51f0b98c 文档:认证失败载体类改名 ClientAuthErrorWrapper
- ADR、README、技术方案、决策记录与排障记忆统一新类名
- auth_session.rs 注释同步
2026-10-02 01:40:14 +08:00
k88936 45774f1c02 文档:认证失败载体的 error 字段标注 ClientAuthError 类型
- ADR、技术方案、决策记录同步 error 字段的显式类型标注
2026-10-02 01:37:37 +08:00
k88936 716ea9d410 Merge remote-tracking branch 'origin/master' into fix/test-concurrent-problem
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m41s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m14s
Project CI / Backend tests (pull_request) Successful in 4m28s
Project CI / Native shell tests (pull_request) Successful in 6m4s
Project CI / Frontend tests (pull_request) Successful in 2m13s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m53s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 10m23s
Project CI / Repository checks (pull_request) Successful in 2m24s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 10m57s
# Conflicts:
#	docs/project-memory/shared-memory/pitfalls.md
2026-10-02 01:35:26 +08:00
k88936 218fba95b0 文档:认证失败载体收敛为只持 error 字段的薄包装
- ADR 认证失败载体:ClientActionError 只保留 error 字段,不读 message、不塞 context、message 留空
- 技术方案与决策记录同步载体形状与 error.error 分流
- 排障记忆:判据改为全局 unhandledrejection 显式上下文
2026-10-02 01:35:10 +08:00
k88936 19c75e8167 文档:认证失败 JS 侧载体改用已有 ClientActionError
- ADR 认证失败载体:删除手写 ClientAuthFailure 类,拒绝装进 ClientActionError,cause 即判别联合
- ADR 命令错误结构化:同步第 3 节对 JS 载体的描述
- 技术方案:认证命令封装形态改为 ClientActionError + cause
- 决策记录:影响范围去掉 clientAuthFailure.ts
- 排障记忆:载体、判据与关联文件路径同步
2026-10-02 01:22:55 +08:00
lhk229 ded9f13f02 Fix Issue 549 (#573)
Project CI / AI game creator shell Rust crates (push) Successful in 2m16s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m39s
Project CI / Backend tests (push) Successful in 5m39s
Project CI / Native shell tests (push) Successful in 6m3s
Project CI / Frontend tests (push) Successful in 1m49s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 9m50s
Project CI / Repository checks (push) Successful in 2m15s
Project CI / AI game creator shell web tests (push) Successful in 1m40s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 6m18s
账户素材超过 500 项时,AGC 曾在筛选和分页前直接拒绝整个素材库,导致查询、预览和指定 ID 导入不可用。本 PR 移除账户素材总量及账户分页 offset=500 的客户端限制,允许大库继续使用现有客户端筛选分页。

Closes #549

## 实现范围

- 移除账户素材库原始条数超过 500 的拒绝,以及 MCP schema、桥接、Runtime 执行层和原生函数 strict schema 的账户分页 offset 上限。
- 保留单页最多 100 项、导入批次数量与下载体积、媒体类型、账号归属、权限及会话校验。项目文件查询的 offset 上限和绑定项目画布资源的数量上限保持原有契约。
- 账户素材 UI 列表、预览及指定 ID 导入同步恢复可用。
- 修复真实账户导入时,在持有身份租约期间重复读取会话互斥锁造成的自锁;写入前校验和覆盖写入过程的身份租约继续保留。
- 同步工具说明、技术方案与排障记录。服务端仍返回全库,传输和解析开销另由 #574 跟进,不作为本 PR 的验收前置条件。

## 验收

以下已完成项表示本地自动化与代码核查通过,不代表线上真实账号验收。

- [x] 覆盖 500/501 项素材库解析;503 张静态图片及 1 项不支持媒体的模拟素材库可正常工作。
- [x] MCP 查询支持 limit=1、folderId、query 和 offset>500;nextOffset、末页、越界空页及默认每页 100 项符合现有契约。
- [x] 直接调用 Runtime 执行层时 offset=501 可查询;MCP schema 与参数校验一致,仍拒绝负数、非整数 offset 和 limit>100。这项不覆盖 Runtime 下发给模型的原生函数 schema。
- [x] Runtime 原生函数 asset.library.list 的 strict schema 允许 offset>500;实际下发的完整函数参数已验证 offset=501/600/10000、null 可用,负数/非整数偏移及超界页长拒绝。补丁已提交并推送:41e2cc0b5。
- [x] 共用读取链路的 UI 素材列表和预览在大库场景可用。
- [x] 指定有效 assetId 完成实际下载、本地文件写入及 manifest/revision 更新;重复导入保持幂等。
- [x] 模拟素材库中的不存在 ID 和不支持媒体被拒绝,且不改变 manifest;返回 Agent 的当前页元数据不泄露媒体地址、对象键或凭据。
- [x] 会话退出、账号切换、凭据刷新、身份租约和取消写入相关定向测试通过。
- [x] 工具说明、技术方案和共享排障文档已同步;项目文件与画布资源原有独立边界已核对保留。
- [ ] 真实平台账号联调:超过 500 项素材时查询、预览和导入,以及实际删除、跨账号、无权限素材的拒绝行为。

## 验证证据

- 账户素材、导入、参数校验、项目文件、取消写入与平台会话定向 Rust 测试:33 项通过。
- runtime_prompt_bundle_build:17 项通过;prompt_source_boundaries:6 项通过。合计 56 项通过。
- Rust 格式检查、npm run check:encoding、npm run check:doc-index、git diff --check 通过。
- 以上 Rust 测试在快进 master 前运行;快进至 44f415d05 后已核对本次代码及工具文本与已测试版本一致,并再次通过编码、文档索引、差异检查和提交时 Rust 格式检查。
- 未运行全量测试,未做真实线上账号或付费操作验证。

初次修复提交:697f421e570606d0519f952a0a5689b5f639f902;原生函数 schema 审查补丁:41e2cc0b57b7f9f5faf06546c1f6108e88380ac3(已推送)。
- 审查补丁验证:24 项定向 Rust 测试通过,覆盖全部 agent_native_tools 测试、大库查询/导入和修正后的旧流式结果测试;格式、编码、文档索引、差异检查、提交及推送检查通过。本轮未重复全量测试,未做真实模型或线上账号调用。

Reviewed-on: #573
2026-10-01 20:55:28 +08:00
k88936 ce54c729e8 AGC 认证命令失败改为 JS 侧载体并只按变体分流
- 新增 ClientAuthFailure:payload 为 ts-rs 判别联合,context 固定 source=auth + 命令名,cause 为原始拒绝值
- clientAuth 的六个命令统一走 invokeClientAuth:结构化拒绝转成 ClientAuthFailure,非结构化拒绝原样抛出,不兜底文案
- 删除 clientAuthError.ts 的形状读取与 getClientAuthErrorMessage 文案回落层
- AuthenticatedClient 的两个 catch 内联 19 个变体的 switch:业务 / 会话变体原样展示载荷 message,系统变体原样抛出经 unhandledrejection 入池,default: expectNever 保证漏接变体编译失败
- hydrateAuth 失败先离开 loading 态;系统变体不再伪装成 unavailable 投影
- ClientAuthState 收窄为 authenticated / unauthenticated,ClientAuthRefreshResult 收窄为 refreshed / unauthenticated / stale
- platformSession 续期只保留 refreshed / unauthenticated / stale 三条路径
- check-config 的 App 调用扫描登记 invokeClientAuth,继续静态证明命令名可达
- 测试:新增 clientAuthFailure 载体与编译期穷尽用例、jsdom unhandledrejection 桥;删除 clientAuthError.test.ts;clientAuthHost / authFailureReporting / authSurface 跟改新口径
- 共享记忆记录 check-config 扫描形态新增 invokeClientAuth
2026-10-01 20:49:48 +08:00
k88936 478b9c9891 文档先行:AGC 认证失败的 JS 侧载体与抛出时机
- 新增 ADR:认证命令统一经 invokeClientAuth 把结构化拒绝转成 ClientAuthFailure(payload 判别联合);判定只写在 catch 子句里,系统变体原样抛出经 unhandledrejection 入池,default: expectNever 编译期挡住漏接变体
- 修订【ADR】AGC命令错误结构化与错误报告口径 §3 与后果:撤销"未识别变体上调是故意的",改为编译期穷尽
- 技术方案同步认证命令的封装形态与两个 ADR 链接
- decision-log / pitfalls 记录第二轮口径:删除形状读取与文案回落层、Rust 失败不再降级成字符串
- docs/README.md 登记新 ADR
2026-10-01 20:33:47 +08:00
kdletters 22f67d185b Merge pull request '我的页签恢复邀请好友入口,AGC 客户端账号菜单接入邀请码与玩家社区' (#578) from codex/profile-invite-entry into master
Project CI / AI game creator shell Rust smoke (push) Successful in 2m22s
Project CI / AI game creator shell Rust crates (push) Successful in 1m39s
Project CI / Native shell tests (push) Failing after 55s
Project CI / Frontend tests (push) Successful in 1m44s
Project CI / Backend tests (push) Successful in 4m45s
Project CI / Repository checks (push) Successful in 2m22s
Project CI / AI game creator shell web tests (push) Successful in 1m40s
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
2026-10-01 20:08:37 +08:00
k88936 6cfc69abf5 Merge remote-tracking branch 'origin/master' into fix/test-concurrent-problem
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 1m44s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 2m57s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m48s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m15s
Project CI / Backend tests (pull_request) Failing after 18s
Project CI / Repository checks (pull_request) Failing after 22s
Project CI / Frontend tests (pull_request) Successful in 2m31s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m24s
Project CI / Native shell tests (pull_request) Successful in 6m53s
# Conflicts:
#	docs/project-memory/shared-memory/pitfalls.md
2026-10-01 19:50:10 +08:00
kdletters 41b882e1fe 我的页签恢复邀请好友入口,AGC 客户端账号菜单接入邀请码与玩家社区
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m50s
Project CI / Backend tests (pull_request) Failing after 15s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m26s
Project CI / Native shell tests (pull_request) Failing after 36s
Project CI / Repository checks (pull_request) Failing after 26s
Project CI / Frontend tests (pull_request) Successful in 2m35s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m25s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 11m17s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 12m41s
- 主站「我的」页签常用功能宫格补回「邀请好友」,邀请码与邀请链接拆成两个复制动作
- 邀请弹层下沉到 packages/shared/src/components/PlatformProfileReferralModal,主站与客户端共用一份实现
- 邀请奖励说明不再写死次数与金额,每日上限由 todayInviterRewardCount 与 todayInviterRewardRemaining 推导
- 奖励说明从面板正文移入右上角帮助按钮,鼠标悬浮展开、触屏与键盘点击开合
- 帮助按钮复用平台 .platform-icon-button 配色,说明气泡复用 PlatformStatusMessage 的 warning token
- AGC 客户端账号菜单新增「邀请码」与「玩家社区」两项,弹层标题与菜单入口文案保持一致
- 新增 Tauri 命令 read_profile_referral_invite_center,用登录 origin 补全 inviteLinkPath 后交给渲染层
- 客户端邀请中心按登录账号隔离,切号重置并作废在飞响应,不本地另存邀请码
- 新命令登记进 apps/ai-game-creator-shell/scripts/check-config.mjs 的 native-only 白名单门禁
- 微信群与 QQ 群二维码从 media/social-media-group 迁入共享组件 assets
- 移除已下线文件的 Tailwind @source 与客户端专用弹层样式,原地删除旧邀请弹层实现
- 同步决策记录与产品基线文档中邀请奖励、跨端复用与文案口径
2026-10-01 19:46:18 +08:00
kdletters 1aa457c36b Merge branch 'master' of https://git.genarrative.world/git/GenarrativeAI/Genarrative
Project CI / AI game creator shell Rust crates (push) Successful in 1m24s
Project CI / AI game creator shell Rust lane 1/2 (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
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust smoke (push) Has been cancelled
2026-10-01 19:45:43 +08:00
lhk229 3193182665 修复 AGC 测试编译并保留 CI 编译诊断
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (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 web tests (pull_request) 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 / AI game creator shell Rust smoke (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
删除 Claude 流式结果测试中已失效的回合参数
分片运行器使用 Cargo 渲染诊断并保留 JSON 产物发现
新增编译失败诊断回归测试并更新排障文档
2026-10-01 11:42:48 +00:00
kdletters fee0dc1fa4 合并 origin/master:网站游戏评分与评价 2026-10-01 19:41:30 +08:00
kdletters d1f789cc10 AGC 支持 Anthropic 独立网关路由与后台协议选项
新增平台 Anthropic 网关路由 /api/llm/anthropic/{*path},复用账号 Router 凭据边界
OpenAI 侧规范路径改为 /api/llm/v1/responses 与 /api/llm/v1/chat/completions,旧路径保留兼容
baseUrl 不再携带路由与版本段,统一由协议自己拼 v1/<op>
cc 执行器改走平台网关,ANTHROPIC_AUTH_TOKEN 复用平台会话,不再直连 Router
后台模型目录 agentMode 增加 anthropic,管理页与客户端契约同步
补齐三条路由埋点与静态段白名单,新增三条回归测试
同步后端架构文档、模型别名文档与排障记忆
2026-10-01 19:41:08 +08:00
lhk229 b60aea4e71 实现网站游戏评分与评价 (#561)
Project CI / AI game creator shell Rust crates (push) Successful in 1m43s
Project CI / AI game creator shell Rust lane 2/2 (push) Failing after 2m7s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m55s
Project CI / AI game creator shell Rust lane 1/2 (push) Failing after 3m23s
Project CI / Frontend tests (push) Successful in 3m3s
Project CI / Repository checks (push) Successful in 3m42s
Project CI / AI game creator shell web tests (push) Successful in 2m3s
Project CI / Backend tests (push) Successful in 6m19s
Project CI / Native shell tests (push) Successful in 8m7s
公开游戏详情页新增评分与评价:登录用户可提交并修改自己对每款游戏的唯一一条 1–10 分评价,评论可空且最多 4000 个 Unicode 码点;游客可分页浏览评价并查看平均分与评分人数。

- 新增私有评价表及共享 DTO/API,事务内校验游戏公开可见性、保证唯一性,并计算分页与全量评分统计;下架或封禁后关闭读写,重新公开及更新版本保留评价。
- 详情页支持编辑预填、取消、提交期间冻结输入、失败保留草稿,以及保存、翻页和账号/游戏切换时的旧响应隔离;复用现有认证与公共组件。
- 同步主规范、里程碑、实施计划、生成绑定、表目录和验收脚本。不扩展 AGC、外部 API、评论审核或评分缓存。

验证:
- 本轮审查复跑前端定向测试 40 项、评价领域测试 2 项,均通过。
- 网站 typecheck、Rust/TypeScript DTO 对齐、SpacetimeDB schema、文档索引、编码与 diff 检查通过。
- 实施文档另记录本地隔离数据库/API 49 项及桌面/移动视口浏览器 smoke 通过;本轮审查未重跑这些运行时验收,也未运行完整测试套件。

发布说明:新增 SpacetimeDB 表,部署时需同步 module 与 API。尚未部署 dev/production,待用户验收。

Reviewed-on: https://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/561
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-10-01 19:19:58 +08:00
kdletters 44f415d057 合并 origin/master(58 个提交):生产 Nginx 模板收敛与记录同步
Project CI / AI game creator shell Rust lane 1/2 (push) Failing after 2m23s
Project CI / AI game creator shell Rust lane 2/2 (push) Failing after 1m15s
Project CI / AI game creator shell Rust crates (push) Successful in 1m14s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m35s
Project CI / Frontend tests (push) Successful in 2m53s
Project CI / Repository checks (push) Successful in 3m36s
Project CI / Backend tests (push) Successful in 4m26s
Project CI / AI game creator shell web tests (push) Successful in 2m23s
Project CI / Native shell tests (push) Successful in 7m27s
- 合并 origin/master 58 个提交,解决 2 处文件冲突:决策记录与踩坑记录均按两侧新增条目并存处理
- claude_code_cli.rs 自动合并通过:本机 Claude sidecar 诊断改动与上游 sidecar 归位并存,无重复函数定义、无冲突残留
- 保留本地未推送提交:AGC Claude 执行认证与错误诊断、Claude sidecar 超时诊断
- 本次推送主体内容不变:生产 Nginx 模板收敛、host-only snippet 与运维/踩坑/决策文档同步
2026-10-01 18:38:56 +08:00
kdletters ac4148d24b 生产 Nginx 收敛到仓库模板并同步生产机 host-only 覆盖
- 主模板 http 段新增 genarrative_gallery_rps 限流 zone,供公开作品架与自定义世界画廊读取接口使用
- 新增 deploy/nginx/snippets/genarrative-host-extras.conf:内部工具页、公开画廊读取 location、主站官网首页入口
- 主模板改为 include host-only snippet,线上 vhost 以仓库模板为唯一来源
- Server-Provision 安装、备份并回滚 genarrative-host-extras.conf,补充 require_path 与临时文件清理
- 生产运维护栏新增 host-only snippet 安装断言
- 运维文档补充主站 SPA 白名单与 host-only 覆盖小节及生效配置核对命令
- 踩坑记录新增线上手工维护漂移条目:/profile 刷新 404 与 client_max_body_size 停在 64m
- 决策记录新增生产 vhost 单一来源、host-only 独立成 snippet、退役路由不做显式 404 的长期口径
2026-10-01 18:37:46 +08:00
k88936 2f51e043b7 文档先行:AGC 认证错误的 TS 形状改为每个变体一个具名载荷类型
- ADR §1 增加"每个变体一个具名载荷结构体 + ts-rs 生成 `{ type } & X`"的决策与代价
- ADR §3 说明 switch 分支里错误已窄化成具名类型
- 技术方案同步命令错误形状描述
- decision-log / pitfalls 记录形状约定:不手写这层类型、不再包派生分类与提示文案函数
2026-10-01 18:08:00 +08:00
JenkenB 97617608ba 修正 Web 预检错误分流
Project CI / AI game creator shell Rust smoke (push) Successful in 1m46s
Project CI / AI game creator shell Rust crates (push) Successful in 1m10s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (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 web tests (pull_request) Has been cancelled
Project CI / Backend tests (push) Successful in 4m33s
Project CI / Native shell tests (push) Successful in 6m15s
Project CI / Frontend tests (push) Successful in 2m3s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 10m31s
Project CI / AI game creator shell Rust lane 1/2 (push) Failing after 11m48s
Project CI / AI game creator shell web tests (push) Successful in 2m3s
Project CI / Repository checks (push) Successful in 3m31s
2026-10-01 17:54:53 +08:00
k88936 bdd315f12f AGC 壳 Rust 单测统一 mock provider 请求预算,修掉分片 4 第二次往返超时
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m1s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m37s
Project CI / Backend tests (pull_request) Successful in 3m54s
Project CI / Frontend tests (pull_request) Successful in 1m54s
Project CI / Native shell tests (pull_request) Successful in 5m53s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m53s
Project CI / Repository checks (pull_request) Successful in 2m28s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m52s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 11m53s
- tests/mod.rs 新增 MOCK_PROVIDER_REQUEST_TIMEOUT(30 秒),作为「等一条 mock provider 请求到达」的唯一预算
- tests/sessions.rs 的 7 处 recv_timeout 由散落的 2 秒 / 10 秒改为引用该常量,确认「不会有下一个请求」的 200ms 负向断言保持不变
- wait_for_captured_mock_request 的内联 10 秒预算改为引用同一常量
- pitfalls 记录该超时是 CI 分片并发放大所致,而非产品缺陷,并附本次复核证据
2026-10-01 17:16:16 +08:00
k88936 c177dde5c3 AGC 壳通知计数按线程隔离,修掉跨用例后台广播串台
- runtime_driver/entrypoints.rs:测试通知计数从进程级 AtomicU64 改成线程作用域 Cell,只统计本测试线程发出的通知
- runtime_driver/entrypoints.rs:`--test-threads=1` 只串行测试线程,前一个用例放行留下的后台回合仍在宿主 async runtime 工作线程上广播「运行中的项目」通知,不再是断言的取样来源
- thread_manager/mod.rs:同步用例注释,说明计数为何按线程隔离,断言语义(放行 1 / 内容变化 1 / 重复进度 0 / 收口 1)不变
- pitfalls:记录现场、根因、现行口径与验证(修复前 5 次红 3 次,修复后 CI 那一片连跑 18 次全绿)
2026-10-01 17:16:16 +08:00
k88936 6b31d4971b Merge remote-tracking branch 'origin/master' into fix/wrong-report
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m33s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m12s
Project CI / Backend tests (pull_request) Successful in 3m55s
Project CI / Frontend tests (pull_request) Successful in 2m12s
Project CI / Native shell tests (pull_request) Successful in 6m29s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 10m27s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 11m29s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m53s
Project CI / Repository checks (pull_request) Successful in 2m34s
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
2026-10-01 17:01:52 +08:00
k88936 8fefd393b2 Merge remote-tracking branch 'origin/master' into fix/wrong-report
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (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 web tests (pull_request) Has been cancelled
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
2026-10-01 16:51:37 +08:00
k88936 387dba37f3 Merge remote-tracking branch 'origin/master' into fix/log-cmd-refuse-reason
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m5s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m20s
Project CI / Backend tests (pull_request) Successful in 4m42s
Project CI / Native shell tests (pull_request) Successful in 5m49s
Project CI / Frontend tests (pull_request) Successful in 2m1s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m47s
Project CI / Repository checks (pull_request) Successful in 2m26s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 12m7s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 11m44s
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
2026-10-01 16:21:11 +08:00
k88936 774f95be94 Merge pull request '退役 DirectProject 工具调用与回合流账本' (#560) from refactor/remove-toolcall.jsonl-legacy into master
Project CI / AI game creator shell Rust crates (push) Successful in 1m35s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m17s
Project CI / Backend tests (push) Successful in 4m8s
Project CI / Frontend tests (push) Successful in 1m49s
Project CI / Native shell tests (push) Successful in 6m21s
Project CI / Repository checks (push) Successful in 2m24s
Project CI / AI game creator shell web tests (push) Successful in 1m43s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 10m25s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 11m50s
Reviewed-on: #560
2026-10-01 16:13:14 +08:00
k88936 ba79cbcece Merge remote-tracking branch 'origin/master' into fix/log-cmd-refuse-reason
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m14s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m47s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (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 web tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
2026-10-01 16:10:34 +08:00
k88936 454fbd5e91 Merge remote-tracking branch 'origin/master' into fix/wrong-report 2026-10-01 16:09:14 +08:00
k88936 2220682e58 修正回合绑定失败被说成回包丢失
- ResponseDeliveryFailure 新增 interrupt_reason,按 cause 给回合终态说明
- 只有 response-write-failed 保留「执行许可回包丢失」;turn-bind-mismatch 改为说明回合绑定不一致、作用域无法确认
- 新增 response_delivery_failure_texts_match_their_cause 用例钉住两句文案
- 同步更新 shared-memory 决策记录里的收束说明口径
2026-10-01 16:08:00 +08:00
k88936 493457c3ea 拒绝原因留痕前统一脱敏
- log_denied_reason 在唯一出口调用 sanitize_diagnostic_message,透传的宿主错误文本不再把绝对路径写进日志
- 去重键改用脱敏后的文本,内存与 stderr 拷贝同样不带原文
- 新增 denied_reason_logging_scrubs_embedded_paths 用例固化该约定
- 同步更新 shared-memory 决策记录里的脱敏口径
2026-10-01 15:48:25 +08:00
k88936 ce4ada8bb3 回包失败留痕改为记录真实原因
- response_write_failed 改名为 response_delivery_failed,新增 ResponseDeliveryFailure 枚举
- 两个调用点分别传 Write(stdin 写入 / flush 失败)与 TurnBindMismatch(bind_turn 返回 false)
- 日志键改为 agent.direct_codex.approval.response_delivery_failed 并带 cause 字段,回合绑定失败不再被误报成写入失败
- 同步更新 shared-memory 决策记录里的日志键口径
2026-10-01 15:44:25 +08:00
k88936 e3041d84e5 未绑定执行器与回包失败的留痕加有界去重
- 未绑定宿主执行器的交互兜底按进程级 (method, outcome) 只写第一行,新增 distinct_outcomes
- 适配器拒绝留痕抽出共用的 log_once,回包未送达同样按回合内原因只记一次
- 上限沿用 MAX_DENIED_REASON_LOGS = 64,模型重试不再逐次刷日志
- 同步更新 shared-memory 决策记录里的去重口径
2026-10-01 15:41:26 +08:00
k88936 c34e45e0c4 未绑定执行器时的交互拒绝按真实结果留痕
- 未绑定宿主执行器的交互兜底不再一律记成审批拒绝
- 新增稳定键 agent.direct_codex.interaction.no_adapter,字段为 method / outcome / request_id
- outcome 区分 decline / empty-permissions / unsupported-method,权限申请与未知方法不再被误标为 decline
- 同步更新 shared-memory 决策记录里的日志键口径
2026-10-01 15:38:05 +08:00
lhk229 55375b1406 清理测试编译warning (#509)
Project CI / AI game creator shell Rust crates (push) Successful in 1m18s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m30s
Project CI / Backend tests (push) Successful in 3m58s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 10m12s
Project CI / Native shell tests (push) Successful in 5m49s
Project CI / Frontend tests (push) Successful in 2m18s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 9m50s
Project CI / AI game creator shell web tests (push) Failing after 2m11s
Project CI / Repository checks (push) Successful in 2m55s
Reviewed-on: https://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/509
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-10-01 15:29:23 +08:00
k88936 fe62482547 Merge branch 'master' into refactor/remove-toolcall.jsonl-legacy
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m53s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m39s
Project CI / Backend tests (pull_request) Successful in 4m10s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 7m34s
Project CI / Native shell tests (pull_request) Successful in 6m15s
Project CI / Frontend tests (pull_request) Successful in 2m15s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m23s
Project CI / Repository checks (pull_request) Successful in 2m45s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m19s
2026-10-01 15:24:49 +08:00
k88936 bb9b0b4d6c 文档对齐:AGC 报告池入口改为调用方带上下文交付
- 修订 ADR §2/§3:真故障由调用方包成 ClientActionError 交给错误池,不再把 rejection 留在无人接手的 Promise 上
- 说明 408/5xx/网络判定发生在调用方 catch,shouldCaptureClientError 随本 ADR 删除
- 同步技术方案、decision-log、pitfalls 的重抛口径与影响文件清单
2026-10-01 15:24:42 +08:00
k88936 fe200598c0 文档先行:AGC 命令错误结构化与错误报告口径
- 新增 ADR:命令错误按具体变体结构化(ts-rs 导出)、报告池只收没人处理的错误、前端按 type 分流不匹配文案
- 更新【技术方案】AGC错误报告与诊断上传:采集口径改为"只收没有调用方处理的错误",补命令变体分流与 clientApi 边界
- 更新共享记忆 decision-log:记录本次口径与影响范围
- 更新共享记忆 pitfalls:记录"输错密码被当成客户端缺陷上报"的现象、根因与判据
- 修正 DirectTurnError 模块注释中"命令边界只给字符串"的过期描述,改为结构化拒单载荷
- docs/README.md 登记新 ADR
2026-10-01 14:52:28 +08:00
k88936 ea33e8c166 DirectProject 审批拒绝原因留痕
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m43s
Project CI / Backend tests (pull_request) Failing after 17s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m13s
Project CI / Frontend tests (pull_request) Successful in 2m12s
Project CI / Repository checks (pull_request) Failing after 13s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m57s
Project CI / Native shell tests (pull_request) Successful in 5m54s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m41s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 10m49s
宿主拒绝 app-server 的审批 / 交互请求时,原因必须落 AppData `RUST` 日志。稳定键 `agent.direct_codex.approval.denied`,字段为 `thread_id` / `method` / `reason` / `distinct_reasons`;未绑定宿主执行器时 `reason=no-bound-host-execution-adapter`,回包写入失败另记 `agent.direct_codex.approval.response_write_failed`。
2026-10-01 14:32:25 +08:00
kdletters dbc3355e3a 账单不再计入实际变动为 0 的泥点流水
- spacetime-module:每日免费 / 会员周期换期改为先算「换期后余额 + 实际变动」(新增 resolve_expiring_points_wallet_transition),实际变动为 0 时只更新余额状态、不再写 profile_wallet_ledger
- spacetime-module:通用结算入口 apply_profile_wallet_signed_delta 在 amount_delta 为 0 时直接返回当前余额,不再落一条 0 变动流水
- spacetime-module:账单列表 list_profile_wallet_ledger_entries 在按余额结算链排序之后、截断 50 条上限之前剔除 amount_delta 为 0 的存量行,历史 0 流水立即从账单消失且不占用列表上限
- spacetime-module:新增 3 条定向单测覆盖换期实际变动与账单 0 变动过滤(去 0 后不改变其余条目顺序)
- 文档:后端数据契约 profile_wallet_ledger 补「实际变动为 0 不进账单」口径并修正源码路径为 runtime/active/profile.rs;decision-log 追加 2026-10-01 条目说明根因是旧判据看入参而不是实际余额变动
2026-10-01 13:23:29 +08:00
kdletters 127def0a8a 修复 AGC Claude 执行认证与错误诊断
官方 Claude 模型复用当前平台会话令牌

保留 Claude 失败终态摘要并增加回归测试

补充 AGC 排障记忆
2026-10-01 13:21:57 +08:00