Repository navigation
test(evals): fail loudly when a spec clicks a disabled control - #4770
Conversation
locate() now reports what disables a control (disabled / aria-disabled="true") and clickTarget() waits for a visible target, refuses a disabled one by name with DisabledTargetError, then re-locates immediately before dispatching so a layout shift after the first inspection fails with both rects instead of silently absorbing the click.
…kTarget A spec that clicks a disabled control now fails immediately with the control's label and disabled state instead of dispatching a mouse event the app ignores; the trace target rect is the geometry that was actually clicked.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Warden review summary — ClearNative findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (67568 ms), confidentiality-review (53125 ms), spec-provenance-review (14326 ms). Blockers
Advisories
Needs recheck
Observed review-thread metrics
Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (80d6824b6adc5b9179e1067b3a54bfa1d4d5539b). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Test evidence — an existing Models subscriber can decline, enable and disable task analytics without losing Models — ✅ passedSHA 80d6824 · engine v1 ✅ 0/8 screenshots passed · 23 assertions · 23 expectations passed · 0 failed · 0 pending [world] den(daytona) · [seed] api GET /v1/org · [seed] api PATCH /v1/inference · web(signed in) ℹ️ ASSERTION — 1. Paid Models usage lives in Analytics independently of the Enterprise planThe existing subscriber's Models page contains subscription controls without analytics or usage limits. Analytics exposes Models & usage and shared limits, while enterprise adoption analytics is locked and Workflow Runs is absent.
ℹ️ ASSERTION — 2. An existing paid Models organization keeps model access while analytics is unreleased and inaccessibleManaged model request returned 200; subscription remained enabled; analytics was absent from the UI and read API returned 403
ℹ️ ASSERTION — 3. Existing workspace deletion remains available before the analytics migrationA separate workspace was deleted through the public API while the analytics tables were absent
ℹ️ ASSERTION — 4. Applying the analytics migration preserves an existing paid subscription and model keyThe real Models API served the existing key before the new tables existed and after the additive migration; subscription status stayed identical
ℹ️ ASSERTION — 5. Existing subscribers are asked for an explicit choice; Not now persists and leaves Models workingNo consent by default, missing confirmation rejected with 400, decline survives reload, same model key still returns 200
ℹ️ ASSERTION — 6. Moving between Models and Analytics preserves consent and keeps the Models page focusedAfter opting in, the Models page still contains no task analytics, usage limits, analytics navigation or integrations. Returning through Analytics restores the enabled Activity view without asking again.
ℹ️ ASSERTION — 7. The ingestion API preserves submitted metadata, deduplicates retries and excludes contentNo pre-consent backfill; 2 real inference calls plus 4 events submitted through the ingestion API after retry; private prompt absent; content and client-supplied costs rejected
ℹ️ ASSERTION — 8. Members cannot view organization analytics, change the choice or attach events to another member's taskRead/write settings returned 403; forged task batch accepted zero events
ℹ️ ASSERTION — 9. A second paid, opted-in organization cannot see the first organization's activityThe second organization has analytics access, returns HTTP 200, and sees zero events
ℹ️ ASSERTION — 10. New Models activity appears without a manual refreshThe empty activity screen became a completed task showing both real inference models, MiniMax-M3 and GLM-5.2, without reloading or pressing Refresh; provider coverage guidance was visible before the first task
ℹ️ ASSERTION — 11. Unavailable Models consumption is an error, not an empty chartAn analytics storage outage returned HTTP 500 and hid the consumption chart and empty-state claims; Refresh restored the recorded costs after recovery
ℹ️ ASSERTION — 12. Streaming and JSON responses remain usable; failed or incomplete calls do not invent zero-cost usageBoth response formats returned their expected text; missing usage has no cost; upstream 503 remains 503 and is recorded as failed
ℹ️ ASSERTION — 13. Turning analytics off preserves the Models subscription and existing key; downgrade and rollout removal stop analyticsSame key returns 200 after disable and rollout removal; subscription status is unchanged; reads are denied and no disabled-period events reappear
ℹ️ ASSERTION — 14. The Langfuse UI verifies project access, rejects private addresses, and exports only newly collected metadataPrivate address rejected; HTTPS witness connected; new model usage arrived without prompt text, keys or historical activity
ℹ️ ASSERTION — 15. Turning off task analytics stops export while Models keeps respondingNew Models request returned 200 after disable; no extra spans arrived across a full export interval
ℹ️ ASSERTION — 16. Opt-out finishes only after an already-authorized export has finishedThe Langfuse witness held an export response; the UI could not confirm opt-out until the response was released, then no later export arrived
ℹ️ ASSERTION — 17. A newer desktop keeps Models working when Den has no analytics endpointThe real desktop received an injected HTTP 404 for analytics settings, still produced the assistant reply, and never attempted to upload task events
ℹ️ ASSERTION — 18. Real desktop tasks correlate with inference usage after opt-in without replacing the conversation or collecting earlier promptsThe same conversation produced new replies before and after opt-in; runtime task start/completion joined the model call by task ID; two models and two tasks retained; prompt text absent
ℹ️ ASSERTION — 19. A real desktop skill invocation produces task analyticsThe model invoked the native skill tool; OpenCode loaded the arranged skill and the resulting skill.loaded event reached the API without a handcrafted ingestion event
ℹ️ ASSERTION — 20. A real desktop file search produces tool activity within the same taskThe model invoked the native glob tool; its completed tool.executed event reached analytics with the skill invocation's task ID, without a handcrafted ingestion event
ℹ️ ASSERTION — 21. Turning analytics off leaves the existing desktop conversation and selected model usableA new assistant reply arrived from the same selected model after disable; the independent HTTP witness observed no task-event uploads across opt-out, re-enable and 40 seconds of background reporting, the disabled-period task was absent, and the earlier conversation was still visible
ℹ️ ASSERTION — 22. Refreshing model activity rejects a late old page and preserves a complete traversalThe real page after task 200 was held while a newer event triggered automatic refresh. After releasing the old body and observing completion, only the refreshed 200 rows remained, with no stale tasks 200 or 400. The next UI request used the refreshed cursor, recovered task 200 through 399, and the final page reached 400. All 401 fixture tasks appeared exactly once, with no further page available.
ℹ️ ASSERTION — 23. Deleting a workspace erases its task analytics and stored export credentialsWorkspace deletion returned 200; an independent data-store witness found no retained history or analytics configuration
⚪ UNVALIDATED — 24. an existing Models subscriber can decline, enable and disable task analytics without losing Models artifact 1
⚪ UNVALIDATED — 25. an existing Models subscriber can decline, enable and disable task analytics without losing Models artifact 6
⚪ UNVALIDATED — 26. an existing Models subscriber can decline, enable and disable task analytics without losing Models artifact 8
⚪ UNVALIDATED — 27. an existing Models subscriber can decline, enable and disable task analytics without losing Models artifact 14
⚪ UNVALIDATED — 28. an existing Models subscriber can decline, enable and disable task analytics without losing Models artifact 15
⚪ UNVALIDATED — 29. an existing Models subscriber can decline, enable and disable task analytics without losing Models artifact 19
⚪ UNVALIDATED — 30. an existing Models subscriber can decline, enable and disable task analytics without losing Models artifact 24
⚪ UNVALIDATED — 31. an existing Models subscriber can decline, enable and disable task analytics without losing Models artifact 25
Test run created 2026-09-10T04:40:28.420Z · Source: |
|
Passed · 12/12 tests · 18/18 assertions · 8 images Commit |
Resolves evals/packages/cdp/test/input.test.ts: both sides extended the import line (clickTarget/DisabledTargetError here, pressKey from dev); keep the union and all 14 tests (8 base + 4 clickTarget here + 2 key/click-readiness from dev). Semantic follow-up for dev's stable-geometry rule in waitForLocated (two inspections with identical rects before a hit-tested target is returned): - dev's click-readiness fixture gains disabled: null, which locate() now requires; - clickTarget mocks enqueue the enabled button twice so stability is satisfied before the pre-dispatch re-locate, keeping each test's intent; - the disabled-guard mock budget rises from 100ms to 500ms to cover two polls. No assertion changed.
Deploying openwork with
|
| Latest commit: |
120e740
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://65615159.openwork.pages.dev |
| Branch Preview URL: | https://e2e-click-disabled-guard.openwork.pages.dev |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (120e740a9f501afe92fdd7b21948af75d4217522). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Resynced with
|








