Files
ISEP/pending-main-push/unnamed--ISEP.md
T
Leo 67dae3b814 推送閘改成判目標,不判整條指令裡有沒有那個字
一個晚上誤攔六次,全都不是在推預設分支:
  ① checkout -b 建新分支時把預設分支寫在後面,再推那條新分支
  ② gh pr create 指定 base——根本不是 git push
  ③ 推 tag(refs/tags/…)
  ④ 推 feature 分支(帶 -u)
  ⑤ 它擋住了我用來**測試它自己**的那條指令
  ⑥ 它擋住了這一筆的 commit——因為 message 裡引用了那幾個字

leo 2026-08-17 早就講過這個形狀:文字層封路必敗,
「紅線寫得越細,命中關鍵字的機率越高 ⇒ 那些閘在懲罰謹慎」。
舊版掃整條指令字串,正是文字層。

改成解析 push 的目標 refspec:
  旗標跳過/第一個非旗標=remote/a:b 取 b/refs/tags/* 不算分支
  一個 refspec 都沒給,才退回看當前分支

八向實測(hooks/tests/main-and-prod-push-guard.test.sh,8/8):
  五種該放行的(今晚誤攔的原形狀,含分支名帶 domain 那種)全過
  三種該擋的全擋

中途自己抓到一個 bug:tag 被跳過後目標清單變空 → 退回猜當前分支
⇒ 當前分支剛好叫預設名時誤擋。改成看到 refspec 就不退回猜測。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 01:29:55 +08:00

44 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 推 main 的請求:未署名
- repo/Users/youlinhsieh/Documents/tech_projects/ISEP
- 分支:fix/push-guard-target-not-substring
- 時間:2026-08-21 01:28:51
- 它想跑的指令:
```
git push -q origin master
```
## 還沒推上去的 commit(原始資料,不是轉述)
```
43c328d Merge pull request 'feat/milestone-must-have-due' (#50) from feat/milestone-must-have-due into main
bcb736e Merge pull request 'fix/worksheet-dedup-by-content' (#49) from fix/worksheet-dedup-by-content into main
6772ca6 每個里程碑都要有真的期限,9999 也擋
1b55512 待驗工作單改用宣稱內容去重,驗過的不再冒出來
1920d4c Merge pull request '身為 leo,我要雲端 clone 下來就有閘,我才不用先處理憑證' (#48) from fix/b4-real-probe into main
47ed778 改走「直接複製進薄殼 repo」,並修掉一支會偷跑指令的閘
03d9782 查了官方文件才發現:setup script 根本讀不到環境變數,而 exit 1 會鎖死 session
36d8e05 認證驗證加 timeout:掛住比失敗更糟
1356372 B4 的探針我自己沒撞過,實撞後發現它根本不會擋
d306158 Merge pull request '身為 leo,我要雲端 env 檔能直接產在桌面,我才不用去翻隱藏目錄' (#46) from feat/cloud-env-outdir into main
9099c3f make-cloud-env.sh:輸出路徑可指定,且不再對使用者指定的目錄動權限
5bceb03 v0.3.1
4e73b8b Merge pull request '身為 leo,我要雲端驗收步驟在閘死掉時真的變紅,我才不會再被三個綠燈騙一次' (#45) from fix/testing-b-section-discriminating into main
291787e TESTING.md B 段整段換掉——舊版在閘全滅時會回綠
3a95121 雲端零閘的兩個真因:setup 不自驗+沒有 release 撐版本號 (#44)
daa1674 雲端零閘的兩個真因:setup 從不驗證自己+沒有任何 release 撐版本號
c48495d Merge pull request 'fix(hooks): sdd-guard.sh 修「解析失敗仍照擋、且訊息洩漏 /nonexistent」' (#42) from fix/sdd-guard-path-resolution into main
8718658 fix(hooks): sdd-guard.sh 修「解析失敗仍照擋、且訊息洩漏 /nonexistent」(InkStoneCo#22
e6d183d Merge pull request '產生雲端 env 設定給 leo 貼(InkStoneCo#14' (#41) from feat/cloud-env-generator into main
f855d82 產生雲端 env 設定,不要 leo 自己拼湊(InkStoneCo#14
```
## 改了哪些檔
```
```
---
總管裁完請刪掉這個檔——留著代表「還沒裁」。