Skip to content

feat/openviking_assets_support_git_commit_id - #3703

Draft
zihengli-bytedance wants to merge 2 commits into
mainfrom
feat/openviking_assets_support_git_commit_id
Draft

feat/openviking_assets_support_git_commit_id#3703
zihengli-bytedance wants to merge 2 commits into
mainfrom
feat/openviking_assets_support_git_commit_id

Conversation

@zihengli-bytedance

Copy link
Copy Markdown
Collaborator

Description

ov add-resource --manifest 的 Git 资源新增按 commit 精确导入能力。Manifest 现在支持通过 params.commit 指定完整的 40 位 commit SHA,并将其贯穿 Resolver、Preflight、CLI 参数构造和资源导入链路,从而支持可复现的固定版本导入。

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

N/A

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

  • 为 OpenViking Assets Manifest 的 Git 参数新增 commit 字段,仅接受完整的 40 位十六进制 SHA,并规范化为小写。
  • 增加 branchcommit 互斥校验,将 commit 纳入 git_refasset_id、Preflight 请求以及 CLI add_resource 参数。
  • commit 场景下,Preflight 通过远端 HEAD 检查仓库访问权限;精确 commit 的可用性由导入阶段的 fetch/checkout 验证。
  • 确保 Manifest 中的 Git selector 优先于凭据文件中的冲突 selector,避免产生歧义。
  • 补充 Resolver、Preflight、HTTP Endpoint 和 Rust CLI 参数构造测试,并更新中英文指南及 API 文档。
  • 将 OpenViking Assets Endpoint 测试切换到轻量 FastAPI fixture,移除与该接口无关的 RAGFS 存储依赖。

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

Test results:

  • Python OpenViking Assets tests: 33 passed
  • Rust CLI OpenViking Assets tests: 13 passed
  • ruff check: passed
  • cargo fmt --check: passed
  • git diff --check: passed

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)

N/A

Additional Notes

  • commit 必须使用完整的 40 位 SHA;缩写 SHA 会在 Manifest 解析阶段被拒绝。
  • branchcommit 不能同时设置。
  • git ls-remote 无法在不拉取仓库数据的情况下可靠验证任意历史 commit,因此 Preflight 只验证 SHA 格式和仓库访问权限,精确 commit 在实际导入时验证。
  • 固定 commit 表示不可变快照。虽然允许配置 watch_interval,但 Watch 会重复处理相同版本,通常建议设置为 0
  • 本变更不依赖其他尚未发布的外部改动。

@zihengli-bytedance
zihengli-bytedance force-pushed the feat/openviking_assets_support_git_commit_id branch from 3dc95fa to c4f707c Compare August 4, 2026 14:03
@zihengli-bytedance
zihengli-bytedance force-pushed the feat/openviking_assets_support_git_commit_id branch from c4f707c to b0caba2 Compare August 4, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant