feat(go/M2.1): port czech.Normalize #4

Merged
kacerr merged 2 commits from feat/m2-1-czech-normalize into main 2026-05-05 23:26:56 +02:00
Owner

Summary

  • Ports Python czech_utils.normalize to Go as internal/domain/czech.Normalize — first M2 (pure-domain) task.
  • NFKD via golang.org/x/text/unicode/norm, drops unicode.Mn only (matches Python unicodedata.combining() semantics, which returns 0 for Mc/Me), then strings.ToLower.
  • Adds golang.org/x/text v0.36.0 — first external Go dep.

Test plan

  • go build ./... clean
  • go test -race ./... green (13-case table-driven test in normalize_test.go)
  • golangci-lint run clean (gofumpt-formatted)
  • All test inputs spot-checked against the Python implementation (PYTHONPATH=scripts:. python -c 'from czech_utils import normalize; ...') before locking the table

Notes

🤖 Generated with Claude Code

## Summary - Ports Python `czech_utils.normalize` to Go as `internal/domain/czech.Normalize` — first M2 (pure-domain) task. - NFKD via `golang.org/x/text/unicode/norm`, drops `unicode.Mn` only (matches Python `unicodedata.combining()` semantics, which returns 0 for Mc/Me), then `strings.ToLower`. - Adds `golang.org/x/text v0.36.0` — first external Go dep. ## Test plan - [x] `go build ./...` clean - [x] `go test -race ./...` green (13-case table-driven test in `normalize_test.go`) - [x] `golangci-lint run` clean (gofumpt-formatted) - [x] All test inputs spot-checked against the Python implementation (`PYTHONPATH=scripts:. python -c 'from czech_utils import normalize; ...'`) before locking the table ## Notes - Plan file: [docs/plans/2026-05-05-2204-go-rewrite-m2-1-czech-normalize.md](../src/branch/feat/m2-1-czech-normalize/docs/plans/2026-05-05-2204-go-rewrite-m2-1-czech-normalize.md) - Parity-fixture wiring deferred to M3.1/M3.2; will retroactively cover this function once the Tier-1 runner lands. - Followup after merge: tick M2.1 in progress tracker with commit SHA, add CHANGELOG entry. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kacerr added 2 commits 2026-05-05 22:36:51 +02:00
Feature work now goes on feat/<slug> branches; Claude pushes and prints
the Gitea compare URL for the user to open the MR. Exceptions documented
for small fixes and typo tweaks.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat(go/M2.1): port czech.Normalize — NFKD + Mn strip + lowercase
All checks were successful
Deploy to K8s / deploy (push) Successful in 8s
d9a61b338c
Adds internal/domain/czech.Normalize, the first pure-domain function in
the Go rewrite (M2 milestone). Matches Python czech_utils.normalize byte-
for-byte: NFKD decompose via golang.org/x/text/unicode/norm, drop Mn-
category combining marks (unicode.Mn, not IsMark, to match Python's
unicodedata.combining() semantics), then strings.ToLower.

Includes 13-case table-driven test; all inputs spot-checked against the
Python implementation before locking. Adds golang.org/x/text v0.36.0 as
first external dependency.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr merged commit 20ade6de3e into main 2026-05-05 23:26:56 +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#4