Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a73a90fa0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| - 在 `FileService` 增加“构造并锁定快照 → 预检 → 批量状态变更/关系清理 → 广播”的子树删除编排,并保留单节点删除作为同一底层删除原语的单节点调用;不要逐节点调用现有 public `delete`,避免重复查询、嵌套事务和父节点先广播造成部分完成观感。 | ||
| - 快照按 `file_id` 携带完整 `FileDB`、`FileType`、`NodeType` 和原始 `OpenAIFile` 事件数据。`FILE`、`DIRECTORY`、`RESOURCE` 均纳入支持范围;每类节点沿用当前 `FileType.needsDirectorySupport()` 判断是否清理目录关系,未知类型在预检阶段拒绝。 | ||
| - `FileRepo` 提供按物理文件分片分组的批量 `DELETED` 更新;每个更新必须校验影响行数与预期数量。入口写开启时,`FileEntryRepo` 按快照 entry ID 分块删除;闭包写开启时,按文件分片一次清理快照节点作为祖先或后代的闭包行。`entry`、`dual`、`closure` 三种模式都必须走对应的启用分支,不能只删除父入口或只删闭包。 |
There was a problem hiding this comment.
Route closure operations by current space after cross-space moves
For a subtree containing a file previously moved across space shards in dual mode, grouping closure cleanup by the physical file shard targets the wrong table. FileEntryRepo.moveLeafClosureAcrossSpace moves closure rows to entryDb(targetSpaceCode), while updateFileSpaceCache leaves the physical file row and file ID in their original shard. Consequently, the proposed deletion either rejects a valid subtree during the dual-mode consistency check or leaves its migrated closure rows behind. Resolve closure shards from the current relationship space independently of file-state shards, including for the closure snapshot prescribed above, and cover a migrated leaf in the deletion tests.
Useful? React with 👍 / 👎.
|
已处理该问题,方案已更新并推送到
|
|
根据最新决策已收窄方案边界并推送到
|
Source issue: #125
Plan file:
.issue-flow/issues/125-file-api-force/plan/001-implementation.mdSummary
file_entry模式为唯一前置条件和权威关系;删除通过加锁 BFS 快照处理目录整棵子树,沿用MAX_TREE_DEPTH=64、分块扫描和稳定锁序。file_directory_not_empty;force=true批量更新文件状态、删除整棵子树的file_entry并保持逐节点FILE_DELETED语义。file_entry按当前关系空间路由;跨空间移动后再删除的场景纳入验收,避免文件分片与关系分片混用。Review focus
file-entry.write-mode=entry,且不需要兼容旧 closure/dual 写入路径?默认同意,相关切换和 closure 清理由独立 issue 负责。file_entry关系编排并保持逐节点删除事件?默认同意,以避免父节点先广播及部分完成语义。file_entry分片参与同一事务资源管理器?若不能,本方案默认预检拒绝,不引入本 issue 范围外的分布式补偿。