Skip to content

Docs/failure diagnosis playbook - #85

Merged
jyotir-aditya merged 4 commits into
mainfrom
docs/failure-diagnosis-playbook
Jul 11, 2026
Merged

jyotir-aditya merged 4 commits into
mainfrom
docs/failure-diagnosis-playbook

Conversation

@jyotir-aditya

Copy link
Copy Markdown
Contributor

No description provided.

… failure JSON (#55)

On any failure, probe the still-live page once (computed styles and geometry
are not recoverable from the saved static HTML) and attach a new additive
page_state field: URL, title, open dialogs/overlays with accessible names,
visible interactive elements (capped), and counts of non-excluded console
errors / failed requests from earlier in the run. Strictly facts, no
interpretation — that stays in the analyzer pipeline, which now receives
page_state in its EvidenceBundle (groundwork for #59).

Collected on both failure paths: per failed assertion in runAssertions
(lazy, cached across the list), and in the engine's crash path for step
failures — the field-review dialog-blocks-click case — where facts ride at
the ExecutionResult top level since no failed AssertionResult exists. Facts
are also persisted as <id>_page_state.json next to the console/network logs.
Collection is best-effort and bounded (3s probe timeout, never throws);
passing runs pay zero cost and are byte-identical.

CLI maps page_state onto each failure object (including the step-failure
fallback); SDK types gain the field. New e2e case: a viewport-covering
dialog blocking a correct click selector must yield page_state naming the
dialog.
…etric overlay path (#55 review)

Review feedback on #84:

- The visible-elements inventory (up to 20 entries, duplicated verbatim on
  every failed assertion) is token noise in the agent-facing JSON contract,
  and on busy pages the truncation can drop the one element that mattered.
  The CLI now strips visible_elements/visible_elements_truncated from
  failures[].page_state; the full facts still persist in the run result
  (.verfix/runs/<id>.json) and the <id>_page_state.json artifact. SDK type
  updated to the shipped shape.

- Document the center-only elementsFromPoint sampling as a deliberate
  ceiling (ponytail): the geometric path requires >=80% viewport coverage,
  and anything that large necessarily covers the center — lowering the bar
  or multi-point sampling would false-positive on legitimate fixed
  sidebars. ARIA dialogs are caught by the selector query at any position.

- New e2e case: a role-less full-viewport overlay (cookie wall) blocking a
  click must be detected via the geometric probe path — previously only the
  [role=dialog] selector path had end-to-end coverage.
Teach the escalation ladder for diagnosing a failure of any cause:
fix_hint/findings/page_state in the JSON output first, then --timeline,
then --dom (with page_state.open_dialogs for occluding overlays), then
--console/--network, and only then touch project source.
Main already landed #84 (page_state facts) and #86 (blocking_overlay
analyzer). Keep main's code for the overlapping crash-path/findings
wiring; this branch's unique delta remains the failure-diagnosis
playbook in generated agent instructions (#61).
@jyotir-aditya
jyotir-aditya merged commit f1beaf6 into main Jul 11, 2026
2 checks passed
@jyotir-aditya
jyotir-aditya deleted the docs/failure-diagnosis-playbook branch July 11, 2026 06:02
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