Fix stale benchmark imports and add benchmarks typecheck to CI - #219
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe benchmark harness now supports ChangesBenchmark validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant npm
participant latency.ts
GitHubActions->>npm: run benchmark:smoke
npm->>latency.ts: execute with --smoke
latency.ts->>latency.ts: use reduced iterations and skip reranking
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #219 +/- ##
=======================================
Coverage ? 85.07%
=======================================
Files ? 46
Lines ? 2399
Branches ? 826
=======================================
Hits ? 2041
Misses ? 357
Partials ? 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Fixes
benchmarks/latency.tsimport paths broken by thesrc/core/restructure and adds CI coverage so benchmark import/type drift is caught before merge.src/core/...(pinecone-client,client-context,namespaces-cache,guided-query-tool)benchmarks/tsconfig.json(noEmit, extends root) andnpm run typecheck:benchmarksnpm run benchmark:smoke(--smoke: WARMUP=1, ITERATIONS=3, nobaseline.json, skipsquery_with_rerank)npm run ciand.github/workflows/ci.ymlRelated issue
Why
Root
tsconfig.jsononly includessrc/**/*, sonpm run typechecknever compiledbenchmarks/. The harness still pointed at pre-restructure paths and failed at module resolution; CI had no step to catch it.CI changes
npm run typecheck:benchmarks(after main typecheck)npm run benchmark:smoke(after CLI smoke test)Emit output is unchanged: benchmark typecheck uses a separate
noEmitproject;dist/remains scoped tosrc/.Smoke mode behavior
--smokeis network-free for CI:query_with_rerank— the bench double’srerankResultsoverride is dead post-restructure; rerank now goes throughrerankResultsImpl(this.indexSession.ensureClient(), …)and would hit real Pinecone HTTPPINECONE_API_KEY/PINECONE_INDEX_NAMEso legacyServerContextconfig resolution works offlineFull
npm run benchmark(non-smoke) still runs all scenarios includingquery_with_rerank.Follow-up (out of scope)
query_with_reranklatency is meaningful again (mockindexSession.ensureClient()likeindexes.test.ts)scripts/test-search.tshas the same class of stale imports and is not typecheckedTest plan
npm run typecheck:benchmarkspassesnpm run benchmark:smokeexits 0 (4 scenarios, noquery_with_rerank, nobaseline.json)typecheck:benchmarks(TS2307)npm run build— nodist/benchmarks/npm run cigreen locallySummary by CodeRabbit
Tests
Chores