Ownership trend window is set by snapshot cadence, not elapsed time #14
Labels
No labels
architecture
cleanup
dependencies
performance
priority: high
priority: medium
reliability
security
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
solvreven/FPL#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ownership_trends(window: int = 2)comparessnaps[-2]andsnaps[-1]— thetwo most recent snapshot directories by position, with no notion of elapsed
time.
So the meaning of "rising"/"falling" depends entirely on how often someone
happened to run
snapshot_pit.py. On 2026-08-27 two snapshots were taken 30minutes apart (before and after a cache rebuild), which collapsed the trend
window from ~2 days to half an hour and made all 616 players read as flat.
It is honestly reported — the UI renders the window via
setOwnTrendWindow— sothis is uninformative rather than misleading, and it self-heals at the next
deadline snapshot. But a signal whose meaning is set by an incidental
operational detail will eventually be read as if it meant something fixed.
Suggested fix. Select the earlier snapshot by a minimum elapsed time (e.g.
the most recent one at least 24h older than the latest), fall back to the oldest
available, and report the actual elapsed hours in the meta so the window is
never implied.
Related test note:
test_a_missing_measurement_is_none_and_never_zeroassertedon the live cache and went red when the data stopped obliging. It has been
rewritten to force the refusal branch with a synthetic fixture.