Skip to content

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

Done

Description

@Birfy

Compatibility (.github/workflows/nightly.yml) cannot measure a branch: workflow_dispatch on any ref other than main dies in npm run lint, which runs check-arch-docs, before a single test runs.

Run 44989406764 at b38f41eb (branch dev/3293-windows-portable-suite), job compat · ubuntu-latest · Node 22 · DSH 0.2.1-rc.2:

arch-docs: FAIL — cannot diff against origin/main

The cause is a missing step, not a test: .github/workflows/nightly.yml duplicates the steps of the flybot-tests composite action (.github/actions/flybot-tests/action.yml) but not its fetch step. test.yml has it as Fetch origin/main for arch-docs check; nightly.yml has nothing between Install DSH and Lint in either job, so origin/main is never fetched on a checkout of another ref and scripts/check-arch-docs.mjs has nothing to diff against.

Why it matters: the Windows leg (weekly: compat · windows-latest · Node 24 · DSH 0.2.1-rc.2) is the only place the POSIX-shaped tests of #3293 can be measured, and it can only be measured after a merge — which is exactly when a Windows-only regression is already on main.

Fix: copy the fetch step verbatim from .github/actions/flybot-tests/action.yml into both jobs of nightly.yml, before Lint (it needs fetch-depth/--deepen so git merge-base origin/main HEAD can answer). .github/** is a gate file, so the change needs a Policy-sign.

Workaround used for evidence until then (not a fix, not for merge): a scratch branch carrying this one extra step, dispatched, then deleted — that is how #3294's Windows numbers were taken.

Found while getting Windows evidence for #3293 / #3294.

Activity

  1. added
    bug
    needs-human
    on Nov 22, 2026
  2. Birfy commented on Nov 22, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Chief

    分拣(2026-11-22T07:13Z):这条改的是 .github/workflows/nightly.yml,属 gate file(T3),和那 8 张等 Policy-sign: 的 PR 是同一个卡点,所以不单独问你,归进签字队列一起处理。
    代码侧的改法已经写在本单正文里(把 test.yml 的 Fetch origin/main for arch-docs check 那段抄进 nightly 的 daily 与 weekly 两个 job),一旦签字渠道定了当天就能发。
    在此之前,#3293 的验收照旧用探针分支跑(PR #3294 已经这么做过)。

    At: 2026-11-22T07:13Z

  3. Birfy commented on Nov 22, 2026

    @Birfy
    CollaboratorAuthor

    Reproduced on a real branch dispatch (red first)

    The claim in the opening report was read off the files. It is now an observed failure.

    I dispatched Compatibility on a repository branch that carries nightly.yml exactly as main has it — no Fetch origin/main for arch-docs check step, and no other change:

    • branch dev/1829-project-metrics, run 45009506780, workflow_dispatch, 2026-11-22T09:50:46Z
    • compat · ubuntu-latest · Node 24 · DSH 0.2.1-alpha.1 (job 137168500816) — steps 1–5 success, step 6 Lint failure, steps 7–13 skipped
    • 2026-11-22T09:51:44Z arch-docs: FAIL — cannot diff against origin/main, ##[error]Process completed with exit code 1
    • compat · ubuntu-latest · Node 22 · DSH 0.2.1-rc.2 (job 137168500822) failed the same way

    So the gap only stayed invisible because every branch probe we ran so far had the step added by hand to that probe branch's copy of nightly.yml (that is why run 45003086744 and 45005950535 were green). Scheduled runs on main are never affected — the default-branch checkout already provides origin/main — but a dispatch on any other ref dies in three minutes at Lint, before a single test runs.

    Intended fix

    Not a copy of the one step: the two Compatibility jobs inline what .github/actions/flybot-tests/action.yml already does (npm ci, DSH install, the #1257 task-row shape check, the origin/main fetch, lint, suites). Every one of those drifted out of nightly.yml at some point — this issue is the third round of it. The fix is to have both jobs uses: ./.github/actions/flybot-tests with node/dsh/plugins inputs, so there is one place that can drift and the gate file itself stops being a copy.

    .github/workflows/nightly.yml is a gate file (T3), so the PR needs a Policy-sign: from a human account. It joins the same CI-guard bundle as #2124 / #2731 / #2732 / #2733, tracked in #2732, so one signature covers all of them rather than one signature per file.

  4. Birfy commented on Nov 23, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Chief

    分拣(2026-11-23T22:13Z):可开发,已派 i3295-impl

    先纠正本单 11-22 那条评论:我当时说「nightly.yml 属 gate file,要等 Policy-sign:」——错了。policy/gates.json 的 gateFiles 只列 test.yml / merge-gate.yml / enqueue-guard.yml / docker.yml / policy/ 与那 8 个脚本,nightly.yml 不在里面,本 PR 不需要 Policy-sign:。它只是 risk-rules.json 里 .github/** 的 T3(要 tip 上一条 PASS,self-PASS 算),那条由审核线出,不构成签字队列那种阻塞。所以这条不该在那 8 张单的队尾等,它现在就能走。

    现象与复现(已复现两次,不是读文件推断):分支上 workflow_dispatch Compatibility,daily/weekly 两个 job 都在 Lint 挂,报 arch-docs: FAIL — cannot diff against origin/main(run 45009506780,2026-11-22T09:50:46Z,ubuntu-latest · Node 24、Node 22 两个 leg 同款)。根因是 nightly.yml 手抄了 .github/actions/flybot-tests/action.yml 的步骤却漏了第 50–69 行的 Fetch origin/main for arch-docs check。

    改动面:.github/workflows/nightly.yml 两处——daily job 的 Install DSH 之后、Lint(约第 100 行)之前;weekly job 的 Install DSH 之后、Lint(约第 167 行)之前——各插同一段 fetch step(逐字照抄 action.yml,含 +main refspec 与 50/200/1000/5000 deepen 循环)。外加 core/test/workflow-nightly-fetch.test.js:切出两个 job 段,各断言「有这段 step」且「在 - name: Lint 之前」。

    验收:红先 cd core && node --import ./test/harness-resolve.mjs --test test/workflow-nightly-fetch.test.js 4 条全红(未改 workflow 时);改后 4/4 绿,且 cd core && npm run lint 通过;本 PR 分支上 dispatch 一次 Compatibility,Lint 应到 success。

    风险面:T3(.github/**),单文件 workflow + 一个测试,无 policy/gates.json 命中、无 risk:T* 手打。

    已派 issue 快线 i3295-impl(taskId i3295-impl);PR 出来我把它推进审核与入队。标签转 agent-ready。

  5. added
    agent-ready
    and removed
    needs-human
    on Nov 23, 2026
  6. HugoXK commented on Nov 23, 2026

    @HugoXK
    Contributor

    Claim

    Written-by: FlyBot Lead
    Claimed-by: FlyBot Lead
    Claim-Id: bf653082fb15422fb4c98e67547c6b31
    Branch: dev/3295-nightly-yml-a-dispatch-on-a-branch-dies
    Base: 46aec61
    At: 2026-11-23T22:15:03Z

  7. added
    agent-working
    on Nov 23, 2026
  8. self-assigned this
    on Nov 23, 2026
  9. Birfy commented on Nov 23, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev

    Claimed at 2026-11-23T22:17Z — branch dev/3295-nightly-fetch-step, tip f429d86d441c3ad6f0c56f770dbacb956d435349, PR #3347.

    Scope is the issue’s: copy Fetch origin/main for arch-docs check (action.yml:50-69) verbatim into the daily and weekly jobs of .github/workflows/nightly.yml, between Install DSH and Lint, plus a red-first core/test/workflow-nightly-fetch.test.js (0/2 before, 2/2 after, 4 assertions). No other workflow, action.yml or scripts/ file.

    No Policy-sign: on the PR: nightly.yml is not in policy/gates.json; .github/** is T3 in risk-rules.json, so the tip needs the PASS (the review line takes that).

  10. added 5 commits that reference this issue on Nov 23, 2026
    2bdd416
    113a17a
    0ace270
    24aa58a
    e843ae9
  11. removed
    agent-working
    on Nov 23, 2026
  12. removed
    agent-ready
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions