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 parity — vs/sync_id diff lines gone; remaining diffs are fix#3 territory (message/amount type drift)
## 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)
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 main2026-05-07 23:51:12 +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
fetch_sheet_datainscripts/match_payments.pywas reading 9 sheet columns but skippingVSandSync ID, causingmake parityto report extra fields on every raw payment row compared to Go's/api/*responses.idx_vs/idx_sync_idcolumn lookups andvs/sync_idkeys to the tx dict; the values flow throughgroup_payments_by_person→_unwrap_view_model_for_api→ JSON response automatically./api/*test fixtures to includevs/sync_idkeys for realism (tests were already passing without them since they don't assert key absence).RawTransaction.VS/SyncIDremain on the wire contract as the user prefers.Cache note
After this lands and
make web(Python) is restarted, hitPOST /flush-cacheonce (or deletetmp/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 greenPOST /flush-cacheafter deploy, thenmake parity—vs/sync_iddiff lines gone; remaining diffs are fix #3 territory (message/amounttype drift)🤖 Generated with Claude Code