Skip to content

Commit 3dab603

Browse files
committed
docs: cover browser use action schema validation
1 parent 963dd84 commit 3dab603

4 files changed

Lines changed: 45 additions & 1 deletion

File tree

LAUNCH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Current latest audit:
117117

118118
| Captured at | Stars | To 1001 | Forks | Watchers | Issues | PRs | Release downloads | Note |
119119
|---|---:|---:|---:|---:|---:|---:|---:|---|
120-
| 2026-05-12T11:46:42+00:00 | 3 | 998 | 20 | 0 | 11 | 0 | 40 | current monitor pass after good-first issue #352 opened for local HTML upload failure-patterns coverage; traffic views 354/132 unique, clones 16382/2819 unique |
120+
| 2026-05-12T11:53:28+00:00 | 3 | 998 | 20 | 0 | 11 | 0 | 40 | current monitor pass after Browser Use action schema validation docs coverage for #345; traffic views 354/132 unique, clones 16382/2819 unique |
121121

122122
The active objective is incomplete until `stargazerCount > 1000`.
123123

docs/browser-use-debugging.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,19 @@ <h2 id="debug-local-html-upload-navigation">Debug local HTML upload navigation m
355355
<p>Related community case: <a href="https://github.com/browser-use/browser-use/issues/4794">browser-use/browser-use#4794</a>.</p>
356356
</section>
357357

358+
<section>
359+
<h2 id="debug-action-schema-validation">Debug action schema validation boundaries</h2>
360+
<p>Action schema coercion can hide why a Browser Use step targeted the wrong element. For example, a raw model action may put a boolean in an element-index field, then one validation path coerces it while another rejects it. After normalization, the final executed target can look deliberate unless the trace preserves both sides of the boundary.</p>
361+
<p>Treat this as a schema validation and future adapter boundary. It does not mean BrowserTrace already captures every internal Browser Use field.</p>
362+
<ul>
363+
<li>Keep the raw model action before validation.</li>
364+
<li>Record the validated or normalized action that Browser Use actually executed.</li>
365+
<li>Capture any schema or normalization warning, validation error, or coercion note.</li>
366+
<li>Preserve selected element metadata for the final executed target, including index, role, text, selector, and URL when available.</li>
367+
</ul>
368+
<p>Related community case: <a href="https://github.com/browser-use/browser-use/issues/4796">browser-use/browser-use#4796</a>.</p>
369+
</section>
370+
358371
<section>
359372
<h2 id="debug-empty-model-responses">Debug empty model responses</h2>
360373
<p>A failing parser exception might occur when the model provider returns an empty response (e.g., <code>input_value=''</code>) before Browser Use validation runs. This suggests the parser received no assistant JSON content at all, rather than malformed JSON.</p>

docs/launch/metrics-log.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,3 +1033,4 @@ uv run --python 3.11 python scripts/launch_metrics.py --json
10331033
| 2026-05-12T11:39:24+00:00 | 3 | 998 | 20 | 0 | 11 | 0 | 40 | current monitor pass after README mentions Browser Use remote CDP hangs for #350; traffic views 354/132 unique, clones 16382/2819 unique |
10341034
| 2026-05-12T11:42:02+00:00 | 3 | 998 | 20 | 0 | 10 | 0 | 40 | current monitor pass after #350 closed with README remote CDP docs coverage; traffic views 354/132 unique, clones 16382/2819 unique |
10351035
| 2026-05-12T11:46:42+00:00 | 3 | 998 | 20 | 0 | 11 | 0 | 40 | current monitor pass after good-first issue #352 opened for local HTML upload failure-patterns coverage; traffic views 354/132 unique, clones 16382/2819 unique |
1036+
| 2026-05-12T11:53:28+00:00 | 3 | 998 | 20 | 0 | 11 | 0 | 40 | current monitor pass after Browser Use action schema validation docs coverage for #345; traffic views 354/132 unique, clones 16382/2819 unique |

tests/test_metadata.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,36 @@ def test_browser_use_guide_covers_local_html_upload_navigation_boundary():
601601
assert "reposts" not in section.lower()
602602

603603

604+
def test_browser_use_guide_covers_action_schema_validation_boundary():
605+
project_root = Path(__file__).resolve().parents[1]
606+
guide = (project_root / "docs" / "browser-use-debugging.html").read_text()
607+
608+
assert 'id="debug-action-schema-validation"' in guide
609+
assert "action schema" in guide
610+
assert "schema coercion" in guide
611+
assert "browser-use/browser-use/issues/4796" in guide
612+
613+
section = guide.split('id="debug-action-schema-validation"', 1)[1].split(
614+
"</section>",
615+
1,
616+
)[0]
617+
618+
for expected in [
619+
"raw model action",
620+
"validated or normalized action",
621+
"schema or normalization warning",
622+
"selected element metadata",
623+
"final executed target",
624+
]:
625+
assert expected in section
626+
627+
assert "future adapter boundary" in section
628+
assert "does not mean BrowserTrace already captures every internal Browser Use field" in section
629+
assert "stars" not in section.lower()
630+
assert "upvotes" not in section.lower()
631+
assert "reposts" not in section.lower()
632+
633+
604634
def test_stagehand_guide_links_first_pr_recipe_for_small_contributions():
605635
project_root = Path(__file__).resolve().parents[1]
606636
guide = (project_root / "docs" / "stagehand-debugging.html").read_text()

0 commit comments

Comments
 (0)