ci(gpu-smoke): 「没有真推理」不再读作 success —— neutral check run 自证(P0-1) - #161
Merged
Merged
Conversation
现状(2026-09-24 审计实测):REPO_ADMIN_TOKEN 从未配置 + 注册 runner 数 = 0, 于是 3 次 schedule run 全是 gpu-smoke=skipped 而 run 结论 success。docs/DOD.md:225 记的上一轮处理是"改成 ::warning + job summary",但 warning 仍然读作通过。 改法(不硬失败,保留接入点): - runner-precheck 只产出机器可读 verdict:no-repo-admin-token-secret / no-registered-gpu-runner / runner-query-denied / available; 另加两个按 verdict 条件执行的步骤,步骤名直接自证原因。 - gpu-smoke 的 job if 改判 verdict == 'available'(真机 job 依旧 skipped)。 - 新增 smoke-status 后置作业(if: always()):把结论写成一条独立 check run, 名字自带原因码,conclusion 用 neutral —— 既不是红灯也不算通过, 同时把结论表格落到 run 页面摘要。check 名用 ASCII(本仓在 cp1252/bsdtar 非 ASCII 上栽过,不引入新变量)。 - 自证链路本身坏掉(check-run 写入失败)才 exit 1:这跟"没有真推理"是两回事。 - 需要 permissions.checks: write,已在本文件内显式声明,未碰仓库 settings。 选型说明:不用 issue skip-record(写后回读)—— 它每周产生用户可见的对象、 要 issues:write、且回读是一次额外的失败点;check run 天然绑在 SHA+run 上。 本地验证(抽出工作流里的脚本原文,在 stub gh 下跑):probe 四场景 verdict 全对、 均 rc=0;attestation 九种 (gpu-smoke 结果 × verdict) 组合的 name/conclusion 映射 全对、正常路径 rc=0;POST 失败路径 rc=1 且带 ::error::;verdict/SMOKE 为空时 兜底成 precheck-did-not-report / unknown。 Signed-off-by: ReSerendipity <ReSerendipity@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
收口审计里的 P0-1。不硬失败、不碰 settings/secrets、保留 self-hosted 接入点。
问题(实测,非推断)
gh api repos/.../actions/secrets只有MANIFEST_SIGNING_KEY_B64→REPO_ADMIN_TOKEN从未配置;variables 为空 →GPU_SMOKE_VENV也未配置;actions/runners → total_count = 0。gpu-smoke.yml:51命中空 token 分支 →:55只发::warning::→:58available=false→:76真推理 job skipped → 整条 run 结论 success。3 次 schedule run 全这样,墙钟 0.1 min。docs/DOD.md:225:「把跳过改成 ::warning + 写进 job summary」)方向对但不够:warning 在 UI 里仍读作通过。改法(单文件 +93 −20)
runner-precheck只负责把原因定成机器可读的verdict:available/no-repo-admin-token-secret/no-registered-gpu-runner/runner-query-denied(token 配了但权限不够 —— 这是新增的一种,否则会退化成"未知")。Skip reason: no-repo-admin-token-secret(REPO_ADMIN_TOKEN 未配置)、Skip reason: no-registered-gpu-runner(在线 gpu runner 数为 0)。gpu-smoke的if改判verdict == 'available'(真机 job 依旧 skipped,接入点与标签不动)。smoke-status(if: always(),ubuntu-latest,5 min):把结论落成一条独立 check run,名字自带 ASCII 原因码,conclusion: neutral—— 既不是红灯也不算通过,读者无法把它误读成"过了";同时把 verdict/结果表格写进 run 页面摘要。exit 1+::error:::那跟"没有真推理"是两回事。permissions.checks: write(本文件内,未动仓库设置/secrets)。选型论证(你给的二选一)
采纳**「独立后置 job 显式结论 + run 摘要」**,不用 issue skip-record:后者每周制造用户可见对象、需要
issues: write、"写后回读"多一个失败点,且回读失败时又回到"没人知道"。check run 天然绑在head_sha+run_id上,neutral是 Checks API 合法结论,不拦合并、不进必需 contexts。家族形态一致(SeedVR2 #129 / MiniMax 的 NO REAL INFERENCE 显式化就是把缺席做成可见结论,而不是做成红灯)。check 名用纯 ASCII:本仓在非 ASCII 上栽过两次(release-gate 的 Windows cp1252、bsdtar 中文文件名),不引入新变量。
本地验证(把工作流里的脚本原文抽出来,在 stub
gh下跑)precheck probe(四种都 rc=0):
no-repo-admin-token-secretno-registered-gpu-runneravailablerunner-query-deniedsmoke-status 映射(9 种组合,name/conclusion 全部按预期):
另:YAML 用
yaml.safe_load解析通过,三个作业/outputs/if 结构已回读确认;提交带Signed-off-by(DCO Check现已是必需 context)。我没做 / 你需要知道的
neutral的 check 在 UI 上的具体图标/文案、以及checks: write在默认权限下能否写成功,只能靠 dispatch 实测(见下)。gh workflow run gpu-smoke.yml --repo ReSerendipity/TTS_MultiModel --ref <本分支>,然后gh api "repos/.../commits/<该分支 head sha>/check-runs" --jq '.check_runs[]|select(.name|startswith("[gpu-smoke]"))|{name,conclusion,html_url}'→ 期望看到
conclusion=neutral且名字带no-repo-admin-token-secret(当前该分支上 token 仍未配置)。Refs: #158 #160