feat(provider-review): add authorized GitLab review reads - #5738
Closed
iscekic wants to merge 9 commits into
Closed
Conversation
This was referenced Aug 29, 2026
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summary (commit 567a597)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 567a597)Status: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Reviewed by grok-4.6 · Input: 136K · Output: 15.7K · Cached: 616.4K Review guidance: REVIEW.md from base branch |
This was referenced Aug 30, 2026
This was referenced Aug 30, 2026
Contributor
Author
|
Closing: the owner stopped this workflow section. The branch is retained. |
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.
No new behavior — This change prepares GitLab reviews without changing the app's screens or available actions.
Summary
GitLabReviewAuthorizationbinds personal and organization reads to the exact owner, integration, instance, project, and current actor through the existing credential broker.GitLabUserSchema,GitLabPathSchema, andGitLabProjectSchemavalidate provider data and canonical locations; project tokens keep unknown scopes instead of inheriting integration grants.Old integration records retain the default instance and stored authentication type; inactive integrations require reconnection, and mismatched identities fail.
Files
apps/web/src/lib/provider-review/gitlab-authorization.ts— Added source, +227/−0 lines. Adds OAuth, personal access token, and exact project-token selection, plus current-actor lookup and project resolution. Preserves nested paths and configured instance subpaths, validates canonical links, and restricts avatars tohttps. Delegates membership, blocked-user, ownership, and expiry checks to the interactive client.apps/web/src/lib/provider-review/gitlab-authorization.test.ts— Added tests, +253/−0 lines. Adds the focused authorization suite.The read-only GitLab adapter populates the existing
ReviewInbox,ReviewOverview,ReviewPage,ReviewFile,ReviewFileContext,ReviewThread,ReviewRevision,ReviewCursor, andReviewCapabilitycontracts.These reads cover scoped inboxes, overviews, checks, files, diff versions, immutable context, and discussions without public routes, provider writes, or mobile rendering.
Legacy automatic-merge metadata remains supported; callers must handle scoped cursors, revision conflicts, unfinished versions, response limits, inherited nullable counts, and uncertain capabilities.
Files
apps/web/src/lib/provider-review/gitlab-read.ts— Added source, +1,251/−0 lines. Defaults personal inboxes to reviewer assignments, supports author filtering, and requires repository scopes for organization and project-token inboxes. Validates exact review identities and canonical links, including closed reviews. Binds 25-item pages to the actor, credential, authorization, query, and revision, with a 100-page limit and bounded responses. Normalizes current pipelines, commit statuses, approvals, requested changes, merge methods, squash policy, restrictions, and evidence-based permissions and recovery. Preserves pre-17.11 automatic-merge metadata and keeps absent version, license, or permission evidence unknown. Validates current and historical diff completion, version identity, and revision consistency. Unfinished versions returntemporarily_unavailable; overflow returnsresponse_too_large, and stale revisions returnconflict. Completed empty versions retain empty pages and numeric zero totals. Preserves old/new paths, file status, binary/truncated/unavailable content, and unknown additions/deletions through the existing nullable totals. Verifies diff membership and fork access before fetching immutable context; validates path, commit, base64, size, and text, with a 500-line limit. Maps comments, reaction counts, multiline anchors, file discussions, resolution, outdatedness, and per-thread resolve/reopen capabilities. Rechecks revisions after composite reads, rejects incomplete pagination, and limits discussion pages to 100 notes.apps/web/src/lib/provider-review/gitlab-read.test.ts— Added tests, +1,446/−0 lines. Adds read fixtures and regressions for unfinished/completed versions, overflow, stale revisions, excluded patches, and inherited nullable counts.Tests: 2 files added —
gitlab-authorization.test.tsandgitlab-read.test.ts, totaling 1,699 added lines.Generated: 0 files changed.
Visual Changes
Visual Changes: N/A
Verification
Reviewer Notes
Human steps
Automated evidence
Scope and inventory
Kilo-Org/cloud; worktree:/Users/igor/Projects/.worktrees/mobile-provider-parity-1d93.mobile-provider-parity-1d93-s8...mobile-provider-parity-1d93-s9.Notes
E2E: bot-e2e — cumulative runtime verification is pending until the remaining section levels land.
Stacked PRs — merge bottom to top. Each level shows only its own diff.
Runtime verification (E2E, user advocacy, simplify) runs on the tip PR over every level.
Every level keeps its own checks, its own bot review, and its own threads; each one is answered on its own PR.
Each level is its own deliverable: it builds and passes its own checks alone.
A finding on a level is repaired on that level, then carried upward with stack.sh forward.
mobile-provider-parity-1d93-s1— feat(provider-review): add shared identity and stack checks #5663mobile-provider-parity-1d93-s2— feat(provider-review): define review contracts and vocabulary #5665mobile-provider-parity-1d93-s3— feat(provider-review): add safe provider SDK boundaries #5689mobile-provider-parity-1d93-s4— feat(git-token): authorize exact provider review resources #5692mobile-provider-parity-1d93-s5— feat(cloud-agent): preserve provider identity through checkout #5700mobile-provider-parity-1d93-s6— feat(provider-review): expose exact repositories and branches #5705mobile-provider-parity-1d93-s7— feat(mobile): preserve provider launch and recent identity #5711mobile-provider-parity-1d93-s8— feat(mobile): select exact provider repositories and branches #5729mobile-provider-parity-1d93-s9— feat(provider-review): add authorized GitLab review reads #5738 ← this PRmobile-provider-parity-1d93-s10— feat(provider-review): add authorized Bitbucket review reads #5745mobile-provider-parity-1d93-s11— feat(provider-review): add reconciled GitLab review actions #5748mobile-provider-parity-1d93-s12— feat(provider-review): add Bitbucket review actions and recovery #5756mobile-provider-parity-1d93-s13— feat(provider-review): expose the neutral review facade #5763 (tip)