Skip to content

fix: idd-all-chain Step 0.4 jq filter use anchored regex (avoid false-positive on quoted text) #53

Description

@kiki830621

Problem

Source: surfaced during /idd-verify #47 (codex P3 #9).

/idd-all-chain Step 0.4 (#47) 用:

HAS_DIAGNOSIS=$(gh issue view "$ROOT_ISSUE" -R "$GITHUB_REPO" --json comments \
    | jq -r '[.comments[] | select(.body | contains("## Diagnosis"))] | length')

contains("## Diagnosis") substring match — 可能 false-positive on:

  • Comment body 內 quoted history (> ## Diagnosis ...)
  • 討論 diagnosis 概念但不是真 diagnosis comment
  • 程式碼或 docs 範例裡寫 ## Diagnosis

Type

bug

Expected

改用 anchor regex match,只認 line-start 的 ## Diagnosis:

| jq -r '[.comments[] | select(.body | test("(?m)^## Diagnosis"))] | length'

(?m) flag 讓 ^ 對 each line。

Priority

P3 (#47 base case 仍 work,只在 corner case false-positive;#47 fix-immediate 後加進 follow-up batch)


Current Status

**Phase**: closed
Last updated: 2026-05-10 by idd-close (cluster #49+#53)

Key Decisions

  • Complexity = Simple (Layer 1 not triggered, Layer 2/P 都不命中)
  • Layer V untriggered (V1=2 V4=2)
  • Single-file 1-line jq filter change → /idd-implement next

Blocking

  • 等 user 跑 /idd-verify --pr 58 (cluster-PR mode 6-AI ensemble)

Activity

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