Skip to content

feat(run): keep a timings history that CI can cache - #1639

Merged
okwasniewski merged 5 commits into
mainfrom
kdy1/perf/cache-timing-api
Nov 10, 2026
Merged

okwasniewski merged 5 commits into
mainfrom
kdy1/perf/cache-timing-api

Conversation

@kdy1

@kdy1 kdy1 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

e2e run already starts the longest files first, but it read the previous run's durations from report.json, which a fresh CI checkout never has. This writes a small versioned history a CI cache can restore and save.

  • Every run that reaches its tests writes <output>/timings.json (timings-1): target::file to milliseconds. It merges into the existing file with a moving average (a run moves an entry a third of the way), and drops files that are gone and targets the config no longer has.
  • A file is timed only when the run carried out all of it, once. A --grep, --last-failed, interrupted (including a retry cut short after a failure), or limit-cut run leaves that file's entry alone, and repeats past the first do not count.
  • A key is a target name, then a project-relative POSIX file with no .. segment. The schema and the reader use the same pattern, and a table test keeps them in step.
  • With one worker the file is still written, but files are ordered only with more than one. Files with no recorded time start first, then the rest longest first.
  • Advisory: a missing, corrupt, or schema-invalid file is no history, never an error. An absent file falls back to report.json, so nothing regresses. A restored cache can reorder files, never change a result.
  • --timings <file> moves it. --last-failed still reads report.json only.
  • Docs: actions/cache recipe in docs/ci/github-actions.mdx (the key ends in github.run_attempt, since a rerun shares run_id and actions/cache never overwrites a key), the provider-neutral rule in docs/ci.mdx. timings.json joins the e2e init and repo .gitignore entries.
  • Wire format: schema/timings-v1.schema.json with a valid and an invalid fixture, in the same change as the producer.

Not here: duration-balanced --shard, a timings.file config key, and dogfooding the recipe in benchmark.yml.

flowchart LR
  A[restore .e2e/timings.json] --> B[e2e run: longest files first]
  B --> C[merge measured files into history]
  C --> D[save .e2e/timings.json]
Loading

Refs ENG-1111

Verified

Ran it locally: yes

  • testbed, built CLI, e2e run tests/check.e2e.ts tests/click.e2e.ts tests/controls.e2e.ts tests/browser.e2e.ts --workers 2, once with no history and once seeded with the timings.json the first run wrote:
no history with timings.json
controls (16 s file) starts 2.5 s 0 s
click (14 s file) starts 1.3 s 0 s
check, browser (short) start 0 s 14 s, 16 s
run 19.4 s 17.5 s

One run per cell on one machine, so the size of the gain is indicative. The order is the point.

  • Same CLI, edge cases: a valid-JSON file with another schema version, a string value, an array, or a __proto__ key is ignored and rewritten, tests still pass. A NO_TESTS run writes nothing. --last-failed reads report.json, not timings.json (NO_LAST_RUN with only a timings file). An unwritable --timings path is one stderr line and exit 0. --grep on one test leaves the file byte for byte unchanged.
  • pnpm check, pnpm test, the testbed suite (587 passed), and the web benchmark (91 passed) are green locally. pnpm test ran before the review fixes; after them I reran pnpm check, the unit suite (3447 passed), the new integration file, and the testbed ordering check. CI is green on the final head.
  • Not verified: the GitHub Actions recipe against a real workflow, and that a PR can read the base branch's cache but not write it. The page states GitHub's documented rule; I did not run it.

Review

A fresh-context review found two things, both fixed in the second commit (cubic-dev-ai then raised nine smaller points, all fixed in the third and fourth): partial runs wrote non-comparable durations (a --last-failed rerun of one 2 s test cut a 60 s entry to about 40 s), and nothing tested the runner wiring. The new integration test fails with the partial guard removed. The review also noted --timings is not confined to the project root like --output; left as is, since the path is one the user names on their own command line and test code already runs with full authority.

CI notes

  • packages/acp executor.test.ts "retries the session directory removal after the agent exits" failed on test (22), (24), and (22.22.3) in earlier runs of this PR (kill ESRCH after a 500 ms wait), and on oskar/fix-main-failing-tests before it. It does not reproduce locally and this PR does not touch packages/acp; reruns passed. It needs its own fix.
  • The Android agentic Huge Virtualized List step failed once with REPLAY_STALE and passed on rerun, with nothing in this diff that reaches it.

🤖 Generated with Claude Code

kdy1 and others added 2 commits November 9, 2026 13:54
`e2e run` already starts the longest files first, but it read the
previous run's durations out of report.json, which a fresh CI checkout
never has. Write a small versioned `<output>/timings.json` (timings-1)
at the end of every run instead: per target::file milliseconds, smoothed
with an exponential moving average, with files that are gone and targets
the config dropped pruned.

