feat(go): M5.4 — parity diff binary + make parity #19

Merged
kacerr merged 2 commits from feat/go-m5-4-parity-binary into main 2026-05-07 23:25:24 +02:00
Owner

Summary

  • go/cmd/parity/main.go: standalone binary that GETs /api/version, /api/adults, /api/juniors, /api/payments from both Python (:5001) and Go (:8080) backends, scrubs an allowlist (render_time.total, build_meta), and prints cmp.Diff for remaining differences. Exits 0/1/2 (match / diffs / errors) — CI-friendly for M7.2.
  • go/cmd/parity/scrub_test.go: 4 unit tests for the dotted-path scrubber.
  • go/go.mod: github.com/google/go-cmp promoted to direct dependency.
  • Makefile: parity target + help entry (make parity — requires both backends running).
  • Progress tracker updated: M5.4 ticked, milestone set to M5 complete.

Test plan

  • cd go && go build ./cmd/parity && go test ./cmd/parity/... — builds clean, 4 tests pass
  • make go-test — full test suite still green
  • make go-lint — no lint issues
  • Live smoke: make web-py + make web-go, then make parityparity: 4/4 routes match

🤖 Generated with Claude Code

## Summary - `go/cmd/parity/main.go`: standalone binary that GETs `/api/version`, `/api/adults`, `/api/juniors`, `/api/payments` from both Python (:5001) and Go (:8080) backends, scrubs an allowlist (`render_time.total`, `build_meta`), and prints `cmp.Diff` for remaining differences. Exits 0/1/2 (match / diffs / errors) — CI-friendly for M7.2. - `go/cmd/parity/scrub_test.go`: 4 unit tests for the dotted-path scrubber. - `go/go.mod`: `github.com/google/go-cmp` promoted to direct dependency. - `Makefile`: `parity` target + help entry (`make parity` — requires both backends running). - Progress tracker updated: M5.4 ticked, milestone set to M5 complete. ## Test plan - [ ] `cd go && go build ./cmd/parity && go test ./cmd/parity/...` — builds clean, 4 tests pass - [ ] `make go-test` — full test suite still green - [ ] `make go-lint` — no lint issues - [ ] Live smoke: `make web-py` + `make web-go`, then `make parity` → `parity: 4/4 routes match` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kacerr added 1 commit 2026-05-07 22:57:41 +02:00
feat(go): M5.4 — parity diff binary + make parity
All checks were successful
Deploy to K8s / deploy (push) Successful in 10s
6f36225187
Adds cmd/parity/main.go: a standalone Go binary that GETs
/api/version, /api/adults, /api/juniors, /api/payments from both
the Python (:5001) and Go (:8080) backends, scrubs an allowlist
(render_time.total, build_meta), and prints cmp.Diff for any
remaining differences.  Exits 0 on full match, 1 on diffs, 2 on
fetch/parse errors — CI-friendly for M7.2.

- go/cmd/parity/main.go: flags (-py, -go, -route, -timeout), fetch
  helper, allowlist scrubber (dotted-path aware), exit-code logic.
- go/cmd/parity/scrub_test.go: 4 unit tests for the scrubber.
- go/go.mod: promote github.com/google/go-cmp to direct dep.
- Makefile: parity target + help entry.
- Progress tracker: M5.4 ticked; milestone updated to M5 complete.
- Plan archived to docs/plans/2026-05-07-2254-m5-4-parity-binary.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr force-pushed feat/go-m5-4-parity-binary from 6f36225187 to fe0e49a134 2026-05-07 23:09:23 +02:00 Compare
kacerr added 1 commit 2026-05-07 23:23:42 +02:00
fix(go): exclude /api/version from parity diff — identity, not contract
All checks were successful
Deploy to K8s / deploy (push) Successful in 7s
2b15280d03
/api/version returns each binary's own tag/commit/build_date, which
differs by design between independently built backends. Diffing it
always produces a false positive. Drop it from allRoutes; the route
remains reachable via `make parity ARGS="-route /api/version"`.

Also remove the vestigial `build_meta` allowlist entry (Python returns
the build dict as the top-level response body, not nested under
build_meta, so the scrubber never matched anything).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr merged commit 208f762c18 into main 2026-05-07 23:25:24 +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#19