Repository navigation
Build #106: 支持单独更新 file metadata - #108
Conversation
|
@claude 检查提交的代码,使用中文回复 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a16488be8
ℹ️ 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".
| OpenAIFile existingFile = fileService.getFile(fileId); | ||
| if(existingFile == null) { | ||
| throw new FileNotFoundException(fileId); | ||
| } |
There was a problem hiding this comment.
Reject metadata updates for resource nodes
When fileId identifies a resource node, this check accepts it and the endpoint overwrites its metadata. Resource creation deliberately fixes metadata to {}, and the adjacent description, cities, and tags update handlers reject resources; this also exceeds the stated ordinary-file-and-directory scope. Add the equivalent NodeType.RESOURCE guard before constructing the update operation.
Useful? React with 👍 / 👎.
Source issue
Summary
PUT /v1/files/{fileId}/metadata,请求体仅需提供metadata。metadata更新事件 scope,继续发送既有FILE_UPDATED事件。Validation
git diff --check(通过)FILE_UPDATED且scope=metadata。java: command not found、mvn: command not found)。