修复 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
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
This commit was merged in pull request #580.
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
# AI 游戏创作智能体 App 实施计划
|
||||
|
||||
## 2026-10-01 项目文件列举的范围与并发边界
|
||||
|
||||
`agc_list_project_files` 的项目内 `path` 在遍历时限制到目标文件、目标目录及其必要祖先;不递归无关子树,也不读取无关条目的元数据。Agent 的控制面、敏感文件和快照排除规则在读取条目元数据之前生效;通用 UI 文件树保持原有可见范围。引擎生成目录仍按项目根身份排除,不能因定向列举改变判定基准。
|
||||
|
||||
文件列举是实时观察,不是文件系统快照。枚举后消失的文件或待进入目录(`NotFound`)跳过;权限、非目录和其它 IO 错误保留路径及原因,不统一吞错或重试。目标不存在时继续返回空列表;符号链接和 Windows 重解析点不得作为遍历入口。过滤后按项目相对路径排序,再计算 `total`、`offset`、`limit` 和 `nextOffset`;多次分页之间的并发变更不承诺快照一致性。
|
||||
|
||||
本修复不调整项目写锁等待、写入许可、项目外读取或工具 DTO。验收通过受控的枚举/元数据间隙释放真实项目锁,并覆盖定向范围、消失目录、真实 IO 错误、受保护路径、链接、引擎目录及分页;不依赖概率性循环碰撞。
|
||||
|
||||
## 2026-09-29 Codex 私有运行目录路径解析
|
||||
|
||||
新建的私有运行目录先确认是普通目录并收紧权限,再解析真实路径,后续 `codex-home`、`workspace` 和隔离用户目录均在真实路径下创建,避免 macOS 系统临时目录的符号链接阻断启动。Windows 扩展 UNC 路径 `\\?\UNC\server\share\...` 必须转换为 `\\server\share\...`,盘符路径才直接去掉 `\\?\` 前缀;转换后保留绝对路径语义。私有子目录仍执行原有祖先符号链接与 reparse point 检查。
|
||||
|
||||
Reference in New Issue
Block a user