fix: resolve three build bugs (#287, #288, #289)#293
Conversation
|
Claude finished @carlos-alm's task —— View job PR Review: Fix Three Build Bugs (#287, #288, #289)Todo List:
Phase 1: Root Cause Analysis ✅Problem Being Solved: This PR fixes three legitimate bugs in the
Why This Approach: All three fixes address root causes, not symptoms. The changes are surgical and don't relax any validation rules. Risk Assessment: LOW. Changes are isolated to the build pipeline with clear benefits and no configuration relaxation. Phase 2: Configuration Change Detection ✅Analysis: ✅ NO HIGH-RISK configuration changes detected
Phase 3: Test Integrity ✅Analysis: ✅ NO test integrity issues found
Phase 4: Code Quality Assessment ✅Strengths:
Detailed Analysis:
Final AssessmentRoot Cause AnalysisProblem Being Solved: Three legitimate bugs in core build functionality - Windows path handling, incremental analysis skipping, and inaccurate edge count reporting. Critical ConcernsNone identified. All changes are appropriate bug fixes. Final Recommendation
Recommendation: Merge this PR. The fixes are solid and address legitimate issues that affect Windows users and incremental build reliability. |
Greptile SummaryThis PR fixes three distinct bugs in
All three fixes are targeted and correct. The CFG/dataflow check uses IIFE try-catch blocks to detect missing tables (returns 0 count or errors), then conditionally runs Confidence Score: 4/5
Important Files Changed
Last reviewed commit: a32e761 |
- Normalize rootDir with path.resolve() at buildGraph entry to fix forward-slash paths on Windows from programmatic callers (#287) - Check for missing CFG/dataflow data in incremental no-op path and run pending analysis pass when --cfg or --dataflow was requested but never computed (#288) - Replace batch edgeCount accumulator with actual DB edge count for drift comparison and build_meta persistence, fixing false positive divergence warnings on incremental builds (#289) Impact: 1 functions changed, 11 affected Impact: 1 functions changed, 1 affected
a32e761 to
01dd21f
Compare
|
Claude finished @carlos-alm's task —— View job PR Review: Fix Three Build Bugs (#287, #288, #289)Todo List:
Phase 1: Root Cause Analysis ✅Problem Being Solved: This PR fixes three legitimate bugs in the
Why This Approach: All three fixes address root causes, not symptoms. The changes are surgical and don't relax any validation rules. Risk Assessment: LOW. Changes are isolated to the build pipeline with clear benefits and no configuration relaxation. Phase 2: Configuration Change Detection ✅Analysis: ✅ NO HIGH-RISK configuration changes detected
Phase 3: Test Integrity ✅Analysis: ✅ NO test integrity issues found
Phase 4: Code Quality Assessment ✅Strengths:
Detailed Analysis:
Final AssessmentRoot Cause AnalysisProblem Being Solved: Three legitimate bugs in core build functionality - Windows path handling, incremental analysis skipping, and inaccurate edge count reporting. Critical ConcernsNone identified. All changes are appropriate bug fixes. Final Recommendation
Recommendation: Merge this PR. The fixes are solid and address legitimate issues that affect Windows users and incremental build reliability. |
Summary
Fixes three bugs in
src/builder.jsthat affectcodegraph build:bug(build): forward-slash paths on Windows cause 0 files parsed and graph stored in CWD #287 — Forward-slash paths on Windows:
buildGraphnow normalizesrootDirwithpath.resolve()on entry. Idempotent for CLI callers, fixes programmatic callers and Git Bash/MSYS2 environments that pass POSIX-style paths likeH:/repo.bug(build): --cfg flag skipped on incremental no-op — requires --no-incremental for first CFG build #288 —
--cfgflag skipped on incremental no-op: The early-return path (no files changed) now checks whether--cfgor--dataflowwas requested but the DB has no corresponding data. When detected, it parses all files and runs only the missing analysis pass before returning — no full pipeline re-run.bug(build): incremental divergence warning compares per-batch edges vs total — false positive #289 — Incremental divergence warning false positive: Replaced the batch
edgeCountaccumulator (which only counted edges inserted in the current batch) with an actualSELECT COUNT(*) FROM edgesquery. This fixes the drift comparison that was comparing batch count vs total DB count, producing ~59% false divergence warnings. The unusededgeCountvariable and all increment sites were removed.Test plan
npm testpasses (1369/1369 tests)npx biome check src/builder.jslint cleannode src/cli.js build H:/Vscode/codegraphwith forward-slash path finds filesnode src/cli.js build . && node src/cli.js build . --cfgpopulates CFG data on second run