false-green
Skill1 starsChanged 15 days agoMITView on GitHub
在要下結論說某次測試、lint 或檢查「過了」之前使用。通過的定義是你看到了成功那一行,不是沒看到抱怨;同時要看跳過了幾條、看 exit code、並記得本機綠不等於 CI 綠。
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- brief-a-subagentSkill
- flaky-testSkill
- istqb-test-designSkill
- mutation-checkSkill
The file
Files
假綠燈:五種「看起來過了」
通過 = 你看到成功那一行。沒看到 = 不知道,不是通過。
1. 先指名成功字串,再確認它出現
說出這個工具成功時會印什麼,然後在輸出裡找到它。不要從「沒有紅字」反推。
go test ./...→ 每個套件一行ok <pkg>;no test files不是通過pytest→N passedeslint→ 通過時不印任何東西,所以這一項只能靠 exit code
輸出會被 pipe、head、工具包裝或代理層截斷與吞掉。看不到成功行,就當作沒跑。
2. 看跳過幾條,不只看通過幾條
312 passed, 148 skipped 和 460 passed 是兩件事。整組整合測試因為某個環境變數沒設而被跳過時,套件照樣印綠、exit code 照樣 0。
每次把 skipped/filtered/deselected 的數字唸出來,並跟上一次比。通過數掉了或跳過數漲了,就是有東西不再跑了。
3. 本機綠不等於 CI 綠
CI 的平台才是事實來源。差異最常出在:檔名大小寫(本機 case-insensitive、CI 不是)、路徑解析與行尾(「轉成正斜線」的函式通常只轉本機的分隔符,Windows 路徑字串到了 Linux 原封不動)、工具版本、只在 CI 設的環境變數、formatter 的預設值。
本機是 Windows、CI 是 Linux 時,推之前在同版本的 Linux 容器裡跑一次同一條指令,最便宜。
本機綠的意思只是「值得推上去看」,不是「過了」。
4. 懷疑輸出被過濾,就導到檔案再讀
<command> > out.txt 2>&1; echo "exit=$?"然後讀 out.txt,並看那個 exit code。exit 0 但輸出是空的,跟 exit 0 且成功行在裡面,不是同一件事——前者通常代表指令根本沒執行到你以為的東西。
反過來也一樣:非零 exit code 配上 command not found、not recognized 這類訊息,代表指令沒啟動,不是「它跑了而且失敗」。這時綠、紅都不知道。
5. 快取重播不是這一次跑的
有些測試工具會重播上一次的結果:go test 在套件與環境沒變時印 ok <pkg> (cached)。如果上一次是在缺環境變數、測試整組被跳過時跑的,重播的就是那個跳過的綠。
看到 (cached) 或同類標記,就當作這次沒跑;關掉快取再跑一次(go test -count=1)。
回報格式
<command> → exit <n>,<成功字串>,skipped <n>(上次 <n>)
任何一欄缺了,就寫「未確認」,不要寫「過了」。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

