Add a DNF row head to head, and stop bailing out one scenario early - #77
Merged
Merged
Conversation
The ladder ran to the back of the field, which is not the bottom of what can
happen to the leader: every finishing place pays something, and not finishing
pays nothing. A DNF row now sits under the last place, ruled off from the
ladder because it is an outcome rather than a position — the leader ends on
exactly what they have banked, and the margin column reads "—" since there is
no place to be ahead of.
Adding it turned up a real bug in the impossibility test. The panel skips the
table and prints a sentence when the lead is more than the event can pay, and
it decided that by asking whether the chaser could be caught at the leader's
WORST FINISH. Those are different claims: the back of the MPO field still
pays 10 points, so a leader parked between "the chaser's ceiling" and "the
chaser's ceiling plus a last-place finish" could not be passed at any place on
the curve and could still be passed on a DNF. The panel bailed out of a table
whose DNF row would have shown a real answer. It now tests against the DNF
total, which is the actual floor, and the sentence for a lead nothing can
close says so out loud ("even if X does not finish"). The one-liner for the
narrower case is new too: where every finishing place settles it but a DNF
does not, the lede says that rather than claiming the whole thing is out of
reach.
Verified against the published bundles: 82 rows MPO and 43 FPO, the DNF row
reading `DNF | 730.1 | any | —` in MPO and `DNF | 963.58 | 33rd | —` in FPO,
at 390 and 1180px with no page errors and no horizontal overflow. The branch
the old test got wrong was exercised directly by parking a leader inside that
window: every place reads "—" and the DNF row reads "1st", where the previous
code printed no table at all. 258 tests still pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JsBC4pyUqbxW9y5o9tAeRr
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.
Follow-up to #76. The head-to-head ladder ran to the back of the field, which is not the bottom of what can happen to the leader: every finishing place pays something, and not finishing pays nothing.
The row
A DNF now sits under last place, ruled off from the ladder because it is an outcome rather than a position:
The leader ends on exactly what they have banked. The margin column reads
—, because there is no place to be ahead of.The bug it exposed
The panel skips the table and prints a sentence when the lead is more than the event can pay. It decided that by asking whether the chaser could be caught at the leader's worst finish — and that is a different claim from "cannot be caught at all", because the back of the MPO field still pays 10 points.
A leader parked between the chaser's ceiling and the chaser's ceiling plus a last-place finish therefore could not be passed at any place on the curve, and could still be passed on a DNF. The panel bailed out of a table whose DNF row would have shown a real answer.
Reproduced directly by parking a leader inside that window:
Before this change that rendered no table at all, just "cannot pass them there however the weekend goes" — which was false.
It now tests against the DNF total, the actual floor. Two copy changes fall out of that:
Verification
DNF | 730.1 | any | —(MPO) andDNF | 963.58 | 33rd | —(FPO).—, DNF row1st, table rendered where the old code rendered none.python -m pytest tests -q→ 258 passed (unchanged — this touches no Python).🤖 Generated with Claude Code
https://claude.ai/code/session_01JsBC4pyUqbxW9y5o9tAeRr
Generated by Claude Code