Release: develop -> main - #4488
Merged
Merged
Conversation
…projection comments (#4484) * docs(log): fix stale financial-log projection comments and hoist asNumber The comment above mapSummaryToEntry still claimed that non-numeric balancesByFinancialType values pass through unchanged; since the typeof guard that landed in 0defde1 they become undefined instead. Rewrite it to state both intentional deviations from the old mapLogToEntry path (a null sub-entry, a wrong-typed sub-entry) and add the previously undocumented top-level `message: null` case, which now yields a zero-point row instead of being dropped (not observed in production today; pinned with a new repository test). Also note on the asNumber guard that a plain typeof check lets Infinity through and that NaN cannot occur in valid jsonb, and hoist asNumber above the per-entry loop instead of recreating it on every iteration. No behavioural change beyond the asNumber hoist. * perf(trading-order): add index on created for monthly yield query TradingOrderService.getTradingOrderYield runs once per minute from LogJobService and was doing a Parallel Seq Scan on trading_order (922 MB / 5.4M rows, 146.399 ms per call in production), the same cost profile the sibling AddLedgerContentChangeScanIndexes migration already fixed for a different query on the same table. * docs: correct F20b test name and bank_tx index claim from PR #4484 review The F20b test name claimed mapSummaryToEntry mapping and SQL-path coverage it doesn't exercise; the test only mocks repo.query with an already projected result. Shortened the name to what it actually proves and moved the removed context into a comment above the test. The trading-order index migration's docstring wrongly stated bank_tx has no created index. IDX_bank_tx_type_created on (type, created) already exists for BankTxService.getBankTxFee, but only covers one of its three sub-queries since type is the leading column. Corrected the paragraph while keeping the underlying exclusion decision. * docs: fix EXPLAIN date mismatch in trading-order index migration The cited production EXPLAIN used created >= '2026-07-30', but the real query (Util.firstDayOfMonth) always filters on the first of the month. Replace the numbers with a measurement against the actual predicate (created >= '2026-07-01'), note that scan cost is date-independent since a Seq Scan reads the whole table regardless, and add an honest caveat that the planner's index choice is not verified in production yet. * docs: unify duplicate row-count figure in trading-order index migration Line 39 quoted 123,831 matching rows from an earlier measurement while line 22 quotes 123,918 from the EXPLAIN cited right above it. Align on 123,918 and note that the number is a point-in-time snapshot (the table grows by roughly 4,350 rows/day) — the ~2.3% selectivity is the stable figure the design decision rests on, not the absolute row count.
github-actions
Bot
requested review from
TaprootFreak and
davidleomay
as code owners
July 30, 2026 09:22
TaprootFreak
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic Release PR
This PR was automatically created after changes were pushed to develop.
Commits: 1 new commit(s)
Checklist