Merge order: land this AFTER #4757 (
e2e/fresh-session-send-gate). Until #4757 is in, the Cluster 1 specs that clickRun taskduring the first ~0.9 s of a new session will fail immediately withDisabledTargetErrorinstead of after a 90 s timeout — that is the intended behaviour of this PR, but it means their red turns from "timeout" into a named failure until the product fix lands.Root cause
Triage:
reports/e2e-red-2026-09-09/triage.md→ Cluster 1 ("Fresh-sessionRun taskclick swallowed", 7 files) and Brief B2.user.clicklocated the target withwaitForLocated(visible + hit-test) and dispatchedInput.dispatchMouseEventat its centre without ever looking atdisabled/aria-disabled. A fresh session'sRun taskbutton isdisabledfor ~0.9 s (transitionState === "switching", see triage proberun4:t=386ms clicked … buttons=[Run task:disabled] user=0), so the click was silently swallowed and the spec died 60–120 s later on an unrelatedsee(...)timeout with an enabled-looking button in the dump.What changed (
evals/packages/cdp,evals/packages/testkitonly)locate()now reportsLocated.disabled: string | null— what disables the control (disabledvia:disabled, so a disabled<fieldset>counts, and/oraria-disabled="true"), ornull. The value is validated like every other located field (a non-string/non-null value is "invalid located-element geometry"). This matches how the app itself decides a control is actionable (session-number-shortcuts.ts:!button.matches('[disabled], [aria-disabled="true"]')).clickTarget(surface, target, { timeoutMs, mustHitTest, button, clickCount }):waitForLocatedas before (visible + hit-test);DisabledTargetErrorimmediately if the control is disabled —Refused to click disabled button "Run task" (disabled); the page would ignore the click.No mouse event is dispatched. It does not wait for the control to become enabled: a spec that needs to wait must say so, otherwise the guard would hide exactly the bug Cluster 1 is about.locateimmediately before dispatch; click at the fresh centre if it is still visible/hit-testable and enabled, otherwise fail with both rects:Target "Workflow Runs" moved before the click could be dispatched: 0,252 120×32 → 0,228 120×32 (visible=true, hitTestOk=false). Covered by ….user.click,user.rightClick,user.dblclickand the focusing click insideuser.typego throughclickTarget. Thetargettrace entry now records the geometry that was actually clicked.hitTest: falsestill works (visibility-only on both inspections).user.see/user.notSee/user.hoverare untouched; they only gain the extradisabledfield inLocated(visible in thelast statedump of aseetimeout).cdp/test/input.test.tsandspecs/spec-primitives.test.tsgaineddisabled: null.Proof (sha
80d6824b6adc5b9179e1067b3a54bfa1d4d5539b,OPENWORK_EVAL_REFexported, fresh sandboxes, both verifiedsource verified 80d6824b6…in the log)node --test packages/cdp/test/*.test.ts packages/testkit/test/*.test.ts→ 53 pass / 0 fail (4 newclickTargettests: refusesdisabledandaria-disabled="true"by name with noInput.dispatchMouseEvent; rejects a malformeddisabledvalue; clicks the re-located centre; fails with both rects when the fresh location is covered or turned disabled).pnpm evals:pr specs/spec-primitives.test.ts→ 3 passed, 1 skipped (that skip is the spec's own "unmet needs skip before building the world" fixture, not new).pnpm evals:e2e visualization --daytona→passed:1 failed:0 skipped:0, placement line:{"command":"evals:e2e","lane":"e2e","daytona":true,"placement":"daytona","engine":"legacy","surface":"legacy",…,"passed":1,"failed":0,"skipped":0,"skips":[],"verdict":"passed"}(236 s). Trace: 5 clicks (Run task×2,Mobile preview,Desktop preview,Request changes) + 2 composer types all throughclickTarget;test-run.jsongitSha=80d6824b6….pnpm evals:e2e models-analytics-upgrade --daytona(guard-not-over-eager check: 24 clicks on links, tabs, options and buttons across Den Web + desktop, including a click right after the spec's ownbutton:not(:disabled)wait) →passed:1 failed:0 skipped:0,"placement":"daytona","verdict":"passed"(595 s). All 24click+ 4typetrace entries ok.tsc -p evalsintroduces no errors in the touched files (the checkout has 366 pre-existing errors inworlds/*andpackages/email).Noticed, not touched
pnpm --dir evals testis red onorigin/devindependent of this change:lint:layers(39specs-use-testkit-onlyviolations),spec-channel-ratchet(19 stale/increased baselines) andspec-boundary-ratchet(5 specs) all name spec files this PR does not touch.test-run.jsonstill does not recordOPENWORK_EVAL_REF/placement(placement: nulleven for a Daytona run); the triage already flags this (Cluster 10).user.hoverstill useswaitForLocateddirectly (hovering a disabled control for its tooltip is legitimate), andevals/packages/behaviorshas its own click paths (sendComposerMessagewaits for!button.disabled) that were not changed.Located.disabledcould back auser.see(target, { disabled })option so specs can assert "the button is disabled" without a raw probe; not added here to keepseesemantics unchanged.