Skip to content

A probe counts only if it was asked to run exactly what its red failed on - #34

Draft
jeremy wants to merge 3 commits into
mainfrom
ran-every-failed
Draft

jeremy wants to merge 3 commits into
mainfrom
ran-every-failed

Conversation

@jeremy

@jeremy jeremy commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Not for merge. Two outside reads have each found ways this still takes out the wrong pull request or fails to drain. It is up as a draft so the rule, its tests and what is still open are in one place. It changes how the cause of a red is found.

Why

A round's probe runs only the jobs its commit names: the red build's Failed as read on the tick that pushes the round. Today a candidate's verdict arrives when its build ends, so that list is whole at the first failed read. A repository that reports red at the first job that failed for good makes the list move afterwards: it grows as more jobs fail, and it loses a name if a job is retried to green. A probe pushed before the change ran other jobs than the red failed on, and the planner still takes its pass three ways: it clears the prefix, it can read the red as a flake, and it can be the middle build of a fair test. With one flake that ejects a pull request that broke nothing.

What it does

  • A build carries Runs, the contexts a probe was asked to run, read back from its Banyan-Probe-Failed trailers.
  • A probe counts for its red only if it was asked to run exactly the contexts the red's Failed holds now, as a set. So every probe that counts ran the same jobs. A whole build and a candidate always count. A probe recorded before probes named their jobs carries no list and counts as before; that is kept apart from a probe asked to run nothing.
  • A build that does not count gives no verdict, pass or fail, is not waited on to answer, and brings no recheck wait.
  • A round still goes out only once CI has begun every build of the round before, whether those count or not.
  • Context names are written and compared through one function (named), since git reads a trailer back without its trailing whitespace.

From the records

Under today's gate nothing moves. Each probe's real job list was read from its commit and put onto copies of the recorded ticks, 16 to 27 November, and this branch's planner was run beside main's on every tick that holds a failed candidate or a probe:

Queue Ticks Differ
hey-native-apps 1,481 0
hey2 1,286 0

In the records of 16 to 28 November a failed candidate's list changed after its first failed read on 0 of 118 candidates on hey-native-apps. On hey2 it changed on 13 of 74, where every round is a whole build.

With an early red on hey-native-apps, a failed job would have shown before the red read on 85 of 118 reds, a median 19.6 minutes ahead, and the list would have changed after that on 35 of them. If the rounds start again at each change, 59% of those minutes are left. These are upper bounds: the first sight of a failed job at a tick, not the first that failed for good.

What the two reads found

Fixed here, each with a test that failed first:

  • With a superset rule, a list that grew and then shrank let set-aside probes count again, one of them never begun before the next round went out, so a fair test was read fail, pass, fail where the builds began fail, fail, pass. #1 was ejected for nothing.
  • A context name ending in a space never matched what read back, and a round went out on every tick.
  • The rule followed the current probes setting, so a probe in flight when probes were turned off still counted.

Still open:

  • A probe's pass between two whole-build failures on a job the probe never ran. Reachable when probes are turned on partway through a red. The rounds begin in order; the fault is what a fair test admits. Main has it too. The remedy is three builds of one kind and one list, for scheduling and for judging: a change to the fair test.
  • An older probe still out at the upgrade keeps its names as written, and counts normalises them, so one that asked for linux counts as having run linux.
  • The candidate itself turning green while its rounds are out leaves no failed attempt to name; a probe with an empty Banyan-Probe-Of goes out, is not read back as a probe, and goes out again.
  • A list that changes on every tick never lets a failure stand long enough for the build below it. It drains once the list is still, which it is when the build ends.
  • A verdict retried to green on the same commit puts a pass after both failures. The design holds that a verdict belongs to a commit for good; an early red makes that a promise CI has to keep.
  • Set-aside rounds use up the three-rounds-ahead allowance when only some are set aside, and their pushes renew a recheck wait.
  • Two failed attempts of one red with different lists: weigh takes the last in slice order, as on main, and that can set one finished round aside. Left alone on purpose: one round per red, never seen in the records, and choosing the attempt differently is a second change to blame.
  • Writing normalised names changes a probe's commit for a list that holds a padded name.
  • Tests: the pushed empty list is not pinned; the harness matches job names by substring and applies no notes.
  • The simulator has no world where a verdict goes red early, so none of this has been run there.

