fix: update benchmark script import paths after src/ restructure#521
fix: update benchmark script import paths after src/ restructure#521carlos-alm merged 2 commits intomainfrom
Conversation
Benchmark scripts still referenced flat src/ paths (builder.js, queries.js, parser.js, native.js, resolve.js, embeddings/index.js) that no longer exist after the domain/infrastructure restructure. Also fix collectImportPairs() to walk src/ recursively since only 2 files remain at the root level. Impact: 3 functions changed, 4 affected
|
Claude finished @carlos-alm's task —— View job PR Review: Import Path Fixes After src/ RestructureReview Progress
Root Cause AnalysisProblem Being Solved: Benchmark scripts broke after the src/ directory restructure (PR #516) because they still referenced flat import paths like Why This Approach: This is a direct, surgical fix addressing the exact problem. Each
Risk Assessment: LOW RISK - Pure maintenance fix with no behavioral changes. Backlog Compliance
Code Quality AssessmentChanges Made (All Correct):scripts/benchmark.js:91-93:
scripts/incremental-benchmark.js:38-44:
scripts/lib/fork-engine.js:141,146:
scripts/query-benchmark.js:93-95:
scripts/embedding-benchmark.js:32-34:
Verification: All 6 corrected import paths exist in the new directory structure. Critical ConcernsNone. This is a straightforward maintenance fix with proper execution. Final Recommendation
Next Steps: As noted in the test plan, re-running the benchmark workflow will verify all fixes work end-to-end. |
Greptile SummaryThis PR corrects six stale import paths across the four benchmark scripts and All six updated target paths were verified to exist in the current
Key observations:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant BS as benchmark scripts
participant BC as lib/bench-config.js
participant FE as lib/fork-engine.js
participant SRC as src/ (restructured)
BS->>BC: resolveBenchmarkSource()
BC-->>BS: { srcDir, version, cleanup }
BS->>BS: srcImport(srcDir, 'domain/graph/builder.js')
BS->>SRC: dynamic import → src/domain/graph/builder.js ✓
BS->>BS: srcImport(srcDir, 'domain/queries.js')
BS->>SRC: dynamic import → src/domain/queries.js ✓
BS->>FE: forkEngines(import.meta.url, argv)
FE->>BC: resolveBenchmarkSource()
BC-->>FE: { srcDir, cleanup }
FE->>FE: srcImport(srcDir, 'domain/parser.js')
FE->>SRC: dynamic import → src/domain/parser.js ✓
FE->>FE: srcImport(srcDir, 'infrastructure/native.js')
FE->>SRC: dynamic import → src/infrastructure/native.js ✓
FE-->>BS: { wasm, native }
note over BS,SRC: incremental-benchmark additionally imports
BS->>BS: srcImport(srcDir, 'domain/graph/resolve.js')
BS->>SRC: dynamic import → src/domain/graph/resolve.js ✓
note over BS,SRC: embedding-benchmark imports
BS->>BS: srcImport(srcDir, 'domain/search/index.js')
BS->>SRC: dynamic import → src/domain/search/index.js ✓
Last reviewed commit: "Merge branch 'main' ..." |
Summary
benchmark.js,query-benchmark.js,incremental-benchmark.js,embedding-benchmark.js) andfork-engine.jsstill referenced flatsrc/paths (builder.js,queries.js,parser.js,native.js,resolve.js,embeddings/index.js) that no longer exist after the domain/infrastructure restructuresrcImport()calls to use correct subdirectory paths (domain/graph/builder.js,domain/queries.js,domain/parser.js,infrastructure/native.js,domain/graph/resolve.js,domain/search/index.js)PROBE_FILEpaths inbenchmark.jsandincremental-benchmark.js(src/queries.js→src/domain/queries.js)collectImportPairs()inincremental-benchmark.jsto recursively walksrc/(only 2 files remain at root level after restructure)Test plan
workflow_dispatchwithversion: devto confirm all 4 jobs pass