feat(group): Support Django route extraction for multi-repo#1836
Open
HuyNguyenDinh wants to merge 22 commits into
Open
feat(group): Support Django route extraction for multi-repo#1836HuyNguyenDinh wants to merge 22 commits into
HuyNguyenDinh wants to merge 22 commits into
Conversation
|
@HuyNguyenDinh is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
CI Report✅ All checks passed Pipeline Status
Test Results
✅ All 10249 tests passed 7 test(s) skipped — expand for details
Code CoverageTests
📋 View full run · Generated by CI |
Collaborator
|
@HuyNguyenDinh Can you please address |
Author
|
Author
|
@magyargergo I’ve looked and pushed the changes to resolve the issues. Let take a look and re-trigger the review phase |
…umer detection - Add REQUESTS_KEYWORD_URL_PATTERNS for requests.get(url='...') keyword args - Add WRAPPER_URI_PATTERNS for generic wrapper.fetch(uri='...') calls - Add WRAPPER_URI_VAR_PATTERNS + buildLocalStringMap for uri=variable propagation - Add LOCAL_STRING_ASSIGNMENTS to track uri='...' assignments - Wire both direct-string and variable-propagation loops in scan() - Add normalizeConsumerPath() helper Note: Automatic cross-link detection remains limited for runtime-computed URLs (URLs built via .format(), string concat, or module constants). Manual manifest links needed for known cross-repo contracts.
…tterns Re-add LOCAL_STRING_ASSIGNMENTS, WRAPPER_URI_VAR_PATTERNS, buildLocalStringMap(), and normalizeConsumerPath() lost during cherry-pick merge of upstream keyword-URL commit. Together with the upstream WRAPPER_URI_PATTERNS and REQUESTS_KEYWORD_URL_PATTERNS, we now detect: - requests.get(url='literal') keyword args - wrapper.fetch(uri='literal') keyword args - wrapper.fetch(uri=variable) where variable was assigned a string literal
Collaborator
|
@HuyNguyenDinh Can you please resolve the merge conflicts? 🙏 |
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
Add end-to-end Django URL route extraction and cross-repo HTTP contract matching, covering static route discovery with cross-file include() resolution, worker-pool and sequential-fallback integration, and manifest-based cross-linking via group.yaml.
Motivation / context
Cross-repo HTTP contract matching requires routes to be extracted from source code and resolved to their full URL prefixes. Django repos use deeply nested urlpatterns with include() that can span multiple files across 2-3+ levels, making static analysis non-trivial. Additionally, HTTP client calls often use variable-based URLs from settings.py (f-strings) that cannot be statically analyzed — those consumer contracts must come from explicit links in group.yaml.
Areas touched
Scope & constraints
In scope
Explicitly out of scope / not done here
Implementation notes
Route flow after this change:
Consumer contracts for variable-based URLs are declared via explicit links in group.yaml — bypasses static analysis entirely. Manifest links produce CrossLink with matchType: manifest and confidence: 1 directly during group sync.
Testing & verification
Risk & rollout
Low risk — additive changes (new optional parameters, new route data that was previously silently dropped). No index migration required; a fresh gitnexus analyze picks up the new routes. Manifest-based cross-links from group.yaml are independent of the graph and don't change with re-indexing.
Checklist