Commit f651b53
committed
fix(patch): make Windows arg-parse patch deterministic (drop override)
The count-guard variant of 0001-win32-arg-parse-embed-guard.patch fixed 21/25
Windows Java tests but collided on the 4 server-integration setups (Rerank,
ToolCalling, Multimodal, OpenAiCompatServer) whose argv length happened to equal
java.exe's process arg count — the guard then wrongly adopted java.exe's command
line and they kept failing with "Failed to parse model parameters". Those tests
pass on Linux/macOS, so their args are valid; the collision was the only cause.
Switch to the deterministic fix: keep the make_utf8_argv() call referenced (no
-Wunused-function) but never adopt its result, so the caller's already-UTF-8 JNI
argv is always used. A JNI library is never the process, so the GetCommandLineW
override is pure liability for us. Verified the patch applies cleanly to b9739
and the applier stays idempotent. CLAUDE.md + TODO.md updated to record the
count-guard -> removal change; upstream PR can still expose an opt-out that
preserves the standalone tools' UTF-8 fix.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SfvSZ76NW4e1qX1PjL4RKq1 parent 0cffac1 commit f651b53
3 files changed
Lines changed: 32 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
| 358 | + | |
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
147 | 155 | | |
148 | 156 | | |
149 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments