Validate domain in qualified pipe lookups and handle parse errors#686
Merged
lchoquel merged 1 commit intofeature/Epic-mthds-1from Feb 17, 2026
Merged
Conversation
PipeLibrary.get_optional_pipe now verifies the domain path matches the pipe's actual domain_code, returning None on mismatch instead of silently ignoring the qualifier. QualifiedRefError is caught gracefully so that malformed refs return None rather than raising. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
PipeLibrary.get_optional_pipenow verifies that the domain path in a qualified ref matches the pipe's actualdomain_code, returningNoneon mismatch instead of silently ignoring the qualifierQualifiedRefErroris caught gracefully so that malformed refs returnNonerather than raisingTest plan
tests/unit/pipelex/libraries/test_pipe_library_lookup.pydomain_code🤖 Generated with Claude Code
Note
Low Risk
Small, localized lookup-behavior change with added tests; main risk is potential behavior change for callers that previously relied on domain qualifiers being ignored.
Overview
PipeLibrary.get_optional_pipenow catchesQualifiedRefErrorso malformed dotted or cross-package refs returnNoneinstead of raising.For both domain-qualified refs (
domain.pipe) and cross-package refs (alias->domain.pipe), lookups now validate that the ref’s domain matches the target pipe’sdomain_code; mismatches returnNone(andget_required_pipesurfaces this asPipeNotFoundError). New unit tests cover domain enforcement and malformed-ref behavior, and an existing cross-package test is updated to setdomain_code.Written by Cursor Bugbot for commit d15b9ff. This will update automatically on new commits. Configure here.