Repository navigation
Reproduce CI-only watch findings with a suite-wide CPU throttle - #3858
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 25, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
Tend now tracks each test failure it leaves unfixed in an issue of its own, one per test node id, instead of adding rows to whichever `ci-fix:` issue a run touched first. The rule goes in `running-tend`'s **Fix every failure in a red run**, the repo overlay that `/tend-ci-runner:ci-fix` loads. The overlay replaces that skill's tracker per failure shape for Leaf. **Why.** #3695 was opened for the declared-scroll-surface regressions from #3673. Those were repaired by #3697, #3698, #3699, #3705, #3706, #3724, #3746 and #3758, and the issue then became a per-nightly umbrella. Its Oct 24 table lists 24 failures from one nightly that share no cause with its title. Across the Oct 21–24 nightly logs, ten of those rows failed on every nightly since they first appeared, three to five nights in a row. They are deterministic regressions in `journeys` tests, which run only nightly, so the pull requests that caused them passed their own CI. Inside the umbrella a row had no owner and could stay red for five nights while the issue looked worked on. **What the rule says.** - One `ci-fix:` issue per failing test node id (or per failing check outside the suite), with the node id in its title. Tend searches open and closed issues for that id, reuses the one it finds, and reopens it if closed. Another test's failure never joins it; a fix for a shared cause closes each test's issue. A failure an open PR covers is that PR's and needs no issue, as `tests/AGENTS.md`'s ownership rule (from #3939) already reads. A `test-macos` failure follows the same rule under the same node id, so one issue holds a test's failures on both jobs, with a table row per job. - The body records the first `ci` run on main the test failed in, with its commit, since that brackets the change that broke it. - Below that, the failure/status table from #3695's thread: one row per failure the test reports (its assertion, a watch finding at teardown), with the status, the PR or run behind that status, and what remains. Tend edits the body as the status changes and comments only to say what changed. The run summary uses the same table, one row per failing test with its issue or PR, and it marks a failure nobody investigated. - A watch finding that fails on CI and passes locally is reproduced on a slower CPU, not by reruns. **Reading a red suite** points to `tests/AGENTS.md` "Races", which owns the `--cpu-throttle` recipe from #3858. **Scope.** The triage proposed this for nightly failures. The rule covers any failing test a session leaves unfixed, push runs included. An umbrella costs the same whichever run produced it, and a push-run failure without a fix needs a tracker under the same key. Where a session fixes a failure in the same run, it files no issue. This supersedes #3768, the bot's open PR that adds the status table as a general reporting rule. The table here is the body of each per-test issue and of the run summary, so #3768 can be closed unmerged. The **Leave outage trackers** line now says `ci-fix` trackers "name no stranded trigger" rather than "have no rows", since a `ci-fix` issue now has table rows. The edit has no eval. It was checked by reading it against the bundled `ci-fix` skill's tracker steps (2 and 4b), which it overrides only on the key and the body. Changes to agent instructions need the control-plane owner's approval (**Landing**); Max authorized this PR in the triage brief. Refs #3695 > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[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.
A shift or write-watch finding that fails on CI and passes locally can now be reproduced by slowing the browser's CPU for the whole test, rather than by rerunning it under load.
pytest --cpu-throttle RATEslows every Chromium page the browser fixtures open, through CDP'sEmulation.setCPUThrottlingRate, before the page navigates.leaf-dev flake --cpu-throttle RATEpasses the option to each of its copies.tests/AGENTS.md("Races") says when to reach for it.Why. The CI triage found that the repro protocol for CI-only watch findings (serial reruns and
leaf-dev flake's 18 concurrent copies) came back "passes 20/20" on each of them while CI failed at rates up to 19%. On a slower runner a layout lands a frame later and falls outside the input window that credits it. Load on this Mac doesn't slow a frame enough; a throttled CPU does.It reproduces a real CI-only finding.
test_file_tree_opens_current_diff_files_by_pointer_and_keyboard[patch]failed on 9 main runs between Oct 21 and Oct 23, each time withbutton.lf-diff-comment… in lf-diff#patch moved without input by (0, -N)px; the same frame moved a node since removed(N from 1 to 23). On a tree of644bae701(Oct 22 main, inside that window) with only this option patched in:The two failures whose output I kept moved it by
(0, -5)px, an amount CI also reported twice.On this branch's head it passes at 6 (3 runs) and 20 (1), as it has on CI since Oct 23.
test_resolved_file_threads_share_the_file_disclosure_edge(#3529) passed on both trees at none, 6 and 20, so a throttle does not reproduce every CI-only finding. The rate also matters: 20 missed the finding that 6 and 10 caught. The doc paragraph says to try more than one rate.Where the throttle is set.
render_harness.readableinstalls everything the suite reads off a page before it navigates, and every pageWatchedBrowserandWatchedContextmake passes through it, so the throttle goes there. Pages frombrowser.unwatched, and pages the product's render gate opens for itself, stay unthrottled. Those pages also run no watches. Firefox and WebKit pages are skipped, since the throttle is a Chromium CDP call. The option is defined inrender_harness, a plugin bothtests/anddev/tests/load, rather than intests/conftest.py.One home for the CDP call.
leaf_dev.browser.slow_cpu(page, rate)is now the one place that sends it.leaf-dev probe --cpu-throttle, the harness, and the four tests that slow their own page call it. Those four tests can't use the suite option instead: each asserts behavior at its own rate (6 or 20) on every run, so they keep their rates. A test's own call replaces the run's rate on that page.Naming. The triage sketched
LEAF_CPU_THROTTLE=Nandleaf-dev flake --throttle N. The option is--cpu-throttleon all three commands, the nameleaf-dev probealready used. A pytest option travels to xdist workers andflake's copies as the other suite options do, andpytest --helplists it.Checks: the four throttled tests and
dev/tests/process/test_flake.pypass (-n0).leaf-dev flake --cpu-throttle 6on a scratch test asserting the option's value passed 18/18, so each copy received it.leaf-dev probe alert-review --cpu-throttle 6timed a busy loop at 61 ms, against 10 ms unthrottled.Refs #3529