Implement DiffKit repo search MVP on Cloudflare + Livegrep#175
Draft
Implement DiffKit repo search MVP on Cloudflare + Livegrep#175
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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
Implements the RFC MVP for multi-repo search using Cloudflare as control plane and Livegrep as data plane, including Worker APIs, D1 metadata/job/index tables, queue consumers/producers, cron-driven sync orchestration, and a new self-hosted
apps/searchservice for VPS deployment.Also adds explicit OSS/self-host deployment docs with:
Changes
search_repo_registrysearch_jobssearch_index_buildsapps/dashboard/src/lib/search-worker.ts) with:GET /api/searchPOST /api/search/reposGET /api/search/repos/:id/statusNOT_INDEXEDhandling + interactive bootstrap enqueue + ETA bucketsresults,repo_status,partial,trace_id)sync/indexjobsentry-worker.ts:fetchrouting for/api/search*queuehandler for search jobsscheduledhandler for periodic sync/cleanupsrc/env.d.tsfor Livegrep/search-control/queues/R2.wrangler.jsonc.examplewith queue producer/consumer bindings, cron trigger, search artifacts R2 bucket, and search vars.New
apps/searchservice (self-hosted)Added a new Node/TypeScript app intended for VPS/private deployment:
apps/search/src/server.tsGET /healthzGET /api/v1/search(proxy to Livegrep upstream)POST /internal/repos/sync(auth-protected)POST /internal/index/build(auth-protected)apps/search/src/repo-sync.tsapps/search/src/index-build.tsapps/search/src/state.tsapps/search/src/livegrep-client.tsapps/search/src/config.tsapps/search/README.md,.env.example,Dockerfile,.dockerignoreDocumentation updates
apps/search/README.mdwith:apps/searchlocal run commands/healthz,/api/v1/search, internal sync/index)README.mdfor OSS users.Open-question defaults from RFC were applied:
interactivejobs immediately.Test Plan
pnpm --filter @diffkit/dashboard check-typespnpm --filter @diffkit/dashboard exec biome check src/lib/search-worker.ts src/entry-worker.ts src/db/schema.ts src/env.d.tspnpm --filter @diffkit/search check-typespnpm --filter @diffkit/search checkScreenshots