Repository navigation
Description
Problem
scripts/run-all-tests.sh 給每個 suite 180 秒,suite 目錄裡有 timeout 檔時取較大的值。edit-run 沒有 timeout 檔,而它在機器忙的時候會超過 180 秒被砍掉,整套測試就回報 1 個 suite 失敗,但沒有任何一項檢查真的失敗。
觀察(2026-11-11,/idd-all #499 的修正輪,macOS,load average 約 50):
| 哪一次執行 | edit-run |
|---|---|
| 整套測試,16:18 開始 | 通過,64 秒 |
| 整套測試,17:51 開始(修正後的工作樹) | 通過 |
spectra-verify 的 agent 另外跑的整套測試,同一個工作樹 |
到 180 秒被砍,紀錄停在中途,沒有摘要也沒有失敗的檢查 |
同一個 agent 單獨跑 edit-run |
通過,約 89 秒 |
edit-run 不讀那次改到的任何檔案,所以這不是回歸,是時限太緊。runner 的檔頭自己寫了 merge-completeness 在 Mac 上受負載影響的情況(#399),那個 suite 用 timeout 檔處理。
Type
bug
Expected
機器忙的時候,整套測試不會因為 edit-run 的執行時間而回報失敗。可以的做法:給 edit-run 一個 timeout 檔(runner 已經支援),值依它在高負載下量到的時間決定。同時看一下其他在正常情況就超過 60 秒的 suite(例如 verify-gate)要不要一起給。
Actual
run-all-tests.sh 印 suites: 73, failed: 1,失敗的是被時限砍掉的 edit-run。看結果的人或 agent 要自己去讀那個 suite 的紀錄,才知道沒有檢查失敗。
Impact
plugins/issue-driven-dev/scripts/tests/edit-run/(加 timeout 檔)。影響的是本機整套測試的可信度:ci.mode 是本機指令的 repo,這種逾時會擋住 push 或 merge。GitHub 上的 CI 在 Linux 跑,整套 6 到 10 分鐘,沒有觀察到這個問題。
Source: /idd-all #499 的修正輪,spectra-verify 對 change idd-499-fix1 的回報,2026-11-11。
Clarity Surface(idd-clarify run 2026-11-11T10:52:22Z, unattended)
| Type | Source | Question for you | Status | Reason |
|---|---|---|---|---|
| ambiguity | "值依它在高負載下量到的時間決定" | edit-run 的時限要給多少秒?要不要連其他平常就超過 60 秒的 suite 一起給? |
resolved @ 2026-11-11T13:57:58Z (reason: 時限可以給寬,秒數由實作的人取;decision) | unattended-auto-Step-4.6-deferred |
Current Status
Phase: closed
Last updated: 2026-11-12 by idd-close
Dashboard: #508 (comment)
Key Decisions
- 2026-11-11 維護者決定:
edit-run的時限可以給寬,秒數由實作的人取(decision) - 2026-11-12 診斷:Complexity Simple;
edit-run約 64.5 秒 CPU 時間,負載超過核心數時牆上時間等比例拉長;給它timeout檔 1800 秒,其他 suite 不給(沒有別的在正常情況超過 60 秒)(Diagnosis) - 2026-11-12 實作完成:
edit-run/timeout1800 秒,run-all-tests-self加四個檢查;宣告只改測試與測試設定(Implementation Complete) - 2026-11-12 verify 第 1 輪:PASS、0 blocking、4 項 In-scope fix(1 MEDIUM、3 LOW)、1 follow-up([bug] run-all-tests.sh names each suite log in the system temp dir by suite name only, so runs overwrite each other (follow-up finding from #508) #518)(報告)
- 2026-11-12 修正輪:時限改成 480 秒(不大於 CI job 時限的一半),檢查搬到
edit-run/test.sh,假 suite 不與真的 suite 同名;Diagnosis 裡以 1800 秒寫的幾段由新的 Implementation Complete 取代(Implementation Complete) - 2026-11-12 verify 第 2 輪:PASS、0 blocking、6 項 In-scope fix(都是 LOW 或 INFO,不擋合併,記在 [enhancement] edit-run time limit: LOW and INFO findings left by the verify of #508 (follow-up from #508) #519)、1 follow-up(補記在 [bug] run-all-tests.sh names each suite log in the system temp dir by suite name only, so runs overwrite each other (follow-up finding from #508) #518)(報告)
- 2026-11-12 PR fix: give the edit-run suite a time limit of its own (#508) #520 由
/idd-all在 verify 乾淨之後 squash 合併成005531b - 2026-11-12 結案(Closing Summary)
Scope Changes
- runner 用固定檔名寫紀錄的問題不在這張,另開 [bug] run-all-tests.sh names each suite log in the system temp dir by suite name only, so runs overwrite each other (follow-up finding from #508) #518
- verify 第 2 輪的六列 LOW 與 INFO 不在這條 branch 上修,另開 [enhancement] edit-run time limit: LOW and INFO findings left by the verify of #508 (follow-up from #508) #519
Blocking
- (none)
Commits
d125e5cfix: give the edit-run suite a time limit of its own ([bug] edit-run suite is killed by the 180 s per-suite limit when the machine is busy #508)66c0cd6fix: keep the edit-run limit under the CI job limit and check it in the suite itself ([bug] edit-run suite is killed by the 180 s per-suite limit when the machine is busy #508)005531bmain 上的 squash merge(PR fix: give the edit-run suite a time limit of its own (#508) #520)
Activity
kiki830621 commentedon Nov 11, 2026
🎯 Decision
原話讀作「可以久一點沒關係」。問的是:
edit-run的時限要給多少秒,其他平常就超過 60 秒的 suite 要不要一起給。決定
edit-run的時限可以給得寬,不必壓在剛好夠用。Rationale
維護者沒有另外說明理由,也沒有指定秒數。以下由記錄的人整理。在
edit-run/加timeout檔,數字由實作的人取:正文記的高負載時間是 89 秒到超過 180 秒,merge-completeness現在的值是 3600。其他平常就超過 60 秒的 suite 要不要一起給,原話沒有分開回答;照同一個方向處理時,在 PR 說明列出給了哪幾個。kiki830621 commentedon Nov 12, 2026
Diagnosis
Type
bug(label
bug)Root Cause / Analysis
我認為 root cause 是:
edit-run的執行時間大半是 CPU 時間,而 runner 的時限是牆上時間。機器忙的時候它會跑得比較久,接近或越過預設的 180 秒。拉長多少沒有簡單的比例,量到的數字在下面。證據(2026-11-12,18 核的 Mac):
edit-run:load 約 20 時 84 秒(user 39.78、sys 24.69,CPU 時間約 64.5 秒);load 60 到 100 時 123 秒。edit-run是 80、82、92 秒。除了已有timeout檔的merge-completeness(470 到 663 秒),沒有別的 suite 超過 60 秒;次高的是mention-markdown(35 到 48 秒)、spec-change(38 秒)、actionability-gate(30 到 38 秒)、correct-flow(33 到 35 秒)。正文舉例的verify-gate三次都不到 30 秒。actionability-gate單獨跑 193 秒、mention-markdown168 秒,是平常的四到五倍。edit-run在 20 秒時被timeout終止,結束碼是 124,紀錄裡沒有任何失敗的檢查,也沒有摘要行。scripts/run-all-tests.sh把 124 以上的結束碼記成TIMEOUT(<秒數>s),並算進 failed。edit-run為什麼吃 CPU:它把idd-edit的每個步驟區塊各放進一個全新的 zsh 與 bash 執行,每一步再呼叫一次 Python helper(suite 檔頭寫明「one fresh shell per block」)。時間花在啟動行程上,這在 macOS 上本來就慢(runner 檔頭對merge-completeness記的是同一件事,#399)。runner 已經有對應的機制:suite 目錄裡的
timeout檔,與預設值取較大者(run-all-tests.sh第 54 到 58 行,#399 加的,run-all-tests-self有測試)。在這張之前只有merge-completeness有這個檔。更正於 2026-11-13:執行時間隨負載拉長但沒有簡單的比例,量到的數字在本段;正文記的那次失敗沒有重現
Existing work
unknown:查詢已 merge 的 PR 時到達上限(100 筆),更早的沒有檢查到。open 的 PR 與 branch 沒有引用這張的。
Impact
plugins/issue-driven-dev/scripts/tests/edit-run/timeout(新檔)、plugins/issue-driven-dev/scripts/tests/run-all-tests-self/test.sh(加檢查)、plugins/issue-driven-dev/scripts/run-all-tests.sh(檔頭的說明加一句)、plugins/issue-driven-dev/CHANGELOG.md。ci.command設成本機指令的 repo(逾時會擋住 push 或 merge)。GitHub 上的 CI 不受影響。Strategy
時限取 1800 秒。依據是維護者的決定(可以給寬,秒數由實作的人取):以 64.5 秒的 CPU 時間估算,1800 秒撐得住負載到核心數的 28 倍左右,也就是 runner 檔頭對
merge-completeness寫的「load 500」那種情況。只給edit-run:量到的資料裡沒有別的 suite 在正常情況超過 60 秒。run-all-tests-self檢查edit-run目錄有timeout檔,照 runner 的讀法取出的數字不小於 900(預設時限的 5 倍)plugins/issue-driven-dev/scripts/tests/edit-run/timeout,內容1800run-all-tests.sh檔頭講timeout檔的那一段加一句edit-run的情況與 [bug] edit-run suite is killed by the 180 s per-suite limit when the machine is busy #508[Unreleased]的 Fixed 條目run-all-tests-self與整套測試Conflict Class
A_parallel_safe
四個檔案各自獨立,沒有共享的可變資源。CHANGELOG 的
[Unreleased]與其他進行中的 PR 會改到同一段,所以這一批是一張一張依序做。Complexity
Simple
Layer 1 未命中(改的是測試設定與檢查,不是純文件);Layer 2 未命中(不新增對外介面)。Layer P 沒有訊號:檔案之間沒有順序依賴,做法只有一種(runner 既有的
timeout檔)。Hard-gate: not triggered — 估計動 4 個檔(
edit-run/timeout、run-all-tests-self/test.sh、run-all-tests.sh、CHANGELOG.md),不動任何被其他檔案引用的共用抽象;runner 讀timeout檔的邏輯不改。Risks
edit-run真的卡住時,本機要等 30 分鐘才會被砍。GitHub 上的testsjob 自己的時限是 20 分鐘(tests.yml),會先到;那時整個 job 被取消,runner 的摘要表印不出來。merge-completeness的 3600 秒已經是這樣。Residue
(none)
Vagueness Pre-check
edit-run一個timeout檔),留下的只有數字,而維護者已決定由實作的人取。edit-run有自己的時限、runner 會採用它;「要不要連其他 suite 一起給」由量到的資料回答(沒有別的超過 60 秒)。Sister Concerns Filed (mid-diagnose)
Skipped: (a) unactionable observation — GitHub 的
testsjob 時限(20 分鐘)比merge-completeness的 suite 時限(3600 秒)短,卡住時會先被 job 的時限取消。這是既有的狀況,沒有另開 issue。edit-run的時限最後定為 480 秒,比 job 的時限短,不在此列。更正於 2026-11-13:job 的時限比 suite 的時限短,只有 merge-completeness 如此;edit-run 的時限是 480 秒
kiki830621 commentedon Nov 12, 2026
📊 For Reviewer / Collaborator
現在:已結案。
edit-run有了自己的時限(480 秒)與對應的檢查,PR #520 合併成005531b(Closing Summary)。Blocking:無。
你該做什麼:無。後續在 #518 與 #519。
last-updated by idd-close at → closed, 2026-11-12
kiki830621 commentedon Nov 12, 2026
Implementation Plan
Spec plan: no behaviour change (c)
這張只改測試與測試的設定:
edit-run的timeout檔,以及run-all-tests-self的一個檢查。另外有 runner 檔頭的一句註解與 CHANGELOG。runner 讀timeout檔的程式不改,沒有任何 skill、script、hook、rule 的行為因此不同。plugins/issue-driven-dev/scripts/tests/run-all-tests-self/test.sh:加一個檢查,edit-run目錄有timeout檔,照 runner 的讀法(只取數字)取出的值不小於 900。先確認它失敗plugins/issue-driven-dev/scripts/tests/edit-run/timeout,內容1800plugins/issue-driven-dev/scripts/run-all-tests.sh:檔頭講timeout檔的那一段加一句edit-run的情況(只改註解)plugins/issue-driven-dev/CHANGELOG.md:[Unreleased]加 Fixed 條目run-all-tests-self與整套測試kiki830621 commentedon Nov 12, 2026
Implementation Complete
Spec: no behaviour change
屬於契約第 2 步的 (c):只改測試與測試的設定。
edit-run/timeout是 runner 讀的 suite 設定,run-all-tests-self/test.sh是測試,run-all-tests.sh只改檔頭的註解,CHANGELOG 是文件。runner 讀timeout檔的程式沒有動。Checklist (synced from TaskList)
plugins/issue-driven-dev/scripts/tests/run-all-tests-self/test.sh:加四個檢查(edit-run有timeout檔;檔案裡只有一個數字;數字不小於 900;runner 套用這個檔)。加檔案之前四個都失敗 → commitd125e5cplugins/issue-driven-dev/scripts/tests/edit-run/timeout,內容1800→ commitd125e5cplugins/issue-driven-dev/scripts/run-all-tests.sh:檔頭講timeout檔的那一段加一句edit-run的情況(只改註解)→ commitd125e5cplugins/issue-driven-dev/CHANGELOG.md:[Unreleased]加 Fixed 條目 → commitd125e5crun-all-tests-self與整套測試 → 結果在下面Changes
d125e5cfix: give the edit-run suite a time limit of its own ([bug] edit-run suite is killed by the 180 s per-suite limit when the machine is busy #508)Files Changed
先失敗的檢查與測試結果
timeout檔之前,run-all-tests-self新增的四個檢查都失敗(另外 9 個通過);加了之後 13 個全過。edit-run/timeout檔交給 runner:一個要跑 3 秒的假 suite,在全域時限 1 秒之下,靠這個檔通過。1800。d125e5c上跑整套測試:73 個 suite、0 個失敗(edit-run84 秒);spectra-archive-post-ic141 項通過。Scope Compliance
timeout檔:量到的資料裡,除了merge-completeness,沒有別的在正常情況超過 60 秒。[Unreleased]條目。Sister Bugs Filed (mid-impl)
(none surfaced)
Next: verification pending
kiki830621 commentedon Nov 12, 2026
Verify: #508
第 1 輪。審查範圍是這條 branch 的一個 commit。
Engine
pai-ensemble 2.26.0 (canonical #207) — 4 IDD lenses + DA + Codex (gpt-6.1-sol, effort xhigh), model: opus
6 / 6 reviewers completed
Aggregate
PASS — 0 blocking, 4 in-scope fix, 1 follow-up
Reviewed:
1637fb661921a983dfbb3ceb76fc4b6a7696dc79..d125e5c451d4e425ce7ea96f09c9aa54d166de06要求覆蓋率
3 / 3 requirements addressed
Findings(合併後)
run-all-tests-self新加的檢查在沙盒裡建了一個名叫edit-run的假 suite。runner 把每個 suite 的輸出寫到系統暫存目錄下、只以 suite 名稱命名的檔案(run-all-tests.sh第 62 行),所以巢狀的那次 runner 會把真的edit-run的紀錄蓋成空檔。整套測試裡edit-run排在run-all-tests-self前面,跑完之後真的紀錄就沒了。#508 的 Actual 正是「要去讀那個 suite 的紀錄才知道沒有檢查失敗」。既有的假 suite(ok、bad、hang、slow)都不與真的 suite 同名,這個衝突是這次加的。testsjob 自己的時限(20 分鐘,tests.yml)長。改之前edit-run在 CI 上卡住時,runner 在 180 秒砍掉它、照樣印出摘要表;改之後 job 的時限先到,整個 job 被取消,沒有摘要。這對edit-run是這次的改動造成的。CHANGELOG 的條目沒有提這個代價。run-all-tests-self原本只用沙盒裡的假 suite,現在寫死了真的edit-run/timeout的路徑。edit-run改名或移除時,runner 的自我測試會因為與 runner 無關的原因失敗。檢查可以放在edit-run自己的test.sh。### Impact說 GitHub 上的 CI 不受影響;Sister Concerns 那一行把「job 的時限比 suite 的時限短」說成既有的狀況、無法處理。對merge-completeness是既有的,對edit-run是 1800 秒造成的,而且秒數本來就由實作的人取。同一則的### Risks寫的是對的。run-all-tests.sh第 62 行)。這次只改了那個檔的檔頭註解,第 62 行沒有動;這是既有的狀況。查證
第 1 列重現過:在
d125e5c上跑完整套測試,真的edit-run的紀錄檔是 0 個位元組。第 2 列對照tests.yml的timeout-minutes: 20。第 3 列讀新加的檢查。第 4 列對照 Diagnosis 留言的三段。第 5 列讀 runner 第 62 行與這次的 diff。requirements 這位 reviewer 沒有意見。regression 確認了宣告:runner 只改註解,其餘是測試設定、測試、CHANGELOG 與附件清單,沒有行為改動。logic 逐項看過新加的四個檢查,沒有發現會空過的情況。Codex 只做靜態審閱,沒有執行測試,沒有發現要修的問題。
規格對照(#480):宣告是
no behaviour change,連結檢查ok,封存檢查pass。驗證期間另外量到一件事:機器的 load average 到 150 左右時,
actionability-gate單獨跑要 193 秒、mention-markdown要 168 秒,也就是負載到這個程度,別的 suite 會先超過預設的 180 秒。這支持第 2 列的說法:edit-run的時限不必長到 1800 秒。Scope Check
diff 只有 Diagnosis 的 Strategy 列的四個檔與附件清單,沒有範圍外的改動。diff 之外的寫入只有 Diagnosis 與 Implementation Complete 裡的兩段 audit 紀錄,第 4 列就是對其中一段的意見。
接下來
第 1 列是 MEDIUM,所以這一輪不算乾淨。修正輪會做四件事:檢查搬到
edit-run自己的test.sh,假 suite 改用不與真 suite 同名的名字,並加一個檢查確認巢狀的 runner 不動真的紀錄;時限改短到 CI 上 runner 仍來得及回報的範圍;CHANGELOG 跟著改;新的 Implementation Complete 寫明 Diagnosis 裡以 1800 秒寫的幾段已被取代。之後跑第 2 輪。kiki830621 commentedon Nov 12, 2026
Follow-up Findings Filed
verify 第 1 輪(報告)的第 5 列不在這張的範圍內,另開了 issue:
Filed: #518
kiki830621 commentedon Nov 12, 2026
Implementation Complete
Spec: no behaviour change
這一則是 verify 第 1 輪之後的版本,取代先前那一則。仍屬於契約第 2 步的 (c):只改測試與測試的設定。現在的 diff 是
edit-run/timeout(suite 設定)、edit-run/test.sh(測試)、run-all-tests.sh檔頭的註解、CHANGELOG 與附件清單。run-all-tests-self/test.sh與 main 相同。Checklist (synced from TaskList)
plugins/issue-driven-dev/scripts/tests/edit-run/test.sh開頭加六個檢查:有timeout檔;檔案裡只有一個數字;不小於 360;不大於 600;假 suite 的名字不是真的 suite;runner 套用這個檔 → commit66c0cd6(第一版放在run-all-tests-self,commitd125e5c,修正輪搬走)plugins/issue-driven-dev/scripts/tests/edit-run/timeout,內容480→ commitd125e5c、66c0cd6plugins/issue-driven-dev/scripts/run-all-tests.sh:檔頭講timeout檔的那一段加一句edit-run的情況(只改註解)→ commitd125e5cplugins/issue-driven-dev/CHANGELOG.md:[Unreleased]加 Fixed 條目 → commitd125e5c、66c0cd6edit-run、run-all-tests-self與整套測試 → 結果在下面Changes
d125e5cfix: give the edit-run suite a time limit of its own ([bug] edit-run suite is killed by the 180 s per-suite limit when the machine is busy #508)66c0cd6fix: keep the edit-run limit under the CI job limit and check it in the suite itself ([bug] edit-run suite is killed by the 180 s per-suite limit when the machine is busy #508)Files Changed
修正輪改了什麼(verify 第 1 輪的四列)
edit-run自己的test.sh,沙盒裡的假 suite 改叫er-limit,並加一個檢查:假 suite 的名字不能是真的 suite。runner 只用 suite 名稱命名紀錄檔,這個根本原因記在 [bug] run-all-tests.sh names each suite log in the system temp dir by suite name only, so runs overwrite each other (follow-up finding from #508) #518。edit-run卡住時 runner 仍來得及在 job 被取消之前回報並印出摘要。run-all-tests-self/test.sh改回原樣。### Impact說的「GitHub 上的 CI 不受影響」成立。Diagnosis 的### Strategy(時限取 1800 秒)、### Risks第一點與 Sister Concerns 那一行是以 1800 秒寫的,由這一則取代:「job 的時限先到」現在只剩merge-completeness,那是既有的狀況。先失敗的檢查與測試結果
timeout換成1800、180、480 s各試一次,分別被上限、下限、「只有一個數字」三個檢查抓到,試完改回480。edit-run整個 suite:248 項通過(原有 242 項加這六項)。66c0cd6上跑整套測試:73 個 suite、0 個失敗;spectra-archive-post-ic141 項通過。當時機器負載高(load 40 到 200),所以這次把預設的每個 suite 時限放寬到 600 秒來跑;實際上除了merge-completeness(1694 秒,它自己的時限是 3600 秒),最慢的是edit-run的 107 秒,沒有 suite 超過 180 秒。edit-run在 load 約 20 時 84 秒(CPU 時間約 65 秒),load 60 到 100 時 123 秒。load 約 150 時actionability-gate單獨跑 193 秒、mention-markdown168 秒,也就是到那個負載,整套測試已經會因為別的 suite 超過預設時限而失敗。Scope Compliance
edit-run/timeout、edit-run/test.sh、run-all-tests.sh(只有註解)、CHANGELOG.md。edit-run/test.sh而不是run-all-tests-self/test.sh;時限是 480 秒而不是 1800 秒。timeout檔。[Unreleased]條目。Sister Bugs Filed (mid-impl)
(none surfaced)
Diagnosis 的 Sister Concerns 那一行是以 1800 秒寫的。時限改成 480 秒之後,它對
edit-run不再適用(見上面「修正輪改了什麼」第 4 點)。verify 第 1 輪的 follow-up 已開成 #518,記在另一則留言。Next: verification pending
kiki830621 commentedon Nov 12, 2026
Verify: #508
第 2 輪(修正輪之後)。審查範圍是整條 branch(兩個 commit)。
Engine
pai-ensemble 2.26.0 (canonical #207) — 4 IDD lenses + DA + Codex (gpt-6.1-sol, effort xhigh), model: opus
6 / 6 reviewers completed
Aggregate
PASS — 0 blocking, 6 in-scope fix, 1 follow-up
Reviewed:
1637fb661921a983dfbb3ceb76fc4b6a7696dc79..66c0cd61286cb4932f00dfcf78b282e87a554f00要求覆蓋率
3 / 3 requirements addressed
Findings(合併後)
### Strategy、### Risks與 Sister Concerns,只由後面的 Implementation Complete 說明已被取代,原文沒有改。只讀 Diagnosis 的人或 agent 會讀到舊的時限與舊的判斷。er-limit的),每跑一次留下一個檔。原因與 #518 相同,這個 diff 不必改。actionability-gate單獨跑就超過預設的 180 秒。那是同一類問題,應該寫成略過並附理由,或開 issue。查證
第 1、6 列讀
edit-run/test.sh新加的那一段。第 2 列查了最近六次 CI 執行裡那一步的時間(358、472、373、477、515、532 秒)。第 3 列對照 CHANGELOG、Diagnosis 與修正輪量到的數字。第 4 列讀 Diagnosis 留言,三段都還是原文。第 5 列在跑過edit-run之後看到那個紀錄檔。第 7 列對照第 2 則 Implementation Complete 的兩段。第 1 輪的四列都已處理:假 suite 改名並加了同名檢查(第 1 列)、時限改成 480 秒(第 2 列)、
run-all-tests-self改回原樣(第 3 列)、新的 Implementation Complete 說明 Diagnosis 被取代的部分(第 4 列,這一輪的第 4 列認為這樣還不夠)。requirements 這位 reviewer 沒有意見。regression 確認宣告成立:runner 只改註解,其餘是測試設定、測試、CHANGELOG 與附件清單。Codex 只做靜態審閱,沒有執行測試,沒有發現要修的問題。
規格對照(#480):宣告是
no behaviour change,連結檢查ok,封存檢查pass。Proposed Corrections
這一輪是無人值守,下面兩項只列出、沒有執行。第 4 列提到的
### Strategy與### Risks是實作途中換掉的做法,不是寫錯的敘述,這類內容要不要寫回 Diagnosis 記在 #474。/idd-edit comment:6813952563 --correct --section '### Root Cause / Analysis' --body-file '<執行時建的檔>'merge-completeness成立;edit-run最後的時限是 480 秒/idd-edit comment:6813952563 --correct --section '### Sister Concerns Filed (mid-diagnose)' --body-file '<執行時建的檔>'第 1 項的替換內容
我認為 root cause 是:
edit-run的執行時間大半是 CPU 時間,而 runner 的時限是牆上時間。機器忙的時候它會跑得比較久,接近或越過預設的 180 秒。拉長多少沒有簡單的比例,量到的數字在下面。證據(2026-11-12,18 核的 Mac):
edit-run:load 約 20 時 84 秒(user 39.78、sys 24.69,CPU 時間約 64.5 秒);load 60 到 100 時 123 秒。edit-run是 80、82、92 秒。除了已有timeout檔的merge-completeness(470 到 663 秒),沒有別的 suite 超過 60 秒;次高的是mention-markdown(35 到 48 秒)、spec-change(38 秒)、actionability-gate(30 到 38 秒)、correct-flow(33 到 35 秒)。正文舉例的verify-gate三次都不到 30 秒。actionability-gate單獨跑 193 秒、mention-markdown168 秒,是平常的四到五倍。edit-run在 20 秒時被timeout終止,結束碼是 124,紀錄裡沒有任何失敗的檢查,也沒有摘要行。scripts/run-all-tests.sh把 124 以上的結束碼記成TIMEOUT(<秒數>s),並算進 failed。edit-run為什麼吃 CPU:它把idd-edit的每個步驟區塊各放進一個全新的 zsh 與 bash 執行,每一步再呼叫一次 Python helper(suite 檔頭寫明「one fresh shell per block」)。時間花在啟動行程上,這在 macOS 上本來就慢(runner 檔頭對merge-completeness記的是同一件事,#399)。runner 已經有對應的機制:suite 目錄裡的
timeout檔,與預設值取較大者(run-all-tests.sh第 54 到 58 行,#399 加的,run-all-tests-self有測試)。在這張之前只有merge-completeness有這個檔。第 2 項的替換內容
Skipped: (a) unactionable observation — GitHub 的
testsjob 時限(20 分鐘)比merge-completeness的 suite 時限(3600 秒)短,卡住時會先被 job 的時限取消。這是既有的狀況,沒有另開 issue。edit-run的時限最後定為 480 秒,比 job 的時限短,不在此列。Scope Check
diff 是
edit-run/timeout、edit-run/test.sh、run-all-tests.sh的檔頭註解、CHANGELOG 與附件清單,沒有範圍外的改動。diff 之外的寫入是 Diagnosis 與兩則 Implementation Complete 裡的 audit 紀錄,以及 #518;第 4、7 列是對前者的意見,#518 的內容與紀錄一致。接下來
這一輪沒有 MEDIUM 以上的項目。In-scope 的六列都是 LOW 或 INFO,不在這條 branch 上再改(合併的要是審過的 commit),合成一張 follow-up issue。第 5 列補記到 #518。
kiki830621 commentedon Nov 12, 2026
Follow-up Findings Filed
verify 第 2 輪(報告):
Filed: #519
fix: give the edit-run suite a time limit of its own (#508) (#520)
kiki830621 commentedon Nov 12, 2026
Closing Summary
Problem
edit-run這個 suite 在機器忙的時候會超過scripts/run-all-tests.sh預設的 180 秒被砍掉。整套測試因此回報 1 個 suite 失敗,但沒有任何一項檢查真的失敗,要去讀那個 suite 的紀錄才看得出來。Root Cause
edit-run的執行時間大半是 CPU 時間(約 65 秒):它把idd-edit的每個步驟區塊各放進一個全新的 shell 執行。runner 的時限是牆上時間,機器忙的時候它跑得比較久:load 約 20 時 84 秒,load 60 到 100 時 123 秒。runner 本來就有給個別 suite 放寬時限的機制(suite 目錄裡的timeout檔),edit-run沒有這個檔。正文記的那次在 180 秒被砍沒有重現。當時 load 約 50,而且另一次整套測試同時在同一個工作樹跑;Diagnosis 用「CPU 時間乘以負載倍數」推出 180 秒的那個論證,後來的量測不支持。
Solution
plugins/issue-driven-dev/scripts/tests/edit-run/timeout:這個 suite 自己的時限,480 秒。edit-run/test.sh開頭加六個檢查:檔案存在;只有一個數字;不小於 360;不大於 600;沙盒裡的假 suite 不與真的 suite 同名;runner 會套用這個檔。run-all-tests.sh只改檔頭的註解;CHANGELOG 加[Unreleased]的條目。版號沒有動。no behaviour change(只改測試與測試設定)。testsjob 自己的 20 分鐘還長,edit-run在 CI 上卡住時整個 job 會先被取消、印不出摘要。Diagnosis 的### Strategy、### Risks與 Sister Concerns 是以 1800 秒寫的,以這裡與第 2 則 Implementation Complete 為準。Verification
edit-run紀錄蓋成空檔;四項都在修正輪處理。66c0cd6上本機整套測試 73 個 suite、0 個失敗,spectra-archive-post-ic141 項通過(當時機器負載高,本機 runner 的預設時限放寬到 600 秒來跑;除了merge-completeness,最慢的是edit-run的 107 秒)。edit-run248 項通過。新的檢查先失敗過,錯的時限值(1800、180、帶文字)都被抓到。suites)通過。合併後 main 的005531b與審過的66c0cd6是同一棵 tree;main 上的 CI 在寫這則摘要時還在跑。pass(沒有要封存的 change)。Changes
PR #520 以 squash 合併成
005531b。branch 上的兩個 commit:d125e5cfix: give the edit-run suite a time limit of its own66c0cd6fix: keep the edit-run limit under the CI job limit and check it in the suite itself改到的檔案:
plugins/issue-driven-dev/scripts/tests/edit-run/timeout(新檔)、scripts/tests/edit-run/test.sh、scripts/run-all-tests.sh(只有註解)、CHANGELOG.md,以及.claude/.idd/attachments/issue-508/_manifest.json;共 5 個檔案。沒有在這張做的
Closing Follow-ups Filed
Residue Acknowledgement
residue declared as
(none)at diagnose time — no acknowledgement neededDoc-sync 檢查
→ doc-sync: 8 files checked, no staleness detected
Distribution Sync
issue-driven-dev;plugin 與 marketplace 在同一個 repo)[Unreleased],plugin.json與marketplace.json仍是 4.0.1。發版要先有一個升版號的 commit,版號由維護者決定;這次只改測試,不影響裝了 plugin 的人kiki830621 commentedon Nov 12, 2026
📝 Note
Source: 維護者 2026-11-13 的決定(紀錄在 #519)
Date: 2026-11-13
論述
結案摘要寫著 verify 第 2 輪列的兩項更正「沒有執行」。維護者在 2026-11-13 決定套用,兩項已經就地更正在這張的 Diagnosis 裡。結案摘要是當時的紀錄,沒有改:它提到 Diagnosis 的那個推論,以及「沒有執行」,說的都是更正之前的狀況。這張沒有 reopen,因為這是更正紀錄,不是重啟工作。
Details
### Root Cause / Analysis:換成第 2 輪報告公布的替換內容,逐字。後來的量測不支持的那個推論拿掉了,補上量到的數字,並寫明正文記的那次失敗沒有重現。### Sister Concerns Filed (mid-diagnose):同一份報告公布的替換內容。job 的時限比 suite 的時限短,只有merge-completeness如此;edit-run的時限是 480 秒。### Strategy與### Risks仍是以 1800 秒寫的。那是實作途中換掉的做法,不是寫錯的敘述,以結案摘要與第 2 則 Implementation Complete 為準。chore: release 4.1.0