Repository navigation
Conversation
With cancels on, a candidate still building when a later candidate lands all its members is deleted before it answers, so the slowest builds of the day never reached the replay's sample of build times. A candidate or check that was recorded with members, is read pending with an empty chain (the trunk holds every member) and is deleted in the window now gives the sample its age at that record, a lower bound on its time. A build deleted for any other reason, one with no push time, and one that answered before or after gives no such sample. The live half of the row is unchanged.
A check cleared with its round while building is not overtaken, and a candidate past the timeout is a lost run, not a slow one: neither gives a sample now. The age runs from the push the deleting record reads, where it has one. A build is counted where its delete is first planned, so a delete planned before the window and again inside it adds nothing. The tests run the positive case with cancels on, and compare the live half with a control recording whose candidate is never deleted, with answered times that a leak into the live median would move.
A read that mends a push its tick never marked stamps it a second after the record's time, so the deleting record can read a push later than itself. The first such delete still marks the candidate, and no sample is taken. The tests now stand on a two-slot stacked landing with cancels on, real round builds for the check and the probe, and a keep that has run out for the landed mark, and each guard has a row that fails without it: the push time with no timeout, its fallback to the recorded push, a candidate never read with members, and a first delete planned before the window on a chain not yet landed. The helper says what the rule does not see.
A delete whose age is not above zero no longer marks the candidate as deleted, so a later delete of it still gives its age. Pin the pending guard, the equality at the push time, and the first valid delete before the window on a chain the trunk had not yet landed.
…eplay samples An overtaken candidate reaches the replay's sample as a timed build that did not fail, answered at the record that plans its delete, so recorded keeps it among the times as it keeps any build no guilty head failed.
…build times The replay draws a build's time by a seeded index, so the order is part of what a row gives. The test compared a sorted copy.
There was a problem hiding this comment.
🟢 Approved
No active review issues are identified for the replay build-time sampling change.
No open issues 🎉
What changed in this PR
This PR reduces replay timing bias by including the age of qualifying candidates deleted while still building after all their members have landed. These ages provide lower-bound build-time samples without changing live metrics.
Changes:
- Track qualifying overtaken candidates and include their ages only when no answer appears in the records read for the window.
- Add tests for eligibility, timing boundaries, duplicate deletes, sample order, and unchanged live metrics.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
eval/live.go |
Adds qualifying overtaken candidates’ ages to replay build-time samples. |
eval/live_replay_test.go |
Tests sampling rules, edge cases, ordering, and live-metric preservation. |
Review effort: Balanced
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.
With
cancelson, a candidate still building when a later candidate lands all its members is deleted before it answers. Those are the day's slowest builds, and none of them reached the replay's sample of build times, so the replay ran fast on any daycancelswas on. hey-native-apps turned it on at 20:46Z on 25 Nov; hey2 has had it throughout.A candidate the record plans to delete while it is still building, once the trunk holds every member of its chain, now gives the sample its age at that record: a lower bound on the time it would have taken. Nothing else reads it. The live half of the row is unchanged.
The rule
A build gives a sample when the first record that plans its delete reads it as a candidate, pending, not past the timeout (the planner's own test), not marked landed, with an empty chain; it was seen with members before; that record is inside the window; its age is above zero; and it never answered in the records the window reads. The age runs from the deleting record's own push time.
An empty-chain candidate is always overtaken by one pushed after it, so its age is at least a whole build's time. In nine days of records, both queues, the ten such candidates had built 37 to 62 minutes.
What the records say
Simulated over live, per cent, main then this branch, at the head that holds main. The 18 windows (18 to 25 Nov, and 26 Nov to 11:19Z) and both queues' whole 26 Nov. The live half is identical in all 20.
No figure main has inside 20% is outside with this, and no row has a broken invariant. The moves under about three points are no evidence either way: the replay's figure is a mean over 200 seeds, and a move that size comes and goes between two builds of the eval.
Both replay checks pass on the build of this head: every window within, every perturbation fails as it should.
Checked
After three outside reads
The first read the first commit and found the rule too wide: it also took round checks cleared while pending (two in hey2's records, at 21 and 22 minutes, which pull the sample the wrong way), builds past the timeout, and the first planned push time where a push was refused and made again. All fixed. The second read the fix and found one edge, a negative age when a tick dies between its push and its mark, and tests that passed with their guard removed. Fixed in the third commit. The third read that commit and found that a delete planned at an age not above zero still used up the candidate's one sample, so a refused delete lost the valid age the next record would give; it also found no test for the pending guard, none for a delete at the push time itself, and a fixture whose trunk moved a record too early. The fourth commit moves the age test beside the others, as that read proposed, and fixes the three tests; it has had no read of its own. Findings per read: 7, 5, 4, none High in the last.
Not changed, with reasons:
Brought up to main
Main changed where the replay's build times are made: it keeps each timed build with its commit, whether it failed and when it answered, and the replay leaves out the failed builds of a head it holds guilty. An overtaken candidate now joins those as a build that did not fail, with its age as the time and the deleting record's time as its answer, so it is always kept. Every test of both sides passes with its own values.
One outside read of the merge: no finding on the resolution, the order of the times, their readers, the four hours before the window, or double counting. One Low, taken: a test compared a sorted copy of the times though the replay draws by a seeded index; it now holds the order.
For main after tonight
It lands after tonight's rows and comparison have posted. It is then judged on the posted rows each night as the other replay changes are: reverted if it takes a figure outside 20% that main without it keeps inside.