Repository navigation
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 42dff35. Configure here.
There was a problem hiding this comment.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Beyond the inline finding, I checked the agent-turn allowlist change in mr.go. reviews only looks up the MR and calls ListMergeRequestReviews, so it makes no changes. review and withdraw-review are still blocked for turn tokens.
Extended reasoning...
The change adds three depot mr review commands, regenerated proto and connect bindings, and adds reviews to the read-only commands that agent-turn tokens may run. The permission surface is that allowlist, and the new entry maps to a list-only RPC that is covered in sandbox_test.go.
There was a problem hiding this comment.
Stale comment
[!NOTE]
🤖 Cursor Grok 4.6 responding on behalf of Cursor Approval AgentRisk: medium. Left a non-blocking comment; this automation did not approve. Cursor Bugbot completed with one unresolved finding that
depot mr reviewcan target a closed or merged merge request. Human review is needed and no reviewers were assigned.Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
I re-reviewed after the latest commit and didn't find any new bugs. mr review now runs requireState(OPEN) before submitting, unless both --request-key and --expected-head-oid were given for an explicit retry. A human look is still worthwhile because this adds reviews to the agent-turn allowlist and adds three new mutation/list RPCs that depend on the server deploy order.
What was reviewed:
- The turn-token allowlist in mr.go: only
reviewswas added, it uses ResolveTurnReadAuth, and the error text and sandbox_test.go match. - review.go: the exactly-one-verdict check, the body requirement, head and key validation, random key generation, and the response-vs-request checks on submit and withdraw. Server strings go through printable().
mr reviewschecks the --limit bounds and rejects any review whose MR id differs from the requested MR.
Extended reasoning...
The change adds three new MergeRequestService RPCs, with their proto, regenerated Go bindings and three CLI subcommands, and extends the agent-turn token allowlist to include mr reviews. The security-sensitive part is that allowlist: turn tokens may now run one more read-only command, while submit and withdraw stay limited to user auth. The earlier inline concern about reviewing non-open MRs is handled in the latest commit by requireState, with an exception only for explicit retries. I deferred instead of approving because the diff is large (about 1.7k lines, mostly generated), it changes permission gating, and it depends on coordinated API and database deploys that this review cannot verify.
|
Note 🤖 GPT-6 Astra responding on behalf of ImLunaHey Closing this implementation because we are using Depot's existing comments, approvals/withdrawal and automated review checks. The separate human-review model and its schema-dependent commands/RPCs are no longer in scope. Database PR #845 is closed; no new review schema should be deployed. The T3 adapter is being returned to the existing released commands. |



The CLI currently lacks a way to submit a human review with a summary and verdict, request changes, or read and withdraw review history. Add
depot mr reviewwith--comment,--approve, or--request-changes, plusdepot mr reviewsanddepot mr withdraw-review.Normal CLI use does not require
--expected-head-oidor--request-key: the command captures the current head and generates a retry key. Failed submissions include the head and key for safely retrying an uncertain response. Existing approval and comment commands remain supported, and request-changes is advisory with no new merge gate.Deploy database#845, then api#7087, before releasing this CLI.
Validation: full Go test suite, final focused MR/root tests, golangci-lint (zero issues), binary build and command help. Protocol bindings were regenerated from the API change.
Part of DEP-8718. T3 integration remains local.
Created with GPT-6 Astra in Codex.
Catch up on this pull request in Depot
Note
Medium Risk
Touches merge-request mutation paths and auth (turn-token allowlist); behavior is well covered by CLI tests but depends on coordinated API/database deploy.
Overview
Adds human review support to the Depot CLI:
depot mr review(approve, request-changes, or comment with optional body),depot mr reviews(paginated history), anddepot mr withdraw-review.Submission pins the MR head (defaulting to current head), generates an idempotent
--request-keyfor retries, and requires an explicit--expected-head-oid+ request-key to replay after uncertain API responses or on closed/merged MRs. Agent turn tokens may list reviews but not submit or withdraw.The change also extends the v1beta2 merge request API (proto + Connect client) with submit/list/withdraw review RPCs,
MergeRequestReviewtypes, and extra viewer permissions /GetMergeRequestflags for human review state.Reviewed by Cursor Bugbot for commit 111a839. Bugbot is set up for automated code reviews on this repo. Configure here.