Record a review verdict on a pull request
Code Mode: praxis.devops.pullRequests.recordVerdict
HTTP: POST /devops/v1/pull-requests/{id}:recordVerdict
Record a reviewer’s verdict on a pull request, after the fact (Sean 2026-11-24). The merge gate no longer waits for it: exposure-judged is decided by machine from the declaration for every kind of exposure, so a pull request merges without any verdict. This call is the review record — send result passed or failed with reason saying in a sentence a reviewer can act on why. It is stored on the pull request as review and announced with the event devops.pullRequest.reviewed. A failed verdict on an already merged pull request is a finding for follow-up (the event says finding true): the merge stands, nothing is un-merged, and a rollback or a fix is asked for on the ticket. headSha must be the pull request’s head, and a verdict for another commit is refused with INVALID_ARGUMENT. List the merged pull requests nobody reviewed with pullRequests.list reviewed=false.
Signature
praxis.devops.pullRequests.recordVerdict(args:{path:{/** e.g. "pr_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string};body:{/** The pull request being judged: the same pr_… id the path carries, repeated here because this call reads it from the body. e.g. "pr_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ pullRequest:string;/** The commit this judgement is about, which must be the pull request's current head; a verdict for any other commit is refused with INVALID_ARGUMENT, because a ju e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ headSha:string;/** The judgement itself. e.g. "passed" */ result:"passed"|"failed";/** Why, in a sentence a reviewer can act on; it becomes the message of the gate's exposure-judged check and is what the next reader of the gate sees. e.g. "read the diff line by line; the fallback path is safe." */ reason?:string}}):Promise<{/** The pull request's platform id (pr_…), which the retrieve, rerunGate, merge and recordVerdict calls address; it is not GitHub's pull request number. e.g. "pr_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** The resource type of this answer, always pull_request. */ object:"pull_request";/** RFC 3339 UTC time this platform first projected the pull request. e.g. "2026-11-08T06:30:00Z" */ createTime:string;/** RFC 3339 UTC time GitHub last moved the pull request; the list is ordered by this, newest first. e.g. "2026-11-08T07:02:00Z" */ updateTime:string;/** Canonical Console link for the pull request's project. e.g. "https://console.deepraxis.com/devops/dvp_01m6j8swzteapw2j5sh4" */ viewerUrl:string;/** The project the pull request belongs to, from the project list. e.g. "dvp_01m6j8swzteapw2j5sh4" */ project:string;/** GitHub's own pull request number in the bound repository, which is what the filter number= and the GitHub web address use. e.g. 4135 */ number:number;/** One line saying what the change proposes, exactly as GitHub holds it. e.g. "feat(devops): an environment rolls back to versions it ran before" */ title:string;/** The description as written on GitHub, which is where the praxis declaration block lives; null when nothing was written. e.g. "Closes #1529" */ body?:string|null;/** The people asked to review, and the state of each one's latest review. */ reviewers:Array<{/** The reviewer's GitHub login; it is what the list's reviewer= filter matches. e.g. "sean" */ login:string;/** Where that reviewer stands: still asked and unanswered, or the conclusion of their latest review. e.g. "requested" */ state:"requested"|"approved"|"changes_requested"|"commented"}>;/** GitHub's own address for the pull request, derived from the project's bound repository; empty when the project is bound to none. e.g. "https://github.com/deepraxis/praxis/pull/4135" */ htmlUrl:string;/** Where the pull request stands: still open, merged, or closed without merging. e.g. "open" */ state:"open"|"merged"|"closed";/** True while GitHub holds it as a draft; a draft is still projected and gated but is not something to merge. e.g. false */ draft:boolean;/** The branch the change comes from and the commit the gate and every check are about. */ head:{/** The head branch's name on GitHub. e.g. "feat/run-page-v2" */ ref:string;/** The head commit, which is what headSha and the gate refer to; a new commit here starts a new gate. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ sha:string};/** The branch the change would land on and the commit it was compared against. */ base:{/** The base branch's name on GitHub, for example main. e.g. "main" */ ref:string;/** The base commit GitHub compared the head against; a merge uses the head, never this. e.g. "c8a9a1cf2f1e0d9c8b7a6f5e4d3c2b1a0f9e8d7c" */ sha:string};/** The paths the change touches, which is what the affected-test rule reads to decide which tests a commit needs. */ changedPaths:{/** The repository paths the change touches. e.g. ["services/devops/src/source/gate-run.ts"] */ paths:Array<string>;/** True when GitHub's comparison was cut at its file limit, so paths is known to be incomplete. e.g. false */ truncated:boolean};/** Who opened the change, and whether that account is a person, an agent or a bot. */ author:{/** The author's GitHub login. e.g. "sean" */ login:string;/** What the author's GitHub account is, so an agent's or bot's change can be told from a person's. e.g. "user" */ kind:"user"|"agent"|"bot"};/** The mergeability word, an open set. e.g. "clean" */ mergeableState:string;/** Who this pull request's letters go to — the gate verdict, the merge, the deploy to each integration environment and an integration failure — as the description' e.g. "agent:agent_ebe8605d-0416-4041-b37f-d677be17b91b" */ notify?:string;/** The exposure the description's praxis block declares, or null when the description declares none — which is itself a failed gate check. */ exposure:{/** Which of the four exposures this is; it decides which gate checks the change must satisfy. e.g. "direct" */ kind?:"flag"|"unwired"|"expand-contract"|"direct";/** Why this exposure is the right one, written for unwired and expand-contract; empty for a flag. e.g. "nothing reads it yet" */ reason?:string;/** The flag's key, present only for a flag exposure; it is what the registry and the paired scenarios are checked against. e.g. "run-page-v2" */ flagKey?:string;/** What the flag is for, present only for a flag exposure. e.g. "release" */ flagKind?:"release"|"experiment"|"ops"|"permission";/** RFC 3339 UTC time the flag must be decided by, present only for a flag exposure; an observation that quietly outlives it is a firing condition. e.g. "2026-12-15T23:59:59Z" */ observeUntil?:string;/** Which phase of an expand-contract move this change is, present only for that kind. e.g. "expand" */ phase?:"expand"|"migrate"|"contract"}|{/** Which of the four exposures this is; it decides which gate checks the change must satisfy. e.g. "direct" */ kind?:"flag"|"unwired"|"expand-contract"|"direct";/** Why this exposure is the right one, written for unwired and expand-contract; empty for a flag. e.g. "nothing reads it yet" */ reason?:string;/** The flag's key, present only for a flag exposure; it is what the registry and the paired scenarios are checked against. e.g. "run-page-v2" */ flagKey?:string;/** What the flag is for, present only for a flag exposure. e.g. "release" */ flagKind?:"release"|"experiment"|"ops"|"permission";/** RFC 3339 UTC time the flag must be decided by, present only for a flag exposure; an observation that quietly outlives it is a firing condition. e.g. "2026-12-15T23:59:59Z" */ observeUntil?:string;/** Which phase of an expand-contract move this change is, present only for that kind. e.g. "expand" */ phase?:"expand"|"migrate"|"contract"};gate:{/** The gate's verdict: failed as soon as one check failed, pending while one is still undecided, passed only when every check passed or was skipped. e.g. "pending" */ state:"pending"|"passed"|"failed";/** The commit this gate is about. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ headSha:string;/** Every check the gate made, in the order it made them. */ checks:Array<{/** Which check this is: the declaration itself, one of the flag duties, the affected tests, or the one judgement only a person makes. e.g. "tests" */ name:"exposure-declared"|"flag-registered"|"flag-paired-scenarios"|"removal-ticket"|"tests"|"lockfile"|"exposure-judged"|"owner-approved"|"repo-lint";/** The check's verdict: skipped means the check does not apply to this exposure kind, and pending means its evidence has not arrived yet — which is never treated a e.g. "pending" */ result:"passed"|"failed"|"skipped"|"pending";/** What to do about a failed or pending check, or the gatekeeper's reason for a judgement; absent when the check simply passed. e.g. "no test run has reported for this head commit" */ message?:string;/** Who decided this check: a machine reading the facts, or the one check a person answers. e.g. "machine" */ by:"machine"|"gatekeeper"}>;/** GitHub's id of the "Praxis DevOps / gate" check run this gate reports through, present once GitHub accepted the report. e.g. 1042 */ checkRunId?:number;/** RFC 3339 UTC time the gate first reached passed or failed on this commit; absent while it is pending, and it does not move when the same verdict is recomputed. e.g. "2026-11-08T07:10:00Z" */ decideTime?:string};/** The tickets the description names, split by what it says about them. */ tickets:{/** Tickets the description closes, named as a URL or #number. e.g. ["#1529"] */ closes:Array<string>;/** Tickets the description merely refers to. e.g. ["#1511"] */ refs:Array<string>};/** Where the pull request stands in its (project, base) merge queue; none means it is not in a queue. */ queue:{/** The queue's state for this pull request. e.g. "none" */ state:"none"|"queued"|"building"|"dequeued";/** Why it left the queue, when it was dequeued for a reason worth keeping. e.g. "conflict with the base" */ reason?:string;/** The temporary merge-group commit GitHub built for it, present once the queue is building; the gate is re-decided on this commit. e.g. "5a3b0d2e9f8c7b6a5d4e3f2a1b0c9d8e7f6a5b4c" */ mergeGroupHead?:string;gate?:{/** The gate's verdict: failed as soon as one check failed, pending while one is still undecided, passed only when every check passed or was skipped. e.g. "pending" */ state:"pending"|"passed"|"failed";/** The commit this gate is about. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ headSha:string;/** Every check the gate made, in the order it made them. */ checks:Array<{/** Which check this is: the declaration itself, one of the flag duties, the affected tests, or the one judgement only a person makes. e.g. "tests" */ name:"exposure-declared"|"flag-registered"|"flag-paired-scenarios"|"removal-ticket"|"tests"|"lockfile"|"exposure-judged"|"owner-approved"|"repo-lint";/** The check's verdict: skipped means the check does not apply to this exposure kind, and pending means its evidence has not arrived yet — which is never treated a e.g. "pending" */ result:"passed"|"failed"|"skipped"|"pending";/** What to do about a failed or pending check, or the gatekeeper's reason for a judgement; absent when the check simply passed. e.g. "no test run has reported for this head commit" */ message?:string;/** Who decided this check: a machine reading the facts, or the one check a person answers. e.g. "machine" */ by:"machine"|"gatekeeper"}>;/** GitHub's id of the "Praxis DevOps / gate" check run this gate reports through, present once GitHub accepted the report. e.g. 1042 */ checkRunId?:number;/** RFC 3339 UTC time the gate first reached passed or failed on this commit; absent while it is pending, and it does not move when the same verdict is recomputed. e.g. "2026-11-08T07:10:00Z" */ decideTime?:string}};/** The change's progress through the delivery environments, in order. */ delivery:{/** One entry per environment the change has reached, in environment order. */ stages:Array<{/** The environment's name, from the project's environment list. e.g. "develop" */ environment:string;/** How far the change has got in that environment. e.g. "healthy" */ state:"pending"|"deployed"|"observing"|"healthy"|"rolled_back";/** The release deployed there, when one has been. e.g. "rls_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ release?:string;/** RFC 3339 UTC time that environment reached this state. e.g. "2026-11-08T07:20:00Z" */ time?:string}>};review?:{/** passed when the reviewer found nothing wrong, failed when they found something to fix or roll back. e.g. "failed" */ result:"passed"|"failed";/** What the reviewer found, in a sentence a reader can act on. e.g. "The retry loop does not stop on a 4xx answer." */ reason:string;by:{/** What sort of actor this is, which decides how the id should be read. e.g. "user" */ kind:"user"|"agent"|"system";/** Identifier of the actor within its kind, such as a user id for a person. e.g. "usr_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** Display name for the actor at the time, so a record reads the way it did when it was written; absent when none was known. e.g. "Sean" */ label?:string};/** The commit the review is about. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ headSha:string;/** RFC 3339 UTC time the verdict was recorded. e.g. "2026-11-24T09:30:00Z" */ time:string;/** True when the pull request had already merged when the verdict was recorded; a failed verdict with merged true is a finding. e.g. true */ merged:boolean};/** The commit it landed as, present only once it is merged. e.g. "c8a9a1cf2f1e0d9c8b7a6f5e4d3c2b1a0f9e8d7c" */ mergeCommitSha?:string;/** RFC 3339 UTC time it was merged, present only once it is merged. e.g. "2026-11-04T02:00:00Z" */ mergeTime?:string;/** RFC 3339 UTC time it was closed without merging, present only when it was closed that way. e.g. "2026-11-04T02:00:00Z" */ closeTime?:string;/** The affected test runs reported at the head commit, newest first; present only when the read asked for expand=runs. */ runs?:Array<string>}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | The pull request’s platform id (pr_…) from a pull request list, not GitHub’s pull request number; the retrieve, rerunGate, merge and recordVerdict calls all address the pull request by it. |
Request body
| Required | Content types | Description |
|---|---|---|
| yes | application/json |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | The pull request with the review recorded on it; its gate is unchanged. |
| 400 | application/json | INVALID_PARAMS or INVALID_ARGUMENT means a field, query value or identifier violates the documented format or range — an unknown enum value, a pageSize outside 1..100, an unsupported filter or orderBy field, or an id with the wrong prefix. Correct the named input; nothing was read or written. |
| 401 | application/json | The API key is missing or invalid; send a valid Praxis API key in the Authorization header before retrying. |
| 403 | application/json | The credential carries no organization, or that organization cannot reach this project; use a key belonging to the project’s organization. No cross-organization read is possible. |
| 404 | application/json | PULL_REQUEST_NOT_FOUND means no pull request with that id is visible to this organization — one of another organization is never readable; list the project’s pull requests and use an id from that answer. |
| 500 | application/json | INTERNAL means the service could not complete the request; retry once, and if it repeats report the request id. A read is safe to repeat; a write that failed this way should be re-read before it is sent again. |