-
Notifications
You must be signed in to change notification settings - Fork 44
Add hierarchical domains and pipe namespacing (Phase 1) #671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/Epic-mthds-2
Are you sure you want to change the base?
Conversation
Introduce QualifiedRef as the centralized model for domain-qualified
reference parsing, replacing scattered .split(".")/rsplit(".") calls
across 8+ files. This enables hierarchical domains (e.g. "legal.contracts")
and domain-qualified pipe references (e.g. "scoring.compute_score"),
making pipes symmetric with the existing concept reference system.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: afe1585ad5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # If it's a domain-qualified ref (e.g. "scoring.compute_score"), try the local code | ||
| if "." in pipe_code: | ||
| ref = QualifiedRef.parse(pipe_code) | ||
| return self.root.get(ref.local_code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enforce domain match when resolving qualified pipe refs
This lookup drops the qualified domain and resolves only by local_code, so a reference like wrong_domain.compute_score will still resolve to any loaded compute_score pipe instead of failing. Because controller dependency validation also uses get_required_pipe, this can silently route to the wrong pipe and hide misconfigured domain prefixes in production workflows.
Useful? React with 👍 / 👎.
| return pipe | ||
| # If it's a domain-qualified ref (e.g. "scoring.compute_score"), try the local code | ||
| if "." in pipe_code: | ||
| ref = QualifiedRef.parse(pipe_code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Treat malformed dotted refs as missing in optional lookup
get_optional_pipe is expected to be a safe existence check, but this parse call raises on malformed dotted inputs (for example foo..bar or foo.), which now propagates exceptions to callers like controller dry-run dependency checks instead of returning None. That turns ordinary user typos into runtime errors rather than a normal “pipe not found” path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| # If it's a domain-qualified ref (e.g. "scoring.compute_score"), try the local code | ||
| if "." in pipe_code: | ||
| ref = QualifiedRef.parse(pipe_code) | ||
| return self.root.get(ref.local_code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_optional_pipe raises on malformed pipe codes
Medium Severity
The QualifiedRef.parse() call in get_optional_pipe is not wrapped in a try-except, so it raises QualifiedRefError for malformed inputs like "a..b", ".foo", or "foo.". The old implementation always returned None for unrecognized pipe codes. This breaks the method's Optional return contract and affects callers like the CLI which command, where user-provided pipe codes are passed directly without validation, turning a graceful "not found" into an unhandled crash.


Summary
QualifiedRefmodel for hierarchical domain-qualified references (e.g.,domain.subdomain::PipeName)Test plan
QualifiedRefparsing and formatting with valid/invalid inputsmake agent-test🤖 Generated with Claude Code
Note
Medium Risk
Touches core parsing/validation for domains, concept refs, and pipe lookup; could reject previously-accepted edge-case strings or change reference resolution behavior across bundles.
Overview
Enables hierarchical domain codes (e.g.
legal.contracts) and domain-qualified references for concepts/pipes throughout bundle parsing and validation.Introduces
QualifiedRefas a central parser/validator for dotted refs, updates concept/domain/multiplicity validation to accept multi-segment domains, and tightens bundle validation by checking same-domain qualified pipe references in controller blueprints while continuing to ignore external refs and special outcomes.Updates builder
.mthdspipelines to use fully-qualified pipe codes (e.g.builder.*,pipe_design.detail_pipe_spec), and adds extensive unit + integration fixtures/tests covering valid/invalid hierarchical domains and cross-domain concept/pipe references.Written by Cursor Bugbot for commit afe1585. This will update automatically on new commits. Configure here.