refactor(domain): reorganize types, drop dead code, reconcile totals #115

Merged
TimCane merged 3 commits from refactor/domain-structure into main 2026-07-07 16:32:21 +01:00
TimCane commented 2026-07-07 16:30:25 +01:00 (Migrated from github.com)

Summary

  • move the 23 flat BillSplitter.Domain root types into Sessions/, Receipts/, Abstractions/, Common/ with folder-matched namespaces, matching the existing Parsing/ subtree; imports updated across Api, Infrastructure and tests
  • remove dead code: LineType.Discount (never produced) and ParticipantAuth.SessionIdClaim (minted into every token, never read)
  • add TotalsValidator: warns the host when sum(items) + tax + tip + service does not match the printed total, within the same penny of slack as the copy-collapse check; quiet when no total is printed
  • flip docs/15 reconciliation from planned to current

Test plan

  • dotnet build clean, 0 warnings
  • dotnet test BillSplitter.Tests green: 114/114 (was 109; +5 TotalsValidatorTests)
  • 7 corpus fixtures that legitimately do not foot now assert the reconcile warning; the 45 that reconcile are unchanged
  • integration tests are CI-only in this environment; they compile
## Summary - move the 23 flat `BillSplitter.Domain` root types into `Sessions/`, `Receipts/`, `Abstractions/`, `Common/` with folder-matched namespaces, matching the existing `Parsing/` subtree; imports updated across Api, Infrastructure and tests - remove dead code: `LineType.Discount` (never produced) and `ParticipantAuth.SessionIdClaim` (minted into every token, never read) - add `TotalsValidator`: warns the host when `sum(items) + tax + tip + service` does not match the printed total, within the same penny of slack as the copy-collapse check; quiet when no total is printed - flip `docs/15` reconciliation from *planned* to *current* ## Test plan - `dotnet build` clean, 0 warnings - `dotnet test BillSplitter.Tests` green: 114/114 (was 109; +5 `TotalsValidatorTests`) - 7 corpus fixtures that legitimately do not foot now assert the reconcile warning; the 45 that reconcile are unchanged - integration tests are CI-only in this environment; they compile
Sign in to join this conversation.
No description provided.