Repository navigation
Commit 76906a3
jzli
fix(codex): strip app-rewritten provider sub-tables so the provider never survives nameless
A Codex app config rewrite re-serializes the provider's inline
env_http_headers table into a separate [model_providers.opencodex.env_http_headers]
sub-table. removeOcxSection() ends its removal scope at the next table header,
and the sub-table header is one, so an inject/restore removed the main table
(with name/base_url) but kept the sub-table: model_providers.opencodex then
exists with only env_http_headers and no name, and Codex rejects the whole
config on startup ('provider name must not be empty'). Because every cleanup
guard matched the exact string '[model_providers.opencodex]', the orphan never
matched again, was journaled as baseline, and re-persisted on every
inject/restore cycle.
Recognize [model_providers.opencodex.*] sub-table headers in removeOcxSection()
and in the three cleanup guards (injectCodexConfig, stripOpencodexConfigResult,
hasOpencodexRouting) so the main table and its sub-tables are removed together.
A user's similarly named table ([model_providers.opencodex_backup]) stays out
of scope: the match requires the 'opencodex.' dot boundary.1 parent bcc77c0 commit 76906a3
2 files changed
Lines changed: 95 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
738 | | - | |
| 738 | + | |
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
| |||
1095 | 1095 | | |
1096 | 1096 | | |
1097 | 1097 | | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1098 | 1119 | | |
1099 | 1120 | | |
1100 | 1121 | | |
1101 | 1122 | | |
1102 | 1123 | | |
1103 | 1124 | | |
1104 | 1125 | | |
1105 | | - | |
| 1126 | + | |
1106 | 1127 | | |
1107 | 1128 | | |
1108 | 1129 | | |
1109 | 1130 | | |
1110 | 1131 | | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1117 | 1136 | | |
1118 | 1137 | | |
1119 | 1138 | | |
| |||
1153 | 1172 | | |
1154 | 1173 | | |
1155 | 1174 | | |
1156 | | - | |
| 1175 | + | |
1157 | 1176 | | |
1158 | 1177 | | |
1159 | 1178 | | |
| |||
1182 | 1201 | | |
1183 | 1202 | | |
1184 | 1203 | | |
1185 | | - | |
| 1204 | + | |
1186 | 1205 | | |
1187 | 1206 | | |
1188 | 1207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
368 | 434 | | |
369 | 435 | | |
370 | 436 | | |
| |||
0 commit comments