Skip to content

docs: registry-first README for @corbits/reranking (CL-8775) - #4

Merged
TheGreatAxios merged 6 commits into
mainfrom
cl-8775-readme-reranking
Sep 22, 2026
Merged

TheGreatAxios merged 6 commits into
mainfrom
cl-8775-readme-reranking

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replace the git-install README with a registry-first README: Install, Use, Full example, How it works, Contributing.

Quickstart now models the real production call site, not a toy example: read RERANK_BASE_URL/RERANK_MODEL from host config at boot (fail fast on a half-configured reranker, matching how retrieval pipelines already treat this endpoint), call rerankDocuments with typed RerankDoc[] candidates, and fall back to the caller's own fused order in a catch when the reranker is unavailable — the degrade-soft policy real retrieval pipelines apply so a reranker outage never fails search.

Verification

  • Install is npm / pnpm / yarn / bun of @corbits/reranking (no github: URL)
  • Quickstart calls the package's real top-level entry point, rerankDocuments from src/index.ts, with real exported types (RerankDoc, RerankResult) and @intx/inference's createDefaultScheduler — the same deps = { fetch, scheduler } shape production hosts already build for chat and embeddings
  • Quickstart's env-var + degrade-soft-catch shape matches how @corbits/memory's hybrid search pipeline wires its own rerank client (RERANK_BASE_URL/RERANK_MODEL, fail-fast boot, fallback to fused ranking on failure)
  • Quickstart code fence compiles standalone against this repo's own tsconfig.json (bunx tsc --noEmit)
  • Contributing commands match package.json scripts (build, test, typecheck); Node >= 24 / Bun >= 1.2.0

Fixes CL-8775

Follow-up

  • The catch {} block silently swallowed a reranker outage. rerankFusedCandidates now takes an onError: (error: unknown) => void host callback, reports the caught error through it, then falls back to the fused order — same degrade-soft behavior, but the failure is now surfaced instead of hidden.

Replace the git-install README with the Interchange section shape:
Install / Use / Full example / How it works / Contributing.
Use Quickstart / How it works / Development / License instead of
Install / Use / Full example / Contributing.
The prior Quickstart hardcoded a localhost baseURL and always-succeeds
call with no failure handling. Real retrieval pipelines read the
reranker endpoint from host config at boot (fail fast on a
half-configured reranker) and degrade to their own fused order when a
rerank call fails, so a reranker outage never fails search.
@TheGreatAxios
TheGreatAxios merged commit a66abe5 into main Sep 22, 2026
1 check passed
@TheGreatAxios
TheGreatAxios deleted the cl-8775-readme-reranking branch September 22, 2026 05:20
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