Repository navigation
fix(core): ensure subdomain check returns bool when range absent - #1630
Open
AlessandroPomponio wants to merge 1 commit into
Open
AlessandroPomponio wants to merge 1 commit into
AlessandroPomponio wants to merge 1 commit into
Conversation
AlessandroPomponio
force-pushed
the
ap_1629_fix_subdomain_returning_none
branch
from
October 30, 2026 15:22
8f4ca55 to
6547630
Compare
michael-johnston
previously approved these changes
Nov 1, 2026
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
AlessandroPomponio
force-pushed
the
ap_1629_fix_subdomain_returning_none
branch
from
November 2, 2026 10:41
6547630 to
cc261a8
Compare
This branch has not been deployed
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.
Summary
Fixes a bug where
is_subdomain_of_discrete_domaincould returnNoneinstead ofFalsewhen the test domain has no range but the discrete domain does. The expression used was relying on short-circuit evaluation of a logicaland, which evaluates to the falsy operand itself (None) rather than the booleanFalse.High-level Changes
ado/schema/domain.py: Wrapped the subdomain range-comparison expression inbool()to guarantee a boolean return value.tests/schema/test_domain.py: Tightened the existing assertion to use strict identity checks (is False/is True), and added the missing reverse-direction test case.Impact
Any caller that was checking the return value with strict boolean identity (
is False) would have received an incorrect result in the affected branch. After this fix, the function is guaranteed to return a properboolin all code paths.