Skip to content

feat(search): add GitLab group sources with per-project permissions - #10107

Merged
waleedlatif1 merged 4 commits into
stagingfrom
codex/gitlab-group-search
Nov 17, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
codex/gitlab-group-search

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add a GitLab group scope to Search, with optional subgroups and separate permissions for every project. Keep the existing project source format and permission-upload API unchanged.
  • Discover canonical projects with bounded pagination, exclude shared projects outside the group, and refresh discovery when CSV permissions are replaced. Fail incomplete discovery before changing grants.
  • Reuse live project search/read and revision checks, with per-user filtering, revocation, stable pagination, and canonical identity checks.
  • Extend the permission exporter and CI documentation to generate both CSVs for a group.

Product update

Admins can connect a GitLab group once instead of adding each project. Search remains live and only searches projects allowed for the current user. Create group sources after the app deployment completes; existing project sources and CI jobs continue unchanged. GitLab setup guide

Type of Change

  • New feature
  • Documentation

Testing

  • 162 focused connector, live-search, application, and orchestration tests passed; existing setup UI tests also passed.
  • Eight real Postgres/HTTP integration tests passed: per-user isolation, revocation, identity changes, stale cursors, revision conflicts, failure atomicity, admin authorization, existing-source/CI compatibility, settings updates without indexing, invalid-ID rejection, revoked credentials, changed group identity, and search rate-limit/reconnect reporting.
  • 27 HTTPS exporter checks passed, including pagination, subgroup scope, duplicate identities, incomplete discovery, partial failures, and CSV parser round trips.
  • 23 setup/catalog tests passed, including regression controls for scope switching and keeping Search-only settings out of the KB API/CLI catalog.
  • Regression controls fail when scope/context/scheduling guards are removed or subgroup options are forced.
  • The docs compatibility inventory adds the group CI example and updates the manifest hash for the integration-count correction already in staging; existing examples and anchors are preserved.
  • Root lint, all 64 audits, workspace type-checking, test-type ratchet, and block-registry check passed. Generated artifacts are current. Full suites run in CI.
  • Provider responses in the end-to-end tests use local HTTP/HTTPS fixtures; this does not claim validation against a live GitLab installation.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 17, 2026 2:40am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; no actionable new defects were identified.

Summary

Adds GitLab group sources to Search while keeping ordinary knowledge-base ingestion project-scoped.

  • GitLab Search can use a group as one source.
  • Group searches follow each user’s project access.
  • The GitLab exporter builds permission CSVs for groups.

No actionable new findings were identified. No previous review threads were supplied. Review checks were based on source code; tests were not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Admin configures group] --> B[Discover canonical projects]
  B --> C[Save scope and per-project grants]
  D[User searches or reads] --> E[Load current scope and reader grants]
  C --> E
  E --> F[Check group identity]
  F --> G[Check selected project identity and access]
  G --> H[Return permitted content and continuation cursor]
Loading

Reviews (4) · Last reviewed commit: "fix(search): preserve connector setup co..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 28 files

This PR changes authentication, authorization, or input validation. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 34 files

Confidence score: 4/5

  • In apps/sim/connectors/gitlab/gitlab.ts, group validation trusts the saved scope, so access updates can succeed with a revoked token or a moved group. Revalidate the current token and group identity when saving.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/connectors/gitlab/gitlab.ts">

<violation number="1" location="apps/sim/connectors/gitlab/gitlab.ts:1347">
P2: Group validation accepts the saved scope without revalidating the current GitLab token or group identity. Saving group settings through the access-update path can therefore succeed with a revoked token or moved group, leaving the source broken until a later sync/search; re-run bounded group discovery with `accessToken` before returning success.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/connectors/gitlab/gitlab.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 34 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 force-pushed the codex/gitlab-group-search branch from c52bb1c to accb5bb Compare November 17, 2026 02:34
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 38 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 00209a0 into staging Nov 17, 2026
82 of 84 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/gitlab-group-search branch November 17, 2026 02:40

This branch was successfully deployed

1 active deployment
Preview — accb5bb2 Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant