Skip to content

[bug] spectra-archive-post-ic/test.sh likely has same grep -qF -- bug (sister from #154) #160

@kiki830621

Description

@kiki830621

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)

  1. cd .claude/scripts/tests/spectra-archive-post-ic
  2. 加 fixture with expected_stdout.txt containing --some-flag-error-string
  3. bash test.sh
  4. 預期:該 fixture FAIL with grep: unrecognized option warning

Impact

Type

bug / test infrastructure

Strategy

  1. Verify reproduction(寫 1-2 個 -- prefixed expected fixture 跑看看)
  2. 若 trigger → 套同 fix:grep -qF "$needle"grep -qF -- "$needle" in spectra-archive-post-ic/test.sh
  3. 若同時 [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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparking-lotDiagnosed but deferred until trigger condition fires. /idd-list filter candidate.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions