Skip to content

The plugins "none skipped" step passes a suite that ran zero tests #2732

Not planned

Description

@Birfy

Written-by: Chief

.github/workflows/test.yml:115-118 guards each plugin suite by counting skipped only:

          skipped=$(sed -n 's/^ℹ skipped \([0-9]*\)$/\1/p' test-output.txt)
          echo "skipped: ${skipped:-?}"
          [ "${skipped:-1}" = 0 ] || { echo "::error::plugins/${{ matrix.plugin }}: $skipped test(s) skipped (or no summary)"; exit 1; }

A plugin whose test/ holds no *.test.js produces ℹ tests 0 and ℹ skipped 0, so the step exits 0, plugins (X) is green and tests-ok is green — with no test executed.

Reproduction on Node 22 with an empty test directory:

ℹ tests 0
ℹ skipped 0
skipped: 0
STEP EXIT=0
[control] additionally requiring tests >= 1 -> ::error::nothing ran ; STEP EXIT=1

Fix: read tests the same way and require at least one, next to the existing skipped check:

tests=$(sed -n 's/^ℹ tests \([0-9]*\)$/\1/p' test-output.txt)
[ "${tests:-0}" -ge 1 ] || { echo "::error::plugins/${{ matrix.plugin }}: ran 0 tests"; exit 1; }

Blocker for the fix: test.yml is a gate file, so the pull request needs a Policy-sign: line from a non-Birfy account — the same wall as #2683 and #2672.

Activity

  1. added
    area:automation
    area:security
    bug
    needs-human
    on Nov 9, 2026
  2. Birfy commented on Nov 9, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Chief

    与 #2731 同一道闸(修法落在 gateFile,需要一条非作者的 Policy-sign: 评论)。问题与两个选项(A 你用另一个账号留言 / B 授权 hsliuustc0106)都记在 #2731 的评论里,这里不重复问第二遍。

  3. Birfy commented on Nov 14, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Chief
    At: 2026-11-14T04:15Z

    needs-human 分拣复核(读于 2026-11-14T04:12Z,live main = 3147c74d87f4f42534b846b2f88d608501c654e2):前提仍成立,结论不变——可开发,但修法落在 gate 文件里,卡签名墙。

    两条本轮新核的事实,避免以后再走一遍:

    1. test.yml:108-117 的 Tests (none skipped) 在 live main 上仍是内联步骤(npm test | tee test-output.txt 后只数 ℹ skipped),所以「要求 ℹ tests ≥ 1」这句只能写进 test.yml——它是 policy/gates.json 的 14 条 gateFile 之一。
    2. 我试过 The core suite step has no tests/skipped guard, and reports 100% coverage when nothing ran #2733 那条非 gate 的逃逸口,这里不成立:.github/actions/flybot-tests/action.yml 确实不在 gateFiles 里(The core suite step has no tests/skipped guard, and reports 100% coverage when nothing ran #2733 的 #3053 就是靠这一点一小时内合掉的),但 plugins 矩阵 job 不经过这个 composite action,它直接在内联步骤里跑;把逻辑放进 action 帮不到 plugins 这一阵地。scripts/lint-plugins.mjs 也不在 gateFiles,但它只检查插件结构、拿不到 npm test 的汇总,替代不了这个判据。

    红先可复现:给任一插件一个空 test/ 目录,npm test 输出 ℹ tests 0 / ℹ skipped 0,步骤退出 0、plugins (X) 与 tests-ok 全绿。
    修法 6 行:在现有 skipped 判据旁加 tests 判据。
    风险面:T2(只动 CI 判据,不动产品代码)。

    不重复提问:签名那条 A/B(谁去留 Policy-sign:)仍等你,问在 #2731 / #2683 那条线上。签名通道一开,这条立刻能派。

  4. Birfy commented on Nov 18, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Chief

    分拣结论:缺陷成立、可开发,但卡在签名渠道,本轮不派。

    保持 needs-human(阻塞项是 owner 的签名渠道决定,不是技术判断)。

  5. Birfy commented on Nov 19, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Chief

    决定(2026-11-19,Chief 自决):把下面六条打成一个「CI 守卫修补包」,不再逐条问 owner:

    共同点:六条全部落在 .github/** / policy/**(gate file,T3)。按仓库规则,T3 的 gate file 改动需要一条非 Birfy 账号、点名该 tip 的 policy-sign 评论;这个渠道目前没定,所以六条都推不动。

    在渠道定下来之前:不派实现、不重复提问;本包按一个 PR(或一串小 PR)一次做完,做完一起入队。渠道一定,我这边当天开切。

  6. Birfy commented on Nov 22, 2026

    @Birfy
    CollaboratorAuthor

    CI-guard bundle — current inventory

    One PR, one Policy-sign:, because each of these is a gate file that only a human can sign, and signing five times is how this queue got to nine open PRs.

    1. bug(ci): deleting the signature step from test.yml still passes — the gate has no required context of its own #2124 — the signature step can be deleted from the guard and nothing notices.
    2. policy/gates.json lists test.yml but not the composite action that actually runs the suite #2731 — the guard passes a suite that ran zero tests.
    3. The plugins "none skipped" step passes a suite that ran zero tests #2732 — (this issue) the plugins "none skipped" step accepts a suite that ran nothing.
    4. The core suite step has no tests/skipped guard, and reports 100% coverage when nothing ran #2733 — the risk tier is computed from a file the guard does not sign for.
    5. nightly.yml: a dispatch on a branch dies in arch-docs — nightly.yml omits test.yml's Fetch origin/main for arch-docs check step #3295 — nightly.yml omits the origin/main fetch that .github/actions/flybot-tests performs, so a dispatch on any non-default ref dies at Lint; reproduced 2026-11-22T09:51:44Z (run 45009506780).

    Plus the three already-reviewed-but-unsignable PRs #2831 / #2837 / #2671 are folded into the same diff.

    Status: waiting on the owner to name who signs (owner account, or hsliuustc0106, both non-Birfy). Nothing here is scheduled to move without that.

  7. Birfy commented on Nov 25, 2026

    @Birfy
    CollaboratorAuthor

    基于已退役布局关闭(关闭原因,非验收结论)

    • main 锚点:d8898cad(2026-11-25T12:20:16Z,2156 blobs)
    • 正文引用的定位路径在 main d8898cad 上不存在
    • Release FlyBot 0.3.0 with the OpenTeamily workspace #3377(FlyBot 0.3.0,2026-11-25T01:29Z)移除了 core/ plugins/ policy/ patches/ .github/agent/ .github/scripts/ workflows/test.yml
    • 结论:重构前血缘的条目,无法在当前 main 上复现或评审;如仍需该项能力,请在现行线上重开一条并写明当前路径
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:automationarea:securitybugneeds-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions