Skip to content

[bug] edit-run: the check "the first backup id stays once" fails when two corrections land in the same second (found during #519) #534

Open

Description

@kiki830621

Problem

edit-run 這個測試 suite 裡有一個檢查偶爾會在 CI 失敗,與被測的程式無關:「the first backup id stays once」(scripts/tests/edit-run/test.sh 的 A5r8b,同一段更正兩次)。

它已經在 CI 失敗兩次:

原因(讀程式得到的;CI 的紀錄只留下失敗的檢查名稱,沒有留下數到幾):

  • --correct 的備份 id 是「目標加上到秒的時間」,例如 comment-288-20261113T020301Z。同一秒內對同一個目標做第二次更正時,idd-edit-helper.py 會在後面加序號,變成 comment-288-20261113T020301Z-2。這是對的:兩份備份都留著,沒有互相覆蓋。
  • 那個檢查先記下第一次的 id,第二次更正之後數「內文裡有幾行包含這個 id」,預期 1。第二個 id 是第一個 id 加上 -2,也包含第一個 id,所以兩次更正落在同一秒時會數到 2。
  • 這個 suite 在本機要 80 秒左右,兩次更正隔得夠遠;在 CI 只要 49 秒,就有機會落在同一秒。

Type

bug

Expected

那個檢查比對完整的 id(例如連同前後的引號),兩次更正落在同一秒時也通過。附一個檢查:讓兩次更正的備份 id 只差序號,確認它仍然通過。

Actual

兩次更正落在同一秒時檢查失敗,CI 回報 edit-run 一個 suite 失敗。重跑通常就過。

Impact

plugins/issue-driven-dev/scripts/tests/edit-run/test.sh(只有測試)。影響的是 CI 的可信度:/idd-all 的 close stage 在 PR 的 CI 失敗時會停下,遇到這個情況要有人重跑。

Source: surfaced during /idd-all #519 — 合併之後 main 上的 CI 失敗,查了原因,2026-11-13

Clarity Surface(idd-clarify run 2026-11-13T02:11:33Z, unattended)

Type Source Question for you Status
(none) — no issues detected passed

Activity

  1. kiki830621 commented on Nov 16, 2026

    @kiki830621
    MemberAuthor

    又一次發生:PR #572 的 CI

    2026-11-16,PR #572 的 CI(run 43819776536,ubuntu-26.04)裡 edit-run 以 253 項通過、1 項失敗結束,失敗的是這張記錄的 the first backup id stays once。那條分支沒有改 edit-run 的任何檔案。同一次 run 另有一個不相關的失敗(spec-change,記在 #548 的留言 6909882017)。

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions