Skip to content

regression-gate.sh 的 wiring 無測試覆蓋:改回 inline heredoc 測試仍全綠(follow-up from #126) #128

Description

@kiki830621

Problem

#126#116+#115)把 baseline 欄位驗證抽成 scripts/lib/baseline-worklist.py 並加了 13 個
測試——但全部 13 個都直接打 lib。把 regression-gate.sh 改回 inline heredoc,測試依然
全綠。

這正是 #116 本身要消滅的 bug class,只是高了一層:驗證有測試,但「gate 有沒有真的呼叫
那個驗證」沒有。兩個獨立 verify lens(requirements F1 + regression M2)各自指出這點。

具體風險:gate 裡的註解宣稱「set -euo pipefail turns any gate error into an abort before
the value is ever used」——目前只有註解在背書。未來一個 local MODEL=$(…) 或加一段
pipe 就會靜默消掉 abort 語意,而所有測試仍綠(local 會遮蔽 command substitution 的
非零 status)。

Type

feature

Expected

至少一個測試 shell out 到真實的 regression-gate.sh,用敵意 BESTASR_BASELINE 驗證
gate 確實 abort。verify 期間已證實可行:gate 在需要語料或 binary 之前就會 abort,
所以測試不需要下載任何東西。

regression lens 建議的作法(它已建過 harness):複製 gate + stub 掉 baseline-worklist.py
到 temp dir,即可獨立驗證兩個呼叫點的 set -e 語意,包含「worklist 過但 model 失敗」
這種靠 baseline 內容無法觸發的組合。

Impact

Tests/BestASRKitTests/(新測試 genre——目前無任何測試碰 shell script 層)。

為什麼是 follow-up 而非 #126 的 in-scope fix

DA 裁決:這是新的測試 genre(既有測試都在 Swift/Python 單元層,沒有 shell 整合層),
牽涉尚未拍板的決定(放哪個 target、如何隔離、要不要 stub),且風險不是 #126 引入的——
gate 的 wiring 在 #126 之前同樣沒有測試。塞進 #126 會讓那個 PR 過度膨脹。

Source: surfaced during /idd-verify PR #126 — requirements lens F1 + regression lens M2
(兩個獨立 leg 收斂)。DA 裁定為 follow-up。

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