feat(py): M5.4 fix #2 — add vs and sync_id to payments tx projection #23

Merged
kacerr merged 1 commits from fix/py-payments-add-vs-syncid into main 2026-05-07 23:51:12 +02:00
Owner

Summary

  • fetch_sheet_data in scripts/match_payments.py was reading 9 sheet columns but skipping VS and Sync ID, causing make parity to report extra fields on every raw payment row compared to Go's /api/* responses.
  • Add idx_vs/idx_sync_id column lookups and vs/sync_id keys to the tx dict; the values flow through group_payments_by_person_unwrap_view_model_for_api → JSON response automatically.
  • Update the three /api/* test fixtures to include vs/sync_id keys for realism (tests were already passing without them since they don't assert key absence).
  • No Go changes — RawTransaction.VS/SyncID remain on the wire contract as the user prefers.

Cache note

After this lands and make web (Python) is restarted, hit POST /flush-cache once (or delete tmp/payments_transactions_*.json) so the in-process cache is cleared and the next request picks up the new column lookups.

Test plan

  • make test — 31 tests, all green
  • POST /flush-cache after deploy, then make parityvs/sync_id diff lines gone; remaining diffs are fix #3 territory (message/amount type drift)

🤖 Generated with Claude Code

## Summary - `fetch_sheet_data` in `scripts/match_payments.py` was reading 9 sheet columns but skipping `VS` and `Sync ID`, causing `make parity` to report extra fields on every raw payment row compared to Go's `/api/*` responses. - Add `idx_vs`/`idx_sync_id` column lookups and `vs`/`sync_id` keys to the tx dict; the values flow through `group_payments_by_person` → `_unwrap_view_model_for_api` → JSON response automatically. - Update the three `/api/*` test fixtures to include `vs`/`sync_id` keys for realism (tests were already passing without them since they don't assert key absence). - No Go changes — `RawTransaction.VS`/`SyncID` remain on the wire contract as the user prefers. ## Cache note After this lands and `make web` (Python) is restarted, hit `POST /flush-cache` once (or delete `tmp/payments_transactions_*.json`) so the in-process cache is cleared and the next request picks up the new column lookups. ## Test plan - [x] `make test` — 31 tests, all green - [ ] `POST /flush-cache` after deploy, then `make parity` — `vs`/`sync_id` diff lines gone; remaining diffs are fix #3 territory (`message`/`amount` type drift) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kacerr added 1 commit 2026-05-07 23:50:49 +02:00
feat(py): M5.4 fix #2 — add vs and sync_id to payments tx projection
All checks were successful
Deploy to K8s / deploy (push) Successful in 7s
65694ad378
Python's fetch_sheet_data read 9 sheet columns but skipped VS and
Sync ID, causing make parity to report extra fields on every raw
payment row emitted by the Go backend. Both columns are already on
the sheet; add idx_vs / idx_sync_id lookups and the matching keys
to the tx dict so the Python /api/* wire shape matches Go's
RawTransaction.

Update /api/* test fixtures to include vs/sync_id keys for realism.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kacerr merged commit fc47606b1c into main 2026-05-07 23:51:12 +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#23