Skip to content

test: stabilize follow-up integration suites#99

Merged
PatrickSys merged 3 commits intomasterfrom
fix/release-followup-test-stability
Apr 14, 2026
Merged

test: stabilize follow-up integration suites#99
PatrickSys merged 3 commits intomasterfrom
fix/release-followup-test-stability

Conversation

@PatrickSys
Copy link
Copy Markdown
Owner

Summary

  • stabilize the release follow-up integration tests by mocking the reranker in search-heavy suites that should stay keyword/index focused
  • relax timeout bounds for the Windows-sensitive integration cases that were failing under suite contention
  • keep this PR strictly version-neutral so Release Please remains the release path instead of this branch

Scope

This PR intentionally excludes the manual release prep that had been sitting on
elease/v2.1.0-publish.

Included:

  • ests/impact-2hop.test.ts
  • ests/search-decision-card.test.ts
  • ests/search-snippets.test.ts
  • ests/index-migration-atomic-swap.test.ts
  • ests/zombie-guard.test.ts
  • ests/search-hints.test.ts

Excluded on purpose:

  • package.json version bumps
  • release-surface doc edits
  • Release Please / publish changes

Verification

  • pnpm run type-check
  • pnpm test
  • additional focused reruns:
    • pnpm test -- tests/zombie-guard.test.ts
    • pnpm test -- tests/search-hints.test.ts

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.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 14, 2026

Greptile Summary

This PR stabilizes six integration test suites by mocking the cross-encoder reranker in three search-heavy files (impact-2hop, search-decision-card, search-snippets) so they stay deterministic, and by relaxing timeout bounds in search-hints, index-migration-atomic-swap, and zombie-guard to absorb Windows CI process jitter. All changes are test-only with no production-code impact.

Confidence Score: 5/5

  • Safe to merge — all changes are test-only stabilization with no production code impact.
  • All findings are P2 style suggestions (incomplete mock coverage for the isAmbiguous export, and the missing reranker mock in search-hints.test.ts). No correctness, data-integrity, or reliability issues are introduced. The timeout adjustments are proportionate to the observed CI jitter.
  • tests/search-hints.test.ts — only suite in the batch that received a timeout bump without the reranker mock; confirm the omission is intentional.

Important Files Changed

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]
Loading

Reviews (1): Last reviewed commit: "test: stabilize follow-up integration su..." | Re-trigger Greptile

Comment thread tests/search-hints.test.ts
Comment thread tests/impact-2hop.test.ts
@PatrickSys PatrickSys force-pushed the fix/release-followup-test-stability branch from 9f546d8 to 1410a77 Compare April 14, 2026 19:06
@PatrickSys
Copy link
Copy Markdown
Owner Author

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.

@PatrickSys PatrickSys merged commit 99c89c6 into master Apr 14, 2026
3 checks passed
@PatrickSys PatrickSys deleted the fix/release-followup-test-stability branch April 14, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant