Skip to content

fix(storage): 升级后继续隐藏旧版多写元数据 - #6395

Merged
baojun-zhang merged 1 commit into
mainfrom
codex/fix-legacy-storage-metadata
Oct 21, 2026
Merged

baojun-zhang merged 1 commit into
mainfrom
codex/fix-legacy-storage-metadata

Conversation

@qin-ctx

@qin-ctx qin-ctx commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Description

修复 #5741 引入的升级回归:从 V1 多写存储升级后,任务目录中残留的 .sync_log.json、.redirect.json 会出现在目录查询结果中。任务接口将这些 JSON 当作任务记录读取,因缺少 status 返回 500。

例如,任务目录中有一条正常任务和 .sync_log.json,调用 GET /api/v1/tasks?resource_id=<session_id>:修改前返回 KeyError: 'status' / HTTP 500;修改后只加载实际任务,正常返回列表。

在文件系统统一内部文件规则中恢复两个旧文件名的隐藏。迁移和清理仍可通过内部目录接口访问原文件;不删除数据,也不回滚 V2 存储协议。

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

回归来源:#5741。

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • 恢复旧版多写元数据的内部文件分类,业务目录查询不再将其作为普通文件返回。
  • 扩展已有目录查询契约测试,覆盖旧元数据隐藏、内部访问保留及分页行为;未新增测试函数或文件。

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

已有目录查询契约测试在修复前失败,修复后通过。运行 cargo test -p ragfs --lib core:: --locked --offline,并通过修改文件的 rustfmt --check 与 git diff --check。

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

不适用。

Additional Notes

此修复针对旧版内部元数据导致的任务查询 500;不改变任务状态语义或持久化格式。

@baojun-zhang
baojun-zhang merged commit c133b94 into main Oct 21, 2026
3 of 15 checks passed
@baojun-zhang
baojun-zhang deleted the codex/fix-legacy-storage-metadata branch October 21, 2026 03:30
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project Oct 21, 2026
@runyunzhou runyunzhou mentioned this pull request Oct 27, 2026
15 of 21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants