Why every config change gets an outcome verdict

A replay says how a change to a station would have done on past tasks. It cannot say how the change does on the team's work after it merges. The tasks are new, people act on the runs, and the model behind the harness may change in between. So once a station's config changes, Spotlight watches the live runs on the new config and compares them with the runs on the config before it. The result is the change's outcome verdict.

Every config change gets one, whoever made it: a config pull request from a search, a change a person proposed from a chat, or an edit to the line's Terraform. A change to the judge's claims alone is not counted: the judge scores replays only, so the runs do the same work before and after it. In the docs' view, the replay before a merge is a forecast, and the outcome after it is the check on that forecast. Without it, a search that keeps opening pull requests would have nothing to tell it that the changes it picks help.

What is measured

The outcome uses only what people did with the runs, their people's verdict. The judge plays no part: it scores replays only. Three measures are compared, and lower is better for each:

  • Follow-ups per run. The messages people wrote on a run's task after the run ended and before they decided it. A run that needed no follow-up did what people wanted the first time.
  • Sent back or held. The share of runs that people sent back or held as wrong.
  • Cost per accepted run. What the runs cost, over the runs people accepted. A config that costs less per run but fails more often costs more per accepted run.

In the docs' view, these three are what a team feels when a station gets better or worse: fewer corrections, fewer rejections, and less spend for the work it keeps.

How the verdict is worked out

Spotlight compares the first 10 runs on the new config that have people's verdict with the last 30 such runs on the config before it. Until 10 runs on the new config have a verdict, the outcome is collecting, and the app shows how many it has. Runs count in the order they began. A run that has no verdict yet holds the window open for up to 7 days after it ends, so a verdict that comes late still counts. After 7 days, or once its task is followed by another run or its pull request is merged or closed, a run without a verdict is passed over. Spotlight measures the outcome again when the 7 days end, so the window can close then even if the station has no new run.

If the station's config changes again before the window is full, the outcome is superseded. It keeps the numbers of the runs it had, but it gives no difference and no verdict, because fewer than 10 runs cannot decide one. Once the window closes, as closed or superseded, the outcome does not change.

For each measure, Spotlight takes the difference, after less before, and its 95% interval from 2,000 resamples of the runs, the same method as the range of a replay's success. The verdict follows from the interval:

  • Better when the whole interval is below 0.
  • Worse when the whole interval is above 0.
  • No clear difference otherwise.

Spotlight gives no verdict to a measure that it cannot compare: a side has fewer than 10 runs for the measure, or the costs are in more than one currency. That measure reads "Not compared".

The mix of tasks moves the numbers. A config that happens to get small tasks after the change looks better than it is. When every run has a size and every size on the new config has runs on the old one too, Spotlight compares small with small and large with large, weighted by the mix after the change. When it cannot, it compares all runs together, and the interval carries the doubt. A small window of 10 runs gives wide intervals, so many changes read no clear difference. In the docs' view, a verdict that says so is more useful than one that reports chance as a gain.

Where the verdict goes

The verdict shows under "Outcome" in a config change's Impact panel on the Insights Stations tab, and through the Insights API.

When the window closes, Spotlight also comments on the change's config pull request on GitHub, with a table of each measure before and after, its interval and its verdict, or "Not compared". A pull request that changes more than one station gets one comment, with a section for each station. Spotlight updates that comment as each station's window closes. A superseded section shows the numbers it had and says that Spotlight gives no verdict. Spotlight finds the pull request in one of two ways:

  • The change is a config pull request that Spotlight opened itself.
  • The change was applied by a Terraform run in GitHub Actions. The provider sends the commit as the Spotlight-Source-Commit header, and Spotlight finds the pull request of that commit.

A change applied any other way has no pull request, and its verdict shows only in Insights.

When any measure is worse, the team gets an inbox notice that names the station, the pull request and the numbers. The notice is resolved when the station's next config change takes effect. A config that a newer change replaced before its verdict gets no notice. Spotlight never reverts a change. A person reads the numbers and decides whether to keep it. In the docs' view, a worse verdict on 10 runs is a reason to look, not proof, and the person who knows what the change was for is the one to weigh it.

On this page