## Summary
- Ports `calculate_fee` (adults) and `calculate_junior_fee` (juniors) from `scripts/attendance.py` into a new `go/internal/domain/fees` package.
- Introduces `Expected{Value int; Unknown bool}` for the junior `"?"` sentinel — strictly typed instead of `str|int`.
- Constants (`AdultFeeMonthlyRate`, `JuniorFeeMonthlyRate`, fallback defaults) are exported so M5 handlers can read them.
- 20 table-driven tests, all green with `-race`; `golangci-lint` clean.
Ticks **M2.3** and **M2.4** in [docs/plans/2026-05-03-2349-go-backend-rewrite-progress.md](docs/plans/2026-05-03-2349-go-backend-rewrite-progress.md).
## Test plan
- [ ] `make go-test` passes (all 20 new subtests green)
- [ ] `make go-lint` clean
- [ ] `make go-build` succeeds
ADULT_FEE_DEFAULT is 700 CZK, not 750. The 750 appears in
ADULT_FEE_MONTHLY_RATE for most current months but is not the fallback.
Rephrase the member-tiers bullet to point at the dict rather than a
number that drifts each season; update the fee-calc bullet to match
the junior line's style (default 700 vs default 500).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Ports calculate_fee and calculate_junior_fee from scripts/attendance.py
into a new go/internal/domain/fees package. Introduces the Expected type
(Value int, Unknown bool) for the junior "?" sentinel, keeping the Go
API strictly typed instead of mirroring Python's str|int return.
All 20 table-driven tests pass with -race; golangci-lint clean.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr
merged commit 0fc3b6dd9a into main2026-05-06 09:23:02 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
calculate_fee(adults) andcalculate_junior_fee(juniors) fromscripts/attendance.pyinto a newgo/internal/domain/feespackage.Expected{Value int; Unknown bool}for the junior"?"sentinel — strictly typed instead ofstr|int.AdultFeeMonthlyRate,JuniorFeeMonthlyRate, fallback defaults) are exported so M5 handlers can read them.-race;golangci-lintclean.Ticks M2.3 and M2.4 in docs/plans/2026-05-03-2349-go-backend-rewrite-progress.md.
Test plan
make go-testpasses (all 20 new subtests green)make go-lintcleanmake go-buildsucceeds