fix: restore strict discovery URL validation with fixture allowlist - #98
Open
FanouZeng-TT wants to merge 1 commit into
Open
Conversation
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.
Change
test_discovery_urlsinprotocol_test.pyhas been permanently skipped(
@unittest.skip("Schemas not yet published...")) — the core UCPschema/spec URLs for the declared
2026-04-08version are now public andthe test itself runs cleanly once the blanket skip is removed. This PR
restores that conformance signal:
import unittestallow_unreachable_urlslist intest_data/flower_shop/conformance_input.jsondeclares the sevenexternal-party URLs the merchant discovery profile references but whose
owners (Google Pay / Shop Pay / mock payment handler / REST OpenAPI)
have not yet published for this version, so the suite stays green
without weakening any other check
publishes its URL (then that URL is strictly validated again)
Validation
2 files, +25/-2 (
protocol_test.py,test_data/flower_shop/conformance_input.json)deterministic regression against the latest
samplesdiscovery profile:12 reachable URLs, none allow-listed; all 7 current 404s covered by the
fixture list; an empty list restores failure on all 7 (non-listed URLs
stay strict); simulated full run has 0 failures
ruff check/ruff formatclean, fullpre-commit run --all-filesgreen,
git diff --checkcleanAll validation and checks pass