syntax = "proto3"; package state.v1; service ReviewService { // RespondReviewGate is the operator's answer to the review gate // (docs/prds/pr-review-operator-response.md, Decision 2): one guarded // requeue that records the answer, increments rereview_rounds for a // re-review, and refuses a re-review past cap with the ErrRereviewCapReached // wire sentinel. Admin-only, like every other operator surface: a // task-scoped grant never reaches it. rpc RespondReviewGate(RespondReviewGateRequest) returns (RespondReviewGateResponse); rpc BeginRemediation(BeginRemediationRequest) returns (BeginRemediationResponse); rpc UpdateReviewPayload(UpdateReviewPayloadRequest) returns (UpdateReviewPayloadResponse); rpc SetReviewCursors(SetReviewCursorsRequest) returns (SetReviewCursorsResponse); } message RespondReviewGateRequest { int64 task_id = 1; string from_status = 2; // gate is the whole review_gate document the caller computed: the offer // with the answer filled in. The store persists it unread. string gate = 3; // rereview increments rereview_rounds in the same write; an approve must // pass false and bumps nothing. bool rereview = 4; // cap is the domain's re-review bound (prreview.MaxRereviewRounds). It // crosses so the guard is enforced where the row is locked rather than by // the caller's stale read. int64 cap = 5; } message RespondReviewGateResponse {} message BeginRemediationRequest { int64 task_id = 1; string payload = 2; } message BeginRemediationResponse {} // UpdateReviewPayloadRequest merges payload's comments into the unclaimed // review unit with the same review id, active or pending. message UpdateReviewPayloadRequest { int64 task_id = 1; string payload = 2; } message UpdateReviewPayloadResponse {} message SetReviewCursorsRequest { int64 task_id = 1; int64 review_cursor = 2; int64 comment_cursor = 3; } message SetReviewCursorsResponse {}