Repository navigation
61 lines (60 loc) · 3.03 KB
/
Copy pathci.yml
File metadata and controls
61 lines (60 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# ⚠️ 2026-09-15 关掉(`gh workflow disable ci`),2026-09-16 用户决定**继续关着**。
#
# 更正一处说法:这份工作流里的步骤都**不打模型**(typecheck、各包单测、hook 测试、
# drift、host-parity、replay——replay 是对冻结运行的确定性重打分)。要大模型才跑得动的
# 是真实用例执行,那本来就不在 CI 里。CI 上红的是 `apps/runner` 起真浏览器的三条测试。
#
# 关的时候它是红的:`apps/runner` 三条测试在 CI 上失败而本机四条全绿——
# captures a screenshot and perf metrics 拿到 'failed'
# streams a debug session's frames 拿到 'step' 而不是 'navigated'
# cancels while page navigation is pending 45 秒超时
# **原因没有定位到**。第二条和当时改的缓存键毫无关系(一个 debug 会话的帧类型
# 不是 cacheId 能影响的事),所以「是那次改动弄坏的」这个结论并不成立,只是时间上相邻。
#
# 关掉 ≠ 这些检查没用。本地这一串仍然是验收口径(见 CLAUDE.md):
# pnpm typecheck && pnpm test && pnpm check:drift && pnpm check:host-parity
#
# 开回去:`gh workflow enable ci`。开之前先把上面三条弄清楚,
# 否则每个 PR 都会带着一片红,而红久了就没人看了——那比没有 CI 更糟。
#
# 借 commerce-agents 的分层:无 API key 的检查跑在每次 PR 上;真跑模型的评测由人触发。
#
# 三件事:
# 1. typecheck + 各包单测(含 hook 子进程测试)——门禁类行为不过模型,脚本化输入就能钉住;
# 2. check-drift——两臂提示词的规则逐条认领,漂移即红;
# 2b. check-host-parity——宿主入口要能覆盖 Web UI 的每一个操作。每条路由必须被分类,
# 覆盖率只能涨不能跌。加了 UI 路由却忘了同步宿主,在这里当场红。
# 3. replay——对仓库里冻结的运行重打分,coverage 必须和 expected.json 逐位相同。
# 这是「CI 只跑 replay、不打 API」:score_run 是确定性的,录制的运行在 benchmark/*/replay/ 里。
name: ci
on:
push:
branches: [main, v3]
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: typecheck
run: pnpm typecheck
- name: unit tests (packages)
run: pnpm test
- name: installer, fixture and gate contracts
run: node --test scripts/test/*.test.mjs
- name: hook tests (子进程,喂 stdin 断 stdout)
run: pnpm test:hooks
- name: prompt drift (两臂提示词逐条认领)
run: pnpm check:drift
- name: host parity (宿主入口对 UI 操作的覆盖,只能涨不能跌)
run: pnpm check:host-parity
- name: replay frozen runs (确定性重打分,不打 API)
run: node scripts/replay.mjs