The file is advisory. A missing, corrupt, or schema-invalid file is no
history, and an absent one falls back to report.json as before, so a
restored cache can reorder files and never change a result.
`--timings <file>` moves it. `--last-failed` still reads report.json.

Documents the actions/cache recipe for GitHub Actions and the generic
restore/save rule in the CI guide. Duration-balanced --shard is left for
a separate decision.

Refs ENG-1111

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A `--grep`, `--last-failed`, interrupted, or `--repeat-each` run summed
only part of a file's tests, or several repeats of them, into the
timings history, so a 60 s file could drop to about 40 s after a rerun
of one failing test. A file now has a timing only when none of its tests
was left out, cut short, or never reached, and repeats past the first do
not count. Adds the integration test for the runner wiring.

Refs ENG-1111

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kdy1
kdy1 requested a review from okwasniewski as a code owner November 9, 2026 05:14
@github-actions github-actions Bot added the size:L Up to 499 changed lines, not counting tests, fixtures, translated docs, or the lockfile label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e web agent: 33 passed

34 agent steps · 26 replayed from cache · 20 model calls · 88.3k tokens (85% cached) · $0.0054

All 33 tests in 5 files
Test Agent Time
🟢 tests-agent/control-inventory.e2e.ts · 7 passed 7 steps 7.4s
🟢 control inventory › check sets the checkbox and the radio 1 step 742ms
🟢 control inventory › check picks a radio the pick replaces with its summary 1 step 263ms
🟢 control inventory › a long press and a double click are chosen over a plain tap 1 step 931ms
🟢 control inventory › a right-click opens the file menu and Rename renames the file 1 step 2.5s
🟢 control inventory › upload attaches the named project files 1 step 2.4s
🟢 control inventory › back returns from the details view to the inventory 1 step 258ms
🟢 control inventory › scroll_to brings the footnote into view 1 step 342ms
🟢 tests-agent/login-form.e2e.ts · 1 passed 1 step 354ms
🟢 act signs in with the benchmark account 1 step 354ms
🟢 tests-agent/planted-bugs.e2e.ts · 3 passed 4 steps · 8 calls 12.2s
🟢 cart totals: a judgment catches the stale order summary 2 steps · 4 calls 6.9s
🟢 checkout review: a judgment catches the broken copy 1 step · 1 call 1.5s
🟢 wishlist: a judgment catches the lost saved items 1 step · 3 calls 3.9s
🟢 tests-agent/scenarios.e2e.ts · 21 passed 21 steps · 12 calls 1m 6s
🟢 act completes shadow-dom-form 1 step · 3 calls 4.4s
🟢 act completes lying-labels 1 step · 3 calls 4.5s
🟢 act completes iframe-form 1 step · 3 calls 4.3s
🟢 act completes infinite-scroll 1 step 3.5s
🟢 act completes virtualized-table 1 step 16.9s
🟢 act completes overlay-trap 1 step 844ms
🟢 act completes sticky-chrome 1 step 904ms
🟢 act completes async-states 1 step · 3 calls 6.9s
🟢 act completes debounced-search 1 step 2.2s
🟢 act completes hover-menu 1 step 449ms
🟢 act completes drag-and-drop 1 step 433ms
🟢 act completes kanban-board 1 step 584ms
🟢 act completes context-menu-trap 1 step 2.6s
🟢 act completes stale-dom 1 step 419ms
🟢 act completes otp-auto-advance 1 step 673ms
🟢 act completes date-picker 1 step 741ms
🟢 act completes rich-text-editor 1 step 9.9s
🟢 act completes playbook-cleanup 1 step 576ms
🟢 act completes promo-storefront 1 step 2.3s
🟢 act completes gift-card-purchase 1 step 2.4s
🟢 act filters the list and the URL carries the filter 1 step 210ms
🟢 tests-agent/unique-cache.e2e.ts · 1 passed 1 step 270ms
🟢 act adds an address with a run-unique label 1 step 270ms

Tested by e2e 0.23.0 · 1m 27s · web · run artifacts

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e web: 91 passed

