Skip to content

fix(webfetch): keep returned text lists and drop non-text Lexmount title and URL - #263

Merged
lanyue-llk merged 1 commit into
mainfrom
fix/lexmount-string-list-fields
Nov 10, 2026
Merged

lanyue-llk merged 1 commit into
mainfrom
fix/lexmount-string-list-fields

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Lexmount returned fields keep text and drop other shapes

Follow-up to the #261 review (non-blocking items).

Change

  • In native_projection.py, the Lexmount page fields author, publish_time, published_at, subtitle, lead, source, editor, copyright and statement used text_or_none, which dropped valid lists of strings. They now use a new text_or_text_list format. It keeps a string or a list of strings and drops anything else, including lists that mix strings with other values. This changes policy 7 in place, as fix(webfetch): ignore malformed and metadata fields in Lexmount answers #261 did. Policies 1–6 replay unchanged, and no saved evidence is bound to fix(webfetch): ignore malformed and metadata fields in Lexmount answers #261's policy-7 source.
  • In providers/lexmount.py, title and final_url are passed only when the selected value is a string, otherwise None. The selection (final_url or url) matches the native result_fields declaration, so replay verification still agrees.
  • tests/fixtures/native-route-baseline.json is regenerated for the projection source hash.

Verification

New tests in tests/test_lexmount_native.py, run through the provider, native-projection replay check and public scorer:

  • A list-of-strings author or subtitle is kept and can supply a stable anchor.
  • A string author is kept.
  • A mixed list, an object or a number is absent and cannot supply the anchor.
  • A list or object title, final URL or URL becomes None.

tests/test_lexmount_native.py and tests/test_native_route_contract.py (204 passed), plus the native projection, provider, saved-matrix and hosted-fetch suites. make lint-check passes. One test, test_public_call_log_view_support_does_not_weaken_acquisition_checks, fails locally on unchanged main too, because of the local dataset lock.

…tle and URL

Lexmount page fields such as author, publish_time, subtitle and copyright
used text_or_none, which dropped valid lists of strings. Project them with a
text_or_text_list format that keeps a string or a list of strings and drops
anything else. The provider passes title and final_url only when the
selected value is a string, matching the native result_fields declaration.
Refresh the native route baseline for the projection source hash.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Review complete · c988aa2

No findings in this review.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Independent review at c988aa25: no P0/P1. Ran 52 malformed/valid shapes through fetch → projection check → replay → score_attempt; replay agreed in all, and policies 1–6 and other providers are identical (365k comparisons). Body wording on policy 7 corrected. Non-blocking: the paired list/mixed controls live in tests rather than native-projection-regressions.json.

@lanyue-llk
lanyue-llk merged commit d2bc914 into main Nov 10, 2026
8 checks passed
@lanyue-llk
lanyue-llk deleted the fix/lexmount-string-list-fields branch November 10, 2026 14:15
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