This repository was archived by the owner on Apr 30, 2026. It is now read-only.
Repository navigation
Commit b11cccc
fix(adversarial-review): truncate branch diff to 60KB to fit context window
大型 PR 的 branch diff 動輒上 MB,整段塞進 adversarial-review prompt 會撐爆 context window,Codex 在 review 中段就停止讀後續檔案。
- 移除 git diff --binary 旗標(context 中沒人解 binary,純浪費 token)
- 加 60KB 上限,超過時截斷並標記 "[... diff truncated to fit context window — use tool calls to inspect remaining files ...]",引導 Codex 主動用 tool calls 拉剩餘檔案
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent b169820 commit b11cccc
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
177 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
178 | 186 | | |
179 | 187 | | |
180 | 188 | | |
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
184 | 192 | | |
185 | | - | |
| 193 | + | |
186 | 194 | | |
187 | 195 | | |
188 | 196 | | |
| |||
0 commit comments