Skip to content

e2e analyzer: let the rubric reach a test-side verdict instead of defaulting to product - #15340

Merged
jonvanausdeln merged 3 commits into
mainfrom
jonv/e2e-analyzer-rubric-test-side
Aug 5, 2026
Merged

e2e analyzer: let the rubric reach a test-side verdict instead of defaulting to product#15340
jonvanausdeln merged 3 commits into
mainfrom
jonv/e2e-analyzer-rubric-test-side

Conversation

@jonvanausdeln

Copy link
Copy Markdown
Contributor

Three consecutive merge-lane runs put the same two new-folder-flow renv failures on "suspected product regression" when the mechanism was visible in the test's own helper. Both reports even recommended the right test-side fix while labeling the root cause product, which routes the work to the wrong owner. The analyzer had all the evidence it needed in both cases, so this is a reasoning-rubric change, not a data change.

Summary

The hole: the residual rule in rubric.md names four dismissive categories (flaky, timeout, infrastructure, test environment) and says that when no dismissal is earned and it isn't locator drift, the residual is a suspected product regression. test logic bug never appears in that path, so an unexplained failure can only land on product.

Four changes:

  1. test logic bug is not a dismissal -- it names an owner and a fix, so a cited test-side mechanism outranks the residual. Adds the self-check that recommending "harden the test to wait for X" while labeling the cause product contradicts itself. Explicitly does not extend to locator drift, which keeps its own stricter decision procedure.
  2. New section: verify the test established its own precondition. Output that marks the START of an async operation (a package install, build, clone, download) proves initiation, not completion; a readiness check returning in tens of milliseconds proves nothing about work that takes seconds. Time the setup step from the trace's [before]/[after] stamps. Notes that this failure mode is intermittent by nature, so a high pass rate does not refute it.
  3. New subsection on where a wait BEGAN, under the existing clock rules (which only covered [after deadline] lines). Subtract an intervening window reload from the budget before calling a product open path slow: 23s of a 40s wait spent reloading is an under-budgeted wait, not a slow handler.
  4. window_start in the history payload, plus the rule that a "first seen" date at the window's edge means the onset is unknown rather than established.

rubric.md is injected verbatim into the Action's system prompt and shared with the interactive e2e-failure-analyzer skill, so both consumers pick this up.

Validation

Dispatched the analyzer from this branch against the three runs the changes were written for, and read every report.

run before after
30944006762 (win) suspected product regression, "slow renv-init open path" test logic bug (under-budgeted wait); reconstructs the budget from the startup-phase lines and says do not relax the selector
30948032053 (ubuntu) suspected product regression, "renv-installed detection race" test logic bug; names the start-of-install match in packageManager.ts, cites the ~5s trace timing, "the modal is expected product behavior"
30952155263 (ubuntu) suspected product regression / test environment test logic bug; same, and "Fix the helper, not the timeout"

Both diagnoses match the fixes in #15338, which were derived independently by hand.

An intermediate revision is worth calling out, because it is the risk this kind of change carries: the first version promoted locator drift alongside test logic bug, and the Windows report then swung to "stale selector," recommending a change to a selector that is correct (.simple-title-bar is the parent of .simple-title-bar-title in draggableTitleBar.tsx:103, so the existing hasText filter matches). The report even called the modal "fully rendered and visible" while claiming its selector did not match. Commit 2 scopes the promotion and adds the guard that was missing: locator drift is deterministic, so a selector that passes 99% of the time cannot be stale, and a high per-environment pass rate refutes drift outright.

Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

Validation Steps

CI tooling only -- no product or e2e-test code changes, so no test tags apply. Validation is the three dispatched analyzer runs above; the reports are attached to each as the e2e-failure-analysis artifact. To re-check any run: Actions -> "Analyze E2E Failures" -> Run workflow, pick this branch, paste a run URL.

Three consecutive merge-lane runs (30944006762, 30948032053, 30952155263)
put the same two new-folder-flow renv failures on "suspected product
regression" when the mechanism was visible in the test's own helper. Both
reports even recommended the right test-side fix ("wait for renv install
to be confirmed") while labeling the root cause product -- the rubric's
residual rule has no test-side exit, so an unexplained failure can only
land on product.

- Say plainly that `test logic bug` and `locator drift` are not
  dismissals, so a cited test-side mechanism outranks the residual, and
  add the self-check: recommending a test fix while labeling the cause
  product contradicts itself.
- New section on verifying the test established its own precondition:
  output that marks the START of an async operation proves initiation, not
  completion, and a readiness check returning in tens of milliseconds
  proves nothing. Time the setup step from the trace timestamps.
- New subsection under the clock rules for where a wait BEGAN: subtract an
  intervening reload from the budget before calling a product open path
  slow. 23s of a 40s wait spent reloading is an under-budgeted wait, not a
  slow handler.
- Note that a "first seen" date is censored by the lookback window, so it
  is only an onset when clean runs precede it inside the window.
Validating the previous commit against the three runs it was written for
fixed both ubuntu reports (they now name the install-completion race in
packageManager.ts and say to fix the helper, not the timeout) but pushed
the Windows report from "suspected product regression" to "locator drift,"
recommending a change to a selector that is correct: `.simple-title-bar`
is the parent of `.simple-title-bar-title` in draggableTitleBar.tsx:103,
so the existing filter matches.

- Scope the "not a dismissal" promotion to `test logic bug`. Locator drift
  keeps its own stricter decision procedure; permission to reach a
  test-side verdict is not permission to blame the selector.
- Add the determinism guard the rubric was missing: markup does not revert
  between runs, so a selector that mostly passes cannot be stale. A high
  per-environment pass rate refutes drift outright, and a failure-state
  screenshot showing the target rendered with the filtered text means the
  question is timing, not markup.
- Route "present with expected role, visibility timeout" through the
  wait-window subsection before it lands on `flaky test`, since an
  under-budgeted wait is a test logic bug with a specific fix.
…nsored

The censoring rule added in the previous commits was applied inconsistently
across the validation runs: the payload carries `lookback_days` but no date
for where the window opens, so using it required the model to do the
subtraction, and it usually skipped it and reported "first seen Jul 28"
bare.

Compute the boundary in e2e-query-history.js and emit it as `window_start`
(listed first so it reads next to `lookback_days` and survives any
head-keeping truncation of the payload). Prefer the API's own
`lookback_days`, since it may clamp what we asked for, and let an
API-provided `window_start` win if the endpoint ever grows one. The error
paths still print a bare `{}`, which the rubric reads as "API unreachable."

Rubric and the script README now name the field instead of describing the
arithmetic.
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

E2E Tests 🚀
This PR will run tests tagged with: @:critical

Note

No feature tags detected. If this PR needs feature coverage, add the tag above and retrigger the workflow.

readme  valid tags

@jonvanausdeln
jonvanausdeln enabled auto-merge (squash) August 4, 2026 23:55
@jonvanausdeln
jonvanausdeln merged commit c37ab1b into main Aug 5, 2026
26 checks passed
@jonvanausdeln
jonvanausdeln deleted the jonv/e2e-analyzer-rubric-test-side branch August 5, 2026 12:09
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants