Skip to content

refactor(audit): bind AuditableCommand type T + shared Service.runCor…#12

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

refactor(audit): bind AuditableCommand type T + shared Service.runCor…#12
fupelaqu merged 1 commit into
mainfrom
feature/audit

Conversation

@fupelaqu

Copy link
Copy Markdown
Contributor

…related (Story 13.7 Phase B)

  • AuditableCommand: abstract type T <: AuditableCommand; withCorrelationId returns T (this.asInstanceOf[T]) so subtypes bind it to their concrete base - sound cast.
  • Service.runCorrelated(entityId, command, correlationId): shared seam to stamp the cid as DATA (never MDC across the tapir serverLogic Future - C14) onto an AuditableCommand before dispatch; no-op for non-auditable commands.

…related (Story 13.7 Phase B)

- AuditableCommand: abstract `type T <: AuditableCommand`; withCorrelationId returns T
  (this.asInstanceOf[T]) so subtypes bind it to their concrete base - sound cast.
- Service.runCorrelated(entityId, command, correlationId): shared seam to stamp the cid as
  DATA (never MDC across the tapir serverLogic Future - C14) onto an AuditableCommand before
  dispatch; no-op for non-auditable commands.

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

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity · 0 duplication

Metric Results
Complexity 4
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.05%. Comparing base (206c883) to head (7fb533a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
.../app/softnetwork/persistence/service/Service.scala 0.00% 4 Missing ⚠️
.../app/softnetwork/persistence/message/package.scala 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
- Coverage   61.22%   61.05%   -0.17%     
==========================================
  Files          95       95              
  Lines        1849     1854       +5     
==========================================
  Hits         1132     1132              
- Misses        717      722       +5     
Flag Coverage Δ
unittests 61.05% <0.00%> (-0.17%) ⬇️

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 a59c322 into main Jun 16, 2026
3 of 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