amount: non-numeric sheet values like "---" were passed through as strings; Go's parseFloat silently returns 0.0. Added get_float helper that matches.
message: numeric cell values (bank references in the message column) came through as float64; Go's getVal uses fmt.Sprint → always a string. Applied get_str to message.
views.py — junior "?" cell text sticky across exception overrides
Go's build_juniors sets cellText = "?" + countStr whenever IsUnknown is true, regardless of exceptions. Python was checking expected == "?", but reconcile overwrites expected with the exception amount (e.g. 0) before the view builder runs — dropping the "?" to "-".
Fix: derive is_unknown from original_expected == "?" (captured before exception substitution). Also aligned the tooltip guard to match Go: only show Received/Expected tooltip for non-unknown months (or when paid > 0).
Test plan
make test — 31 tests, all green
Restart make web + POST /flush-cache, then make parity — confirm these three diffs gone
## Summary
Three `make parity` diffs fixed, all Python-side:
**`match_payments.py` — tx field coercions**
- `amount`: non-numeric sheet values like `"---"` were passed through as strings; Go's `parseFloat` silently returns `0.0`. Added `get_float` helper that matches.
- `message`: numeric cell values (bank references in the message column) came through as `float64`; Go's `getVal` uses `fmt.Sprint` → always a string. Applied `get_str` to `message`.
**`views.py` — junior `"?"` cell text sticky across exception overrides**
- Go's `build_juniors` sets `cellText = "?" + countStr` whenever `IsUnknown` is true, regardless of exceptions. Python was checking `expected == "?"`, but `reconcile` overwrites `expected` with the exception amount (e.g. `0`) before the view builder runs — dropping the `"?"` to `"-"`.
- Fix: derive `is_unknown` from `original_expected == "?"` (captured before exception substitution). Also aligned the tooltip guard to match Go: only show Received/Expected tooltip for non-unknown months (or when paid > 0).
## Test plan
- [x] `make test` — 31 tests, all green
- [ ] Restart `make web` + `POST /flush-cache`, then `make parity` — confirm these three diffs gone
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The Sheets API returns VS (variabilní symbol) cells as float64 when
the column is number-formatted, so Python was emitting vs: 0 (a JSON
number) while Go's getVal uses fmt.Sprint and always emits vs: "0"
(a string). Add get_str helper that converts whole-number floats via
int() first (matching Go's %g formatting), applied to the vs field.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two remaining make parity diffs vs Go:
- amount: non-numeric sheet values like "---" passed through as strings;
Go's parseFloat silently returns 0.0 for unparseable values. Add
get_float helper that matches that behaviour.
- message: numeric cell values (e.g. a bank reference in the message
column) passed through as float64; Go's getVal uses fmt.Sprint and
always emits a string. Apply get_str to the message field.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Go's build_juniors sets cellText = "?" + countStr whenever
md.IsUnknown is true, regardless of whether an exception overrides the
expected amount. Python was checking expected == "?" for this branch,
but reconcile replaces expected with the exception amount (e.g. 0)
before the view builder runs, so the "?" was silently dropped to "-".
Fix: derive is_unknown from original_expected == "?" (set before
exception substitution) instead of expected == "?". Also align the
tooltip guard: Go only shows Received/Expected tooltip for non-unknown
months (or when paid > 0), matching the same is_unknown flag.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kacerr
merged commit 709a2f2335 into main2026-05-08 00:26:39 +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
Three
make paritydiffs fixed, all Python-side:match_payments.py— tx field coercionsamount: non-numeric sheet values like"---"were passed through as strings; Go'sparseFloatsilently returns0.0. Addedget_floathelper that matches.message: numeric cell values (bank references in the message column) came through asfloat64; Go'sgetValusesfmt.Sprint→ always a string. Appliedget_strtomessage.views.py— junior"?"cell text sticky across exception overridesbuild_juniorssetscellText = "?" + countStrwheneverIsUnknownis true, regardless of exceptions. Python was checkingexpected == "?", butreconcileoverwritesexpectedwith the exception amount (e.g.0) before the view builder runs — dropping the"?"to"-".is_unknownfromoriginal_expected == "?"(captured before exception substitution). Also aligned the tooltip guard to match Go: only show Received/Expected tooltip for non-unknown months (or when paid > 0).Test plan
make test— 31 tests, all greenmake web+POST /flush-cache, thenmake parity— confirm these three diffs gone🤖 Generated with Claude Code