Skip to content

fix(e2e): the monkey offers only controls the harness can act on - #532

Merged
M0Rf30 merged 1 commit into
mainfrom
ci/e2e-monkey-disabled-subtree
Nov 27, 2026
Merged

M0Rf30 merged 1 commit into
mainfrom
ci/e2e-monkey-disabled-subtree

Conversation

@M0Rf30

@M0Rf30 M0Rf30 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

The monkey job failed on main: workflow e2e run 45998601602 (2026-11-27, commit b2fa929), job 140504200689. The same commit passed on 2026-11-26.

Root cause

click locator("[data-monkey-id=\"2\"]"): element is not enabled (still failing after 2000 ms) at monkey.e2e.ts:297, step 327 of MONKEY_SEED=248447929, on /settings/ai. The control is the Custom / OpenAI-compatible provider button.

AISettingsPage wraps the form in aria-disabled="true" (and opacity-40 pointer-events-none) while AI is off, the default. The harness refuses to click inside it: enabled() in web/e2e/lib/inpage.ts walks the ancestors for aria-disabled and a disabled <fieldset>. The monkey's collect() checked only the control's own state, so it offered the button, and the catch rethrew whenever the element still existed.

It is not a flaky page and not a product bug. A walk that reaches the AI settings page without turning AI on hits it every time; it only looks random because the seed is random.

Fix

  • collect() uses an ancestor-aware enabled() that mirrors the harness, for links, buttons and inputs.
  • An action that finds its control disabled or gone is logged and skipped; any other error still fails the step.
  • New test offers only controls the harness can act on. It fails on the old code and passes now.

