From c9183abce7cdecc377e229a6c323add1d8cdbc13 Mon Sep 17 00:00:00 2001
From: lanyue-llk <270302213+lanyue-llk@users.noreply.github.com>
Date: Tue, 20 Oct 2026 18:08:09 +0800
Subject: [PATCH] Fix acceptance isolation and explicit page identity contracts
---
README.md | 10 ++
docs/README.zh-CN.md | 10 ++
pyproject.toml | 2 +-
src/lexbench_webfetch/benchmark.py | 3 +-
.../evaluation/scoring-regressions.json | 50 +++++-
src/lexbench_webfetch/metrics.py | 28 +++-
src/lexbench_webfetch/models.py | 2 +
src/lexbench_webfetch/scoring.py | 72 +++++----
tests/test_acceptance_isolation.py | 146 ++++++++++++++++++
uv.lock | 4 +-
10 files changed, 287 insertions(+), 40 deletions(-)
create mode 100644 tests/test_acceptance_isolation.py
diff --git a/README.md b/README.md
index ffd47d9..17d45d8 100644
--- a/README.md
+++ b/README.md
@@ -106,6 +106,16 @@ uv run --frozen browser-harness-eval run \
Run these two commands from Browser Eval. Ordinary runs are diagnostic; a formal live-site comparison additionally requires its pre-call/post-call reference certification. The benchmark input checker verifies frozen bytes, not present-day website validity. See the [Browser Eval integration guide](https://github.com/lexmount/browser-eval/blob/main/docs/benchmarks.md).
+## Scoring behavior
+
+Version 0.3 matches Latin words at word boundaries for facts, markers and stable anchors. Required body facts use the returned content; a separate document title cannot supply missing body text. Chinese phrases retain literal matching, and numeric and currency checks keep their value boundaries.
+
+A task can set `page_identity_required: true` to require its final URL observations. Missing or mismatched observations then fail acceptance. Dynamic tasks can also set `document_language_match: "exact"` when the complete language tag matters; the default is `"primary"`. These checks apply across interfaces. Frozen tasks that do not require URL metadata keep their content-based acceptance rules.
+
+Offline scoring recomputes derived fields. It retains the original reference hash, deadline evidence and file fingerprints. A file verdict requires current file verification; an old pass flag cannot certify a rescore. Summaries expose `mean_all_attempts_ms`, `all_attempts_p50_ms` and `all_attempts_p95_ms` alongside the existing successful-call timings. The all-attempt population includes failed calls and timeouts.
+
+These changes do not revise frozen tasks or certify historical results. Score corrections require a new evidence revision tied to the scorer and its regression controls.
+
## Repository contents
| Path | Purpose |
diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.md
index a34e08b..d22c41d 100644
--- a/docs/README.zh-CN.md
+++ b/docs/README.zh-CN.md
@@ -106,6 +106,16 @@ uv run --frozen browser-harness-eval run \
普通运行用于诊断。正式比较实时网站时,还需要完成调用前后的参考内容认证。输入校验只能证明文件版本相符,不能证明网站今天仍然符合旧参考。详见 [Browser Eval 接入说明](https://github.com/lexmount/browser-eval/blob/main/docs/benchmarks.md)。
+## 评分规则
+
+0.3 版对事实、标记和固定锚点中的拉丁文使用单词边界匹配。正文事实只匹配返回内容,单独返回的文档标题不能补足正文。中文短语仍按原文匹配,数字和货币保留原有的数值边界检查。
+
+任务可设置 `page_identity_required: true`,要求返回的最终网址符合任务声明;缺少网址或网址不符都会判为未通过。动态任务需要区分完整语言标签时,可再设置 `document_language_match: "exact"`,默认值为 `"primary"`,只比较主语言。这些检查适用于所有接口。没有要求网址元数据的冻结任务,继续按原有内容规则验收。
+
+离线评分会重新计算派生字段,保留原始参考哈希、调用时限证据和文件指纹。文件结论需要当前文件验收依据;旧的通过标记不能认证本次重评分。汇总在原有成功调用耗时之外,提供全部调用的 `mean_all_attempts_ms`、`all_attempts_p50_ms` 和 `all_attempts_p95_ms`,包含失败调用与超时。
+
+上述修改不改写冻结题目,也不自动认证历史成绩。更正分数仍需建立新的证据修订,绑定评分器版本和回归用例。
+
## 仓库内容
| 路径 | 用途 |
diff --git a/pyproject.toml b/pyproject.toml
index d3d39a7..18e2499 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "lexbench-webfetch"
-version = "0.2.0"
+version = "0.3.0"
description = "Versioned Web Fetch tasks, acceptance contracts and frozen reference bindings"
readme = "README.md"
requires-python = ">=3.11"
diff --git a/src/lexbench_webfetch/benchmark.py b/src/lexbench_webfetch/benchmark.py
index f8b7be4..d3fdfe5 100644
--- a/src/lexbench_webfetch/benchmark.py
+++ b/src/lexbench_webfetch/benchmark.py
@@ -20,7 +20,8 @@
"fact_coverage_threshold", "expected_resources", "resource_output_contract",
"content_score_applicable", "required_patterns", "acceptance_contract",
"composite_acceptance", "mutable_body_policy", "body_requirements", "retrieval_hints",
- "source_review_url", "evaluation_url", "expected_final_url", "expected_document_language",
+ "source_review_url", "evaluation_url", "expected_final_url", "page_identity_required",
+ "expected_document_language", "document_language_match",
"expected_document_language_present", "target_language", "target_region",
)
diff --git a/src/lexbench_webfetch/definitions/evaluation/scoring-regressions.json b/src/lexbench_webfetch/definitions/evaluation/scoring-regressions.json
index 378cdf5..8a57b2e 100644
--- a/src/lexbench_webfetch/definitions/evaluation/scoring-regressions.json
+++ b/src/lexbench_webfetch/definitions/evaluation/scoring-regressions.json
@@ -24225,9 +24225,57 @@
{"id": "html-record-nested-title-list-uses-enclosing-card", "category": "structured-extraction", "root_cause": "html_nested_title_layout_owner", "failure_mode": "false-negative", "case": {"url": "https://example.test/catalog", "task_kind": "body", "min_content_chars": 1, "composite_acceptance": {"version": 1, "groups": [{"id": "houses", "kind": "named_link", "minimum_records": 1, "hosts": ["example.test"], "entry_path": "/item/[0-9]+", "required_fields": [{"id": "price", "kind": "price"}, {"id": "area", "kind": "area"}]}]}}, "artifact": "$100,000
900 sqft
", "ok": true, "expected_task_pass": true, "expected_metrics": {"composite_acceptance_pass": true}},
{"id": "html-record-nested-distinct-title-stays-independent", "category": "structured-extraction", "root_cause": "html_nested_title_layout_owner", "failure_mode": "false-positive", "case": {"url": "https://example.test/catalog", "task_kind": "body", "min_content_chars": 1, "composite_acceptance": {"version": 1, "groups": [{"id": "houses", "kind": "named_link", "minimum_records": 2, "hosts": ["example.test"], "entry_path": "/item/[0-9]+", "required_fields": [{"id": "price", "kind": "price"}, {"id": "area", "kind": "area"}]}]}}, "artifact": "$100,000
900 sqft
", "ok": true, "expected_task_pass": false, "expected_metrics": {"composite_acceptance_pass": false}},
{"id": "html-record-duplicate-identity-validates-before-dedup", "category": "structured-extraction", "root_cause": "html_record_validation_before_identity_deduplication", "failure_mode": "false-negative", "case": {"url": "https://example.test/catalog", "task_kind": "body", "min_content_chars": 1, "composite_acceptance": {"version": 1, "groups": [{"id": "houses", "kind": "named_link", "minimum_records": 1, "hosts": ["example.test"], "entry_path": "/item/[0-9]+", "required_fields": [{"id": "price", "kind": "price"}, {"id": "area", "kind": "area"}]}]}}, "artifact": "First House$100,000
First House$100,000
900 sqft
", "ok": true, "expected_task_pass": true, "expected_metrics": {"composite_acceptance_pass": true}},
- {"id": "html-record-duplicate-identity-cannot-combine-name-and-fields", "category": "structured-extraction", "root_cause": "html_record_validation_before_identity_deduplication", "failure_mode": "false-positive", "case": {"url": "https://example.test/catalog", "task_kind": "body", "min_content_chars": 1, "composite_acceptance": {"version": 1, "groups": [{"id": "houses", "kind": "named_link", "minimum_records": 1, "hosts": ["example.test"], "entry_path": "/item/[0-9]+", "required_fields": [{"id": "price", "kind": "price"}, {"id": "area", "kind": "area"}]}]}}, "artifact": "
$100,000
900 sqft
First House", "ok": true, "expected_task_pass": false, "expected_metrics": {"composite_acceptance_pass": false}}
+ {"id": "html-record-duplicate-identity-cannot-combine-name-and-fields", "category": "structured-extraction", "root_cause": "html_record_validation_before_identity_deduplication", "failure_mode": "false-positive", "case": {"url": "https://example.test/catalog", "task_kind": "body", "min_content_chars": 1, "composite_acceptance": {"version": 1, "groups": [{"id": "houses", "kind": "named_link", "minimum_records": 1, "hosts": ["example.test"], "entry_path": "/item/[0-9]+", "required_fields": [{"id": "price", "kind": "price"}, {"id": "area", "kind": "area"}]}]}}, "artifact": "
$100,000
900 sqft
First House", "ok": true, "expected_task_pass": false, "expected_metrics": {"composite_acceptance_pass": false}},
+ {"id": "body-only-word-boundary-answer-title-supplies-required-fact", "category": "answer-surface", "root_cause": "metadata_title_supplies_missing_body_fact", "failure_mode": "false-positive", "case": {"url": "https://example.test/page", "required_facts": [{"id": "title", "alternatives": ["Exact page title"]}]}, "artifact": "Body", "title": "Exact page title", "ok": true, "expected_task_pass": false, "expected_metrics": {"fact_coverage": 0.0, "content_chars": 4}},
+ {"id": "body-only-word-boundary-answer-title-does-not-inflate-body-length", "category": "answer-surface", "root_cause": "answer_surface_omission", "failure_mode": "false-positive", "case": {"url": "https://example.test/page", "required_facts": [{"id": "title", "alternatives": ["Exact page title"]}], "min_content_chars": 20}, "artifact": "Body", "title": "Exact page title", "ok": true, "expected_task_pass": false, "expected_metrics": {"fact_coverage": 0.0, "length_pass": false, "content_chars": 4}},
+ {"id": "body-only-word-boundary-archive-news-and-footer-cannot-replace-introduction", "category": "acceptance-contract", "root_cause": "archive_introduction_scope_not_legacy_ui_copy", "failure_mode": "false-positive", "case": {"url": "https://example.test/archive", "task_kind": "body", "acceptance_contract": {"version": 1, "schema": "body_text", "stable_text_role": "diagnostic", "minimum_records": 0, "page_patterns": ["(?is)\\bibiblio(?:\\.org)?\\b.{0,500}\\b(?:collections? of collections|public digital (?:library|archive)|digital (?:library|archive|repository))\\b.{0,700}\\b(?:freely available information|free(?:ly)? available (?:digital )?(?:information|resources|collections))\\b.{0,700}\\b(?:software|music|literature|art|history|science|politics|cultural studies)\\b.{0,700}\\b(?:UNC|University of North Carolina(?: at|-)? Chapel Hill)\\b"], "stable_text_anchors": [{"id": "legacy-navigation", "alternatives": ["Logos"]}]}}, "artifact": "ibiblio News\\nFirst update\\nSecond update\\nThird update\\nLogos\\nHosted by UNC Chapel Hill", "ok": true, "expected_task_pass": false, "expected_metrics": {"stable_task_pass": false, "stable_anchors_required": false, "stable_anchor_hits": 0}},
+ {"id": "latin-boundary-fact-Home-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["Home"]}]}, "artifact": "(Home)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-fact-Home-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["Home"]}]}, "artifact": "homepage", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-marker-Home-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": ["Home"]}, "artifact": "(Home)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-marker-Home-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": ["Home"]}, "artifact": "homepage", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-anchor-Home-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["Home"]}]}}, "artifact": "(Home)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-anchor-Home-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["Home"]}]}}, "artifact": "homepage", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-fact-Live-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["Live"]}]}, "artifact": "(Live)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-fact-Live-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["Live"]}]}, "artifact": "deliver", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-marker-Live-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": ["Live"]}, "artifact": "(Live)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-marker-Live-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": ["Live"]}, "artifact": "deliver", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-anchor-Live-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["Live"]}]}}, "artifact": "(Live)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-anchor-Live-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["Live"]}]}}, "artifact": "deliver", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-fact-News-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["News"]}]}, "artifact": "(News)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-fact-News-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["News"]}]}, "artifact": "newsletter", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-marker-News-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": ["News"]}, "artifact": "(News)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-marker-News-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": ["News"]}, "artifact": "newsletter", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-anchor-News-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["News"]}]}}, "artifact": "(News)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-anchor-News-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["News"]}]}}, "artifact": "newsletter", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-fact-Print-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["Print"]}]}, "artifact": "(Print)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-fact-Print-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["Print"]}]}, "artifact": "blueprint", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-marker-Print-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": ["Print"]}, "artifact": "(Print)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-marker-Print-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": ["Print"]}, "artifact": "blueprint", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-anchor-Print-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["Print"]}]}}, "artifact": "(Print)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-anchor-Print-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["Print"]}]}}, "artifact": "blueprint", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-fact-url-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["url"]}]}, "artifact": "(url)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-fact-url-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["url"]}]}, "artifact": "curl", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-marker-url-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": ["url"]}, "artifact": "(url)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-marker-url-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": ["url"]}, "artifact": "curl", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-anchor-url-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["url"]}]}}, "artifact": "(url)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-anchor-url-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["url"]}]}}, "artifact": "curl", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-fact-café-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["café"]}]}, "artifact": "(café)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-fact-café-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "required_facts": [{"id": "answer", "alternatives": ["café"]}]}, "artifact": "caféteria", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-marker-café-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": ["café"]}, "artifact": "(café)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-marker-café-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": ["café"]}, "artifact": "caféteria", "ok": true, "expected_task_pass": false},
+ {"id": "latin-boundary-anchor-café-whole", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["café"]}]}}, "artifact": "(café)", "ok": true, "expected_task_pass": true},
+ {"id": "latin-boundary-anchor-café-fragment", "category": "format-normalization", "root_cause": "latin_word_fragment_false_match", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "expected_any": [], "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "answer", "alternatives": ["café"]}]}}, "artifact": "caféteria", "ok": true, "expected_task_pass": false},
+ {"id": "body-fact-title-absent", "category": "answer-surface", "root_cause": "metadata_title_supplies_missing_body_fact", "failure_mode": "false-positive", "case": {"url": "https://example.test/article", "required_facts": [{"id": "install", "alternatives": ["widget --start"]}]}, "artifact": "unrelated text", "title": "widget --start", "ok": true, "expected_task_pass": false},
+ {"id": "body-fact-title-present", "category": "answer-surface", "root_cause": "metadata_title_supplies_missing_body_fact", "failure_mode": "false-negative", "case": {"url": "https://example.test/article", "required_facts": [{"id": "install", "alternatives": ["widget --start"]}]}, "artifact": "widget --start", "title": "widget --start", "ok": true, "expected_task_pass": true},
+ {"id": "query-sensitive-dynamic-matching-final-page-and-language-remain-eligible", "category": "acceptance-contract", "root_cause": "undeclared_query_parameters_may_select_other_content", "failure_mode": "false-negative", "case": {"url": "https://example.test/start", "evaluation_url": "https://example.test/start", "expected_final_url": "https://example.test/en/catalog", "target_language": "en-US", "target_region": "US", "track": "dynamic", "task_kind": "body", "acceptance_contract": {"version": 1, "schema": "body_text", "minimum_records": 0, "stable_text_anchors": [{"id": "identity", "alternatives": ["Catalog"]}]}}, "artifact": "Catalog", "ok": true, "final_url": "https://example.test/en/catalog?session=123#items", "metadata": {"route": "dynamic_selected_text", "document_language": "en"}, "expected_task_pass": true, "expected_metrics": {"page_identity_status": "mismatch", "final_url_consistent": false, "language_consistent": true}},
+ {"id": "answer-body-fact-remains-valid-with-an-unrelated-document-title", "category": "answer-surface", "root_cause": "answer_surface_omission", "failure_mode": "false-negative", "case": {"url": "https://example.test/page", "required_facts": [{"id": "heading", "alternatives": ["Exact page title"]}]}, "artifact": "Exact page title\nRequired body", "title": "Unrelated title metadata", "ok": true, "expected_task_pass": true, "expected_metrics": {"fact_coverage": 1.0}}
],
"superseded_cases": {
+ "dynamic-matching-final-page-and-language-remain-eligible": "query-sensitive-dynamic-matching-final-page-and-language-remain-eligible",
+ "answer-title-supplies-required-fact": "body-only-word-boundary-answer-title-supplies-required-fact",
+ "answer-title-does-not-inflate-body-length": "body-only-word-boundary-answer-title-does-not-inflate-body-length",
+ "archive-news-and-footer-cannot-replace-introduction": "body-only-word-boundary-archive-news-and-footer-cannot-replace-introduction",
+
"owned-specific-image-alt-is-an-accessible-record-name": "specific-image-alternative-does-not-create-visible-record-name",
"nested-image-accessible-names-identify-linked-records": "image-alternatives-do-not-create-visible-record-names",
"dynamic-final-page-mismatch-cannot-be-counted-as-a-pass": "content-policy-dynamic-final-page-mismatch-cannot-be-counted-as-a-pass",
diff --git a/src/lexbench_webfetch/metrics.py b/src/lexbench_webfetch/metrics.py
index 9038d86..372974c 100644
--- a/src/lexbench_webfetch/metrics.py
+++ b/src/lexbench_webfetch/metrics.py
@@ -223,8 +223,16 @@ def _inline_frame_candidates(
URLs that the browser serialized, and ignores hidden synchronization or ad
frames. The same parser applies to any provider returning inline frames.
"""
+ if not re.search(r'