Skip to content

Report the daily scaling benchmark from a CI job of its own, and fail nothing on its readings - #5563

Merged
max-sixty merged 2 commits into
mainfrom
grind/bench-no-gate
Nov 5, 2026
Merged

max-sixty merged 2 commits into
mainfrom
grind/bench-no-gate

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Max asked that nothing pass or fail on a benchmark's reading. Two daily journeys did:
tests/journeys/test_scaling.py failed a browser cost whose growth fitted an exponent
past SUPERLINEAR (1.5), and tests/journeys/test_server_scaling.py did the same for
the server's paths. This deletes both. The daily ci run now calls the benchmark
command itself, in a scaling job of its own, and feeds the same chart.

What the daily run does now

The scaling job runs only on the schedule, on its own runner, so the suite's three
pytest workers no longer share its cores:

  • uv run leaf-dev scaling --sizes 64,128,256 --rounds 2: the four browser pages
    (asks, document, prose, threads) at the sizes and rounds the deleted test used
    (BASE, 8, is always added).
  • uv run leaf-dev scaling --server: the server's paths on every collection at the
    command's default sizes and rounds (128 to 1,600, three rounds), as the deleted
    server test measured them.

Each step tees its table, every cost by size with its exponent and a ! past 1.5,
into the job summary, the log, and a scaling-report-<run> artifact beside each
run's results.json. GitHub serves no job summary through its API (the check-run's
output.summary is empty for an Actions job), so the log and the artifact are where
an agent reads it.

The chart step reads the browser run's results.json and builds the same
customSmallerIsBetter entries the test wrote: <axis>: <cost> at 64 sections, in
KB for event_kb and ms otherwise, rounded to two places. The github-action-benchmark
settings are unchanged (alert-threshold 150%, comment-on-alert). The chart step
runs when the browser step produced its readings, whatever the server step did. A
crash of the command fails its step, and so the run; no reading does.

The command's readings may shift by a step in the chart's first point after this
lands, since they are no longer taken beside the suite's other tests on a shared
runner.

References

scaling.py's header no longer says the daily suite fails growth, and says where the
daily run reports. It and the job's comment point at the rule's home, tests/AGENTS.md,
"Results do not depend on execution speed", whose rewrite in #5522 says no test passes
or fails on a benchmark's reading; #5522 lands after this. ci.yaml's header names the
new job. Nothing else in the tree named the deleted tests (git grep test_scaling test_server_scaling UNHELD scaling-chart).

Checks

  • leaf-dev scaling asks --sizes 16 --rounds 1 and leaf-dev scaling --server options --sizes 16 --rounds 1 run, and the chart step's jq (with select(.n == 16)) turns
    the browser results.json into entries named as the test named them (asks: load,
    asks: event_kb in KB, …).
  • uv run pre-commit run on the changed files, including actionlint.

Not verified: the job on a scheduled run. It runs first at the next 10:47 UTC
schedule after landing.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits November 5, 2026 14:27
… nothing on its readings

Max asked that nothing pass or fail on a benchmark's reading. The daily
journeys tests/journeys/test_scaling.py and test_server_scaling.py failed a
cost whose growth fitted an exponent past 1.5; both are deleted.

The daily ci run's new `scaling` job runs `leaf-dev scaling --sizes
64,128,256 --rounds 2` and `leaf-dev scaling --server` on a runner of its
own, tees each table (exponents included) into the job summary, the log and
a `scaling-report` artifact, and charts the browser readings at 64 sections
from the run's results.json under the names the test wrote. The job fails
only when the command does.

dev/AGENTS.md, "Tests", states the rule; scaling.py's header says where the
daily run reports instead of naming the deleted tests.

Checked: the command at a small size on both paths, with the chart step's
jq over its results.json; pre-commit on the changed files.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
#5522 states the rule in tests/AGENTS.md, "Results do not depend on
execution speed", so the job's comment and scaling.py's header point
there, and dev/AGENTS.md no longer restates it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty
max-sixty marked this pull request as ready for review November 5, 2026 22:41
@max-sixty
max-sixty merged commit a8310f0 into main Nov 5, 2026
6 checks passed
@max-sixty
max-sixty deleted the grind/bench-no-gate branch November 5, 2026 22:59
max-sixty added a commit that referenced this pull request Nov 5, 2026
…one by a benchmark (#5522)

`tests/AGENTS.md` held functional tests to giving the same result when
the system runs
ten times slower, and sent performance to be tested "separately, under
controlled
conditions". Max's rules now cover every test: "we should never have the
timings be a
test, we should have a rule that running on a 10x slower machine still
passes", and "we
should never pass/fail based on benchmark results".

The section "Functional results do not depend on execution speed"
becomes "Results do not
depend on execution speed", and says:

- every test, fixtures and watches included, gives the same result on a
machine ten times
slower than the one it was written on, since CI's runner and a host
running other
  sessions' suites are both slower than an idle development machine;
- so no test asserts a duration, and no test passes or fails on a
benchmark's reading: a
benchmark reports its readings (`leaf-dev scaling`, charted daily), and
a reader judges
  them;
- `--cpu-throttle 10` checks a test against the rule; it slows only
Chromium's renderer,
  not the server, Python or the driver, and doesn't reach a page from
  `browser.unwatched`;
- each operation that could hang gets a deadline at least ten times the
longest it takes
on CI's runner, whose `test` job records each test's time in its junit
results
  (`leaf-dev suite-profile`).

"Absences" now says how to assert that something didn't happen, the
commonest violation:
wait for a later event ordered after the moment the forbidden behavior
would have
happened, then check it is absent. It names the events the suite already
waits on: the
page's sends coming back (`round_trip`), the page taking in what the
server holds
(`told`), the shared clock's next tick (`ticked`), and a later gesture
of the same kind.
"Wait for the operation's own completion signal" already covers a fixed
wait before an
assertion that something happened.

Three other places follow:

- `test_a_wait_takes_the_suites_deadline` called a sleep "an absence
window"; it now says
a sleep bounds nothing and points at "Absences". Its check never read
sleeps, so only
  the docstring changes.
- `faulthandler_timeout`'s comment in `pyproject.toml` said the slowest
test takes under
three minutes on CI. On the 2026-11-05 nightly, sixteen tests took
longer than 180 s,
the slowest 1,614 s. Max decided the half-hour limit stays a guard
against a hang,
outside the ten-times rule, and the comment now says so. The limit
itself is unchanged.
- "Races" said `--cpu-throttle` slows every page the browser fixtures
open; it now says
the pages the `browser` fixture watches. The two comments that cite the
section by
  heading follow its new name.

`dev/AGENTS.md` says nothing about timing; `leaf-dev scaling`'s own
header owns how it
measures. No eval was run on this wording.

Related: #5563 took the daily growth tests' pass/fail out, so nothing
gates on a benchmark's reading; #5523 holds the playground wait and the
scaling changes, and #5541 the fixed
waits before absence assertions.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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