Commit 253dfb6
authored
fix: preserve correlation ID in withdrawal events and guard uncompiled eligibility (#2040)
* fix: preserve correlation ID in withdrawal status events and guard uncompiled eligibility rules
Pass the existing correlation ID from context into buildWithdrawalStatusEvent
instead of generating a fresh UUID, maintaining distributed trace continuity
across the withdrawal saga.
Return an Internal error in validateProductTypeConstraints when EligibilityCEL
is non-empty but EligibilityProgram is nil, preventing silent bypass of
eligibility checks when the CEL compiler is not configured.
* fix: fall back to new UUID when context has no correlation ID
* fix: seed correlation ID at handler level in ExecuteWithdrawal
Extract correlation ID from context/metadata at the top of the
ExecuteWithdrawal handler and seed it into the context before passing
it to the orchestrator and completePendingWithdrawal. This ensures a
single trace ID flows through the entire request lifecycle instead of
generating a new UUID in completeWithdrawalWithOutbox when the context
value was not set.
---------
Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>1 parent 79e87f5 commit 253dfb6
3 files changed
Lines changed: 45 additions & 4 deletions
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
| |||
314 | 323 | | |
315 | 324 | | |
316 | 325 | | |
317 | | - | |
318 | | - | |
| 326 | + | |
| 327 | + | |
319 | 328 | | |
320 | 329 | | |
321 | 330 | | |
| |||
365 | 374 | | |
366 | 375 | | |
367 | 376 | | |
368 | | - | |
| 377 | + | |
369 | 378 | | |
370 | 379 | | |
371 | 380 | | |
372 | 381 | | |
373 | 382 | | |
374 | 383 | | |
375 | | - | |
| 384 | + | |
376 | 385 | | |
377 | 386 | | |
378 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
495 | 496 | | |
496 | 497 | | |
497 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
0 commit comments