v0.5.5 — 有測試才算完整 Ship the tests
回歸測試隨 skill 出貨 🧪
三輪跨模型二審、兩次第三方獨立複驗,抓出的 21 個缺陷全部有對應的回歸測項 —— 但那份測試一直只活在開發機上,外面的人只能相信 README 上的文字。這版把它出貨。
skills/ai-review/tests/matrix.sh —— 40 項行為測試,九段:
- 後端錯誤分類(額度/未登入/網路/政策/版本/空回覆)
- 沒有後端不得中斷上層流程(含
set -e+$(…)+ wrapper 呼叫鏈) - 兩個退出碼開關(
--strict/--soft-fail)與它們的互斥 - 可插拔後端(不存在/未登入/失敗)
- 分類器不得把真失敗吞成「略過」(含
401 seconds誤判的正反例) - 落檔安全:同秒不覆蓋、權限 600、不留殘檔、symlink 攻擊、自訂 rubric 路徑不進檔名、特殊檔名的 YAML、非 UTF-8 locale 下的長中文檔名
- 失敗時看得到原因(stderr 與 stdout 兩路)
不燒任何額度(後端全用 stub 模擬)、不弄髒你的目錄(產出寫暫存區、跑完自動清掉)、全過回 exit 0 可直接進 CI:
sh <skill目錄>/tests/matrix.sh # SH=bash 可指定用哪個 shell 跑受測腳本裝好之後打這一行就能自己驗一次 —— 不必相信我寫的字。
Ship the tests 🧪
The 21 defects found across three cross-model review rounds all have regression cases — but the suite only ever lived on the author's machine, so everyone else had to trust the README. v0.5.5 ships it: 40 behaviour tests, no quota burned (stubbed backends), no files left behind (temp workspace, auto-cleaned), exit 0 when green so it drops straight into CI. Verified across sh/dash/bash/ksh/zsh.
更新 Update: npx skills update