lili 85f48228cd
Some checks failed
contract-gates / contract-gates (push) Has been cancelled
docs-gate / docs-gate (push) Has been cancelled
feat(cheap-gen): W-AXIS 波3 知识层补强+收尾——tsc 顾问门+recipes+暗资产接线+n=5 基线台账
- tsc 顾问门:typescript devDependency + tsc-advisory 测试档;顾问性(永不阻断),
  金标 10 款零误伤抽验
- recipes/ 五篇高频场景索引(命中矩形/计时器/资产回退/场景机/结算演出,「抄这段形态
  +头号病根」)+ littlejs-game-dev §0.5 卡壳就查接线
- 暗资产接线:plugin-capability-map(11 注入+1 取证+6 储备逐件裁定)+
  engine-capabilities-brief(≤3KB 蒸馏)+ api.d.ts/game-host.d.ts 补插件指针;
  三方一致性对账门 plugin-surface-gate.py(含 cwd 锚定修)挂 pre-commit+Gitea Actions
- hard_genre_batch 参数化(五品类 n=5 批跑驱动,checkpoint 续跑)
- n=5 基线台账入库(gitignore 例外 add -f,只入台账不入游戏产物):
  wax-baseline.jsonl 25 局逐局记录(含判定仪器订正批注:cap1500 重判/图像盲 M3 重判,
  只加字段零改值)——终数:操作口径 14/25=56%、质量口径 18/25=72%;
  品类 narrative/heritage 5/5、trpg 4/5、puzzle/sim-business 2/5(缺口逐局有名有姓,
  根因见 07-10 v2 plan §1);旧「80%/39%」口径正式作废存照

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 04:27:18 -07:00

57 lines
2.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 契约机器门 · 服务端兜底(Gitea Actions,与 GitHub Actions 语法兼容)
# pre-commit 是自愿门(--no-verify / 新 clone 未配 hooksPath 可绕),本工作流是不可绕的服务端门。
# 与 docs-gate.yml 平级、各管一摊:docs-gate 管文档治理七检,本工作流管四类契约门。
# 生效前提:Gitea 实例已配 act_runner;未配时本文件静默不跑,不影响开发。
# CI 侧全量真跑(不做 pre-commit 的路径条件触发):判例库四段尽量装齐 esbuild + pytest 后全跑,
# 装不齐时 run.mjs 自带零依赖降级、诚实 SKIP 缺依赖段,不假绿。
name: contract-gates
on:
push:
branches: ['**']
pull_request:
jobs:
contract-gates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# 段 A 版本升号闸(check_version_bump)要比对 push 前提交,故拉全历史;
# 其余四门只读工作区、不依赖 git 历史,fetch-depth 变化对它们无影响。
fetch-depth: 0
# 判例库 python-gates 段需 pytest;check-undef 段需 esbuild(随 node_modules)。
# 尽力预装让四段全量真跑;装不上则相应段 run.mjs 会诚实 SKIP。
- name: 预装门依赖(尽力)
run: |
pip3 install --quiet pytest || true
npm ci --prefix game-runtime/tools/amodel-gen || true
- name: 门金标判例库全量回归
run: node contracts/gate-fixtures/run.mjs
- name: play-loop 契约正负样本套件
run: python3 contracts/play-loop/validate.py --suite
- name: 品类 rubric fixture↔skill 双写对账
run: python3 .agents/tools/rubric-sync-gate.py
- name: 便宜档插件面三方一致性对账(目录/prompt 白名单/host-config 注入 + PLUGIN_KEY_DIR
run: python3 .agents/tools/plugin-surface-gate.py
- name: Prompt Registry 版本一致性
run: python3 contracts/prompts/check_registry.py
# 四道闸·闸0(段 A):改了 prompt 正文相对 push 前提交必须升 version。
# 基线优先取 push 事件的 before;取不到/无效回落 HEAD~1;再取不到(首 push/新分支)则跳过不误拦。
- name: Prompt 闸0 version 升号(改正文必升版)
run: |
BASE="${{ github.event.before }}"
if [ -z "$BASE" ] || ! git rev-parse --verify --quiet "$BASE^{commit}" >/dev/null 2>&1; then
BASE="$(git rev-parse --verify --quiet HEAD~1 2>/dev/null || true)"
fi
if [ -z "$BASE" ]; then
echo "无可比基线(首次提交/新分支),版本升号闸跳过(不误拦、不假绿)"
exit 0
fi
python3 contracts/prompts/check_version_bump.py --base "$BASE"