test: stabilize follow-up integration suites#99
Conversation
Greptile SummaryThis PR stabilizes six integration test suites by mocking the cross-encoder reranker in three search-heavy files ( Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| tests/impact-2hop.test.ts | Adds vi import and a reranker identity-mock so the 2-hop suite stays index/keyword focused; mock covers rerank and getRerankerStatus but omits the also-exported isAmbiguous. |
| tests/search-decision-card.test.ts | Adds identical reranker mock at module scope; vi was already imported; change is minimal and correct. |
| tests/search-snippets.test.ts | Adds reranker mock in the same pattern as the two sibling files; no other behavioral changes. |
| tests/search-hints.test.ts | Only timeout relaxed (no timeout → 30 s on one test); reranker is not mocked unlike the three sibling suites, which may leave latent flakiness if isAmbiguous ever fires here. |
| tests/zombie-guard.test.ts | Upper-bound assertion loosened from 7 s to 8 s and Vitest timeout from 10 s to 12 s, giving more headroom for Windows process jitter on a 1-second handshake timer; change is proportionate. |
| tests/index-migration-atomic-swap.test.ts | Adds a 30 s explicit timeout to one test that previously had no bound, addressing Windows CI contention; no logic change. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph "Reranker-mocked suites"
A[impact-2hop.test.ts] -->|vi.mock reranker| M[reranker identity mock\nrerank → pass-through\ngetRerankerStatus → 'fallback']
B[search-decision-card.test.ts] -->|vi.mock reranker| M
C[search-snippets.test.ts] -->|vi.mock reranker| M
end
subgraph "Timeout-relaxed suites"
D[search-hints.test.ts\ntimeout: default → 30 s] -->|no reranker mock| R[real reranker\ncould trigger model load]
E[index-migration-atomic-swap.test.ts\ntimeout: default → 30 s]
F[zombie-guard.test.ts\nelapsed bound: 7 s → 8 s\nVitest timeout: 10 s → 12 s]
end
M --> P[Keyword/index search path\ndeterministic, no model download]
R -.->|only if isAmbiguous fires| X[Model load / download risk]
Reviews (1): Last reviewed commit: "test: stabilize follow-up integration su..." | Re-trigger Greptile
9f546d8 to
1410a77
Compare
|
Addressed the remaining Greptile review points on this branch before merge:\n\n- ests/search-hints.test.ts now mocks ../src/core/reranker.js directly and includes isAmbiguous: vi.fn(() => false) so the suite no longer depends on the real reranker load path.\n- ests/impact-2hop.test.ts now includes isAmbiguous in the reranker mock, and the same mock shape was applied to the sibling search-heavy suites called out in review.\n\nNo further code changes were needed after the rebase onto the #101 baseline fix; the current branch already contains the requested coverage. |
Summary
Scope
This PR intentionally excludes the manual release prep that had been sitting on
elease/v2.1.0-publish.
Included:
Excluded on purpose:
Verification
Release Note
There is already an open Release Please PR for 1.10.0 (#79). This branch is only the cleanup follow-up needed to land the test stabilization work on master; the actual release/version decision should continue through the release automation path.