All 91 tests in 41 files
Test Time
🟢 tests/aria-hidden-flow.e2e.ts · 2 passed 750ms
🟢 aria hidden flow › picks the Pro plan by its visible text and confirms it 548ms
🟢 aria hidden flow › another plan shows the error and keeps the picker open 202ms
🟢 tests/async-states.e2e.ts · 2 passed 7.2s
🟢 async states › reads the code off the transient toast and verifies it once the button enables 2.3s
🟢 async states › a wrong code is rejected after the toast has gone 4.9s
🟢 tests/canvas-only.e2e.ts · 2 passed 278ms
🟢 canvas only › taps square, circle, then diamond at their pixel coordinates 152ms
🟢 canvas only › a shape out of order paints the error and resets progress 126ms
🟢 tests/canvas-whiteboard.e2e.ts · 2 passed 390ms
🟢 canvas whiteboard › drags both shapes into their slots and saves 240ms
🟢 canvas whiteboard › bounces a shape off the wrong slot and refuses to save early 150ms
🟢 tests/cart-totals.e2e.ts · 2 passed 360ms
🟢 cart totals › increasing a quantity updates the line total but the order summary stays stale (planted bug) 211ms
🟢 cart totals › a quantity never drops below one 149ms
🟢 tests/checkout-review.e2e.ts · 1 passed 185ms
🟢 shows a raw greeting token and an undefined delivery date (planted bug), yet places the order 185ms
🟢 tests/context-menu-trap.e2e.ts · 2 passed 559ms
🟢 context menu trap › right-click opens nothing; the row menu renames the file 279ms
🟢 context menu trap › the decoy menu items refuse and keep the file 280ms
🟢 tests/control-inventory.e2e.ts · 8 passed 3.7s
🟢 control inventory › check sets the checkbox and the radio without flipping a set one 281ms
🟢 control inventory › check picks a radio the pick replaces with its summary 157ms
🟢 control inventory › a long press and a double click are told apart from a tap 1.0s
🟢 control inventory › the file menu opens on right-click only and Rename renames the file 285ms
🟢 control inventory › setInputFiles attaches files named from the project root 147ms
🟢 control inventory › the details view is left through the browser history 197ms
🟢 control inventory › scrollIntoView brings the footnote into view 286ms
🟢 control inventory › every exercise done shows the success message 1.3s
🟢 tests/css-content-ui.e2e.ts · 2 passed 381ms
🟢 css content ui › the tile labelled Ship it advances and confirming ships 210ms
🟢 css content ui › a wrong tile shows the CSS-rendered error and keeps the picker 171ms
🟢 tests/date-picker.e2e.ts · 2 passed 695ms
🟢 date picker › navigates three months ahead and books the required date 397ms
🟢 date picker › confirming without the exact date shows the error 298ms
🟢 tests/debounced-search.e2e.ts · 2 passed 2.9s
🟢 debounced search › a decoy one character off is refused 1.4s
🟢 debounced search › picking the exact item adds it to the cart 1.4s
🟢 tests/deferred-dialog.e2e.ts · 1 passed 1.1s
🟢 one submit opens one confirm, even when double-clicked 1.1s
🟢 tests/div-soup.e2e.ts · 2 passed 671ms
🟢 div soup › a wrong code is rejected 290ms
🟢 div soup › the right code grants access after the delete tile fixes a typo 381ms
🟢 tests/drag-and-drop.e2e.ts · 2 passed 712ms
🟢 drag and drop › an out-of-order item resets the dropzone 365ms
🟢 drag and drop › dropping Banana then Cherry passes 347ms
🟢 tests/filter-deep-link.e2e.ts · 2 passed 243ms
🟢 filter deep link › filtering writes the query to the URL 133ms
🟢 filter deep link › opening a shared link restores the filter 110ms
🟢 tests/gift-card-purchase.e2e.ts · 3 passed 538ms
🟢 gift card purchase › refuses to buy without an amount 138ms
🟢 gift card purchase › refuses a recipient without an at sign 201ms
🟢 gift card purchase › sends the gift card 199ms
🟢 tests/hover-menu.e2e.ts · 2 passed 447ms
🟢 hover menu › a decoy leaf is refused 199ms
🟢 hover menu › hovering Account, then Billing, reaches Redeem voucher 248ms
🟢 tests/iframe-form.e2e.ts · 2 passed 584ms
🟢 iframe form › a wrong code is refused by the host page 265ms
🟢 iframe form › the code read from one frame applies through the other 319ms
🟢 tests/image-only-ui.e2e.ts · 3 passed 514ms
🟢 image only ui › the icons have no names, so the bare svg locator is ambiguous 131ms
🟢 image only ui › a wrong icon shows the error image and keeps the icons 166ms
🟢 image only ui › tapping the star, then the heart, verifies the icons 217ms
🟢 tests/infinite-scroll.e2e.ts · 1 passed 2.9s
🟢 scrolls the feed until the Golden Ticket loads, then claims it 2.9s
🟢 tests/kanban-board.e2e.ts · 3 passed 746ms
🟢 kanban board › pointer drags move both cards into the goal layout 376ms
🟢 kanban board › a swipe along a path drags a card as well 148ms
🟢 kanban board › a plain tap moves nothing and the untouched board is rejected 222ms
🟢 tests/login-form.e2e.ts · 4 passed 861ms
🟢 login form › rejects a malformed email 212ms
🟢 login form › rejects a short password 199ms
🟢 login form › rejects an unknown account 199ms
🟢 login form › signs in and logs out 251ms
🟢 tests/lying-labels.e2e.ts · 4 passed 741ms
🟢 lying labels › the button whose accessible name says Pay now is the wrong one 150ms
🟢 lying labels › a text match for Pay now catches the decoy phrase too 138ms
🟢 lying labels › the field whose accessible name says Amount is the wrong one 258ms
🟢 lying labels › visible text drives the payment through 195ms
🟢 tests/native-dialogs.e2e.ts · 3 passed 470ms
🟢 native dialogs › answers the confirm, prompt, and alert chain 147ms
🟢 native dialogs › dismissing the confirm cancels the order 152ms
🟢 native dialogs › a wrong gift code is rejected 171ms
🟢 tests/newsletter-signup.e2e.ts · 1 passed 2.3s
🟢 subscribe renders no feedback and logs a TypeError (planted bug) 2.3s
🟢 tests/onboarding-wizard.e2e.ts · 5 passed 4.5s
🟢 onboarding wizard › back keeps what was typed and the brief comes back with it 251ms
🟢 onboarding wizard › the address step takes the brief through its bare-div dropdown 331ms
🟢 onboarding wizard › the profile step steers the calendar three decades back 1.1s
🟢 onboarding wizard › the preferences step flips the toggles the brief names and leaves the trap off 1.4s
🟢 onboarding wizard › the review step repeats the brief and finishes with the PIN 1.5s
🟢 tests/order-history.e2e.ts · 2 passed 1.5s
🟢 order history › overview and settings render their panels 230ms
🟢 order history › the orders tab never leaves its loading state (planted bug) 1.3s
🟢 tests/otp-auto-advance.e2e.ts · 3 passed 1.5s
🟢 otp auto-advance › focus advances with each digit and the full code verifies 526ms
🟢 otp auto-advance › backspace on an empty box clears and refocuses the previous one 168ms
🟢 otp auto-advance › a wrong code clears every box and starts over 794ms
🟢 tests/overlay-trap.e2e.ts · 1 passed 755ms
🟢 continues only after the banner and the overlay are gone 755ms
🟢 tests/playbook-cleanup.e2e.ts · 2 passed 558ms
🟢 playbook cleanup › deleting the draft removes it from an exact-name search 303ms
🟢 playbook cleanup › cancelling the dialog keeps the draft searchable 255ms
🟢 tests/price-sorting.e2e.ts · 3 passed 437ms
🟢 price sorting › opens in the featured order with sale prices struck through 130ms
🟢 price sorting › low to high sorts by the original price, not the paid one (planted bug) 141ms
🟢 price sorting › high to low is the same wrong order reversed (planted bug) 166ms
🟢 tests/product-reviews.e2e.ts · 1 passed 1.2s
🟢 the running-shoe page lists coffee-grinder reviews (planted bug) 1.2s
🟢 tests/promo-storefront.e2e.ts · 1 passed 1.4s
🟢 buys a deal once the promo chrome is out of the way 1.4s
🟢 tests/rich-text-editor.e2e.ts · 2 passed 494ms
🟢 rich text editor › bolding exactly the required word passes the check 262ms
🟢 rich text editor › bold that spills into the previous word fails the check 232ms
🟢 tests/saved-addresses.e2e.ts · 3 passed 620ms
🟢 saved addresses › adds an address and clears the form 210ms
🟢 saved addresses › ignores an add with an empty field 194ms
🟢 saved addresses › delete shows its toast but keeps the address, on retry too (planted bug) 216ms
🟢 tests/shadow-dom-form.e2e.ts · 2 passed 652ms
🟢 shadow DOM form › rejects a wrong access code 320ms
🟢 shadow DOM form › grants access with the code from the hint inside the root 332ms
🟢 tests/smoke.e2e.ts · 1 passed 336ms
🟢 home lists the scenarios and opens one 336ms
🟢 tests/stale-dom.e2e.ts · 1 passed 2.2s
🟢 taps the moving target three times across rebuilds of the list 2.2s
🟢 tests/sticky-chrome.e2e.ts · 1 passed 215ms
🟢 accepts the terms once the button clears the sticky footer 215ms
🟢 tests/virtualized-table.e2e.ts · 1 passed 14.9s
🟢 scrolls the windowed table to the Golden Row and claims it 14.9s
🟢 tests/wishlist.e2e.ts · 2 passed 1.5s
🟢 wishlist › saving toggles the button and the tab badge 262ms
🟢 wishlist › the wishlist tab renders the empty state despite the badge count (planted bug) 1.3s