What that says

The faults are not falling from one read to the next. Each is a way evidence gathered against one list is read against another, or a way a moving list or verdict breaks something main takes as given. Before a third rule: whether probes should be used at all for a red whose list is still moving, or whether an early red should wait for this to be settled in the simulator first.

A probe runs only the jobs named in its Banyan-Probe-Failed trailers, the red
candidate's Failed as read on the tick that pushed it. Where a verdict can go red
before the build ends, Failed grows on later ticks, and a probe pushed before it grew
ran fewer jobs than the build failed: its pass cleared prefixes, read the red as a
flake and stood as the middle build of a fair test, and an innocent pull request
could leave on one flake.

A build now carries Runs, the contexts a probe was asked to run, read back from its
trailers in order. A probe covers its red when every context in the red's Failed, as
this tick reads it, is among them. One that does not is read as a build with no
verdict, as a lost one is, without the recheck wait a lost one gets: its pass and its
failure say nothing, nothing waits for it while it runs, and the next round, pushed
with the list as it now stands, goes out on the tick that reads the longer list.

A whole build and a candidate always cover. Runs is nil on a probe recorded before
probes named their jobs, which covers as before, and empty on one asked to run none,
which covers only a red whose Failed is still empty. Where Failed never changes, and
where probes are off, every tick plans as before.
…d on

A probe that ran a subset of its red's Failed was set aside, and one that ran a
superset counted. Where Failed shrinks again, as a job retried to green leaves it,
that let rounds count beside each other that never ran the same jobs: a failure that
ran linux and mac stood with a pass that ran linux alone. And a round set aside while
CI had not begun it let the next round go out past it, so when the list shrank back
the three could read as a fair test though they began out of order, and an innocent
pull request left.

A probe now counts for its red only where the contexts it was asked to run are the
same set as the red's Failed on the tick that reads it, whatever their order. Growth
and shrinkage are alike: a probe that does not count gives no verdict, nothing waits
for it, and the next round goes out with the list as it stands. Three rounds in a row
that count ran the same list, so each was pushed when the round before ran the list
then standing and so had truly begun.

Names are compared as a probe's trailers read them back: up to the first line break,
without the whitespace at either end, which git loses from the end of a message, and
none left empty. The trailers are written the same way, so a context whose name ends
in a space no longer sends a round out on every tick.

The rule holds whatever the Probes setting, which chooses only what is pushed next: a
probe in flight when probes are turned off counts only for its own list. A whole build
and a candidate always count, as does a probe recorded before probes named their jobs.
…unts or not

A probe that was not asked to run what its red's list now holds gives no verdict, and
the rounds went on past it at once, begun or not. Two things let them. The check that
CI had begun the last round read the copies the rounds are weighed on, where a probe
that does not count reads as lost and so as begun. And it was asked only while a build
that counts was running, so with none running, on a flake, on the tip, or on a list
that grew past every round out, the next round went out without it. An innocent pull
request could leave on rounds 1, 2 and 3 read as a fair test though round 3, a whole
build once probes were turned off, began before round 2.

The next round now goes out only once CI has begun every build of the round before:
its build has a start, or has reported, whether it counts or not. A build that does not
count is still never waited on to answer, brings no recheck wait and does not hold the
bound of three rounds past the last one read. One that outlives the timeout before CI
begins it is lost, as before, and the round after skips a number. Where the
repository's CI does not say when a build began, begun is reported, so there the next
round waits for a build set aside to report.

With this, three rounds in a row that count began in order, whatever kind of build each
is: each was pushed once CI had begun every build of the round before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant