固化 Match-3 生产者、视觉、音频与双 Judge 证据闭包。 将《山海行纪》r1.1 绑定新的不可变 release,并以生产预检现场核验 bundle、Registry/2 和 25 项 Writer 快照。 同步地图1平衡锁值、跨游戏回归修复、验收契约与 SoT 证据。
59 lines
3.0 KiB
YAML
59 lines
3.0 KiB
YAML
# Prompt 四道闸 · 真模型闸(段 B)—— 手动触发的真模型 eval CI
|
|
#
|
|
# 与 contract-gates.yml 分工(各管一摊):
|
|
# · contract-gates 每次 push 自动跑离线门(含段 A 版本升号闸 check_version_bump):秒级、零成本、不可绕。
|
|
# · 本工作流(段 B)花真模型钱、慢,故不随 push 跑,改手动 workflow_dispatch 触发——纪律 =
|
|
# prompt 改动合入前至少真跑一次、四闸全绿 + 人工抽检才合(prompt治理 SoT §2/§4)。
|
|
#
|
|
# 真模型 = MiniMax-M3 经 new-api 网关(thinking 关);单跑预算 cap ≤¥5 由 eval_gate.py 硬编码兜、超即 fail。
|
|
# 只焊 live 面:非 live 条目 SKIP 豁免、live 无金标 fail-closed(见 registry.yaml 头部消费面三态对账)。
|
|
#
|
|
# 前提:runner 能内网直连 new-api(100.64.0.8:3000,与 Gitea 同在 mini-infra 内网)。eval_gate.py 自带
|
|
# ProxyHandler({}) 绕系统代理;NO_PROXY 再兜一层。若 runner 不在内网,改走「ssh mini-desktop 执行」
|
|
# 既有模式(见 docs/内网凭据与端点.md);NEWAPI_KEY 走 Gitea secret,绝不落仓、不设长期 env。
|
|
# 生效前提:Gitea 实例已配 act_runner + secrets.NEWAPI_KEY;未配时本工作流不可用(不影响 push 门)。
|
|
name: prompt-eval
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
prompt_id:
|
|
description: '指定单条 prompt id 真跑(留空 = 对相对 base 改动的 live 条目跑)'
|
|
required: false
|
|
default: ''
|
|
base:
|
|
description: 'changed 模式的对比基线 git ref'
|
|
required: false
|
|
default: 'HEAD~1'
|
|
jobs:
|
|
prompt-eval:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NEWAPI_KEY: ${{ secrets.NEWAPI_KEY }}
|
|
NEWAPI_BASE_URL: http://100.64.0.8:3000
|
|
NO_PROXY: 100.64.0.8,localhost,127.0.0.1
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# --changed 模式要比对基线找改动条目,故拉全历史。
|
|
fetch-depth: 0
|
|
|
|
- name: 安装并校验 Prompt eval 依赖
|
|
run: |
|
|
python3 -m pip install --disable-pip-version-check -r contracts/prompts/requirements-eval.txt
|
|
python3 -m pip check
|
|
python3 -c "import cv2, PIL; from PIL import Image; print('Pillow', PIL.__version__, 'OpenCV', cv2.__version__, 'PNG', Image.registered_extensions().get('.png'))"
|
|
|
|
- name: 段B 真模型四道闸(改动条目 / 指定条目)
|
|
run: |
|
|
if [ -z "$NEWAPI_KEY" ]; then
|
|
echo "✘ 未配置 secrets.NEWAPI_KEY,真模型闸无法跑(读 docs/内网凭据与端点.md 配 Gitea secret)"
|
|
exit 1
|
|
fi
|
|
if [ -n "${{ github.event.inputs.prompt_id }}" ]; then
|
|
echo "→ 指定条目真跑:${{ github.event.inputs.prompt_id }}"
|
|
python3 contracts/prompts/eval_gate.py --id "${{ github.event.inputs.prompt_id }}"
|
|
else
|
|
echo "→ 对相对 ${{ github.event.inputs.base }} 改动的 live 条目真跑"
|
|
python3 contracts/prompts/eval_gate.py --changed --base "${{ github.event.inputs.base }}"
|
|
fi
|