Recently Updated: ignore price-refresh payloads#33
Merged
Conversation
The Recently Updated list looked useless because every dashboard appeared updated at the same time — that's because Quantic's periodic stock-price refresh fires update_holdings on every worker, and we were stamping updated_at on every payload. Now compute a holdings signature (symbol, quantity, avg_price) and only bump the timestamp when that materially changes. Price-only payloads — which carry new price / value_in_base / value_in_usd but the same user-controlled fields — preserve the previous timestamp. The restore path still overrides via `__updated_at` to keep the historical timestamp across server restarts. 37 tests / 0 failures (+4 new on the worker spec covering price-only, adding, quantity edit, and override preservation).
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.
The Recently Updated list looked useless because every dashboard appeared updated at the same time — that's Quantic's periodic stock-price refresh firing `update_holdings` on every worker, which we were stamping as a fresh `updated_at`.
Now compute a holdings signature `(symbol, quantity, avg_price)` and only bump the timestamp when that materially changes. Price-only payloads (new `price` / `value_in_base` / `value_in_usd`, same user-controlled fields) preserve the previous timestamp. The restore path still overrides via `__updated_at` to keep the historical timestamp across server restarts.
Test plan