Checks

  • Against a local server and Lightpanda 1.0.2: the new test fails before the change and passes after (35 expects). MONKEY_SEED=248447929 MONKEY_STEPS=400 MONKEY_MAX_SECONDS=600 bun run monkey: 4 pass, 0 fail. The local walk reached the Open AI settings link at step 327 and chose Open navigation next, so the disabled buttons were no longer candidates (the local walk is one step off from CI's).
  • tsc -p web/e2e/tsconfig.json: clean.

The `monkey` job failed on main (run 45998601602, commit b2fa929, job 140504200689): `click locator([data-monkey-id="2"]): element is not enabled (still failing after 2000 ms)` at step 327 of `MONKEY_SEED=248447929`, on /settings/ai. The same commit passed the day before: the seed is random, the failure is not.

`AISettingsPage` wraps the whole form in `aria-disabled="true"` (and `pointer-events-none`) while AI is off, which is the default. The harness refuses to click inside it (`enabled()` in `lib/inpage.ts` walks the ancestors), but the monkey's `collect()` only looked at the control's own state, so it picked the `Custom / OpenAI-compatible` provider button and the catch rethrew because the element still existed. Any walk that reaches that page can hit it.

`collect()` now applies the same ancestor rule (`aria-disabled`, disabled `fieldset`) to links, buttons and inputs, and an action that finds its control disabled or gone is logged and skipped. The new test `offers only controls the harness can act on` fails on the old code and passes now; `MONKEY_SEED=248447929 MONKEY_STEPS=400 bun run monkey` passes against a local server and Lightpanda 1.0.2 (4 pass, 0 fail).
@github-actions

Copy link
Copy Markdown

Coverage

Coverage vs main
Go, unit + integration 83.3% ±0.0
Go, unit tests only 69.7% ±0.0
Go, integration tests only 53.1% ±0.0
Web, lines 91.8% ±0.0
Web, functions 85.8% ±0.0
Go by area
Area Coverage vs main
cmd/docgen 80.3% ±0.0
cmd/genformats 90.8% ±0.0
cmd/oa 0.0% ±0.0
cmd/resetpw 0.0% ±0.0
cmd/server 70.2% ±0.0
internal/ai 85.6% ±0.0
internal/api 77.4% ±0.0
internal/apkkeys 77.1% ±0.0
internal/apktest 90.7% ±0.0
internal/artifactpath 100.0% ±0.0
internal/attest 84.0% ±0.0
internal/attestation 79.2% ±0.0
internal/audit 97.6% ±0.0
internal/auth 91.6% ±0.0
internal/backup 72.4% ±0.0
internal/bgtask 96.8% ±0.0
internal/blockreason 100.0% ±0.0
internal/branding 93.5% ±0.0
internal/bundlechecks 100.0% ±0.0
internal/clientsetup 93.0% ±0.0
internal/config 96.4% ±0.0
internal/cron 90.0% ±0.0
internal/crypto 91.0% ±0.0
internal/csaf 85.0% ±0.0
internal/curation 99.2% ±0.0
internal/database 76.0% ±0.0
internal/declarative 84.1% ±0.0
internal/dtrack 85.3% ±0.0
internal/exploit 93.6% ±0.0
internal/federation 81.7% ±0.0
internal/format 80.3% ±0.0
internal/formats 88.0% ±0.0
internal/gpgkeys 87.1% ±0.0
internal/group 89.5% ±0.0
internal/httpcache 100.0% ±0.0
internal/httpcompress 93.3% ±0.0
internal/httpx 85.7% ±0.0
internal/imagesbom 81.9% ±0.0
internal/importmeta 93.3% ±0.0
internal/iocopy 100.0% ±0.0
internal/itempath 98.3% ±0.0
internal/lazyre 100.0% ±0.0
internal/license 98.5% ±0.0
internal/licensemeta 87.5% ±0.0
internal/licensepolicy 92.6% ±0.0
internal/limitio 92.9% ±0.0
internal/mcp 89.9% ±0.0
internal/metrics 96.2% ±0.0
internal/middleware 94.6% ±0.0
internal/netutil 93.4% ±0.0
internal/nixkeys 79.6% ±0.0
internal/oacli 85.2% ±0.0
internal/ocimanifest 100.0% ±0.0
internal/ocipath 100.0% ±0.0
internal/ociref 96.8% ±0.0
internal/osv 89.8% ±0.0
internal/passwd 93.3% ±0.0
internal/pathseg 100.0% ±0.0
internal/pglock 79.0% ±0.0
internal/pkgdeps 88.1% ±0.0
internal/presign 99.2% ±0.0
internal/promote 84.5% ±0.0
internal/proxy 86.8% ±0.0
internal/publicurl 96.8% ±0.0
internal/pypisimple 97.9% ±0.0
internal/quarantine 100.0% ±0.0
internal/quayapi 81.2% ±0.0
internal/quota 92.2% ±0.0
internal/recovery 84.8% -0.4
internal/registry 100.0% ±0.0
internal/replication 78.1% ±0.0
internal/repodispatch 85.1% ±0.0
internal/repotype 97.0% ±0.0
internal/rpmextra 92.9% ±0.0
internal/sbom 89.9% ±0.0
internal/scanexport 96.4% ±0.0
internal/search 90.5% ±0.0
internal/secrets 91.4% ±0.0
internal/storage 84.9% ±0.0
internal/telemetry 92.2% ±0.0
internal/tiering 83.5% ±0.0
internal/trash 96.7% ±0.0
internal/urlparams 100.0% ±0.0
internal/vexsync 80.0% ±0.0
internal/vuln 89.9% ±0.0
internal/webhook 86.1% ±0.0
internal/worker 82.5% -0.2
internal/workq 79.5% ±0.0
pkg/ansible 89.8% ±0.0
pkg/cargo 95.6% ±0.0
pkg/compactindex 97.8% ±0.0
pkg/composer 94.5% ±0.0
pkg/conan 99.2% ±0.0
pkg/conda 94.8% ±0.0
pkg/delta 71.4% ±0.0
pkg/gemversion 100.0% ±0.0
pkg/helm 97.0% ±0.0
pkg/lockfile 96.7% ±0.0
pkg/logger 96.9% ±0.0
pkg/maven 96.7% ±0.0
pkg/nix 99.1% ±0.0
pkg/npm 88.0% ±0.0
pkg/nuget 97.6% ±0.0
pkg/pyversion 100.0% ±0.0
pkg/rubymarshal 87.1% ±0.0
tests/integration 78.8% ±0.0
web 93.7% ±0.0
Web by area (lines)
Area Coverage vs main
src 85.1% ±0.0
src/api 92.8% ±0.0
src/components 90.2% ±0.0
src/composables 89.7% ±0.0
src/demo 93.0% ±0.0
src/i18n 98.5% ±0.0
src/lib 99.2% ±0.0
src/pages 92.1% ±0.0
src/pwa 97.6% ±0.0
src/router 98.6% ±0.0
src/stores 99.0% ±0.0
src/telemetry 90.8% ±0.0

Full report (HTML, merged profile) in the CI run artifacts

@M0Rf30
M0Rf30 merged commit 39f3574 into main Nov 27, 2026
23 checks passed
@M0Rf30
M0Rf30 deleted the ci/e2e-monkey-disabled-subtree branch November 27, 2026 17:37
@M0Rf30 M0Rf30 mentioned this pull request Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant