Commit 4b07fce
committed
admin: canonicalise GSI projection_type at validation (Codex P2)
validateGSI accepted case-insensitive projection values for SPA
ergonomics, but only validated them — the original (possibly
lowercase) string then flowed through the bridge to the adapter,
where buildCreateTableProjection only matches exact uppercase. So
"include" passed handler validation only to fail later at the
adapter as ValidationException. Codex P2 flagged this as a
boundary mismatch on PR #635.
Fix: validateGSI now writes the uppercase form back to
gsi.Projection.Type when the value is recognised. Every downstream
consumer (the adapter bridge in main_admin.go and the AdminForward
server's handleCreate) sees the canonical shape.
Tests: round-trip "include" through the handler and confirm
src.lastCreateInput.GSI[0].Projection.Type is "INCLUDE"; sweep the
five mixed-case variants ALL/All/all + KEYS_ONLY/keys_only +
Include to confirm 201 in every case.1 parent 905d231 commit 4b07fce
2 files changed
Lines changed: 74 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
448 | 459 | | |
| 460 | + | |
449 | 461 | | |
450 | 462 | | |
451 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 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 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
401 | 462 | | |
402 | 463 | | |
403 | 464 | | |
| |||
0 commit comments