Repository navigation
Description
Problem
#546 記的是症狀:issue 開在 repo A(有 GitHub remote),程式與 Spectra 規格在另一個本機 git repo B,B 刻意沒有任何 remote(例如裡面有不能上 GitHub 的資料)。/idd-close Step 1.57 一律 git fetch origin -- <default>,在 B 上永遠失敗、回 error,所以這種佈局裡宣告了 **Spec**: change <name> 的 issue 都無法結案。
這張記的是修法的設計決定:放寬只能靠設定檔明確打開,不做自動判斷。
#546 的 Expected 第 1 項舉的例子是「沒有任何 remote 時,以本機預設 branch 為準」——那是自動判斷。自動判斷的問題是它在別的專案裡也會生效:一個 repo 只是 remote 暫時設錯、或 clone 時漏了 remote,gate 就會安靜地改用本機 ref,而本機的預設 branch 可能跟遠端不同步。使用者選了明確設定的做法(2026-11-14)。
Type
feature
Proposal
在 issue 所在 repo 的 IDD 設定加一個欄位,以程式 repo 相對於設定檔所在目錄的路徑為 key,例如:
{
"spec_archive": {
"projects/sub-repo": { "ref": "local", "branch": "master" }
}
}ref: "local":Step 1.57 對branch指的本機 branch 跑spec-change.py archived --ref <branch>,不 fetch。branch必填:沒有 remote 就沒有origin/HEAD可讀,HEAD是當前 branch 不一定是預設 branch,所以不猜,由設定寫明。- 設定寫在 issue 所在 repo 的設定檔,不另放一份在程式 repo:程式 repo 原本沒有 IDD 設定,多一份沒有
github_repo的檔會讓 walk-up 先停在它。key 是程式 repo 的主工作樹(linked worktree 換算成主工作樹)相對於設定檔所在目錄(.claude/的上一層)的路徑;./sub/、sub視為同一路徑,兩個條目指向同一路徑是錯誤,路徑當不了 key 時不借用.條目;issue repo 自己的檢查不受影響。讀不了的設定檔當成沒有條目。連結檢查的起點認#N與 issue repo 自己的owner/repo#N(程式 repo 的 commit 這樣寫)。
更正於 2026-11-14:設定改寫在 issue 所在 repo、以程式 repo 路徑為 key(決定見 comment 6869531838);key 與讀取規則照第 1、2 輪 verify 修正(comment 6871443624、6872782744)
- 只在該 repo 沒有任何 remote 時才接受這個設定;repo 有 remote 卻設了
ref: "local",回error並寫明原因。這樣 repo 之後加了 remote,放寬不會悄悄留著。 - 沒設這個欄位時行為完全不變(照現在 fetch origin、失敗就
error)。例外:程式 repo 完全沒有 remote 時改成不 fetch、直接error(結果相同;原本 git 會把名為origin的本機路徑當成 remote,第 3 輪 verify)。 - 輸出要寫明是用本機 ref 判定的,例如:
→ spec archive gate: pass (local ref master@<short-sha>; repo has no remote; spec_archive.ref=local)。
Expected
- Step 1.57 讀
spec_archive設定;ref: "local"且 repo 沒有 remote 時,用branch的本機 ref 判定封存,輸出寫明用的是本機 ref 與 commit - repo 有 remote 卻設了
ref: "local"→error,原因寫明 - 沒設欄位時行為與現在相同(既有測試不改;完全沒有 remote 時改成不 fetch,結果同樣是
error) - 同一個設定套用到 idd-close Step 1.57: 程式在沒有 remote 的 repo 時,spec archive gate 永遠回 error、無法結案 #546 列的另外兩處:Step 1.5 在本機模式下略過程式 repo 的 fetch、只查 issue repo 上的 PR,輸出寫明略過了 branch 查詢;
references/spec-wrapper.md第 5 步連結檢查的起點依序取程式 repo 的idd-N-baselinetag、branch 上第一個引用#N(左右邊界同pr-issue-matching.md)或 issue repo 自己的owner/repo#N的 commit 的父 commit,兩者都沒有就error -
references/config-protocol.md補spec_archive欄位說明(含「只在沒有 remote 時接受」的理由) -
scripts/tests/spec-close-gate/test.sh與新的scripts/tests/spec-archive-local/test.sh加案例:沒有 remote + 設定 → pass 並印出本機 ref;沒有 remote 沒設定 → error 且不 fetch;有 remote + 設定 → error
更正於 2026-11-14:第 4、6 項照第 2、3 輪 verify 修正(comment 6872782744、6875253859);第 3 項與 Proposal 註明沒有 remote 時的例外(第 4 輪 verify,comment 6879033245)
Out of scope
idd-alldirect-commit 的推送路徑與close-stage.py的 CODEOWNERS 檢查也會 fetch origin,但推送本來就需要 remote,不在這張。- 自動偵測「沒有 remote」並放寬(見 Problem 第三段)。
Impact
刻意不放 remote 的本機子專案,只要用 Spectra 寫規格,每一張 issue 都卡在 /idd-close。目前只能讓 issue 開著,或手動結案、跳過這道 gate。
Refs #546
Clarity Surface(idd-clarify run 2026-11-14T01:32:08Z)
| Type | Source | Question for you | Status |
|---|---|---|---|
| ambiguity | "設定從 --cwd 往上找(config-protocol 的 walk-up)" |
spec_archive 要寫在程式 repo B 自己的設定檔(B 原本可能沒有 IDD 設定、也沒有 github_repo),還是寫在 issue 所在 repo A 的設定檔裡、以 B 的相對路徑為 key? |
resolved @ 2026-11-14 (reason: 照建議定案,見 comment 6869531838) |
| ambiguity | "Step 1.5 check-existing-work.sh --cwd <B> 的 git fetch failed" |
設成 ref: "local" 時,Step 1.5 查既有 PR 與 branch 是跳過 B 的 fetch、只查 A 上的 PR,還是照樣停下? |
resolved @ 2026-11-14 (reason: 照建議定案,見 comment 6869531838) |
| missing-context | "references/spec-wrapper.md 第 5 步連結檢查的 SPEC_BASE 起點" |
本機模式沒有「還沒推的 commit」這條界線(merge-base HEAD <branch> 在 direct-commit 時就是 HEAD),連結檢查的起點要用什麼,例如這張 issue 的 baseline commit? |
resolved @ 2026-11-14 (reason: 照建議定案,見 comment 6869531838) |
Current Status
Phase: closed
Last updated: 2026-11-15 by idd-close
Key Decisions
- 設定寫在 issue 所在 repo、以程式 repo 主工作樹的路徑為 key;只在程式 repo 沒有任何 remote(url、pushurl、vcs 有設定,不論值;舊式 remotes/branches 檔)時接受
- Step 1.5 本機模式略過程式 repo 的 branch 查詢(含預設 branch),只查 issue repo 的 PR
- 連結檢查起點:baseline tag → 第一個引用
#N或 issue repo 的owner/repo#N的 commit 的父 commit → error - 沒有 remote 又沒有條目時不 fetch,停下說明;
has_remote正好是 true 才 fetch - 讀不了的設定檔與
"spec_archive": null當成沒有條目;重複鍵是 error,parse 時判定 - git 沒記錄主工作樹的 linked worktree(git 目錄不叫
.git的 separate git dir、submodule)不猜 key;bare 主 repo 的 linked worktree 以自己的路徑為 key - 五個 Spectra change 已封存(a263daf、81e37d3、cb12565、78dcf7b、7ab3088)
- 第 4 輪 verify:PASS、0 Blocking;MEDIUM 的 In-scope fix 在 e951479 修完,maintainer 看過後指示合併
- PR feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (#547) #555 squash 合併為 d42cf15;結案摘要見 comment 6887614273
Scope Changes
- 新增 requirement「spec-change.py reads the repository that holds --cwd」:top level 結尾有空白時讀錯目錄,是 idd-close spec archive gate:加 spec_archive 設定,讓刻意沒有 remote 的程式 repo 以本機預設 branch 判定封存 #547 之前就有的問題(第 3 輪 Blocking)
- 第 1–4 輪 verify 列出、不在範圍內的改進合成 spec_archive follow-ups: config ownership check, existing-work noise and Step 1.55 fetch in local mode #552
Blocking
- (none)
Tasks
- 1.1
spec_archive的解析:依 requirement「A repository without a remote can opt into its local default branch」的 Example「how a spec_archive entry resolves」,新 suite spec-archive-local 對spec-change.py archive-ref跑 Example 十一列,測試檔帶標記 spec-example: spec-on-every-issue / how a spec_archive entry resolves。驗證:改 spec-change.py 之前失敗(子命令不存在)。 - 1.2 本機模式的連結檢查起點:依同一條 requirement 的 Example「where the local link check starts」,spec-archive-local 對
spec-change.py link-base跑 Example 五列,帶標記 spec-example: spec-on-every-issue / where the local link check starts。驗證:改之前失敗。 - 1.3 封存檢查的本機模式:依 requirement「Close requires the issue's change to be archived」的 Example「the close gate reads the default branch」新增的三列,spec-close-gate 照 SKILL.md 原文執行 Step 1.57 的區塊(有設定、沒有 remote 的 repo),帶既有標記。驗證:改 SKILL.md 之前,新的三列失敗;原有各列照舊通過。
- 1.4 略過 branch 查詢:依 requirement「The helper can skip the branch lookup」的 Example「the branch lookup can be skipped」,check-existing-work suite 跑三列,並檢查 idd-close Step 1.5 在本機模式帶
--skip-branches,帶標記 spec-example: idd-existing-work-lookup / the branch lookup can be skipped。驗證:改之前失敗。 - 2.1
spec-change.py加archive-ref與link-base子命令(docstring 一併更新)。驗證:1.1、1.2 通過;spec-change suite 照舊通過。 - 2.2
check-existing-work.sh加--skip-branches。驗證:1.4 的 helper 部分通過;check-existing-work 原有各項照舊通過。 - 3.1 idd-close Step 1.57:宣告了 change 時先問
archive-ref,local用回傳的 commit 並印出本機 ref,remote照舊 fetch,error停下。驗證:1.3 通過;spec-close-gate 原有的文字檢查照舊通過。 - 3.2 idd-close Step 1.5:
archive-ref回local時帶--skip-branches並印出說明。驗證:1.4 的 skill 部分通過。 - 3.3 spec-wrapper.md 第 5 步:先問
link-base,ok用它的起點、remote照舊、error停下。驗證:spec-wrapper-contract suite 照舊通過。 - 3.4 config-protocol.md 加
spec_archive欄位一節(key 的算法、只在沒有 remote 時接受的理由、找不到設定時照舊)。驗證:git diff 只有新增。 - 4.1 CHANGELOG 的 Unreleased 加 Added 條目(idd-close spec archive gate:加 spec_archive 設定,讓刻意沒有 remote 的程式 repo 以本機預設 branch 判定封存 #547)。驗證:已發布版本的條目沒有改動。
- 4.2 跑 run-all-tests.sh 與連結檢查。驗證:結束碼都是 0,links 回 ok。
Commits
d42cf15feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (idd-close spec archive gate:加 spec_archive 設定,讓刻意沒有 remote 的程式 repo 以本機預設 branch 判定封存 #547) (feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (#547) #555)(squash;branch 上的 14 個 commit 見 PR feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (#547) #555)
Activity
kiki830621 commentedon Nov 14, 2026
🎯 Decision
決定
Clarity Surface 的三題照 Claude 提的建議定案:設定寫在 issue 所在 repo 的設定檔、以程式 repo 的相對路徑為 key;本機模式下 Step 1.5 跳過程式 repo 的 fetch、只查 issue repo 上的 PR;連結檢查的起點先用程式 repo 的 baseline tag,沒有就用第一個引用
#N的 commit 的父 commit,兩者都沒有就error。Rationale
第一題選 issue repo 的設定檔,是因為程式 repo 原本就沒有 IDD 設定:在它裡面放一份只有
spec_archive、沒有github_repo的檔,walk-up 找 target 時會先停在它,/idd-issue、/idd-clarify這些 skill 的 repo 解析就可能拿到空值。以路徑為 key 也解決原本擔心的問題:放在 issue repo 的設定裡,不會連 issue repo 自己的檢查一起放寬,因為只有 key 對上的那個子 repo 才適用。比對用程式 repo 的git rev-parse --show-toplevel相對於設定檔所在目錄(.claude/的上一層)的路徑,只認完全相同,不做前綴比對。第二題選略過 fetch 而不是停下:程式 repo 沒有 remote,就不可能有遠端 branch 或 PR 帶著它的 commit,停下只會讓每一張 issue 都卡在 Step 1.5,卻擋不到任何真實的衝突。issue repo 上的 PR 照查,因為有人可能在那裡開了引用同一張 issue 的 PR。輸出要寫明「本機模式,略過程式 repo 的 branch 查詢」,讓讀的人知道這一項沒有查。
第三題的順序是「明確記下的起點優先,推出來的其次,推不出來就不猜」。baseline tag 是開工時留下的錨點,最可靠;沒有 tag 時,IDD 要求每個 commit 引用
#N,所以第一個這樣的 commit 的父 commit 就是開工前的狀態。比對#N要用單字邊界,免得#14對上#142。兩者都找不到時回error並要求明確給起點,不退回merge-base:direct-commit 時那是 HEAD,範圍會是空的,檢查會在什麼都沒看的情況下通過。Related
#546、Clarity Surface 第 1–3 列
kiki830621 commentedon Nov 14, 2026
Diagnosis
Type
feature
Root Cause / Analysis
需求拆解(照正文 Proposal、Expected,以及 comment 6869531838 的三項決定):
skills/idd-close/SKILL.mdStep 1.57):宣告了 change 的 issue 一律gh repo view取預設 branch 名、git -C <cwd> fetch origin -- <branch>、對FETCH_HEAD跑spec-change.py archived。fetch 失敗就是error。這一段要分兩條路:設定指定本機模式時,改用本機 branch 的 commit;沒設定時照舊。git rev-parse --show-toplevel往上找第一份 IDD 設定(.claude/.idd/local.json,舊路徑.claude/issue-driven-dev.local.json),讀spec_archive[<程式 repo 相對於設定檔所在目錄的路徑>]。只認完全相同的 key。條目存在但程式 repo 有任何 remote →error;branch缺、不是字串、或本機沒有這個 branch →error。check-existing-work.sh):它對--cwd跑git fetch origin,失敗時 errors 加一筆git fetch failed,Step 1.5 的 fail-closed 比對只看 open PR 相關的錯誤,所以目前照常往下、但輸出裡帶著一筆錯誤。本機模式要讓 helper 略過 fetch 與 branch 列舉,不記成錯誤,改記一筆說明;open PR 的查詢照舊(查的是 issue 所在 repo)。references/spec-wrapper.md第 5 步):目前merge-base HEAD FETCH_HEAD。本機模式改成依序取程式 repo 的idd-<N>-baselinetag、本機 branch 上第一個訊息以單字邊界引用#<N>的 commit 的父 commit,兩者都沒有就error(不退回merge-base:direct-commit 時那是 HEAD,範圍是空的)。references/config-protocol.md加spec_archive欄位(含只在沒有 remote 時接受的理由、key 的算法)。把第 2、4 項的判斷放進
scripts/spec-change.py的新子命令,讓 Step 1.57、spec-wrapper 第 5 步、Step 1.5 共用同一份解析,不在三處各寫一份 bash。Existing work
unknown—check-existing-work.sh:merged PR list reached its limit (100); older merged PRs were not checked。open PR 與 branch 沒有找到引用 idd-close spec archive gate:加 spec_archive 設定,讓刻意沒有 remote 的程式 repo 以本機預設 branch 判定封存 #547 的。Impact
plugins/issue-driven-dev/scripts/spec-change.py、plugins/issue-driven-dev/scripts/check-existing-work.sh、plugins/issue-driven-dev/skills/idd-close/SKILL.md(Step 1.5、Step 1.57)、plugins/issue-driven-dev/references/spec-wrapper.md(第 5 步)、plugins/issue-driven-dev/references/config-protocol.md、openspec/specs/spec-on-every-issue/spec.md、openspec/specs/idd-existing-work-lookup/spec.md、plugins/issue-driven-dev/scripts/tests/spec-close-gate/test.sh、scripts/tests/spec-change/spec_archive條目的程式 repo;沒設的專案行為不變Strategy
spec-change.py新子命令:解析設定 → 回remote(沒有條目)、local(branch 與 commit)或error(條目在但有 remote、branch 缺或不存在、設定讀不了)spec-change.py新子命令:本機模式的連結檢查起點(baseline tag → 第一個引用#N的 commit 的父 commit →error),#N用單字邊界archived,輸出寫明local ref <branch>@<short sha>;其他照舊check-existing-work.sh加略過 fetch 的選項;Step 1.5 在本機模式帶這個選項,輸出寫明略過了 branch 查詢spec-wrapper.md第 5 步:本機模式取起點的寫法config-protocol.md加spec_archive欄位spec-on-every-issue封存檢查那條 requirement、idd-existing-work-lookup的 fetch 行為,每條加 Example#14不得對上#142Conflict Class
A_parallel_safe — 改的是 plugin 內的 script 與 skill 文件,沒有單寫者資源或 submodule。
Complexity
Spectra
Layer 2:新增一個寫在
config-protocol.md的設定欄位,是給之後使用者照著寫的設定契約。Layer 3:修改spec-on-every-issue的封存檢查(「fetch 失敗就停」那條 SHALL)與idd-existing-work-lookup兩份既有規格。同類的設定欄位 #252(sdd_bias)、#465(ci)也走 Spectra。Hard-gate: triggered — 同一個概念散佈到
spec-change.py、check-existing-work.sh、idd-close/SKILL.md、spec-wrapper.md、config-protocol.md與兩份規格(Spectra 優先,不另外升級)。Risks
error而不是悄悄沿用本機 ref。check-existing-work.sh被 idd-all、idd-implement、idd-diagnose、idd-close 共用:新選項預設關閉,其他呼叫端行為不變。Residue
(none)
Vagueness Pre-check
Sister Concerns Filed (mid-diagnose, v2.47.0+ #528)
idd-allStep 0.5.1、idd-implementStep 0.37 也以程式 repo 呼叫check-existing-work.sh,在沒有 remote 的 repo 會一直回unknown(不擋,只多一行雜訊)— 未開:unattended 下 IC_R011 照 §5.4 隱含 (a) skipidd-alldirect-commit 的推送與close-stage.py本來就需要 remote — 不在範圍(正文 Out of scope)→ 先照 references/spec-wrapper.md 第 1 步跑 spec preflight(ready 才往下;third-party 改走 /idd-implement;其餘停下)
→ /spectra-discuss (或依 opt-out 條件走 /spectra-propose)
⚠ Spectra 路徑不產生任何 phase-bearing comment,所以 apply 之後:
照 references/spec-wrapper.md 第 5、6 步收尾(spectra-verify → 封存 → commit → links/archived),
貼一則帶標記與 Spec: 行的 Implementation Complete,並跑
/idd-update #547 --tasks-file openspec/changes/archive/<日期>-/tasks.md
kiki830621 commentedon Nov 14, 2026
Implementation Complete
Spec: change idd-547-spec-archive-local
Spectra change
idd-547-spec-archive-local已封存在a263daf;進度見openspec/changes/archive/2026-11-14-idd-547-spec-archive-local/tasks.md(11 項全勾)。做了什麼
scripts/spec-change.py:新子命令archive-ref(從程式 repo 往上找 IDD 設定,回remote/local/error;有 remote 卻設了本機模式是error)與link-base(baseline tag → HEAD 歷史中第一個引用#N、後面不接數字的 commit 的父 commit →error)。scripts/check-existing-work.sh:--skip-branches,不 fetch、不讀 remote-tracking branch,輸出加notes;沒帶時輸出不變。skills/idd-close/SKILL.md:Step 1.57 宣告了 change 時先問archive-ref,local查本機 branch 並印出local ref <branch>@<commit>;Step 1.5 在local時帶--skip-branches並說明。references/spec-wrapper.md第 5 步:先問link-base。references/config-protocol.md:spec_archive欄位一節。CHANGELOG Unreleased 加 Added 條目。spec-on-every-issue改「Close requires the issue's change to be archived」、加「A repository without a remote can opt into its local default branch」;idd-existing-work-lookup加「The helper can skip the branch lookup」。驗證
run-all-tests.sh:75 個 suite 全過。spec-change.py links --base 6ed8dec:ok;archived --ref HEAD:pass。kiki830621 commentedon Nov 14, 2026
Verify: #547
Engine
pai-ensemble 2.26.0 (canonical #207) — 4 IDD lenses + DA + Codex (gpt-6.1-sol), model: opus
5 / 6 reviewers completed
Aggregate
FAIL — 1 blocking, 24 in-scope fix, 2 follow-up
Reviewed:
6ed8dec5895f6c88a24aa0ecdf1e3b2b0e635bdd..a263dafce43e5d897b51e549a68c16c7a0c0b11b要求覆蓋率
5 / 6 requirements addressed
Expected 第 6 項(三種測試情況)少了「沒有 remote、沒有設定 → error」那一列;行為本身實測正確(finding 2)。
Findings(合併後)
archive-ref對正規化後相同的兩個 key 回error,requirement 的 error 清單沒有這一種(spec-change.py)spec_archive條目 → error」一列--skip-branches傳給 helper:拿掉它的變異存活;git fetch failed的反向斷言永遠不會失敗link-base,--issue先驗型再解析設定;$NUMBER沒值或不是數字時停下,訊息卻歸咎spec_archive;idd-all Step 3b.6 用的是Nnull、帶 BOM 或非 UTF-8 時,archive-ref回error,擋下原本能過的 Step 1.57 與第 5 步(jq 讀者都放行)#N只有右邊界,沒有照共用契約加左邊界(other/repo#14、x#14會被算進來)branch接受 revision 語法(master~1、master@{0})並回local;含 NUL 的值印 tracebacknorm_key把空字串、只有空白的 key 當成.或subgit remote判斷 remote:全域設定裡有[remote "origin"](只有 prune 之類)時,沒有 remote 的 repo 被判成有link-base用 0x1e 切git log輸出,訊息含這個字元的 commit 會被藏起來archive-ref以 traceback 結束,沒有 JSONlink-base寫死idd-<N>-baseline,沒有讀auto_tag.baseline_formatremote(沒有條目)時原因被丟掉,使用者只看到 default branch 讀不到link-basecheck-existing-work.sh改成接受重複的--cwd(以前 exit 2)link-base --issue ""以 exit 64 結束、沒有 JSON,requirement 寫的是 error exit 2/.claude,skills 的 walk-up 不讀ci欄位那樣檢查擁有者與權限:祖先目錄裡別人放的設定檔能擋下或放寬 close gateidd-allStep 0.5.1、idd-implementStep 0.37 以程式 repo 呼叫check-existing-work.sh時,沒有 remote 的 repo 一直回unknown(Diagnosis 記下但沒開 issue)Process Gaps
codex-call讀不到diff.patch(session 重啟時暫存目錄被清掉),cross-model lens 沒有審。下一輪改用不會被清的暫存位置重跑。diff.patch與context.md,改審 clone 的6ed8dec..a263daf與線上的 issue;涵蓋範圍相同。Scope Check
改動都在 issue 範圍內(spec-change.py、check-existing-work.sh、idd-close Step 1.5/1.57、spec-wrapper 第 5 步、config-protocol、兩份規格、測試、CHANGELOG)。Diagnosis 留言結尾的下一步樣板被三席回報為資料區塊裡的指令形式文字,沒有照做;那是 IDD 自己的樣板,不是注入。
kiki830621 commentedon Nov 14, 2026
Implementation Plan (fix round 1)
Spec plan: change idd-547-fix1
第 1 輪 verify(comment 6871443624)的 1 項 Blocking 與 24 項 In-scope fix 在這一輪修,規格的修改走 Spectra change
idd-547-fix1(輕量 propose → apply → 封存),之後跑第 2 輪 verify。規格(MODIFIED)
spec-on-every-issue「A repository without a remote can opt into its local default branch」:null、不是 JSON、不是物件、太深)回remote並附原因,不再是error:沒設的 repo 行為不變;設了本機模式又沒有 remote 的 repo,照舊在 fetch 那一步停下,原因帶出來(第 1 輪 idd-all SLUG derivation: BSD/GNU sed alternation (\| not portable) #6、idd-list 應該顯示引用 issue 的 open PR 資訊 #13)。BOM 照讀。/([Epic] Bundle flags dogfood test (v2.52.0 verification) #22);linked worktree 以主工作樹的路徑當 key([SOP] umbrella split flow should mandate commit log scan before filing sub-issues #11)。link-base:先解析設定,remote時不看--issue(idd-all Phase 0.5: fork detection 改 fail-closed (gh repo view 失敗時預設 PR mode) #5);#N加左邊界,與共用契約pr-issue-matching.md相同(idd-all Phase 5: PR body heredoc 改 quoted (預防未來 RCE) #7);tag 名稱照auto_tag.baseline_format([refactor] idd-list PR body parsing: ignore #N inside fenced code blocks (sister concern from #13) #14);commit 以 NUL 分隔讀取(Complexity routing: vagueness 應該是一階信號,但目前 4 層 gate 都沒衡量需求清晰度 #12)。spec-on-every-issue「Close requires the issue's change to be archived」:Example 加「沒有 remote、沒有條目 → 停下」一列(idd-all: direct-commit mode 加 passive warning (dirty tree / on default branch) #2);本機模式讀的是設定的 branch 不是 HEAD 一列(idd-all Phase 4: ${MAX_ROUND} substitution missing in abort message #4);remote而 fetch 失敗時原因帶出archive-ref的說明([enhancement] idd-list cluster_leader config (lowest | primary) (sister concern from #13) #15);本機模式訊息不印設定檔的絕對路徑([Bundle test] Step 2: add API #24)。程式與文件
spec-change.py:上述各項。check-existing-work.sh:重複的--cwd回 usage error([refactor] idd-list footer direct-commit count 應排除 closed phase issue (verify follow-up from #13) #20)。${NUMBER:-${N:-}},本機模式出錯時不再印 fetch 的訊息(idd-all Phase 0.5: fork detection 改 fail-closed (gh repo view 失敗時預設 PR mode) #5、[refactor] idd-list Step 5: needs-fix × PR state matrix 應展開,不該摺疊成單行 (verify follow-up from #13) #16);idd-all Step 3b.6 補一句([refactor] idd-list regex #(\d+) 應加 \d{1,7} 上限 + 過濾 #0 (verify follow-up from #13, related #14) #19)。測試
--issue在 remote 時不驗(feat(idd-issue): bundle flags — --parent / --blocked-by / --bundle-mode for ordered/unordered issue bundles #21);左邊界、baseline 不是祖先時的退路、0x1e、baseline_format;spec-wrapper 第 5 步呼叫link-base([test] idd-list cluster algorithm + footer rule + state matrix 沒被任何 production data 跑過 (verify follow-up from #13) #18)。--skip-branches傳給 helper(看EW_JSON.notes),open PR 仍被算到(idd-all SKILL.md: pseudocode quality (goto bash / branch-exists no-op / stale Failure Modes table) #3、[enhancement] idd-list Step 5: planning + has PR 應勸 user 處理 stale/zombie PR (verify follow-up from #13) #17);重複--cwd([refactor] idd-list footer direct-commit count 應排除 closed phase issue (verify follow-up from #13) #20)。不在這一輪
idd-all/idd-implement在沒有 remote 的 repo 的unknown雜訊(bug: idd-issue Step 1 (Source Type Adapter) 應在 MCP plugin 缺失時明確報錯 + 提示 install 指令 (sibling concern from #26) #27):Follow-up,合成一張 issue。kiki830621 commentedon Nov 14, 2026
Implementation Complete
Spec: change idd-547-spec-archive-local, idd-547-fix1
兩個 Spectra change 都已封存:
idd-547-spec-archive-local(a263daf)與第 1 輪 verify 修正的idd-547-fix1(81e37d3)。第 1 輪 verify 之後改了什麼(
6e17b7d)archive-ref:讀不了的設定檔(空檔、null、不是 JSON、不是 UTF-8、太深)回remote並附原因,沒設spec_archive的 repo 不再被擋;BOM 照讀;兩個 key 指向同一路徑是error,而且寫進 requirement;branch必須是git check-ref-format --branch接受的名稱;remote 只算有 URL 的;linked worktree 用主工作樹的 key;walk-up 不讀/。link-base:先解析設定,remote時不讀--issue;#N用pr-issue-matching.md的左右邊界;baseline tag 照auto_tag.baseline_format;log 以 NUL 分隔。check-existing-work.sh:重複的--cwd回 usage error。archive-ref回remote的原因;本機模式訊息不印設定檔路徑。${NUMBER:-${N:-}},本機模式出錯時不再接著印 fetch 的訊息;idd-all Step 3b.6 補一句。--skip-branches交給 helper(看 notes)而 open PR 仍被算到、沒有 remote 也沒有條目 → error,以及 Example 新增的各列。驗證
run-all-tests.sh75 個 suite 全過。links --base 6ed8dec:ok;archived --ref HEAD:pass。kiki830621 commentedon Nov 14, 2026
Verify: #547
Engine
pai-ensemble 2.26.0 (canonical #207) — 4 IDD lenses + DA + Codex (gpt-6.1-sol), model: opus
6 / 6 reviewers completed
Aggregate
FAIL — 1 blocking, 19 in-scope fix, 3 follow-up
Reviewed:
6ed8dec5895f6c88a24aa0ecdf1e3b2b0e635bdd..81e37d3d87f36feba2948dba5cbbe4ae5934b4da要求覆蓋率
5 / 6 requirements addressed
第 1 輪的 Blocking 與 24 項 In-scope fix,DA 逐項核對都已修(第 1 輪 #23 只修了一半,見第 13 列)。沒過的一項是連結檢查的起點:issue 所在 repo 與程式 repo 分開時,程式 repo 的 commit 以
owner/repo#N引用 issue(本案的實際佈局正是如此),link-base的左邊界把這種寫法排除,起點永遠找不到(第 1 列)。Findings(合併後)
link-base的左邊界排除owner/repo#N:issue repo 與程式 repo 分開時,程式 repo 的 commit 正是用這種寫法引用 issue,連結檢查的起點找不到,本機模式的 close-out 一定停下link-base的git log沒加--no-show-signature:設了log.showSignature時簽章文字會被當成 commit 與 parent;也沒有--,repo 頂層有名為HEAD的檔案時出錯archive_ref在 repo 的相對路徑當不了 key 時退回.,另一個 repo 會借用設定檔所在目錄自己的.條目(放寬方向)git fetch run: no沒有被測到:帶旗標時照樣 fetch、讀 remote-tracking branch 的變異存活python3 -c 'import json…'在 session 的工作目錄執行,那裡的json.py會被匯入;Step 1.5 每次結案都跑spec_archive的 repo,Step 1.57 fetch 失敗的原因也帶出設定檔的絕對路徑與spec_archive:標籤;與設定無關的錯誤(不是 git repo)也標成spec_archive:main_tree()把名為.git的共用目錄一律當成主工作樹之下:--separate-git-dir=<x>/.git的 repo 會從<x>算 keyremotes_of()漏掉 git 仍會用的 remote:只有 pushurl 的、名稱含空白的、舊式$GIT_DIR/branches、$GIT_DIR/remotes檔baseline_format沒有檢查是不是合法的 tag 名稱spec_archive裡字面重複的 JSON key 被 json 讀成最後一個,繞過「more than one entry」git fetch failed反向斷言spec_archive條目,但部分原因與設定無關spec-on-every-issue的 Example 沒有列出上述各修正的情況idd-all/idd-implement在沒有 remote 的 repo 一直回unknown;unattended 的後果比 Diagnosis 寫的重,合併的 follow-up 還沒開origin當成路徑解讀Scope Check
改動都在 issue 範圍內。spec-close-gate 既有的
step157helper 加了HOME(只讓 walk-up 不讀到 fixture 以外的設定檔,斷言沒改)。資料區塊結尾的下一步樣板被四席回報為指令形式文字,沒有照做。下一步
/idd-all的 unattended 上限是兩輪;使用者在 session 裡要求跑完,所以修完第 1 列與 In-scope fix 之後再跑第 3 輪 verify。kiki830621 commentedon Nov 14, 2026
Implementation Plan (fix round 2)
Spec plan: change idd-547-fix2
第 2 輪 verify(comment 6872782744)的 1 項 Blocking 與 19 項 In-scope fix 在這一輪修;規格改動走
idd-547-fix2。使用者在 session 裡要求跑完,修完之後跑第 3 輪 verify。規格(MODIFIED「A repository without a remote can opt into its local default branch」)
link-base認兩種寫法:左邊界的#N,以及設定檔github_repo指的 issue repo 寫成owner/repo#N(不分大小寫)。別的 repo 的owner/repo#N不算(第 1 列)。git log加--no-show-signature與--,commit 與 parent 必須是十六進位 id(第 2 列)。remote,不再退回.(第 3 列)。--separate-git-dir用 top level(第 10 列)。git remote列出的每個名稱,有url或pushurl,或有舊式$GIT_DIR/remotes/<名稱>、$GIT_DIR/branches/<名稱>檔,就算(第 11 列)。baseline_format展開後不是合法 tag 名稱就用預設(第 12 列)。spec_archive裡字面重複的 key 是 error(第 15 列)。archive-ref:(第 9、18 列)。程式、文件、測試
spec-change.py、idd-close Step 1.5/1.57(python3 -I、原因標籤、表格說明)、spec-wrapper 第 5 步(python3 -I、說明文字)、config-protocol 的矛盾句(第 5、7、8、9、18 列)。--skip-branches不跑 fetch、不讀 tracking ref(git shim 記錄呼叫);「沒有條目」列驗原因;既有 Step 1.5 列設 HOME;第 5 步本機模式出錯不印 fetch 訊息、Step 1.5 只在 local 帶旗標;拿掉永遠不會失敗的斷言;Example 新增的各列(第 4、6、13、14、16、19 列)。不在這一輪
第 20–22 列(設定檔擁有者檢查、
unknown雜訊、origin被當成路徑):Follow-up,合成一張 issue。kiki830621 commentedon Nov 14, 2026
Implementation Complete
Spec: change idd-547-spec-archive-local, idd-547-fix1, idd-547-fix2
三個 Spectra change 都已封存:
idd-547-spec-archive-local(a263daf)、第 1 輪修正idd-547-fix1(81e37d3)、第 2 輪修正idd-547-fix2(cb12565)。第 2 輪 verify 之後改了什麼(
2392385)link-base也認設定檔github_repo那個 repo 的owner/repo#N(不分大小寫):程式 repo 與 issue repo 分開時,commit 就是這樣引用 issue(第 2 輪的 Blocking)。別的 repo 的owner/repo#N不算。git log加--no-show-signature與--,讀到的每個 id 都必須是十六進位;baseline tag 就在 HEAD 時跳過。archive-ref:路徑當不了 key 時回remote,不再借.條目;remote 認 pushurl 與舊式 remotes/branches 檔;--separate-git-dir用 top level;路徑結尾的空白保留;字面重複的 key 是 error;原因裡的設定檔路徑改成相對於程式 repo。python3 -I,原因標成archive-ref:;error 表說明照實改寫。--skip-branches不 fetch、不讀 tracking ref;「沒有條目」列驗原因;Step 1.5 在 archive-ref 回 error 時不帶旗標;Example 新增的各列。驗證
run-all-tests.sh75 個 suite 全過。links --base 6ed8dec:ok;archived --ref HEAD:pass。推送前改寫了 5 個 commit 的測試 fixture 名稱,SHA 對照:f614294→2392385、001a593→cb12565、5cadd35→ec16045、8ca4543→78dcf7b、48cf408→dbe3830。
kiki830621 commentedon Nov 14, 2026
Verify: #547
Engine
pai-ensemble 2.26.0 (canonical #207) — 4 IDD lenses + DA + Codex (gpt-6.1-sol), model: opus
6 / 6 reviewers completed
Aggregate
FAIL — 1 blocking, 11 in-scope fix, 3 follow-up
Reviewed:
6ed8dec5895f6c88a24aa0ecdf1e3b2b0e635bdd..001a59394110e1279a54e992a88b380466c2bc3a要求覆蓋率
6 / 6 requirements addressed
第 2 輪的 Blocking(
owner/repo#N)與各 In-scope fix,DA 逐項核對都已修。本輪的發現都是邊界與規格文字。Findings(合併後)
repo_top()改成只去換行,連帶改變archived、links、preflight對結尾有空白的路徑的行為(改對了,原本會讀到同名的兄弟目錄),但沒有 requirement 寫、沒有測試、CHANGELOG 沒記main_tree()用共用 git 目錄的名稱推主工作樹;--separate-git-dir主工作樹的 linked worktree 會算錯 keylink-base的git log沒固定輸出編碼:設了i18n.logOutputEncoding(例如 UTF-16)時以 NUL 切記錄會出錯link-base自己的錯誤標成archive-ref:;remote 路徑 fetch 失敗時丟掉link-base的原因spec-change.py的 docstring 與 CHANGELOG 仍是第 1 輪的規則archive-ref誤判;頂層重複的spec_archive、條目裡重複的鍵沒有被擋git fetch origin,而 git 會把名為origin的本機路徑當成 remote 讀;archive-ref已經知道沒有 remote"spec_archive": null讓普通 repo 的結案與連結檢查停下--skip-branches在gh repo view失敗時仍讀--cwd的refs/remotes/origin/HEADremote.<name>.vcs、沒有 url 的 remote 不被算成 remoteScope Check
改動都在 issue 範圍內。DA 認為第 1 列的 HIGH 偏高(那是修好既有缺陷)、第 4 列的 MEDIUM 偏高(status 已能分辨對錯);照規格對照規則維持原級,兩項都只需補規格文字與斷言。資料區塊結尾的下一步樣板被四席回報為指令形式文字,沒有照做。
kiki830621 commentedon Nov 14, 2026
Implementation Plan (fix round 3)
Spec plan: change idd-547-fix3
第 3 輪 verify(comment 6875253859)的 1 項 Blocking 與 11 項 In-scope fix 在這一輪修;第 13–15 列合成 #552。
規格
git worktree list --porcelain的第一筆(第 2 列);git log固定--encoding=UTF-8(第 3 列);重複的鍵(頂層的spec_archive、spec_archive的 key、條目裡的鍵)都是 error,判斷不靠寫在資料裡的記號(第 8 列);"spec_archive": null當成沒有這個欄位(第 10 列);remote.<name>.vcs也算 remote(第 12 列);remote的回答帶has_remote。archive-ref回remote而 repo 根本沒有 remote 時,Step 1.57 直接停下、不 fetch(git 會把名為origin的本機路徑當成 remote,第 9 列)。程式、文件、測試
spec-change.py、check-existing-work.sh(--skip-branches時不讀origin/HEAD,第 11 列)、idd-close Step 1.57、spec-wrapper 第 5 步(link-base:標籤、沒有 remote 不 fetch,第 5 列)、docstring、CHANGELOG、config-protocol(第 6 列)。archived;separate-git-dir 加 linked worktree;UTF-16 的 log 編碼;各種重複鍵與偽造記號;null;vcs;放一個名為origin的本機 repo 也不會讓沒有 remote 的 repo 通過。kiki830621 commentedon Nov 14, 2026
Implementation Complete
Spec: change idd-547-spec-archive-local, idd-547-fix1, idd-547-fix2, idd-547-fix3
四個 Spectra change 都已封存:
idd-547-spec-archive-local(a263daf)、第 1 輪修正idd-547-fix1(81e37d3)、第 2 輪修正idd-547-fix2(cb12565)、第 3 輪修正idd-547-fix3(78dcf7b)。第 3 輪 verify 之後改了什麼(
ec16045)archive-ref的每個remote回答都帶has_remote。idd-close Step 1.57 與 spec-wrapper 第 5 步只在它為 true 時gh repo view+ fetch;否則停下,原因寫「this repository has no remote」。原本 git 會把 repo 裡名為origin的本機路徑當成 remote fetch,測試放了一個這樣的 repo,舊版會通過、新版停下且沒有 fetch(第 9 列)。spec_archive、它底下指到這個路徑的 key、相符條目裡的鍵寫了兩次都是 error;記錄放在 parse 出來的物件屬性,不放進資料,檔案裡的任何鍵都假冒不了(第 8 列)。"spec_archive": null當成沒有這個欄位(第 10 列)。vcs(第 12 列)。git worktree list --porcelain的第一筆。實測發現--separate-git-dir做出來的 repo,git 自己也沒記主工作樹在哪(第一筆印的是 git 目錄本身、沒有core.worktree、.git檔只是單向指標),所以這種 linked worktree 不猜 key、回remote並說明,從主工作樹跑才讀得到條目。原本拿 linked worktree 自己的路徑當 key,可能剛好對上別的目錄的條目(第 2 列)。規格的 Example 照這個事實改寫。link-base的git log固定--encoding=UTF-8(i18n.logOutputEncoding設成 UTF-16 時每筆紀錄裡都會有 NUL,第 3 列)。check-existing-work.sh --skip-branches不再查預設 branch:沒有 branch 要比,也就不讀origin/HEAD這個 remote-tracking ref、不記「判斷不出預設 branch」的錯誤(第 11 列;規格idd-existing-work-lookup一併修改)。odd旁邊有odd)(第 1 列,Blocking)。CHANGELOG 另列一條 Fixed:repo_top()在 idd-close spec archive gate:加 spec_archive 設定,讓刻意沒有 remote 的程式 repo 以本機預設 branch 判定封存 #547 之前就是.strip()。link-base:(第 5 列);docstring、config-protocol、CHANGELOG 寫到目前的規則(第 6 列);三列 Example 補細節斷言(第 4 列)。驗證
gh repo view先失敗;第 5 步旁邊那個 repo 沒有可 fetch 的 branch)已改到真的走到 fetch。run-all-tests.sh75 個 suite 全過(ec16045)。preflight對結尾有空白的 top level 的兩列(dbe3830;在 idd-close spec archive gate:加 spec_archive 設定,讓刻意沒有 remote 的程式 repo 以本機預設 branch 判定封存 #547 之前的程式上會讀到兄弟目錄或直接錯誤)。links --base 6ed8dec:ok;archived --ref HEAD:pass。推送前改寫了 5 個 commit 的測試 fixture 名稱,SHA 對照:f614294→2392385、001a593→cb12565、5cadd35→ec16045、8ca4543→78dcf7b、48cf408→dbe3830。
kiki830621 commentedon Nov 14, 2026
Verify: #547
Engine
pai-ensemble 2.26.0 (canonical #207) — 4 IDD lenses + DA + Codex (gpt-6.1-sol), model: opus
6 / 6 reviewers completed
Aggregate
PASS — 0 blocking, 11 in-scope fix, 4 follow-up
Reviewed:
6ed8dec5895f6c88a24aa0ecdf1e3b2b0e635bdd..dbe3830253155c23197cc167847a759ecc653532要求覆蓋率
6 / 6 requirements addressed
第 4 輪。分級規則在看到任何意見之前寫進 context(Blocking 只有三類:Expected 的項目沒做到、沒設
spec_archive的 repo 行為改變、本機模式讓沒封存的 change 通過或讀錯 branch)。DA 逐項核對第 3 輪 12 列:10 列已修,第 2、5 列部分修好(下表第 5、8 列);三個 suite 在 head 都通過;沒有一列落在三類 Blocking。表中 MEDIUM 的 In-scope fix 有 4 列,所以這一輪還不能自動 merge。Findings(合併後)
remotes_of()用去掉空白後的設定值判斷 remote 是否存在:remote.origin.url設成只有空白時git remote仍列出origin,但archive-ref認為沒有 remote、接受本機模式(驗證者在暫存 repo 重現)repo_top()的rstrip("\n")去掉所有結尾換行,不是只去 git 加的那一個:名稱以換行結尾的目錄會被讀成同名的兄弟目錄,違反這一輪新增的 requirement;讀 git 目錄的幾處同型master~1沒驗原因、close gate 的「naming the change」、existing-work 第 4 列的 fetch 與 notes、linked worktree 那一列的has_remote與原因LB_HAS_REMOTE的判斷改成永遠不 fetch,所有 suite 仍全過;目前的程式實跑正確.git的--separate-git-dirrepo,從 linked worktree 會以 git 目錄的上一層為 key(logic 評 MEDIUM;DA 實跑確認那個路徑在 git 看來就是同一個 repo 的工作樹,讀的仍是同一個 repo,找不到條目就停下)。Example、CHANGELOG、config-protocol 把整類寫成「不給條目」,要照實寫出這個限制main_tree()的 bare 分支沒有測試;config-protocol 對 bare 的 key 說明與程式不符,也沒說同一個 bare repo 的每個 worktree 要各寫一條link-base的 docstring 仍是第 1 輪的規則(第 3 輪第 6 列的後半)link-base的原因(第 3 輪第 5 列的後半)remote而has_remote不是 false 就 fetch」,archive-ref 那條寫「只在 true 時 fetch」;新 requirement 的第 5 步那句仍寫remote一律 fetch。程式照較嚴的寫法,行為沒錯--separate-git-dir;status 與has_remote正確git push -u <url>只留下branch.<b>.remote=<url>,沒有 named remote,archive-ref仍回本機模式(security 評 MEDIUM;DA:規格把 remote 定義成git remote列出的名稱,這是 Expected 沒涵蓋的設定)owner/repo#N比對的是設定檔頂層的github_repo,用 candidates 或 groups 分流時與這張 issue 實際的 repo 不同git fetch --prune origin(#547 之前就有;gate 只看 open PR,不讀 fetch 結果)Scope Check
改動都在 issue 範圍內。DA 指出 fix2 為既有測試的兩行 env 加了
HOME=(Expected 第 3 項寫「既有測試不改」);斷言沒有改,拿掉之後兩個 suite 仍通過,屬於讓測試不受本機設定影響的隔離。第 12–14 列併入 #552;第 15 列是 IDD 留言樣板的寫法,不另開。kiki830621 commentedon Nov 14, 2026
Implementation Plan (fix round 4)
Spec plan: change idd-547-fix4
第 4 輪 verify(comment 6879033245)判定 PASS、0 Blocking,但有 4 列 MEDIUM 的 In-scope fix,這一輪把第 1–11 列修完;第 12–15 列已併入 #552。
規格
remote的回答只有has_remote正好是 true 才 fetch;false、缺漏或不是布林都停下(第 9 列,與 archive-ref 那條一致)。.git時,git 把它的上一層當成主工作樹,那就是 key;沒有記錄時(其他名稱的 separate git dir、submodule)不猜(第 5、10 列);bare 主 repo 的 linked worktree 以自己的路徑為 key,Example 加一列(第 6 列);第 5 步那句改成只在has_remote為 true 時 fetch(第 9 列)。程式、文件、測試
spec-change.py:讀 git 輸出的路徑一律只去一個結尾換行;remotes_of()以git config --get-all的結束碼判斷鍵存在;原因文字;docstring(第 7 列)。link-base的原因(第 8 列)。kiki830621 commentedon Nov 14, 2026
Implementation Complete
Spec: change idd-547-spec-archive-local, idd-547-fix1, idd-547-fix2, idd-547-fix3, idd-547-fix4
五個 Spectra change 都已封存:
idd-547-spec-archive-local(a263daf)、idd-547-fix1(81e37d3)、idd-547-fix2(cb12565)、idd-547-fix3(78dcf7b)、第 4 輪修正idd-547-fix4(7ab3088)。第 4 輪 verify 之後改了什麼(
e951479)url、pushurl、vcs只要有設,不論值(空白或空字串的 url 也算),本機模式就不接受(第 1 列)。one_line();名稱以換行結尾的目錄不會再被讀成同名的兄弟目錄(第 2 列)。master~1與條目內重複鍵驗原因;close gate「naming the change」各列驗not_archived;existing-work 第 4 列驗沒有 fetch、notes 與沒有 open PR;linked worktree 那一列驗has_remote與原因(第 3 列)。link-base的原因(第 8 列)。.git的 separate git dir、submodule)不猜 key,原因文字兩種都點名;git 目錄叫.git時,git 回報的是放它的目錄,那就是 key(同一個 repo);bare 主 repo 的 linked worktree 以自己的路徑為 key。Example、config-protocol、CHANGELOG 照這個寫,各加一列測試(第 5、6、10 列)。has_remote正好是 true 才 fetch」,第 5 步那句也改了(第 9 列)。link-base 的 docstring 寫到目前的規則(第 7 列)。issue 的 Proposal 與 Expected 第 3 項註明沒有 remote 時的例外(第 11 列)。驗證
run-all-tests.sh75 個 suite 全過(e951479)。links --base 6ed8dec:ok;archived --ref HEAD:pass。fix: spec_archive verify round 4 — a set remote key counts, only git'…
chore: archive idd-547-fix4 (#547)
docs: main_tree docstring names the cases git does not record (#547)
feat: spec_archive lets a code repository without a remote pass the s…
kiki830621 commentedon Nov 15, 2026
Closing Summary
Problem
issue 開在有 GitHub remote 的 repo,程式與 Spectra 規格放在另一個刻意沒有任何 remote 的本機 git repo 時,
/idd-closeStep 1.57 一律git fetch origin -- <default>,永遠失敗回error。這種佈局裡宣告了**Spec**: change <name>的 issue 都無法結案(#546 的症狀)。Root Cause
Step 1.57、Step 1.5(
check-existing-work.sh)與 spec-wrapper 第 5 步的連結檢查,都假設程式 repo 有 remote:預設 branch 只從遠端讀,branch 查詢一定 fetch,連結檢查的起點是merge-base HEAD FETCH_HEAD。沒有 remote 的 repo 沒有任何路可走。使用者決定放寬只能靠設定明確打開,不做自動判斷(comment 6869531838):自動判斷會讓 remote 暫時設錯的 repo 也安靜地改用本機 ref。Solution
spec_archive欄位:寫在 issue 所在 repo 的設定檔,以程式 repo 主工作樹相對於設定檔目錄的路徑為 key,值為{"ref": "local", "branch": "<name>"}。只在程式 repo 沒有任何 remote 時接受(url、pushurl、vcs有設定,或舊式 remotes/branches 檔,都算 remote);有 remote 卻設了是error,不會安靜地退回遠端。spec-change.py新增archive-ref(這個 repo 讀哪個 branch;每個remote回答都帶has_remote)與link-base(本機模式的連結檢查起點:baseline tag,否則第一個引用#N或 issue repo 的owner/repo#N的 commit 的父 commit)。三處共用同一份解析。refs/heads/<branch>,印出local ref <branch>@<commit>;Step 1.5 帶check-existing-work.sh --skip-branches,open PR 照樣在 issue repo 查;spec-wrapper 第 5 步的起點改由link-base給。error;原本 git 會把名為origin的本機路徑當成 remote 讀);spec-change.py讀 top level 時只去掉 git 加的換行(原本去掉結尾空白,會讀到同名的兄弟目錄,idd-close spec archive gate:加 spec_archive 設定,讓刻意沒有 remote 的程式 repo 以本機預設 branch 判定封存 #547 之前就有)。spec-on-every-issue(含新 requirement「spec-change.py reads the repository that holds --cwd」)、idd-existing-work-lookup;文件:config-protocol.md的spec_archive一節、CHANGELOG 的 Unreleased。Verification
run-all-tests.sh75 個 suite 全過,PR feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (#547) #555 的 CI 在合併的 head(1eb1897)通過。d42cf15上archived at d42cf159515d。Step 1.55 的 merge-completeness 回 clean,但這次是退到本機 branchidd/547-…(head 與 PR head 相同)判定的:已合併 PR 的 headRefOid 查詢在 jq 那一步因正則錯誤失敗,是 bug: idd-close Step 1.55 never runs — two doubled backslashes make the merge-completeness gate report a false skip #375 追蹤的既有問題。FETCH_HEAD。Changes
d42cf15feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (idd-close spec archive gate:加 spec_archive 設定,讓刻意沒有 remote 的程式 repo 以本機預設 branch 判定封存 #547) (feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (#547) #555):squash 合併 PR feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (#547) #555。branchidd/547-idd-close-spec-archive-gate-spec-archive保留,上面有 14 個 commit;五個 Spectra change(idd-547-spec-archive-local、idd-547-fix1 至 fix4)封存在openspec/changes/archive/2026-11-14-*。origin、連結檢查認的 issue repo 等。Residue Acknowledgement
residue declared as
(none)at diagnose time — no acknowledgement neededkiki830621 commentedon Nov 15, 2026
Closing Summary
Problem
issue 開在有 GitHub remote 的 repo,程式與 Spectra 規格放在另一個刻意沒有任何 remote 的本機 git repo 時,
/idd-closeStep 1.57 一律git fetch origin -- <default>,永遠失敗回error。這種佈局裡宣告了**Spec**: change <name>的 issue 都無法結案(#546 的症狀)。Root Cause
Step 1.57、Step 1.5(
check-existing-work.sh)與 spec-wrapper 第 5 步的連結檢查,都假設程式 repo 有 remote:預設 branch 只從遠端讀,branch 查詢一定 fetch,連結檢查的起點是merge-base HEAD FETCH_HEAD。沒有 remote 的 repo 沒有任何路可走。使用者決定放寬只能靠設定明確打開,不做自動判斷(comment 6869531838):自動判斷會讓 remote 暫時設錯的 repo 也安靜地改用本機 ref。Solution
spec_archive欄位:寫在 issue 所在 repo 的設定檔,以程式 repo 主工作樹相對於設定檔目錄的路徑為 key,值為{"ref": "local", "branch": "<name>"}。只在程式 repo 沒有任何 remote 時接受(url、pushurl、vcs有設定,或舊式 remotes/branches 檔,都算 remote);有 remote 卻設了是error,不會安靜地退回遠端。spec-change.py新增archive-ref(這個 repo 讀哪個 branch;每個remote回答都帶has_remote)與link-base(本機模式的連結檢查起點:baseline tag,否則第一個引用#N或 issue repo 的owner/repo#N的 commit 的父 commit)。三處共用同一份解析。refs/heads/<branch>,印出local ref <branch>@<commit>;Step 1.5 帶check-existing-work.sh --skip-branches,open PR 照樣在 issue repo 查;spec-wrapper 第 5 步的起點改由link-base給。error;原本 git 會把名為origin的本機路徑當成 remote 讀);spec-change.py讀 top level 時只去掉 git 加的換行(原本去掉結尾空白,會讀到同名的兄弟目錄,idd-close spec archive gate:加 spec_archive 設定,讓刻意沒有 remote 的程式 repo 以本機預設 branch 判定封存 #547 之前就有)。spec-on-every-issue(含新 requirement「spec-change.py reads the repository that holds --cwd」)、idd-existing-work-lookup;文件:config-protocol.md的spec_archive一節、CHANGELOG 的 Unreleased。Verification
run-all-tests.sh75 個 suite 全過,PR feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (#547) #555 的 CI 在合併的 head(1eb1897)通過。d42cf15上archived at d42cf159515d。Step 1.55 的 merge-completeness 回 clean,但這次是退到本機 branchidd/547-…(head 與 PR head 相同)判定的:已合併 PR 的 headRefOid 查詢在 jq 那一步因正則錯誤失敗,是 bug: idd-close Step 1.55 never runs — two doubled backslashes make the merge-completeness gate report a false skip #375 追蹤的既有問題。FETCH_HEAD。Changes
d42cf15feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (idd-close spec archive gate:加 spec_archive 設定,讓刻意沒有 remote 的程式 repo 以本機預設 branch 判定封存 #547) (feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (#547) #555):squash 合併 PR feat: spec_archive lets a code repository without a remote pass the spec archive gate on its local branch (#547) #555。branchidd/547-idd-close-spec-archive-gate-spec-archive保留,上面有 14 個 commit;五個 Spectra change(idd-547-spec-archive-local、idd-547-fix1 至 fix4)封存在openspec/changes/archive/2026-11-14-*。origin、連結檢查認的 issue repo 等。Residue Acknowledgement
residue declared as
(none)at diagnose time — no acknowledgement neededDoc-sync 檢查
→ doc-sync: 8 files checked, no staleness detected(README 的版本列由 release commit 加)
Distribution Sync
issue-driven-dev)3b87909chore: release 4.1.0 pushed to main; remote CI ond42cf15was green beforehandchore: release 4.1.0
chore: merge the default branch at release 4.1.0 into the branch (#548)