Problem
Source : surfaced during /idd-implement #154 reproduction (Step 5.7)
.claude/scripts/tests/spectra-archive-post-ic/test.sh 可能含同類 bug:grep -qF "$needle" 不加 -- 結尾選項分隔符,當 needle 以 -- 開頭時被 grep 誤判為 flag → silent failure or warning instead of pattern match。
Background
/idd-implement #154 期間我從 spectra-archive-post-ic/test.sh 抄了 fixture-dir test runner 模式做 idd-edit/test.sh。 抄完跑第一次,fixtures 03/04/05 全 FAIL 並印出:
grep: unrecognized option `--scope requires value'
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
...
修法:grep -qF "$needle" → grep -qF -- "$needle"。 -- 告訴 grep「options 結束,後面是 pattern」。
問題 :抄自 spectra-archive-post-ic/test.sh,所以 該 test runner 也可能有同 bug 。 若 spectra archive fixtures 的 expected_stdout / expected_stderr needles 沒 -- 開頭,bug 不會 trigger → silent 不知道存在。
Reproduction (untested,需 verify)
cd .claude/scripts/tests/spectra-archive-post-ic
加 fixture with expected_stdout.txt containing --some-flag-error-string
跑 bash test.sh
預期:該 fixture FAIL with grep: unrecognized option warning
Impact
Type
bug / test infrastructure
Strategy
Verify reproduction(寫 1-2 個 -- prefixed expected fixture 跑看看)
若 trigger → 套同 fix:grep -qF "$needle" → grep -qF -- "$needle" in spectra-archive-post-ic/test.sh
若同時 [infra] IDD plugin test framework — adversarial fixtures for SKILL.md regression coverage (sister concern from #154) #156 trigger generalize → 抽 shared assertion lib .claude/scripts/lib/assert-helpers.sh
Priority
P3 — silent until new -- prefixed fixture added。 file 是為了 audit + 未來 #156 generalize 時 batch fix。
Refs #154 #156
Problem
Source: surfaced during /idd-implement #154 reproduction (Step 5.7)
.claude/scripts/tests/spectra-archive-post-ic/test.sh可能含同類 bug:grep -qF "$needle"不加--結尾選項分隔符,當needle以--開頭時被 grep 誤判為 flag → silent failure or warning instead of pattern match。Background
/idd-implement #154期間我從spectra-archive-post-ic/test.sh抄了 fixture-dir test runner 模式做idd-edit/test.sh。 抄完跑第一次,fixtures 03/04/05 全 FAIL 並印出:修法:
grep -qF "$needle"→grep -qF -- "$needle"。--告訴 grep「options 結束,後面是 pattern」。問題:抄自 spectra-archive-post-ic/test.sh,所以 該 test runner 也可能有同 bug。 若 spectra archive fixtures 的 expected_stdout / expected_stderr needles 沒
--開頭,bug 不會 trigger → silent 不知道存在。Reproduction (untested,需 verify)
cd .claude/scripts/tests/spectra-archive-post-icexpected_stdout.txtcontaining--some-flag-error-stringbash test.shgrep: unrecognized optionwarningImpact
--prefixed needles,所以 bug 未 trigger--flag預期值會 silent 失敗(看 PASS 但實際 grep 沒匹配)#154是 instance idd-all: 增加 HITL(attended)模式 — direct-commit + 允許 sub-skill AskUserQuestion #1,本 issue verify 後可能升 instance idd-all: direct-commit mode 加 passive warning (dirty tree / on default branch) #2 → 整合進 [infra] IDD plugin test framework — adversarial fixtures for SKILL.md regression coverage (sister concern from #154) #156 framework 設計時 batch fixType
bug / test infrastructure
Strategy
--prefixed expected fixture 跑看看)grep -qF "$needle"→grep -qF -- "$needle"in spectra-archive-post-ic/test.sh.claude/scripts/lib/assert-helpers.shPriority
P3 — silent until new
--prefixed fixture added。 file 是為了 audit + 未來 #156 generalize 時 batch fix。Refs #154 #156