feat: enable --cfg and --dataflow by default on builds#312
Conversation
Cargo.toml was still at 2.6.0 after the v3.0.0 release, causing codegraph info to report a stale native version and potentially triggering unnecessary full rebuilds from version mismatch detection.
CFG and dataflow analyses now run by default during `codegraph build`. Users who want faster builds can skip them with `--no-cfg` / `--no-dataflow`, following the same Commander --no-* convention as --no-incremental. - Replace opt-in --cfg/--dataflow with opt-out --no-cfg/--no-dataflow - Add dataflowMs to build return object (was tracked but not returned) - Update MCP tool descriptions to remove stale "Requires build --cfg" notes - Update fallback warnings in cfg.js and dataflow.js for legacy DBs Impact: 5 functions changed, 19 affected
Impact: 4 functions changed, 7 affected
|
Claude finished @carlos-alm's task —— View job PR Review: Enable CFG and Dataflow by DefaultReviewing PR #312 to enable Review Checklist
Phase 1: Root Cause Analysis ✅Problem Being Solved: Users were encountering empty results when running Why This Approach: The solution inverts the opt-in behavior to opt-out using Commander.js's Phase 2: Configuration Change Detection ✅No High-Risk Changes Detected:
Phase 3: Test Integrity ✅No Test Weakening Detected:
Phase 4: Code Quality ✅Implementation Quality: ✅ Positive Aspects:
✅ Code Quality:
🔍 Security/Performance: No security issues. Performance impact is intentional (more analysis by default) with clear opt-out path. Root Cause AnalysisProblem Being Solved: Poor UX where Critical ConcernsNone. This is a well-executed UX improvement with appropriate safeguards. Final Recommendation
Minor suggestions for future:
|
Greptile SummaryThis PR enables CFG and dataflow analyses by default during Key Changes:
Trade-offs:
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 7b91262 |
Additional Comments (2)
|
|
Claude finished @carlos-alm's task —— View job PR Review: Enable CFG and Dataflow by DefaultReviewing PR #312 to enable Review Checklist
Phase 1: Root Cause Analysis ✅Problem Being Solved: Users were encountering empty results when running Why This Approach: The solution inverts the opt-in behavior to opt-out using Commander.js's Phase 2: Configuration Change Detection ✅No High-Risk Changes Detected:
Phase 3: Test Integrity ✅No Test Weakening Detected:
Phase 4: Code Quality ✅Implementation Quality: ✅ Positive Aspects:
✅ Code Quality:
🔍 Security/Performance: No security issues. Performance impact is intentional (more analysis by default) with clear opt-out path. Root Cause AnalysisProblem Being Solved: Poor UX where Critical ConcernsNone. This is a well-executed UX improvement with appropriate safeguards. Final Recommendation
Minor suggestions for future:
|
|
Fixed in b20b7eb — updated both README locations to reflect default-on behavior:
|
Additional Comments (1)
Consider adding default values in Then use |
Impact: 1 functions changed, 0 affected
|
Fixed in 909bc8a — changed |
|
Claude finished @carlos-alm's task —— View job PR Review: Enable CFG and Dataflow by DefaultReviewing PR #312 to enable Review Checklist
Phase 1: Root Cause Analysis ✅Problem Being Solved: Users were encountering empty results when running Why This Approach: The solution inverts the opt-in behavior to opt-out using Commander.js's Phase 2: Configuration Change Detection ✅No High-Risk Changes Detected:
Phase 3: Test Integrity ✅No Test Weakening Detected:
Phase 4: Code Quality ✅Implementation Quality: ✅ Positive Aspects:
✅ Code Quality:
🔍 Security/Performance: No security issues. Performance impact is intentional (more analysis by default) with clear opt-out path. Root Cause AnalysisProblem Being Solved: Poor UX where Critical ConcernsNone. This is a well-executed UX improvement with appropriate safeguards. Final Recommendation
Minor suggestions for future:
|
Additional Comments (1)
When |
Impact: 1 functions changed, 0 affected
|
Fixed in aa5b989 — applied the same The previous README comments were already addressed in b20b7eb. |
|
Claude finished @carlos-alm's task —— View job Reviewing PR #312: Enable CFG and Dataflow by Default Review Checklist
Phase 1: Root Cause Analysis ✅Problem Being Solved: Users were encountering empty results when running Why This Approach: The solution inverts the opt-in behavior to opt-out using Commander.js's Phase 2: Configuration Change Detection ✅No High-Risk Changes Detected:
Phase 3: Test Integrity ✅No Test Weakening Detected:
Phase 4: Code Quality ✅Implementation Quality: ✅ Positive Aspects:
✅ Code Quality:
✅ Technical Correctness:
🔍 Security/Performance: No security issues. Performance impact is intentional (more analysis by default) with clear opt-out path. Root Cause AnalysisProblem Being Solved: Poor UX where Critical ConcernsNone. This is a well-executed UX improvement with appropriate safeguards. The critical bug identified by Greptile in the incremental build logic has been fixed in commit aa5b989. Final Recommendation
Minor suggestions for future:
View job run: https://github.com/optave/codegraph/actions/runs/22653353523 |
Additional Comments (1)
dataflow edges are stored in the |
|
Claude finished @carlos-alm's task —— View job Claude finished reviewing this PR —— View job PR Review: Enable CFG and Dataflow by DefaultReviewing PR #312 to enable Review Checklist
Phase 1: Root Cause Analysis ✅Problem Being Solved: Users were encountering empty results when running Why This Approach: The solution inverts the opt-in behavior to opt-out using Commander.js's Phase 2: Configuration Change Detection ✅No High-Risk Changes Detected:
Phase 3: Test Integrity ✅No Test Weakening Detected:
Phase 4: Code Quality ✅Implementation Quality: ✅ Positive Aspects:
✅ Code Quality:
🔍 Security/Performance: No security issues. Performance impact is intentional (more analysis by default) with clear opt-out path. Root Cause AnalysisProblem Being Solved: Poor UX where Critical ConcernsPre-existing bug should be fixed in follow-up: The dataflow detection logic in src/builder.js:542 checks the wrong table, causing unnecessary re-parsing. This doesn't block the PR but should be addressed soon since dataflow will now run more frequently. Final Recommendation
Follow-up suggestion: Fix the dataflow table check bug in src/builder.js:542 by changing the query to |
Impact: 1 functions changed, 0 affected
|
Fixed in 7b91262 — the All 16 build integration tests pass locally. |
|
Claude finished @carlos-alm's task —— View job PR Review: Enable CFG and Dataflow by DefaultReviewing PR #312 to enable Review Checklist
Phase 1: Root Cause Analysis ✅Problem Being Solved: Users were encountering empty results when running Why This Approach: The solution inverts the opt-in behavior to opt-out using Commander.js's Phase 2: Configuration Change Detection ✅No High-Risk Changes Detected:
Phase 3: Test Integrity ✅No Test Weakening Detected:
Phase 4: Code Quality ✅Implementation Quality: ✅ Positive Aspects:
✅ Code Quality:
✅ Technical Correctness:
🔍 Security/Performance: No security issues. Performance impact is intentional (more analysis by default) with clear opt-out path. Root Cause AnalysisProblem Being Solved: Poor UX where Critical ConcernsNone. This is a well-executed UX improvement with appropriate safeguards. Previous technical issues identified by Greptile have been addressed in subsequent commits. Final Recommendation
Minor suggestions for future:
|
Summary
codegraph build, eliminating the surprise of empty results when users trycfgordataflowcommands--no-cfg/--no-dataflow(same Commander--no-*convention as--no-incremental)dataflowMsto the build return object (was tracked internally but not returned)Closes #292
Test plan
codegraph build . --no-incremental— CFG + dataflow run by default (timing visible in output)codegraph build . --no-cfg --no-dataflow --no-incremental— both skipped cleanlycodegraph cfg buildGraph/codegraph dataflow buildGraph— return data without explicit flagsnpm test— all tests pass (only pre-existing ruby/php WASM failures)