Tested by e2e 0.23.0 · 1m 3s · web · run artifacts

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 23 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/ci/github-actions.mdx Resolved
Comment thread packages/e2e/src/run/last-run.ts Resolved
Comment thread packages/e2e/tests/unit/timings.test.ts Resolved
Comment thread docs/reference/cli.mdx Resolved
Comment thread docs/ci.mdx Resolved
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e android agent: 1 flaky, 19 passed

24 agent steps · 15 replayed from cache · 40 model calls

⚠️ 1 flaky test passed on a retry

⚠️ act completes Modal Flow
tests/fixtures.ts:76

ENGINE_FAILURE at step 1 of 1: app.open, after 2.9s

open dev.e2e.benchmark failed: Android app dev.e2e.benchmark process remained running after close

  • Screen: dev.e2e.benchmark

Evidence: screenshot, log

All 20 tests in 1 file
Test Agent Time
⚠️ tests-agent/scenarios.e2e.ts · 1 flaky, 19 passed 24 steps · 40 calls 5m 58s
🟢 act completes Login Form 1 step 23.3s
🟢 act completes Infinite Scroll List 1 step 20.8s
⚠️ act completes Modal Flow (1 failed attempt first) 1 step 14.0s
🟢 act completes Bottom Tabs 1 step 6.9s
🟢 act completes Text Input Variations 1 step 7.1s
🟢 act completes Broken Accessibility 2 steps · 5 calls 13.2s
🟢 act completes Vision Only 2 steps · 1 call 6.2s
🟢 act completes Gestures 1 step · 11 calls 29.0s
🟢 act completes Async States 1 step · 11 calls 23.1s
🟢 act completes Debounced Search 1 step 6.9s
🟢 act completes Huge Virtualized List 1 step 1m 56s
🟢 act completes Flattened Registration Form 2 steps · 1 call 8.1s
🟢 act completes Flattened Login 2 steps · 6 calls 15.9s
🟢 act completes Sticky Chrome Target 1 step 9.3s
🟢 act completes WebView Accessibility 1 step · 5 calls 14.2s
🟢 act completes Permission Prompt 1 step 6.7s
🟢 act completes Product Catalog 1 step 8.8s
🟢 act completes Error Recovery 1 step 9.4s
🟢 act completes Choice Controls 1 step 9.0s
🟢 act completes Sequential Onboarding 1 step 10.5s

