Commit
fix(ci): split pure CLAP-search policy out of the DB query module
Commit details
Commit notes
CI intermittently failed to link `clap-search.test.ts` with "Export named 'CLAP_DEFAULT_MIN_SIMILARITY' not found in module clap-search.ts" — a Bun module-link flake: that pure unit test dragged in the heavy `clap-search.ts` graph (drizzle, ../db, ./clap-client) just to reach a handful of dependency-free helpers.
Extract the pure pieces (relevance-cutoff resolution, readiness/failure classification, the not-ready error type) into `clap-search-policy.ts`, which has no DB/CLAP-client imports. `clap-search.ts` re-exports them (`export *`) so the library route and other importers are unchanged, and the unit test now imports the light policy module directly — removing the fragile load.
typecheck + lint clean; clap-search test passes in isolation and the full local suite is green (0 fail).
Co-Authored-By: Claude Opus 4.8 <[email redacted]> Claude-Session: [private session redacted]
- Files changed
- 3
- Lines added
- +112
- Lines removed
- −94