feat: add ORM dataflow detection (Prisma + Supabase)#511
Conversation
|
@marxo126 is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
Why this is usefulCurrently GitNexus traces function calls, imports, and route handlers — but ORM data access is invisible. When a developer calls
With Test run verificationORM integration test (3/3 passed): Full test suite (3715/3730 passed, 13 skipped): The 2 failures are pre-existing in |
5d0d3ed to
cf5501a
Compare
CI Report✅ All checks passed Pipeline Status
Test Results
✅ All 4269 tests passed 1 test(s) skipped — expand for details
Code CoverageTests
📋 View full run · Generated by CI |
cf5501a to
9dc845b
Compare
Rebased onto mainForce-pushed The ORM dataflow detection code is unchanged, only the branch history was cleaned up. |
|
@marxo126 can you please make sure CI is green? 🙏 |
|
@claude Let's run a final review if this PR is production ready and ready to be merged |
|
Claude finished @magyargergo's task in 4m 40s —— View job Production Readiness Review
Verdict: ❌ Not Ready to Merge — Critical Bug FoundThe feature concept is solid and the integration with the pipeline is well-structured, but there is one critical bug that would silently make ORM detection a no-op in production. 🔴 Critical:
|
|
Can you please resolve the merge conflicts as well? 🙏 |
9dc845b to
e5e8450
Compare
|
Rebased onto latest upstream main — merge conflicts resolved. |
Add QUERIES relationship type to detect data access patterns from Prisma and Supabase JS client calls. Creates edges from consumer files to model CodeElement nodes with method-specific reason fields. - Add QUERIES to REL_TYPES and FROM/TO pairs for Function/Method→CodeElement - Add ExtractedORMQuery interface and regex extraction in parse-worker - Add processORMQueries() in pipeline Phase 3.7 with model node creation - Add Prisma/Supabase path + AST framework detection patterns - Add integration test with fixture repo validating QUERIES edges Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e5e8450 to
e301d74
Compare
|
@claude Let's run a final review if this PR is production ready and ready to be merged. |
|
Claude finished @magyargergo's task in 1m 42s —— View job Production Readiness Review
Verdict: ❌ Not Ready to Merge — Critical Bug Still PresentThe previous Claude review identified a critical bug. After checking the latest commit ( 🔴 Critical:
|
ORM detection (Prisma, Supabase) was defined in parse-worker.ts but never called inside processFileGroup, making it dead code in the worker path. Only the sequential fallback in pipeline.ts ran ORM extraction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix pushed: worker path now calls
|
|
@claude Let's run a final review if this PR is production ready and ready to be merged |
|
Claude finished @magyargergo's task in 1m 24s —— View job Production Readiness Review
Verdict: ✅ Ready to MergeThe critical bug identified in previous reviews has been fixed. The PR is functionally correct and CI is green. 🟢 Critical Bug: Fixed
The missing // Extract ORM queries (Prisma, Supabase)
extractORMQueries(file.path, file.content, result.ormQueries);
}
};ORM detection now works on both the worker path (large repos) and the sequential fallback path (small repos). 🟡 Medium Issues (non-blocking, polish items)These were flagged in prior reviews and remain unaddressed, but neither blocks correctness:
🔵 Minor Issue (non-blocking)
What's Good
The two medium issues and one minor issue are polish items that can be addressed in a follow-up PR. The core feature is now correct end-to-end. |
Summary
QUERIESrelationship type to detect ORM data access patterns from Prisma and Supabase JS client callsCodeElementnodes with method-specific reason fields (e.g.,prisma-findMany,supabase-select)Changes
schema.tsQUERIEStoREL_TYPES, addFROM Function/Method TO CodeElementpairsparse-worker.tsExtractedORMQueryinterface, regex extraction forprisma.model.method()andsupabase.from('table').method()parsing-processor.tsormQueriesthroughWorkerExtractedDatapipeline.tsCodeElementmodel nodes andQUERIESedgesgraph/types.tsQUERIEStoRelationshipTypeunionframework-detection.tsDetection Patterns
Prisma:
prisma.user.findMany(),prisma.post.create(), etc. — regex captures model name + methodSupabase:
supabase.from('bookings').select(),supabase.from('users').insert()— regex captures table name + methodTest plan
🤖 Generated with Claude Code