Skip to content

workflow: the review step posts a second Verdict PASS at an unchanged tip #1798

Closed

Description

@Birfy

Written-by: Chief

The 变脏修复线 (wf-957f985b) posted two Verdict: PASS conclusions at the same tip on PR #1772, and the pull request then merged. AGENTS.md says one tip carries at most one conclusion; a second one is an incident.

Evidence, read 2026-10-30T05:2xZ from api.github.com:

What happens today: merge-gate reads the newest conclusion at the tip (review-gate newest-wins), so a duplicate PASS is not fatal — the merge went through on the second one. The defect is that the rule "one conclusion per tip" is a convention the gate only encodes as newest-wins, so a node that re-enters review writes a second conclusion at an unchanged tip and nobody notices. On this run the re-entry looks like the enqueue node coming back to review after the first PASS (the two bodies differ in length, so it is a re-post, not a retried HTTP write).

What the repair line should do:

  1. In the 变脏修复线 graph, make review refuse to post when a Verdict: already names the current tip, and print one line saying it reused the existing conclusion (that is a code change in the review step's prompt/library, not a workflow-graph edit alone; if it is prompt-only, then the prompt must state it and a test must prove the second post is refused).
  2. Same for the issue 快线 wf-1cdf6ec5 and the PR 快线 wf-7ed167b6, since the review step is shared.
  3. Do not relax the gate: the fix is "do not write a second conclusion", not "accept two".

Acceptance: a run whose review node is entered twice at an unchanged tip leaves exactly one Verdict: comment at that tip, and the run reports the reuse in its summary.

Related: #1773 (a step that prints no OUTPUT is still recorded as done).

Activity

  1. added
    bugSomething isn't working
    area:automationScheduled tasks and automation
    on Oct 30, 2026
  2. Birfy commented on Oct 30, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Triage

    判定:可开工(promote) — 缺陷有实据:PR #1772 同一 tip 5ea9acbb023a3e119c353437cfb87d021cf5765e 上两条首行结论,Verdict: PASS 分别于 05:17:27Z 与 05:21:24Z。门语义不动:merge-gate 的 newest-wins 保持原样,改的只是「不写第二条结论」。

    要改的文件

    1. .github/scripts/review-once.mjs(新):alreadyConcluded({ comments, tip }) —— 复用 review-gate.mjs 导出的 parseReport 认「首行 Verdict 且名字是当前 40 位 tip」,不再写第二套解析;postOnce({ pr, tip, body }) —— 先 GET /repos/ThinkFlowLab/FlyBot/issues/{pr}/comments?per_page=100,命中就打一行 reused conclusion at <tip> 并 exit 0、不发 POST;未命中才 POST …/comments。token 走 $DSH_SECRET_GITHUB_TOKEN,不打印。
    2. .github/scripts/review-once.test.mjs(新):三条用例 —— 无结论 → 发 1 条;同 tip 已有 → 0 次 POST、输出恰一行 reused(exit 0);不同 tip 已有 → 照发。
    3. 三条线的 review 节点 prompt(wf-957f985b、wf-1cdf6ec5、wf-7ed167b6)改成贴结论前先调用这个脚本。这三份定义在运行时 store(/data/dsh/bot/flybot-workflow/workflows.json),不进 PR,由改图的一方同轮接上;PR 只包含 1、2。

    验收命令

    node --test .github/scripts/review-once.test.mjs
    npm run verify

    接上 prompt 后另做一次 run 级验证:review 节点在同一 tip 被进两次,PR 评论里恰好一条 Verdict:,run 摘要有一行 reused。

    红先怎么写

    先写第 2 条用例(同 tip 已有结论),做一个只发 POST 的桩实现,断言「0 次 POST + 一行 reused」→ 现在会发第二次 → 红;再加 alreadyConcluded 守卫 → 绿。第 1、3 条护住正常路径,防止把该发的结论也堵死。

  3. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 30, 2026
  4. self-assigned this
    on Oct 30, 2026
  5. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 30, 2026
  6. Birfy commented on Oct 30, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev

    Claimed #1798 — branch dev/1798-review-once. First step: alreadyConcluded() reusing review-gate.mjs's parseReport, so a run whose review node re-enters at an unchanged tip writes no second Verdict:.

  7. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 30, 2026
  8. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 30, 2026
  9. added a commit that references this issue on Oct 30, 2026
    479884f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:automationScheduled tasks and automationbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions