Repository navigation
fix(webfetch): keep returned text lists and drop non-text Lexmount title and URL - #263
Merged
Merged
Conversation
…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.
Contributor
Author
|
Independent review at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the #261 review (non-blocking items).
Change
native_projection.py, the Lexmount page fieldsauthor,publish_time,published_at,subtitle,lead,source,editor,copyrightandstatementusedtext_or_none, which dropped valid lists of strings. They now use a newtext_or_text_listformat. 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.providers/lexmount.py,titleandfinal_urlare passed only when the selected value is a string, otherwiseNone. The selection (final_url or url) matches the nativeresult_fieldsdeclaration, so replay verification still agrees.tests/fixtures/native-route-baseline.jsonis 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:None.tests/test_lexmount_native.pyandtests/test_native_route_contract.py(204 passed), plus the native projection, provider, saved-matrix and hosted-fetch suites.make lint-checkpasses. One test,test_public_call_log_view_support_does_not_weaken_acquisition_checks, fails locally on unchangedmaintoo, because of the local dataset lock.