v20.0 Semantic Search Fail-Closed and Lint Hygiene
Summary
This archive records a bounded maintenance bundle completed while v22.0 Gate 0 remained blocked.
The work stayed inside the active maintenance lane and focused on code-quality safeguards rather than new product scope:
- restore an authoritative repo-wide lint baseline
- make semantic search fail closed when the browser embedding worker cannot initialize or execute
- sync canonical docs and tests to the new runtime behavior
Completed Outcomes
- Restored repo-wide lint signal:
- excluded local MkDocs build output under
site/from ESLint traversal - removed the local
site/artifact so root-hygiene checks pass again - Hardened the semantic search worker path:
- removed synthetic mock embeddings from
app/worker.ts - kept worker init failures in an explicit error state instead of reporting
ready - added request-scoped embed responses so failures settle cleanly per request
- Hardened the semantic-search hook:
- in-flight embedding promises now settle on both success and error
- worker failures clear pending request listeners and preserve keyword-only search behavior
- semantic enhancement now skips itself when embeddings are unavailable
- Reconciled canonical docs with the live runtime:
- architecture now documents keyword-only fallback when semantic worker initialization fails
- architecture now points push-notification service-worker behavior at
public/sw.js/public/custom-sw.js - Added focused regression coverage for:
- semantic worker init failure handling
- embedding request error settlement
- keyword-only fallback when semantic enhancement cannot upgrade results
Canonical References Updated
Verification Snapshot
Validated during the 2026-04-15 maintenance pass:
npm run lintnpm run type-checknpx vitest run tests/hooks/useSemanticSearch.test.ts tests/hooks/useServices.test.tsnpx vitest run tests/unit/documentation-hygiene.test.tsnpm run check:refsnpm run check:root
What Remains Open
This archive does not change the active Gate 0 blocker order or add new roadmap debt.
Still-open maintenance items remain on the main roadmap:
- regenerate
types/supabase.tson a Docker-capable machine and remove the last intentionalnotification_audittyping escape hatch - unify client and server ranking behind one shared scoring engine
- keep the default skip-free E2E suite healthy while leaving Playwright execution to CI/manual dispatch during GitHub free-tier budget mode