Repository navigation
test(fork): auto-rebase precheck 的情境測試進 fork-check-lint - #79
Merged
Merged
Conversation
precheck.test.sh runs precheck.sh against fake git, gh and alert script in a temp HOME, one case per lock state plus the 6 h down alert; a broken precheck otherwise stops the hourly rebase in silence. The precheck parses dates with BSD or GNU date so the test also runs in Linux CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
為什麼
#77、#78 兩輪都靠臨時寫的情境測試抓到 precheck 的問題(develop-moved 時每小時重開一輪、長期失敗沒有警報)。precheck 改壞時排程只會安靜停擺,所以把那份測試正式放進 repo、掛進
fork-check-lint。改了什麼
.claude/skills/orca-fork-auto-rebase/scripts/precheck.test.sh:暫存 HOME 裡放假的git、gh與警報腳本,跑 13 種情境(沒有鎖、等人的鎖被取代/仍有效/develop 已移動、發版中新鮮/過期、進行中新鮮/過期、gh 失敗 1/2/7 小時、怪 tag),比對 exit code 與有沒有警報。用env -u BASH_ENV跑:這台機器的 BASH_ENV 會依假 HOME 重排 PATH,讓真的 gh 排到假的前面。precheck.sh:日期解析 BSDdate -j失敗時改用 GNUdate -d,測試在 CI 的 Linux 上也能跑。Makefile:fork-check-lint跑這支測試。FORK.md:說明這支測試,改 precheck 時要在這裡加情境。驗證
develop-moved判斷 →「releasing, fresh」紅;警報門檻改 10 小時 →「gh down 7 h」紅🤖 Generated with Claude Code