feat(competition): king-progression timeline from competition.history - #403
Merged
Merged
Conversation
summarize_competition reports the CURRENT composite king + score-to-beat and standings ranks miners, but nothing tells the story of the competition -- who has held the composite crown, in what order, at what score, and how much each new king had to gain to take it. competition.history records exactly that (pr_eval appends one entry per crowning, in order). Add trinity.competition_timeline: build_timeline reads competition.history and reports the reign-by-reign progression -- each king's composite, per-benchmark breakdown, and gain over the previous king (the delta that had to clear win_margin; the first crown is measured against the 0.0 seed) -- plus the total gain from first crown to now and the single biggest leap. Read-only, tolerates a non-dict competition / non-list history / non-dict entry / missing miner-or-score without crashing. Empty (no crownings) on the seed leaderboard. Pure stdlib -- no torch, no network. Adds scripts/competition_timeline_report.py and offline tests.
…nblocks CI) A botched merge left nested git conflict markers in trinity/analysis/__init__.py (union_diagnostics vs oracle_column vs definition_of_done import blocks), so the package is invalid Python and ruff/import fail on every branch. __all__ already lists the symbols of all three modules, so all three import blocks are intended; keep them. Stacked here only to green this PR's CI while the same repair lands via James-CUDA#402/James-CUDA#405 -- it drops out on rebase once main is fixed.
Contributor
Author
|
CI was red because |
This was referenced Jul 22, 2026
fix(analysis): resolve unresolved merge-conflict markers in __init__ (package failed to import)
#405
Merged
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.
What does this PR do?
summarize_competition(#397) reports the current composite king + score-to-beat, andstandings(#387) ranks miners — but nothing tells the story of the competition: who has held the composite crown, in what order, at what score, and how much each new king had to gain to take it.competition.historyrecords exactly that —pr_eval._update_leaderboardappends one entry per crowning, in order.How
Add
trinity.competition_timeline:build_timelinereadscompetition.historyand reports the reign-by-reign progression —win_margin; the first crown is measured against the0.0seed floor);It's read-only and tolerant: a non-dict
competition, non-listhistory, non-dict entry, or an entry missingminer/scoreare skipped without crashing.scripts/competition_timeline_report.pyrenders it (text or--json):Scope
Pure stdlib — no torch, no network. New module + script + tests; touches no existing file. The committed seed
leaderboard.jsonrenders "no one has been crowned yet." 10 offline tests cover the gain-over-previous-king math, the biggest leap, the per-benchmark breakdown, the empty/no-competition cases, skipped malformed entries, and load-from-file.ruff+mypyclean;pytest tests/test_competition_timeline.pygreen (10).Duplication note
New self-contained module; verified no open PRs exist at push time, and it's distinct from
standings(current ranking) andsummarize_competition(current king) — this is the historical progression. Fourth piece of thecompetition-object toolkit (after merged #384/#387/#397).