Skip to content

refactor: trim restating comments and tighten test variable names - #329

Merged
tiana-code merged 1 commit into
mainfrom
refactor/comment-and-naming-hygiene
Jun 20, 2026
Merged

refactor: trim restating comments and tighten test variable names#329
tiana-code merged 1 commit into
mainfrom
refactor/comment-and-naming-hygiene

Conversation

@tiana-code

Copy link
Copy Markdown
Owner

Full code-quality pass requested by the owner, covering comments, naming, and structure.

Findings

  • Structure is already correct. Every service keeps clean hexagonal layers (thin controllers with no @Transactional, interface + impl services, DTOs split into request/response, enums under domain/enum, repositories in infrastructure). Nothing to change.
  • Production naming is already clean. No cryptic one or two letter names in main code. The only offenders were a few single-letter locals in tests, now renamed (c/s/a to case/session/alert, and a/b to debitAccount/creditAccount).

Comment changes (balanced bar)

  • Cut docstrings that restated adjacent code, the sandbox provider doc blocks first (the marker-to-result narration the when block already shows), plus a handful of restating one-liners.
  • Trimmed verbose blocks to the non-obvious why.
  • Kept comments carrying a real invariant: transaction-boundary rules, fail-closed and constant-time security notes, concurrency and optimistic-lock semantics, MapStruct limitations, privacy/opaque-token notes, and the public plug-in port contracts (KycProvider, SanctionsProvider, AmlCopilot, BankProvider and their types), which document the adapter API for OSS adopters and back PROVIDERS.md.

17 files, comments and test names only, no behavior change. Verified: all four services compile; compliance/ledger/decision unit tests green (466 total); spotless and detekt clean. Integration tests run on CI (need Docker).

Cut the docstrings that only restated adjacent code, the sandbox
provider doc blocks foremost, and trimmed the verbose ones down to the
non-obvious why. Comments that carry a real invariant (transaction
boundary, fail-closed, concurrency, MapStruct limits, privacy) stay, and
the public plug-in port contracts keep their documentation. Renamed the
single-letter locals in the domain and mapper tests to descriptive
names. No behavior change.
@tiana-code
tiana-code merged commit 8b1f685 into main Jun 20, 2026
8 checks passed
@tiana-code
tiana-code deleted the refactor/comment-and-naming-hygiene branch June 20, 2026 14:29
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