Repository navigation
A recorded replay's chance of red follows the candidates pushed near each build - #30
Merged
Merged
Conversation
A head is also guilty when, over the records read, no whole build that held it at that head passed, no landing of it was confirmed, two or more failed whole builds held it with no ejected culprit among their members, and it then left the queue at that head: its head moved, its label came off or it was gone. Probes count for neither side. The ejection rule stays; the two are a union, each head judged against the ejected heads alone. The red candidates of such a head leave the unblamed count, so they no longer become a chance of red for every build of the day. On hey2 on 26 Nov #2671's three red candidates were never ejected and read as a 13% chance of red.
A tree a guilty head breaks takes one of that head's recorded failing times, pushed to answered, from the failed whole builds that held it, the shortest drawn where the tree holds more than one. Those times leave the shared sample. A guilty head with no timed failure keeps drawing from the shared sample, and probes keep theirs. Perturbations scale these times.
A whole build read red on a base whose trunk the record reads red is no evidence against its members. The record reads the trunk red as the planner does: a red candidate's blame round in which the build of that base alone was read red and never green, and nothing was read green. A passing build of any kind that holds a head clears it, probes included, and a build once read green has passed whatever a later record reads for it. Builds of the trunk alone are kept in the replay's reading of the records, which dropped them before. The guilt fixtures are now the planner's own days, recorded pass by pass against the simulated CI.
Where the record's queue never ejected a head that broke the build, the replay's queue may eject it first, and the record's next head for that pull request then arrived with no label to queue it. The replay now labels it again at that head, with the record's queueing time. A pull request the record ejected comes back only with its own label, as before.
A whole build that takes a guilty head's failing time no longer draws from the shared sample first, so every other build's shared draws are main's. With no failing times recorded the lookup returns at once. One draw picks each held head's time, and the shortest stands. Two guilty heads in the same recorded build are still both given that build's time, and a failing time is still push to answered.
No record exercises the red-trunk clause. In the planner's form it cleared no head across the eighteen windows from 18 to 26 November, and the red trunk on hey-native-apps from 15:18 to 16:50 on 26 November clears nobody either: every member of its red candidates stayed queued and landed. A rule no record exercises cannot be scored against live. The replay's reading of the records no longer keeps builds of the trunk alone, which only that clause read. It comes back with a head the rule convicts whose failures all sit in a round the planner read as a red trunk. The test of a head's failing times now gives each of its three failed builds a time the shared sample does not hold, so a shared draw cannot pass for one. A head that moves without being held guilty is labelled once, which the red-trunk day used to show.
A wait figure through the window's own simulate comes from them, eight builds of a head with three recorded times take more than one, the shorter of two heads' times wins with it on either number, and the come-back label carries the record's queueing time.
The come-back label read only the heads the rule holds guilty. A head the record ejected, labelled again at that head and ejected again by the replay's queue, stayed out when its author pushed a new head while the record still queued it. It now comes back with every guilty head; where the replay had not ejected it, the label changes nothing.
A planner-made day of eight pull requests that break nothing, with builds of different times, gives the simulated and over-live halves of its row exactly as main gave them, so a build with no guilty head taking one draw more from the shared sample shows.
A build read green already passes every member it holds, and a head that passed is never guilty, so the clause decided nothing. The guard that a record queued the head stays, and now has a test: a head in two red builds that no loaded record queued was otherwise held guilty, its failures taken out of the shared sample and its candidates counted as blamed.
unejected_guilty_heads in the simulated half is how many heads the replay holds to have broken the build and left without an ejection, so a reader of the row can see a conviction and question it. It is a count over the window's records, the same on every seed.
A red trunk: the records do hold a head that left while the trunk failed, and the rule holds it guilty on those builds, so the sentence saying no record holds one goes. A head with one failed build, even one that failed alone. And a head it cannot tell from what it failed beside, unless the record ejected the other.
The records a window loads reach back before it opens, so a head held guilty on an earlier day was counted on every day after. The count now takes only the heads the window plays as guilty.
The verdict read each member's guilt by pull request number when the build answered, so a build pushed with a guilty head whose pull request moved to a clean head while it ran was read green. A tree's guilt is now that of the heads it was pushed with, as its failing time already was: the build pushed with the breaking head fails whatever its pull request holds by the time it answers. This changes what the replay did with a culprit the record ejected: its builds still running when the record moved it to its next head were read green, and are now read red. On the 18 windows only red builds, red candidates and their pull requests move, on four of hey-native-apps' days; landings, waits and builds per landing do not.
A recorded replay opened at the window's start, from the last record at or before it, with no running builds: a candidate building at the start was built again from nothing, so the day's first arrivals waited a build longer than they did live, and a red candidate at the start was replayed late. The open alone moved a figure by up to 17 points: hey2's wait p90 on 25 Nov went from 1.7% over live to 15.0% under it. The replay now opens a constant four hours before the window, from the last record at or before then, or from the first record where none is. Time zero stays at the window's start and the lead-in runs before it, so a window with no record before its start replays as before. The simulator counts its scores again from zero, so landings with their waits, labelled spans and queue-added minutes, builds and probes, red builds and candidates, and ejections count only from the window's start, each by when it happened; waiting_at_open is what waits at zero, and acts counts the acts from zero. withdrawn and departures_after_an_unconfirmed_plan count from the window's start as before. The record's hold is kept only on a head held at the replay's opening record, the one hold the replay did not see begin. A hold that begins in the lead-in is answered by git like one that begins in the window, so the unattributed holds are those of the heads held at the replay's opening. A pull request ejected in error now has never, not zero, for no return, as a return time before zero is a real one. With a 72-hour lead-in the 13 windows that were run sit within 2.2 points of the 4-hour rows on every figure. The count of unejected guilty heads takes in the lead-in: a head the replay plays as guilty before the window still shapes the queue the window opens on.
A replay that broke an invariant in the lead-in left its loop before the window opened, so the row took that seed's lead-in landings, waits, builds, last landing and the pull requests waiting at the break. Such a seed now gives the row its invariant failure and nothing else; the recorded acts the row counts are the window's, as before. The simulated landings an hour is left 0 where every seed's last landing is at the window's start, rather than divided by zero.
A guilty head's failing times came from the window's answered builds alone, so a head the replay plays as guilty only in the lead-in had none, and its lead-in builds drew from the shared sample. Its failing times are now those of its failed whole builds answered from the replay's opening record on, kept as the window's are, less those first read after an unrecorded stretch. The shared sample, the probe time and every rate stay the window's, and a lead-in build of a head that is not guilty gives nothing to any of them.
The red build before a replacement is shorter than the green ones; the opening record is the later of two before the cutoff, with the opening pull request's clocks as recorded; landings at the open are at zero and later; three ready clocks differ from their label's; an earlier landing's values, a lead-in probe and an empty window count nothing; a candidate pushed before zero and red after it is a red candidate, not a whole build; the population at the open changes at zero; a withdrawal seen at zero is pinned as it counts today; the return after a wrong ejection comes from a real one; the lead-in guilty head fails in its own time; and the pair holds clear before zero or are answered by git there.
The row's live half gained the first-candidate fields on main. The pin is the live half main's own build prints for the same records, so the test still shows the replay leaves it alone.
* replay-guilt: The pinned live half carries the first-candidate fields
The landings at the window's start give their wait samples, beside a later one that waits longer, and both wait percentiles of the row; the three own ready clocks give a row whose two percentiles differ, live and simulated; a window with no landing counts no wait, labelled span or queue-added sample; and the return after a wrong ejection runs through Run's opening tick with every build holding the pull request red, out just before its return time and back at the first tick from it.
Two red probes of the bare trunk on T, with no build on T pushed between them read green, make the trunk red from the record that made T the trunk to the push of the first build on T read green after the first probe. The replay plays that span as an episode from where it opens; the span's red builds, read on T where they were first read red, count neither towards the chance of red nor against a head's guilt. The row counts the spans it plays.
…again A pull request wrongly ejected at -13m is out at -5m, due back at -3m, queued again at that tick, and queued when the window opens, with the verdicts forced as in the in-window case beside it.
The first build on T read green after the first red probe ends the span. Where it is a candidate holding pull requests that go first in the record that pushes it, they are the fix: a tree is red unless it holds one, and the span ends when the replay's own queue lands it, with no fix of the simulator's own queued. Any other such build ends the span at its push record, on the acts' clock, a recorded replay's trees going by their push. A span whose fix landed before the replay opens plays no episode. The row counts the fixed spans each seed leaves red.
…firm them A build read green counts on the base it was pushed on as well as the one it is read on, so a green pushed on T between two red probes clears them however the records later rebase it. A span starts no earlier than the push of the last green build on T before its probes. A fix lands where the trunk's next observation confirms the landing, at the record that planned it; a refused one leaves the span running. A fix-ended span's builds are the red ones on T that hold none of its fixes, pushed before the fix lands.
A span no fix ends is still found, and its builds are still no evidence of a head's guilt, but the replay plays no episode for it and its red candidates stay in the chance of red. Trees are judged at their start in every world again. The row counts the unplayed spans that overlap the window.
…e row says so An unplayed span counts only where it overlaps the scored window, and the row gives the minutes it overlaps. The posted row adds a line under the simulator's when the replay landed through one.
* replay-warm: A wrong ejection's return that falls due before the window is tested again Four lead-in replay tests hold the waits they score
…r each build A recorded replay gave every candidate and check the day's red share among answered candidates with no culprit. Such failures bunch in time, so a replay spread an hour of reds over the whole day. Now a simulated candidate or check pushed at t whose drawn time is d takes the red share of the recorded candidates pushed within d of t, ends included, and the day's share where none was. Probes take zero as before. The sample is every candidate the records read that was read green or red, holds no head the replay holds broken, and is no build of a red trunk the replay plays. A flake is in play where the day's share is above zero or a red in the sample was pushed within an hour of the hours the replay runs. The day's share is counted in the same walk with the same tests. The build map now keeps builds with no chain, which the day's count walked before.
…m the sample A recorded replay told checkEject a flake was in play where the sample held a red pushed within an hour of the hours it runs. That window could be true where the replay opened later than the lead-in, false at its exact ends, and false while a long build drew from a red outside it. Each seed now records that one of its builds took a chance above zero from the candidates pushed near it, whether or not that build then failed, and a flake is in play from then on, or from the start where the day's share is above zero. The tests cover the new rule, the share read over a build's drawn time rather than the nominal one, and one recorded day whose simulated half moves because a red candidate answered after the window is near its builds, and is the quiet day's with that candidate green.
The mark a build sets when it takes a chance above zero from the sample was read only where the shape had no script, though the draw itself is not. No replay of records sets a script, so no row changes. A test holds the mark across a later build that draws zero.
There was a problem hiding this comment.
🟢 Approved
No active review issues remain for the recorded replay failure-rate changes.
No open issues 🎉
What changed in this PR
This PR makes recorded replay failures follow local clusters of unexplained red candidates, rather than applying the same daily failure rate throughout the window. It changes simulated results while leaving probes and live measurements unchanged.
Changes:
- Collects answered candidates with no identified culprit, excluding builds attributed to repaired red trunks.
- Uses nearby candidates’ red share within each simulated build’s drawn duration, falling back to the daily rate when none are nearby.
- Tracks when a seed draws a nonzero local failure chance and adds tests for sampling, boundaries, fallback behavior, and end-to-end replay results.
[!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/tick_replay.go |
Extracts eligible recorded candidates and their push times and outcomes. |
eval/sim.go |
Applies local failure probabilities and tracks flake eligibility for invariant checks. |
eval/local_chance_test.go |
Tests sampling rules, simulated outcomes, and unchanged no-red replay results. |
eval/live.go |
Passes the window’s candidate sample into recorded simulations. |
Review effort: Balanced
* train/main: A moved head's test fixture clears its breaking flag at the move (#29)
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.
Builds that fail for no pull request's reason come in bunches. The replay spread them evenly: every candidate and check had the day's share of such failures as its chance of red, at any hour. So on a day with a bad hour, the replay landed through the hour and failed builds at random the rest of the day.
This gives a simulated candidate the red share the records show around its own time. It follows the red-trunk replay, which is on main, and changes only the simulated half of the row. Probes are untouched.
The rule
twith a drawn build timedtakes the red share among the sample's candidates pushed withindoft. With none there, it takes the day's share, as before.The rule and what it should do were written down before it ran.
What the records hold
In nine days of windows hey-native-apps has 23 red candidates with no culprit among 532 answered, and hey2 has 2 among 223. For each such candidate, the red share among the others pushed within 40 minutes of it, against the same for a green one:
19 Nov is the one window the stack still has outside 20%. Nothing landed live from 06:31 to 11:59. Simulated over live, landings, median, p90, builds per landing:
The other 17 windows and both whole days of 26 Nov: all inside with and without it. Nine rows are identical. The rest, largest move of any figure, in points:
Limits
Checked
After two outside reads
Findings per read: 6 on the first commit (four Medium, one Low, one on the tests), then 2 on the second (both Low).
Taken: the window that decided when a flake is in play is gone, for a mark the seed sets when a build draws above zero from the sample; that removes its nominal lead-in, its excluded ends and a false broken invariant for a long build. Three tests: the drawn time, the end-to-end day, the new mark.
Taken from the second read, in the third commit: the mark is read whatever else the shape holds (it was skipped for a scripted shape, which no replay of records is), and a test holds the mark across a later build that draws zero. The read found no ordering in which a failure drawn from the sample reaches the check on ejections with no flake in play, and no leak of the mark between seeds. The four rows that move most were run again at the third commit and are equal; both replay checks pass on its build.
Not changed, with reasons:
For main, on trial
It lands before the day's rows are made, so the posted comparison is its first score. No build holding it has read that day's records, and its code was fixed before any of them was opened. The decision to land it the same day was made after main's own build had been read on the first hours of that day, which were outside 20% on one queue; if that queue's comparison comes inside, it is reported with that beside it, not as a clean count.
It is reverted before the next day's rows if, on either queue, the posted comparison has outside 20% a figure that the build of main without it has inside on the same day. It is kept once a queue with three or more red candidates with no culprit has the posted row inside on all four figures where main without it is outside, or further out by more than three points.
The nightly path was run with it, on copies of the records, before it landed.