Skip to content

refactor(audit): route dispatches through runCorrelated + bind Paymen…#28

Merged
fupelaqu merged 1 commit into
mainfrom
feature/audit
Jun 16, 2026
Merged

refactor(audit): route dispatches through runCorrelated + bind Paymen…#28
fupelaqu merged 1 commit into
mainfrom
feature/audit

Conversation

@fupelaqu

Copy link
Copy Markdown
Contributor

…tCommand type T (Story 13.7 Phase B)

  • PaymentCommand overrides type T = PaymentCommand (sound withCorrelationId cast).
  • BasicPaymentService.runCorrelated: keyed convenience over the shared Service.runCorrelated.
  • TriggerSchedule4Payment reads schedule.correlationId -> ExecuteNextRecurringPayment (closes the scheduler->renewal cid hop).
  • convert all 22 endpoint dispatch sites from inline 'cmd.withCorrelationId(cid); run(cmd)' to 'runCorrelated(cmd, cid)' (atomic stamp+dispatch).
  • fix: preRegisterCard/preRegisterPaymentMethod stamped the cid BEFORE cmd.copy(...), which resets the AuditableCommand var and silently dropped it; now stamp the copied command.

…tCommand type T (Story 13.7 Phase B)

- PaymentCommand overrides `type T = PaymentCommand` (sound withCorrelationId cast).
- BasicPaymentService.runCorrelated: keyed convenience over the shared Service.runCorrelated.
- TriggerSchedule4Payment reads schedule.correlationId -> ExecuteNextRecurringPayment (closes
  the scheduler->renewal cid hop).
- convert all 22 endpoint dispatch sites from inline 'cmd.withCorrelationId(cid); run(cmd)'
  to 'runCorrelated(cmd, cid)' (atomic stamp+dispatch).
- fix: preRegisterCard/preRegisterPaymentMethod stamped the cid BEFORE cmd.copy(...), which
  resets the AuditableCommand var and silently dropped it; now stamp the copied command.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.94%. Comparing base (0d4378a) to head (4bba2b0).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...oftnetwork/payment/service/CheckoutEndpoints.scala 66.66% 1 Missing ⚠️
...softnetwork/payment/service/MandateEndpoints.scala 0.00% 1 Missing ⚠️
...rk/payment/service/RecurringPaymentEndpoints.scala 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
+ Coverage   40.92%   40.94%   +0.01%     
==========================================
  Files         155      155              
  Lines       10861    10859       -2     
  Branches     1810     1604     -206     
==========================================
+ Hits         4445     4446       +1     
+ Misses       6416     6413       -3     
Flag Coverage Δ
unittests 40.94% <66.66%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fupelaqu fupelaqu merged commit abddce2 into main Jun 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant