Multi-profile embedding serving, FTS deprecation cleanup, doctor --fix#114
Merged
Conversation
gitsema tools serve can now host several named embedding profiles at once. Repos pin to a profile forever at first index via remote-index --profile; servers with no profiles configured behave exactly as before. Adds schema v32 (repos.profile_name), profile routing/conflict handling on POST /remote/index, and gitsema repos info. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01XaRDTbabmfzyo6EXzB53LD
No index database predating Phase 11 remains in active use, so the Git-refetch behavior backfill-fts provided is no longer needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01XaRDTbabmfzyo6EXzB53LD
…eddings Folds the manual fixes doctor already recommends (index rebuild-fts / index backfill-fts / index gc) into a single --fix flag that runs them when the corresponding issue is detected and re-reports health. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01XaRDTbabmfzyo6EXzB53LD
- Export PROFILE_NAME_RE from profiles.ts and reuse it in remoteIndex.ts and server/routes/remote.ts instead of duplicating the regex literal. - doctor.ts: remove the now-redundant rebuildFts() call after backfillFts() (which already inserts directly into blob_fts), and factor the FTS/orphan-embedding print logic into a shared printFtsAndOrphanCounts() helper used for both the initial and post-fix reports. - Update docs/PLAN.md Phase 131 and the doctor-fix-flag changeset to match the simplified --fix behavior. - Document two skipped /simplify findings (doctor --fix generalization into a fix registry; ephemeral remote-index job profile routing parity) in docs/feature-ideas.md. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01XaRDTbabmfzyo6EXzB53LD
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…tion test afterAll's rmSync of the temp repo dir can hit a transient lock from the git subprocesses spawned in beforeAll on Windows runners — same pattern already handled in profileFirstRun.test.ts. Cleanup is best-effort, not test-critical, so swallow the error instead of failing the suite. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01XaRDTbabmfzyo6EXzB53LD
3 tasks
Fix Windows EBUSY flake in doctorFix integration test
Runs `pnpm install` at the start of every Claude Code on the web session (gated on $CLAUDE_CODE_REMOTE so it's a no-op locally), so tests/build work without a manual install step. Unignore .claude/hooks/ and .claude/settings.json so they ship with the repo. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01XaRDTbabmfzyo6EXzB53LD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
repos.profile_namecolumn (schema v32) pins an embedding profile (speed/balanced/quality) at first index per repo;buildProfileProviderMapresolves per-repo provider pairs on the server (src/server/routes/remote.ts), with ephemeral (non-persisted) jobs falling back to a default profile.gitsema index backfill-ftsin favor ofgitsema index rebuild-fts— no pre-Phase-11 index databases remain in active use, sorebuild-fts(re-syncingblob_ftsfrom already-stored content) now covers all FTS maintenance.backfill-ftskeeps working as a hidden, deprecated alias.gitsema index doctor --fix: auto-repairs missing FTS5 content (viabackfillFts()) and orphan embeddings (viarunGarbageCollection()) whenindex doctordetects them, then re-reports index health — no need to chainindex rebuild-fts/index gcmanually./simplify): dedup the profile-name validation regex (PROFILE_NAME_RE, now exported fromprofiles.tsand reused inremoteIndex.ts/remote.tsinstead of three copy-pasted literals); drop a redundant FTS rebuild call indoctor.ts --fix(backfillFts()already writesblob_ftsdirectly); factor the duplicated FTS/orphan-count print logic intoprintFtsAndOrphanCounts().README.md,CLAUDE.md,docs/parity.md,docs/features.md,docs/PLAN.md(Phase 128 deviations + new Phase 131),docs/deprecations.md,docs/feature-ideas.md(two findings deferred from the simplify pass — fix-registry generalization fordoctor --fix, and ephemeral-job profile-routing parity).doctor --fix).Test plan
pnpm build— cleanpnpm test— 1333 passed, 22 skipped (114/116 files, 2 skipped)tests/integration/doctorFix.integration.test.tscovers--fixbackfilling FTS content and re-reporting healthtests/embeddingProfiles.test.ts, expandedtests/remoteIndexPersistence.test.tscover profile resolution/persistenceGenerated by Claude Code