feat(go): wire fuj fees + fuj reconcile (M2.11-12) #11

Merged
kacerr merged 2 commits from feat/m2-11-12-fees-reconcile-cli into main 2026-05-06 17:54:33 +02:00
Owner

Summary

  • New internal/services/membership package with AttendanceLoader, TransactionLoader, ExceptionLoader interfaces and NewStubSources() stub returning ErrIOPending until M4 Sheets loaders land.
  • FeesReport and ReconcileReport orchestrate domain/fees + domain/reconcile and write fixed-width text reports matching the Python output of calculate_fees.py and match_payments.py print_report.
  • cmd/fuj/main.go: fuj fees and fuj reconcile now dispatch; fuj sync / fuj infer keep the [M4] placeholder.
  • Both subcommands exit 1 with a clean actionable error message while IO is pending.
  • 13 unit tests covering stubs, all formatter branches, and orchestration wiring via fake loaders.

Test plan

  • cd go && go test -race ./internal/services/membership/... — all green
  • cd go && go test -race ./... — all packages green
  • cd go && golangci-lint run ./... — clean
  • ./bin/fuj fees → exits 1, stderr: "io layer not yet wired up; lands in milestone M4"
  • ./bin/fuj reconcile → same
  • ./bin/fuj helpfees / reconcile no longer tagged [M2]; sync / infer still [M4]

🤖 Generated with Claude Code

## Summary - New `internal/services/membership` package with `AttendanceLoader`, `TransactionLoader`, `ExceptionLoader` interfaces and `NewStubSources()` stub returning `ErrIOPending` until M4 Sheets loaders land. - `FeesReport` and `ReconcileReport` orchestrate `domain/fees` + `domain/reconcile` and write fixed-width text reports matching the Python output of `calculate_fees.py` and `match_payments.py print_report`. - `cmd/fuj/main.go`: `fuj fees` and `fuj reconcile` now dispatch; `fuj sync` / `fuj infer` keep the [M4] placeholder. - Both subcommands exit 1 with a clean actionable error message while IO is pending. - 13 unit tests covering stubs, all formatter branches, and orchestration wiring via fake loaders. ## Test plan - [x] `cd go && go test -race ./internal/services/membership/...` — all green - [x] `cd go && go test -race ./...` — all packages green - [x] `cd go && golangci-lint run ./...` — clean - [x] `./bin/fuj fees` → exits 1, stderr: `"io layer not yet wired up; lands in milestone M4"` - [x] `./bin/fuj reconcile` → same - [x] `./bin/fuj help` → `fees` / `reconcile` no longer tagged `[M2]`; `sync` / `infer` still `[M4]` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kacerr added 2 commits 2026-05-06 17:51:03 +02:00
Add internal/services/membership package: AttendanceLoader,
TransactionLoader, ExceptionLoader interfaces + NewStubSources stub
(returns ErrIOPending until M4 lands real Sheets loaders).

FeesReport and ReconcileReport orchestrate domain/fees + domain/reconcile
and write fixed-width text reports matching Python calculate_fees.py and
match_payments.py print_report output. 13 unit tests cover all formatter
branches and orchestration wiring via fake loaders.

cmd/fuj/main.go: fees and reconcile subcommands now dispatch; sync/infer
retain the [M4] placeholder.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
chore: tick M2.11 + M2.12 in progress tracker + CHANGELOG entry
All checks were successful
Deploy to K8s / deploy (push) Successful in 12s
8386af8078
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr merged commit 28f0e468f7 into main 2026-05-06 17:54:33 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kacerr/fuj-management#11