Repository navigation
Report the daily scaling benchmark from a CI job of its own, and fail nothing on its readings - #5563
Merged
Merged
Conversation
… 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
marked this pull request as ready for review
November 5, 2026 22:41
leaf-agent
approved these changes
Nov 5, 2026
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]>
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.
Max asked that nothing pass or fail on a benchmark's reading. Two daily journeys did:
tests/journeys/test_scaling.pyfailed a browser cost whose growth fitted an exponentpast
SUPERLINEAR(1.5), andtests/journeys/test_server_scaling.pydid the same forthe server's paths. This deletes both. The daily
cirun now calls the benchmarkcommand itself, in a
scalingjob of its own, and feeds the same chart.What the daily run does now
The
scalingjob runs only on the schedule, on its own runner, so the suite's threepytest 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 thecommand'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 eachrun's
results.json. GitHub serves no job summary through its API (the check-run'soutput.summaryis empty for an Actions job), so the log and the artifact are wherean agent reads it.
The chart step reads the browser run's
results.jsonand builds the samecustomSmallerIsBetterentries the test wrote:<axis>: <cost>at 64 sections, inKB for
event_kband ms otherwise, rounded to two places. Thegithub-action-benchmarksettings are unchanged (
alert-threshold150%,comment-on-alert). The chart stepruns 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 thedaily 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 thenew 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 1andleaf-dev scaling --server options --sizes 16 --rounds 1run, and the chart step'sjq(withselect(.n == 16)) turnsthe browser
results.jsoninto entries named as the test named them (asks: load,asks: event_kbin KB, …).uv run pre-commit runon the changed files, includingactionlint.Not verified: the job on a scheduled run. It runs first at the next 10:47 UTC
schedule after landing.