From 72a45f3ef3186b50d9099a734f739a9fcb66d1e0 Mon Sep 17 00:00:00 2001 From: ThearchyHelios Date: Fri, 16 Oct 2026 18:23:03 +0800 Subject: [PATCH] =?UTF-8?q?check-capabilities=20=E8=B7=9F=E4=B8=8A?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E6=B8=A0=E9=81=93=E6=8E=A8=E9=80=81=E7=9A=84?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E8=AF=84=E6=B5=8B=E4=B8=A4=E4=B8=AA=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=EF=BC=88=E5=A4=8D=E6=A0=B8=20M1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit W3-c 打开 eval.regressed、eval.failed 的全局渠道订阅时没改这项检查的期望,分支上「全局渠道:推给全局渠道的五项」和「登记了 还没推送的不列」两项就不过(复现:check-capabilities 63 通过、2 不过)。 - 全局渠道的期望改成 [...every, 'review.done', 'eval.regressed', 'eval.failed'],标题照 W3-d 的写法叫「推给全局渠道的几项」, 合并时两边的期望并在一起即可;个人渠道、应用渠道的期望不变(这两个事件只推全局渠道)。 - 「登记了还没推送的不列」里去掉评测的两项;另加一项:全局渠道列出的叫法照实带「定时」(定时评测有退步、定时评测没有评完)。 check-capabilities 66 项、check-schedules 355 项全过。 --- scripts/check-capabilities.mjs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/check-capabilities.mjs b/scripts/check-capabilities.mjs index abcbcfc1..e4b77f5a 100644 --- a/scripts/check-capabilities.mjs +++ b/scripts/check-capabilities.mjs @@ -301,7 +301,7 @@ await section('设置:身份、通知、审计', async () => { await section('设置 → 通知:可订阅的事件照服务端登记列(总方案 X6)', async () => { // 列表从真后端的 GET /api/notify/events 来(GET 放行):这种范围的渠道收得到的才列;从来推不到的(以前列着、一勾就 422 - // 的「待办升级」「动作已生效」……)和登记了还没推送的(评测、召回、待办汇总……)都不列 + // 的「待办升级」「动作已生效」……)和登记了还没推送的(召回、待办汇总……)都不列 const { page, errors } = await open('/settings/notify') await page.getByRole('button', { name: '添加渠道' }).first().click() const dlg = page.locator('[role="dialog"]') @@ -311,11 +311,15 @@ await section('设置 → 通知:可订阅的事件照服务端登记列(总 return waitFor(page, async () => await dlg.locator(`[data-notify-events="${value}"]`).count() === 1) } const every = ['task.opened', 'run.finished', 'run.failed', 'action.unknown'] - check('全局渠道:推给全局渠道的五项', await waitFor(page, async () => await dlg.locator('[data-notify-events="global"]').count() === 1) - && JSON.stringify(await listed()) === JSON.stringify([...every, 'review.done']), JSON.stringify(await listed())) + // 第 3 波起:定时评测的两个事件只推全局渠道(评测是搭建者们共用的一把尺,不归哪个人;服务端 notify/service.notify_eval) + check('全局渠道:推给全局渠道的几项', await waitFor(page, async () => await dlg.locator('[data-notify-events="global"]').count() === 1) + && JSON.stringify(await listed()) === JSON.stringify([...every, 'review.done', 'eval.regressed', 'eval.failed']), + JSON.stringify(await listed())) const text = await dlg.innerText() + // 只推定时发起的评测:叫法照实带「定时」,勾上的人不会以为手动发起的那次也推 + check('评测的两个事件照实说是定时的', ['定时评测有退步', '定时评测没有评完'].every((t) => text.includes(t)), text) check('从来推不到的不列', !['待办升级', '待办超时', '待办处理完', '动作失败', '动作已生效'].some((t) => text.includes(t)), text) - check('登记了还没推送的不列', !['评测有退步', '评测失败', '每天的待办汇总', '访问密钥快到期', '数据源有变化要处理', '口径升版,答案的数变了'] + check('登记了还没推送的不列', !['每天的待办汇总', '访问密钥快到期', '数据源有变化要处理', '口径升版,答案的数变了'] .some((t) => text.includes(t)), text) check('应用的渠道:不列只发给提交人的「我提交审核的应用有结果」', await scope('app') && JSON.stringify(await listed()) === JSON.stringify(every), JSON.stringify(await listed()))