Tested by e2e 0.23.0 · 6m 7s · android-emulator · run artifacts

…tial, and say when ordering applies

- A retry cut short after a failure leaves the result under the earlier
  verdict; read the attempts, and a serial group's, for an interrupt.
- timings-1 keys: a target name, then a project-relative POSIX file with
  no `..` segment, in the schema and the reader alike.
- Rerun cache key adds github.run_attempt, since a rerun shares run_id
  and actions/cache never saves over an existing key.
- Docs and help say the history orders files only with more than one
  worker, and that the file is `<output>/timings.json`.

Refs ENG-1111

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e ios agent: 21 passed, 1 skipped

25 agent steps · 12 replayed from cache · 55 model calls · 336.0k tokens (82% cached) · $0.0226

All 22 tests in 1 file
Test Agent Time
⏭️ tests-agent/scenarios.e2e.ts · 21 passed, 1 skipped 25 steps · 55 calls 8m 15s
🟢 act completes Login Form 1 step 37.9s
🟢 act completes Infinite Scroll List 1 step 40.9s
🟢 act completes Modal Flow 1 step 11.2s
🟢 act completes Bottom Tabs 1 step 7.7s
🟢 act completes Text Input Variations 1 step 14.0s
🟢 act completes Broken Accessibility 2 steps · 5 calls 23.6s
🟢 act completes Vision Only 2 steps · 6 calls 28.8s
🟢 act completes Gestures 1 step · 7 calls 29.1s
🟢 act completes Async States 1 step · 10 calls 33.6s
🟢 act completes Debounced Search 1 step · 1 call 27.6s
🟢 act completes Flattened Registration Form 2 steps · 1 call 28.8s
🟢 act completes Flattened Login 2 steps · 10 calls 51.0s
🟢 act completes Sticky Chrome Target 1 step 13.7s
🟢 act completes WebView Accessibility 1 step 12.2s
🟢 act completes Permission Prompt 1 step 11.6s
🟢 act completes Photo Picker 1 step · 2 calls 27.7s
🟢 act completes Product Catalog 1 step 10.5s
🟢 act completes Error Recovery 1 step 10.3s
🟢 act completes Choice Controls 1 step · 6 calls 35.8s
🟢 act completes Stripe PaymentSheet 1 step · 7 calls 28.6s
🟢 act completes Apple Pay 1 step 10.7s
⏭️ act completes Apple Pay Billing Address (skipped: the CI simulator's Apple Pay sheet skips the billing-address step, so the scenario cannot be completed there)

Tested by e2e 0.23.0 · 8m 16s · ios-simulator · run artifacts

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 12 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/reference/cli.mdx Resolved
Refs ENG-1111

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 5 files (changes from recent commits).

View guided diff | Turn on auto-fix | Re-trigger cubic

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e android: 57 passed, 1 skipped

All 58 tests in 7 files
Test Time
⏭️ tests/controls.e2e.ts · 24 passed, 1 skipped 2m 35s
🟢 control inventory › a label query resolves a labeled text field 20.0s
🟢 control inventory › a labeled field answers name, display value, value reads, fill, and clear 12.0s
🟢 control inventory › a placeholder query and attribute reads find the field 5.1s
🟢 control inventory › a secure field takes a fill and denies value reads 6.3s
🟢 control inventory › press sends a character and Enter through the soft keyboard 8.5s
🟢 control inventory › a field autofocuses on mount and focus() moves the focus 7.1s
🟢 control inventory › toBeFocused follows the focus 7.6s
🟢 control inventory › a switch checks, unchecks, and reports its state 7.6s
🟢 control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap 6.2s
🟢 control inventory › checkbox and radio roles check, uncheck, and report their state 10.2s
🟢 control inventory › a tab role answers getByRole 3.7s
🟢 control inventory › a radio group reports the checked option 7.3s
🟢 control inventory › buttons report disabled, enabled, and a state that arrives later 6.4s
🟢 control inventory › a display: none element is absent rather than hidden, its visible twin attached 6.3s
🟢 control inventory › a header answers its accessible name 3.5s
🟢 control inventory › a tab row answers count, all, texts, filters, positions, and switching 5.1s
🟢 control inventory › a list answers counts, list-form text, reads, and boxes in order 5.1s
⏭️ control inventory › a row contains its texts (skipped: React Native flattens a plain View out of the accessibility tree on both platforms: XCTest and the Android helper report a View with a testID as a leaf beside its children, so filter({ has }) and a query scoped to it match nothing; only Sc…)
🟢 control inventory › a long press lands as one 6.9s
🟢 control inventory › a double tap lands inside the 300 ms window 6.3s
🟢 control inventory › an ambiguous locator fails at once 4.9s
🟢 control inventory › screenshot, restart, and clearState reopen the app on its home list 6.1s
🟢 refusals › verbs a device never declares are refused before the engine 3ms
🟢 refusals › keys the soft keyboard cannot send are refused by the engine 1.6s
🟢 refusals › a missing locator fails as not found once its timeout passes 1.1s
🟢 tests/device-fixture.e2e.ts · 10 passed 1m 11s
🟢 device fixture › setOrientation rotates the window the app measures 4.6s
🟢 device fixture › home leaves the app, openApp brings it back where it was 4.1s
🟢 device fixture › foregroundApp sees the home screen after home() 3.6s
🟢 device fixture › closeApp then openApp relaunches on the home list 6.4s
🟢 device fixture › closeApp leaves the next commands on the same device 6.3s
🟢 device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN 4.4s
🟢 device fixture › device.back pops the scenario 4.4s
🟢 device fixture › unstable_raw reaches the test session through agent-device 3.7s
🟢 device fixture › setNetwork and setAirplaneMode change what the app sees 12.3s
🟢 device fixture › setLocation and clearLocation change what the app reads 21.0s
🟢 tests/device.e2e.ts · 5 passed 38.1s
🟢 permission prompt › allowing the system dialog enables the microphone 5.5s
🟢 permission prompt › a denied prompt recovers once the permission is granted outside 11.7s
🟢 sequential onboarding echoes the exact values 9.4s
🟢 onboarding rejects a malformed email before advancing 5.2s
🟢 dismissing the keyboard over choice controls leaves them as they were 6.4s
🟢 tests/flows-lists.e2e.ts · 7 passed 3m 10s
🟢 infinite scroll reaches the target item 28.1s
🟢 product catalog adds exactly two of the right variant 8.6s
🟢 gestures: long-press, then swipe left 7.6s
🟢 gestures: double-tap completes the flow 9.0s
🟢 sticky chrome: accept below the fold, then continue 10.5s
🟢 async states: load, pull to refresh, claim through the toast 11.4s
🟢 huge virtualized list reaches row 512 1m 54s
🟢 tests/flows.e2e.ts · 7 passed 46.6s
🟢 text inputs unlock the submit button 5.6s
🟢 filled text inputs report their values 5.2s
🟢 modal flow confirms through the native alert 8.0s
🟢 bottom tabs act inside the last tab 6.1s
🟢 error recovery retries, then confirms the delete 8.2s
🟢 choice controls place the exact order 5.5s
🟢 debounced search selects the target once results arrive 8.0s
🟢 tests/login-form.e2e.ts · 3 passed 25.6s
🟢 login form › rejects a malformed email 6.7s
🟢 login form › rejects an unknown account 7.0s
🟢 login form › signs in and logs out 11.9s
🟢 tests/smoke.e2e.ts · 1 passed 5.0s
🟢 home lists the scenarios and opens one 5.0s

Tested by e2e 0.23.0 · 8m 52s · android-emulator · run artifacts

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e ios: 1 flaky, 54 passed, 1 skipped

⚠️ 1 flaky test passed on a retry

⚠️ device fixture › enrollBiometrics and setBiometrics answer a biometric prompt
tests/device-fixture.e2e.ts:202

ASSERTION_FAILED

expect.poll(...).toBe(...) timed out after 10000 ms last: expected "biometrics: failed (system_cancel)" to be "biometrics: unlocked"

  • Screen: dev.e2e.benchmark / Control Inventory

Evidence: screenshot, log

All 56 tests in 7 files
Test Time
⚠️ tests/device-fixture.e2e.ts · 1 flaky, 10 passed 1m 49s
🟢 device fixture › setAppearance flips the color scheme the app reads 13.6s
🟢 device fixture › setOrientation rotates the window the app measures 10.3s
🟢 device fixture › the clipboard reads back what was written 7.0s
🟢 device fixture › home leaves the app, openApp brings it back where it was 10.1s
🟢 device fixture › closeApp then openApp relaunches on the home list 10.3s
🟢 device fixture › closeApp leaves the next commands on the same device 13.5s
🟢 device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN 7.4s
🟢 device fixture › device.back pops the scenario 6.8s
🟢 device fixture › unstable_raw reaches the test session through agent-device 5.8s
🟢 device fixture › setLocation and clearLocation change what the app reads 13.4s
⚠️ device fixture › enrollBiometrics and setBiometrics answer a biometric prompt (1 failed attempt first) 11.1s
⏭️ tests/controls.e2e.ts · 23 passed, 1 skipped 3m 25s
🟢 control inventory › a label query resolves a labeled text field 12.9s
🟢 control inventory › a labeled field answers name, display value, value reads, fill, and clear 17.9s
🟢 control inventory › a placeholder query and attribute reads find the field 7.4s
🟢 control inventory › a secure field takes a fill and denies value reads 10.5s
🟢 control inventory › press sends a character and Enter through the soft keyboard 11.4s
🟢 control inventory › a field autofocuses on mount and focus() moves the focus 11.2s
🟢 control inventory › toBeFocused follows the focus 10.5s
🟢 control inventory › a switch checks, unchecks, and reports its state 11.1s
🟢 control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap 9.2s
🟢 control inventory › checkbox and radio roles check, uncheck, and report their state 13.3s
🟢 control inventory › a radio group reports the checked option 9.4s
🟢 control inventory › buttons report disabled, enabled, and a state that arrives later 8.9s
🟢 control inventory › a display: none element is absent rather than hidden, its visible twin attached 8.6s
🟢 control inventory › a header answers its accessible name 5.0s
🟢 control inventory › a tab row answers count, all, texts, filters, positions, and switching 6.8s
🟢 control inventory › a list answers counts, list-form text, reads, and boxes in order 7.6s
⏭️ control inventory › a row contains its texts (skipped: React Native flattens a plain View out of the accessibility tree on both platforms: XCTest and the Android helper report a View with a testID as a leaf beside its children, so filter({ has }) and a query scoped to it match nothing; only Sc…)
🟢 control inventory › a long press lands as one 8.9s
🟢 control inventory › pointer verbs land at the point asked for 10.7s
🟢 control inventory › an ambiguous locator fails at once 6.2s
🟢 control inventory › screenshot, restart, and clearState reopen the app on its home list 14.9s
🟢 refusals › verbs a device never declares are refused before the engine 3ms
🟢 refusals › keys the soft keyboard cannot send are refused by the engine 748ms
🟢 refusals › a missing locator fails as not found once its timeout passes 1.2s
🟢 tests/device.e2e.ts · 3 passed 1m 13s
🟢 sequential onboarding echoes the exact values 44.6s
🟢 onboarding rejects a malformed email before advancing 15.0s
🟢 dismissing the keyboard over choice controls leaves them as they were 13.8s
🟢 tests/flows-lists.e2e.ts · 7 passed 4m 25s
🟢 infinite scroll reaches the target item 40.0s
🟢 product catalog adds exactly two of the right variant 11.5s
🟢 gestures: long-press, then swipe left 9.8s
🟢 sticky chrome: accept below the fold, then continue 13.2s
🟢 async states: load, pull to refresh, claim through the toast 11.2s
🟢 huge virtualized list reaches row 512 2m 46s
🟢 web view coupon form applies the code shown on the page 13.0s
🟢 tests/flows.e2e.ts · 7 passed 1m 17s
🟢 text inputs unlock the submit button 15.7s
🟢 filled text inputs report their values 11.6s
🟢 modal flow confirms through the native alert 10.9s
🟢 bottom tabs act inside the last tab 8.4s
🟢 error recovery retries, then confirms the delete 10.0s
🟢 choice controls place the exact order 8.1s
🟢 debounced search selects the target once results arrive 12.5s
🟢 tests/login-form.e2e.ts · 3 passed 51.0s
🟢 login form › rejects a malformed email 15.4s
🟢 login form › rejects an unknown account 14.5s
🟢 login form › signs in and logs out 21.0s
🟢 tests/smoke.e2e.ts · 1 passed 8.6s
🟢 home lists the scenarios and opens one 8.6s

Tested by e2e 0.23.0 · 7m 50s · ios-simulator · run artifacts

@kdy1 kdy1 added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 9, 2026
@kdy1

kdy1 commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

[claude-sonnet-5-5] responding on behalf of kdy1

Left for the human reviewer:

  • The GitHub Actions recipe is not run against a real workflow. The page states GitHub's rule that a pull request can read its base branch's cache but not write to it. Confirm it before relying on the restore-keys order.
  • --timings is not confined to the project root the way --output is. I left it open, since the path is one the user names on their own command line and test code already runs with full authority. Say if you want it confined.
  • packages/acp/tests/executor.test.ts "retries the session directory removal after the agent exits" is intermittent in CI (kill ESRCH after a 500 ms wait). It also failed on oskar/fix-main-failing-tests, it does not reproduce locally, and this PR does not touch it. It needs its own fix.
  • Out of scope, by decision: duration-balanced --shard, a timings.file config key, and running the recipe in benchmark.yml.

Comment thread packages/e2e/src/run/last-run.ts Resolved
…e target

A test a `platforms` list excludes is `selected: false` with cause
`platform-unavailable`, the same flag a `--grep` or `--last-failed` sets, so a
file holding both an iOS-only and an Android-only test never got a time on
either target. Only a filter makes a file partial; a permanent platform
exclusion does not.

Refs ENG-1111

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 10, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

View guided diff | Turn on auto-fix | Re-trigger cubic

@kdy1 kdy1 added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 10, 2026
@okwasniewski
okwasniewski merged commit b285835 into main Nov 10, 2026
32 checks passed
@okwasniewski
okwasniewski deleted the kdy1/perf/cache-timing-api branch November 10, 2026 13:58
kdy1 added a commit that referenced this pull request Nov 10, 2026
The timings history (#1639) replaced the previous report as where file
durations come from, so the prose that says what orders files inside a
relevance band now names it: the filters guide, the `workers` bullet in
the config reference, the CI guide, the skill's running reference, and the
wording of the integration test that pins the one-worker gate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
okwasniewski pushed a commit that referenced this pull request Nov 11, 2026
…1589)

* feat(runner): start the tests a change is likeliest to break first

A test filter can score the tests it keeps: `relevance` in its result maps test ids to a number from 0 to 1. With `--changed-since`, each target starts the files of the likeliest tests first, in bands at 75%, 50%, and 25%, and the target with the likeliest file goes first. Inside a band the longest-first order from the previous run still decides, with more than one worker.

`decisionFilter()` scores every test it hands back: 1 for a test whose file, setup file, or stored screenshots changed, the model's answer for one it judged, and 0.5 for one it did not. It requires e2e 0.23.1 or newer, since an older runner refuses the unknown `relevance` key and drops the whole filter.

The run prints `ranked N of M tests by relevance, likeliest first` when the scores change the order.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(runner): write the failing fixture as a constant, not built from a parameter

CodeQL flagged `failingFile(title)` for putting `JSON.stringify` output into generated code. Only `gamma` used it, so the file is a constant now.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(runner): say how targets, bands, and the ranking line are decided

Review of #1589 found the docs looser than the code: targets go by the band of their best file, not its exact score, with ties in config order; a rating the model did not give counts as 50% and the test takes the higher of its two ratings; the bands are half-open; the ranking line follows when the scores put tests in more than one band; and a filter that returns no scores leaves the order alone. One test title said an empty target goes last, but it keeps its place.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(runner): score known areas on the fallback path and name files, not tests

The areas example now scores the tests whose area a change reaches even when another changed file maps to no area, keeping the no-exclusion fallback. The README, docs, and skill say the run starts the files of the likeliest tests, ordered by relevance band with collection order breaking ties on one worker. The timings test makes beta and gamma wait for each other before they sleep, so a slow second worker cannot start alpha ahead of gamma.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(runner): keep the scores of a filter that fails

A filter that threw left every test unscored, so a run with no AI Gateway
key (a pull request from a fork) or a model outage fell back to collection
order and lost the one thing the decision filter knows without the model:
which tests the change touches.

The error a filter throws may now carry `relevance`. The runner checks it
the way it checks a result's, merges it by the highest score, and still
warns, leaves nothing out, and records `outcome: failed`. Scores that fail
the check are dropped, and the note says why. A call past its deadline is
abandoned, and nothing it throws is read.

decisionFilter() puts the scores the change alone gives (1 for a test the
change touches, 0.5 for the rest) on the error it throws, as a property
that is not enumerable, so printing the error does not list every test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(runner): point the ordering prose at the timings history

The timings history (#1639) replaced the previous report as where file
durations come from, so the prose that says what orders files inside a
relevance band now names it: the filters guide, the `workers` bullet in
the config reference, the CI guide, the skill's running reference, and the
wording of the integration test that pins the one-worker gate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. size:L Up to 499 changed lines, not counting tests, fixtures, translated docs, or the lockfile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants