feat(search): add GitHub installation indexing - #7694
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR adds GitHub App installation-backed indexing for organization Search while retaining per-reader GitHub authorization.
Confidence Score: 5/5The PR appears safe to merge; no new actionable defects remain, and both previously reported access failures are manually resolved and fixed in the current code. The current implementation authorizes bounded candidate sets without the former 100-source cutoff and retains completed repository grants when another source reaches its independent deadline. The changes since the previous review primarily relocate and clarify documentation plus stabilize an asynchronous test assertion, with no resulting correctness or rule-compliance issue.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/knowledge/access/github-installation.ts | Implements bounded, per-source live GitHub authorization and preserves completed grants when another source stalls. |
| apps/sim/lib/knowledge/search/queries.ts | Ranks opaque candidates before live authorization, then hydrates only results allowed by the full predicate. |
| apps/sim/lib/knowledge/read-access.ts | Streams bounded connector authorization batches for document lists, counts, tags, and bulk operations. |
| apps/sim/lib/oauth/github-installation.ts | Validates App configuration, installation ownership and state, and mints repository-scoped installation tokens. |
| apps/sim/lib/knowledge/application/github-installation-source.ts | Restricts installation indexing to organization member-mode Search and binds sources to provider-attested repository identities. |
| apps/sim/app/api/knowledge/github/installations/route.ts | Exposes authenticated, rate-limited installation list/connect endpoints with safe response projections. |
| apps/docs/content/docs/platform/self-hosting/integrations-oauth.mdx | Documents GitHub App registration, permissions, environment configuration, and replacement procedure. |
Sequence Diagram
sequenceDiagram
participant Admin
participant Sim
participant GitHub
participant Index
participant Reader
Admin->>Sim: Connect personal GitHub account
Sim->>GitHub: List installations administered by user
Admin->>Sim: Select installation and repository
Sim->>GitHub: Verify installation and immutable repository ID
Sim->>Index: Index through repository-scoped installation token
Reader->>Sim: Search or open indexed content
Sim->>GitHub: Verify reader repository access and installation state
GitHub-->>Sim: Current authorization result
Sim->>Index: Load content under full ACL predicate
Index-->>Reader: Return only authorized content
Reviews (3): Last reviewed commit: "fix(search): clarify public setup docume..." | Re-trigger Greptile
064317c to
10f5c42
Compare
|
@cubic-dev-ai review this PR |
@icecrasher321 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@icecrasher321 I have started the AI code review. It will take a few minutes to complete. |
Summary
Type of Change
Testing
Checklist