Skip to content

[test] Add shell test fixture infra for diagnosis detection logic (verify follow-up from #53) #61

@kiki830621

Description

@kiki830621

Problem

From verification of #53 (PR #58):
「跑 find tests/*.bats 在整個 repo:zero 結果。Plugin 沒 test infra。Implementation Complete 的「Smoke Tests (manual — 4/4 PASS)」是 self-reported 的人工跑 jq,沒記錄 input fixture、沒記錄 reproduce 命令、沒 commit 到 repo」
— Source: team:devils-advocate (HIGH structural)

Repo 的 markdown skill 沒有自動化 test infra。所有 jq filter / regex / shell logic 都靠 manual smoke test → self-reported PASS → commit。半年後 jq 升版改變 (?m) 行為、或 contributor 把 regex 改錯,沒有自動化 catch

Type

test (infrastructure)

Priority

P3 (structural debt — risk grows over time)

Strategy

  1. plugins/issue-driven-dev/tests/ 加 shell test fixture infra(bats 或純 bash)
  2. 為現有 jq detection logic 寫 fixture:
  3. Test runner: tests/diagnosis-detection.sh 跑 jq filter 對每個 fixture,assert expected output
  4. CI integration (若有 CI infra)

Acceptance

  • Test fixture directory created with hand-crafted comment bodies
  • Shell test runner exists and runs bash tests/diagnosis-detection.sh
  • All 5 cases (canonical / quoted / mid-text / leading-ws / fenced) → expected output
  • Doc: explain how to add new fixture for future regex changes

Related

Source: surfaced during /idd-verify --pr 58 (cluster #49 #53), Step 5b triage. Master report: #58 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions