Skip to content

ci: 增加官方 V3 插件依赖真实安装门禁 - #1190

Open
InfinityPacer wants to merge 2 commits into
jxxghp:mainfrom
InfinityPacer:codex/ci/v3-manifest-install-gate
Open

ci: 增加官方 V3 插件依赖真实安装门禁#1190
InfinityPacer wants to merge 2 commits into
jxxghp:mainfrom
InfinityPacer:codex/ci/v3-manifest-install-gate

Conversation

@InfinityPacer

@InfinityPacer InfinityPacer commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

官方 V3 插件已采用 modern manifest,但结构校验不能证明依赖在其声明支持的平台上可以真实安装。

本 PR 增加按平台执行的 V3 依赖安装门禁:

  • 自动发现 package.v3.json 发布范围内的 modern manifest;
  • 在 Linux x64/arm64、Windows x64、macOS Intel/ARM CI 矩阵中隔离安装;
  • 复用宿主的 uv pip install -r pyproject.toml 语义,并在安装后执行 uv pip check
  • 根据插件声明的平台范围选择矩阵,不把受限插件伪装成全平台兼容;
  • AnimeUpscale 明确限定为 Linux x64 CUDA 门禁,并由对应任务验证 PyTorch CUDA 索引。

验证:

  • pytest tests/ci -q:48 passed
  • Ruff、版本门禁、JSON、compileall 与 git diff --check 通过
  • macOS ARM64 对 AgentResourceOfficer 完成真实隔离安装,67 个依赖安装成功且 uv pip check 通过

完整 CUDA 安装及其余平台由本 PR 的 CI 矩阵完成。

PR-Agent 摘要

🤖 Generated by PR Agent at ed8ec87

  • 新增 V3 依赖隔离安装与健康检查门禁
  • 覆盖五平台并按插件声明筛选
  • AnimeUpscale 限定 Linux x64 CUDA
  • 补充门禁测试、文档与 CI 变更触发;增加多平台安装耗时

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR-Agent Code Review

本 PR 增加了按平台隔离安装 V3 插件依赖并执行 uv pip check 的 CI 门禁,同时支持插件级平台声明。但当前实现没有将 V3 发布范围完整纳入发现和触发逻辑,可能导致门禁误检或被绕过,因此存在中等风险。

审查提交:b2aa387

)


def discover_manifests(root: Path = V3_ROOT) -> list[Path]:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

越界发现

discover_manifests() 直接扫描所有 plugins.v3/*/pyproject.toml,完全不读取 package.v3.json。当仓库中存在未列入 V3 发布范围的开发中或停发插件时,矩阵任务仍会选择并安装其依赖;该插件的平台不兼容或依赖安装失败会阻断本不应覆盖的发布门禁,违反“仅验证发布范围内 manifest”的契约。发现逻辑应以 package.v3.json 的发布条目为筛选边界。

shell: bash
run: |
set -euo pipefail
if git diff --quiet "${{ github.event.pull_request.base.sha }}" HEAD -- \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

触发漏检

依赖门禁的变更检测路径没有包含 package.v3.json。当 PR 只修改发布范围(例如将一个已有 pyproject.toml 的插件加入 V3 发布包)时,git diff --quiet 会判定无需运行,所有矩阵任务都跳过真实安装,从而绕过新增发布依赖的安装验证,违反发布范围变化必须触发依赖门禁的契约。变更检测应覆盖该发布范围文件。

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR-Agent Code Review

本 PR 新增了按平台隔离安装 V3 插件依赖并执行 uv pip check 的 CI 矩阵,同时补充了平台筛选逻辑和门禁测试。当前安装流程未确保插件声明的 uv 专用依赖源被实际采用,可能导致 CUDA 依赖门禁出现假通过,因此仍存在一个中等风险问题。

审查提交:ed8ec87

return (
[uv_bin, "venv", "--python", python_spec, str(environment)],
[
uv_bin,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

CUDA 源未应用

这里使用 uv pip install -r pyproject.toml 的 pip 兼容模式安装依赖,但该模式不会应用清单中的 [tool.uv.sources] 配置,包括 AnimeUpscale 声明的 pytorch-cu126 显式索引。触发 Linux x64 的 AnimeUpscale 门禁时,uv 可能从默认 PyPI 安装另一个满足版本约束的 CPU 或非 cu126 版 torch,随后 uv pip check 仍会通过,因而违反了必须验证 CUDA 索引的安装门禁契约。安装步骤需要改为使用能读取项目 uv source 配置的方式,或显式把清单声明的索引配置传递给安装命令。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant