Continuous monitoring and early warning for track-record scores - #2
Merged
Conversation
A point-in-time score says how good a record is today; monitoring says whether it is deteriorating, early enough to act. The scoring machinery is run forward through time, emitting alerts when a record turns. - Dual-window scoring: an expanding window is the authoritative published number; a trailing window compared against the preceding equal-length window is the early-warning signal. Equal lengths keep the comparison length-fair, and divergence is measured on annualised Sharpe (uncapped, sensitive on short windows) rather than the integrity-capped composite. - Cadences: daily, weekly, monthly, yearly. - Alerts: trailing divergence (pre-emptive), new critical flag, grade drop, score drop; each references the triggering snapshot. - Append-only, hash-chained ScoreHistory proves the record was not reordered or back-edited; each snapshot stays firewall-verifiable. - Thresholds are operator-tunable; delivery is a hosted adapter over the emitted data structures. 25 new tests; docs/monitoring.md spec.
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.
Continuous monitoring and early warning
Stacked on
feature/score-firewall(#1); review that first. This adds thedeterioration-detection layer the marketplace-operator workflow needs: a
point-in-time score says how good a record is today, monitoring says whether
it is deteriorating — early enough to act.
Dual-window scoring
window. Equal lengths make the comparison length-fair — a naive
"recent vs. whole history" gap is contaminated by record length, since
sufficiency and the Deflated Sharpe reward more data and make every short
window look like decay.
composite saturates at the short-record cap on sub-year windows, which
would flatten the signal exactly where it must be sharp.
TRAILING_DIVERGENCEis the pre-emptive alert; it fires before the slow expanding score reacts.
What's in it
score.monitoring—Cadence(daily/weekly/monthly/yearly),Monitor,ScoreSnapshot,ScoreHistory,Alert/AlertKind/Severity.over time), grade drop, score drop — each referencing its triggering
snapshot.
ScoreHistory;is_chain_valid()proves the record was not reordered or back-edited, andeach snapshot stays firewall-verifiable.
polling) is a hosted adapter over the emitted data structures.
Quality
format clean. Additive: no changes to the scoring engine or firewall.
Docs
docs/monitoring.md— specification, dual-window rationale, and thecalibration/delivery boundaries.