Skip to content

fix(gate): name the pin's columns, so a drift is an error - #1769

Closed
adeerkhan wants to merge 1 commit into
bendlang:mainfrom
adeerkhan:fix/perf-pin-columns
Closed

adeerkhan wants to merge 1 commit into
bendlang:mainfrom
adeerkhan:fix/perf-pin-columns

Conversation

@adeerkhan

@adeerkhan adeerkhan commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

The perf gate read its pin by position — column 1 is SEQ-CPU, column 2 is PAR-CPU, column 3 is PAR-GPU — and nothing tied those positions to the names the file declares. The pin is hand-edited (its own header says the COMPILER column and the spaces are "by hand"), so a layout that drifts is read as numbers and reported as a verdict.

Two drifts, both silent today:

A header whose SEQ-CPU and PAR-CPU are swapped. The sequential run is then compared against the parallel baseline — 0.500 s instead of 3.501 s for bfs — so the gate either fails a healthy run, or passes a run that is seven times slower, and says nothing about the pin.

A row that loses a cell. The OUTPUT column reads as undefined, and the gate reports an output-size mismatch, blaming the program for a change in the pin file.

The reader now takes the column names and checks them, the way bend2/docs/gen_charts.ts already does for the record pins ("columns drifted from [...] -- repin"): a header that does not name the expected columns, or a row with the wrong number of cells, is an error.

The error is raised where the pin is read, before the benchmarks run, so a drift is seconds to see and not a 20-minute run to find.

Check, on the gate's own pin:

# the header's SEQ-CPU and PAR-CPU swapped
$ bun gates/perf.ts
error: .../bench/runtime/_pin_/apple_m4.txt: columns drifted from [bench, COMPILER, SEQ-CPU, PAR-CPU, PAR-GPU, OUTPUT] -- repin

# the OUTPUT column dropped from one row
$ bun gates/perf.ts
error: .../bench/runtime/_pin_/apple_m4.txt: bfs has 4 columns, not 5 -- repin

Both fire before any SSH, so neither needs the cluster to check. With the pin as committed the gate reads it as before.

Gates: repo 54/54. The other three need the mini cluster, so they are not run here.

Not caught: a transposition of two values inside one row, with the header intact — telling SEQ from PAR by value would need an invariant the pin does not state, so the guard stays on the shape.

The perf gate read its pin by position: column 1 is SEQ-CPU, column 2
is PAR-CPU, column 3 is PAR-GPU, and nothing tied those positions to
the names the file declares. The pin is hand-edited, so a layout that
drifts is read as numbers and reported as a verdict.

The reader now takes the column names and checks them, the way
bend2/docs/gen_charts.ts already does for the record pins: a header
that does not name the expected columns, or a row with the wrong number
of cells, is an error and the gate says to repin.
@adeerkhan
adeerkhan force-pushed the fix/perf-pin-columns branch from 8d2468e to 143209c Compare October 19, 2026 20:00
@Lorenzobattistela Lorenzobattistela self-assigned this Oct 20, 2026
@Lorenzobattistela

Copy link
Copy Markdown
Collaborator

Thanks for this. We're closing it: the gate's pin is written by --pin (header included). The only hand edits are the COMPILER cells and the spacing, and only maintainers run the perf gate, on the cluster. A swapped header would turn nearly every cell red at once and be spotted right away, so the extra check in gates/ doesn't pay for itself.

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.

2 participants